diff options
Diffstat (limited to 'public/app/views/components')
| -rw-r--r-- | public/app/views/components/header_includes.php | 6 | ||||
| -rw-r--r-- | public/app/views/components/theme.php | 98 |
2 files changed, 104 insertions, 0 deletions
diff --git a/public/app/views/components/header_includes.php b/public/app/views/components/header_includes.php index 0600450..1b52824 100644 --- a/public/app/views/components/header_includes.php +++ b/public/app/views/components/header_includes.php @@ -51,6 +51,12 @@ <link href="/assets/css/overides.css" rel="stylesheet"> +<!-- THEME CSS + /////////////////////////////////////////////////////////////////////////--> + +<?php // decide a theme + Render::view('components/theme'); +?> <!-- JAVASCRIPT /////////////////////////////////////////////////////////////////////////--> diff --git a/public/app/views/components/theme.php b/public/app/views/components/theme.php new file mode 100644 index 0000000..238f932 --- /dev/null +++ b/public/app/views/components/theme.php @@ -0,0 +1,98 @@ +<?php + +// decide a theme according to month +$month = idate('m'); + +switch ($month) { + case 12: case 1: case 2: + $season = 'winter'; + break; + + case 3: case 4: case 5: + $season = 'spring'; + break; + + case 6: case 7: case 8: + $season = 'summer'; + break; + + case 9: case 10: case 11: + $season = 'fall'; + break; + + default: + $season = 'spring'; +} + + +/** themes + * --- -- -- - - - + * auto select one id of L = array.LENGTH, per month: + * ( ( (month*31 + day) % L*2 ) div 2 ) + * + * this will allow theme exchange every 2 days + */ + + +$themes = [ + + 'summer' => [ + [ + 'css' => 'summer-05', + 'url' => 'https://www.vecteezy.com/vector-art/6691305', + 'label' => 'Mohammad Arfa Affan: 3d Vectors (@Vecteezy)' + ], + [ + 'css' => 'summer-02', + 'url' => 'https://www.pxfuel.com/en/desktop-wallpaper-elkiv', + 'label' => '@pxfuel: Faded orange lines' + ], + [ + 'css' => 'summer-01', + 'url' => 'https://www.freepik.com/free-photo/nazare-portugal_7487018.htm', + 'label' => 'frimufilms: North beach and ocean in Nazare, Portugal' + ] + ], + + + 'fall' => [ + + [ + 'css' => 'spring-04', + 'url' => 'https://www.pxfuel.com/en/desktop-wallpaper-evgsz', + 'label' => '@pxfuel: Nature, lights' + ] + ], + + // summer-09 + // https://www.freepik.com/free-photo/body-water_13126578.htm + // ninjason1: Body of water + + 'winter' => [ + [ + 'css' => 'winter-09', + 'url' => 'https://www.freepik.com/free-photo/abstract-water-waves-with-ink-dots_5068293.htm', + 'label' => 'freepik: Abstract water waves with ink dots' + ] + + ], + + + 'spring' => [ + [ + 'css' => 'spring-04', + 'url' => 'https://www.pxfuel.com/en/desktop-wallpaper-evgsz', + 'label' => '@pxfuel: Nature, lights' + ] + + ] + + +]; + + +define('THEME', $themes['summer'][2]); + +?> +<link href="/assets/css/themes/<?=THEME['css']?>.css" rel="stylesheet"> + |
