From c03c9f8b886c0e8eca5a701c0ca941e05e0b6285 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 21 Nov 2025 22:20:10 +0100 Subject: Add pharo tiny blog --- .../TinyBlog-Components/TBScreenComponent.class.st | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pharo-mooc/tiny-blog/src/TinyBlog-Components/TBScreenComponent.class.st (limited to 'pharo-mooc/tiny-blog/src/TinyBlog-Components/TBScreenComponent.class.st') 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 +] -- cgit v1.2.3