From 60c94d23e5f44188c1016d4adfa4eb3a8e51f340 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 15 Aug 2020 12:23:24 -0500 Subject: [PATCH] Starting modelling available theme packs and providers. --- repository/Brea/BreaTheme.class.st | 66 +++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/repository/Brea/BreaTheme.class.st b/repository/Brea/BreaTheme.class.st index 33b0d7f..89e4526 100644 --- a/repository/Brea/BreaTheme.class.st +++ b/repository/Brea/BreaTheme.class.st @@ -37,6 +37,70 @@ Class { #category : #Brea } +{ #category : #accessing } +BreaTheme class >> availablePacks [ + ^ self downloadLinks keys +] + +{ #category : #utilities } +BreaTheme class >> downloadLinks [ + "Keys are the theme names and values are the url where it can be downloaded + as a zip file. + For the moment we work only with HTML5Up themes, but more could be added + and the code should be refactored accordingly." + | result providerUrl | + result := Dictionary new. + providerUrl := 'https://html5up.net'. + result + at: 'Paradigm Shift' put: providerUrl, '/paradigm-shift/download'; + at: 'Massively' put: providerUrl, '/massively/download'; + at: 'Ethereal' put: providerUrl, '/ethereal/download'; + at: 'Story' put: providerUrl, '/story/download'; + at: 'Dimension' put: providerUrl, '/dimension/download'; + at: 'Editorial' put: providerUrl, '/editorial/download'; + at: 'Forty' put: providerUrl, '/forty/download'; + at: 'Stellar' put: providerUrl, '/stellar/download'; + at: 'Multiverse' put: providerUrl, '/multiverse/download'; + at: 'Phantom' put: providerUrl, '/phantom/download'; + at: 'Hyperspace' put: providerUrl, '/hyperspace/download'; + at: 'Future Imperfect' put: providerUrl, '/future-imperfect/download'; + at: 'Solid State' put: providerUrl, '/solid-state/download'; + at: 'Identity' put: providerUrl, '/identity/download'; + at: 'Lens' put: providerUrl, '/lens/download'; + at: 'Fractal' put: providerUrl, '/fractal/download'; + at: 'Eventually' put: providerUrl, '/eventually/download'; + at: 'Spectral' put: providerUrl, '/spectral/download'; + at: 'Phonon' put: providerUrl, '/photon/download'; + at: 'Highlights' put: providerUrl, '/highlights/download'; + at: 'Landed' put: providerUrl, '/landed/download'; + at: 'Strata' put: providerUrl, '/strata/download'; + at: 'Read Only' put: providerUrl, '/read-only/download'; + at: 'Alpha' put: providerUrl, '/alpha/download'; + at: 'Directive' put: providerUrl, '/directive/download'; + at: 'Aerial' put: providerUrl, '/aerial/download'; + at: 'Twenty' put: providerUrl, '/twenty/download'; + at: 'Big Picture' put: providerUrl, '/big-picture/download'; + at: 'Tessellate' put: providerUrl, '/tessellate/download'; + at: 'Overflow' put: providerUrl, 'overflow/download'; + at: 'Prologue' put: providerUrl, '/prologue/download'; + at: 'Helios' put: providerUrl, '/helios/download'; + at: 'Telephasic' put: providerUrl, '/telephasic/download'; + at: 'Strongly Typed' put: providerUrl, '/strongly-typed/download'; + at: 'Parallelism' put: providerUrl, '/parallelism/download'; + at: 'Escape Velocity' put: providerUrl, '/escape-velocity/download'; + at: 'Astral' put: providerUrl, '/astral/download'; + at: 'Striped' put: providerUrl, '/striped/download'; + at: 'Dopetrope' put: providerUrl, '/dopetrope/download'; + at: 'Miniport' put: providerUrl, '/miniport/download'; + at: 'TXT' put: providerUrl, '/txt/download'; + at: 'Verti' put: providerUrl, '/verti/download'; + at: 'Zerofour' put: providerUrl, '/zerofour/download'; + at: 'Arcana' put: providerUrl, '/arcana/download'; + at: 'Halcyonic' put: providerUrl, '/halcyonic/download'; + at: 'Minimaxing' put: providerUrl, '/minimaxing/download'. + ^ result +] + { #category : #utilities } BreaTheme >> dashedName [ ^ self name asDashedLowercase @@ -116,7 +180,7 @@ BreaTheme >> provider: anObject [ { #category : #accessing } BreaTheme >> url [ - ^ url + ^ url ifNil: [ url := self class downloadLinks at: self name. ] ] { #category : #accessing }