Class { #name : 'MFTNavbarComponent', #superclass : 'WAComponent', #instVars : [ 'mainNavLinks' ], #category : 'MyFitnessTracker-Web-Components', #package : 'MyFitnessTracker-Web', #tag : 'Components' } { #category : 'instance creation' } MFTNavbarComponent class >> newFrom: anOrderedDictionary [ ^ self new mainNavLinks: anOrderedDictionary; yourself ] { #category : 'initialization' } MFTNavbarComponent >> initialize [ super initialize. mainNavLinks := OrderedDictionary new ] { #category : 'initialization' } MFTNavbarComponent >> mainNavLinks: anOrderedDictionary [ mainNavLinks := anOrderedDictionary ] { #category : 'rendering' } MFTNavbarComponent >> renderContentOn: html [ html navigation: [ html unorderedList: [ mainNavLinks keysAndValuesDo: [ :titleKey :callback | html listItem: [ html anchor callback: callback; with: titleKey capitalized ] ] ]; unorderedList: [ html listItem: [ html anchor callback: [ mainNavLinks at: #logout ]; with: 'Logout' ] ] ] ]