diff options
Diffstat (limited to 'pharo-mooc/tiny-blog/src/TinyBlog-Components/TBScreenComponent.class.st')
| -rw-r--r-- | pharo-mooc/tiny-blog/src/TinyBlog-Components/TBScreenComponent.class.st | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pharo-mooc/tiny-blog/src/TinyBlog-Components/TBScreenComponent.class.st b/pharo-mooc/tiny-blog/src/TinyBlog-Components/TBScreenComponent.class.st new file mode 100644 index 0000000..ef15b8f --- /dev/null +++ b/pharo-mooc/tiny-blog/src/TinyBlog-Components/TBScreenComponent.class.st @@ -0,0 +1,37 @@ +Class { + #name : 'TBScreenComponent', + #superclass : 'SBSRootComponent', + #instVars : [ + 'header' + ], + #category : 'TinyBlog-Components', + #package : 'TinyBlog-Components' +} + +{ #category : 'acccessing' } +TBScreenComponent >> blog [ + "Return the current blog. In the future we will ask the + session to return the blog of the currently logged in user." + ^ TBBlog current +] + +{ #category : 'acccessing' } +TBScreenComponent >> children [ + ^ { header } +] + +{ #category : 'initialization' } +TBScreenComponent >> createHeaderComponent [ + ^ TBHeaderComponent from: self +] + +{ #category : 'initialization' } +TBScreenComponent >> initialize [ + super initialize. + header := self createHeaderComponent +] + +{ #category : 'acccessing' } +TBScreenComponent >> renderContentOn: html [ + html render: header +] |
