diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-11-21 22:20:10 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-11-21 22:20:10 +0100 |
| commit | c03c9f8b886c0e8eca5a701c0ca941e05e0b6285 (patch) | |
| tree | 5f27293563caa042b182de97fe59b22e2cbd533a /pharo-mooc/tiny-blog/src/TinyBlog-Components/TBScreenComponent.class.st | |
| parent | c0336dac8effb57c04221f23b72bff70170933c5 (diff) | |
| download | book-exercises-c03c9f8b886c0e8eca5a701c0ca941e05e0b6285.tar.gz | |
Add pharo tiny blog
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 +] |
