diff --git a/repository/Brea/BreaTheme.class.st b/repository/Brea/BreaTheme.class.st new file mode 100644 index 0000000..527b92d --- /dev/null +++ b/repository/Brea/BreaTheme.class.st @@ -0,0 +1,112 @@ +" +I model a web theme. + +For the Collaborators Part: State my main collaborators and one line about how I interact with them. + +Public API and Key Messages + +- message one +- message two +- (for bonus points) how to create instances. + + One simple example is simply gorgeous. + +Internal Representation and Key Implementation Points. + + Instance Variables + name: + preview: + provider: + url: + + + Implementation Points +" +Class { + #name : #BreaTheme, + #superclass : #Object, + #instVars : [ + 'name', + 'provider', + 'url', + 'preview', + 'license' + ], + #category : #Brea +} + +{ #category : #utilities } +BreaTheme >> dashedName [ + ^ self name asDashedLowercase +] + +{ #category : #operation } +BreaTheme >> downloadInto: aFolder [ + | tempName zippedFile | + self url ifNil: [ ^ self ]. + tempName := self name. + zippedFile := aFolder / self dashedName , 'zip'. + aFolder ensureCreateDirectory. + GrafoscopioUtils + downloadingFrom: self url withMessage: 'Downloading ', tempName, '...' into: zippedFile. + ^ zippedFile +] + +{ #category : #installation } +BreaTheme >> installInto: aFolder [ + | zippedFile | + self url ifNil: [ ^ self ]. + zippedFile := self downloadInto: aFolder. + (ZipArchive new readFrom: zippedFile) extractAllTo: aFolder. + ^ aFolder +] + +{ #category : #accessing } +BreaTheme >> license [ + ^ license +] + +{ #category : #accessing } +BreaTheme >> license: anObject [ + license := anObject +] + +{ #category : #accessing } +BreaTheme >> name [ + ^ name ifNil: [ name = 'unamed' ] +] + +{ #category : #accessing } +BreaTheme >> name: anObject [ + name := anObject +] + +{ #category : #accessing } +BreaTheme >> preview [ + ^ preview +] + +{ #category : #accessing } +BreaTheme >> preview: anObject [ + preview := anObject +] + +{ #category : #accessing } +BreaTheme >> provider [ + ^ provider +] + +{ #category : #accessing } +BreaTheme >> provider: anObject [ + provider := anObject +] + +{ #category : #accessing } +BreaTheme >> url [ + ^ url +] + +{ #category : #accessing } +BreaTheme >> url: anObject [ + url := anObject +] diff --git a/repository/Brea/BreaWikiPage.class.st b/repository/Brea/BreaWikiPage.class.st index a020bd2..bfda608 100644 --- a/repository/Brea/BreaWikiPage.class.st +++ b/repository/Brea/BreaWikiPage.class.st @@ -1,5 +1,9 @@ " I model a wiki page of a Brea site. +I am modelled after common wiki pages, where a document in a light markup laguage +is converted in HTML and is expected to access document history (I am helped by +FossilRepo for that). +I can be used for other types of publications, like blog post though. " Class { #name : #BreaWikiPage,