From 5375e22de976b74f5f04d800014c30d9c66f0fe5 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Mon, 12 Jun 2023 01:12:30 +0300 Subject: official Reliese Candidate; themes added; routes organized; fine tuning --- public/app/views/components/theme.php | 89 +++++++++++++++++++++++------------ 1 file changed, 60 insertions(+), 29 deletions(-) (limited to 'public/app/views/components/theme.php') diff --git a/public/app/views/components/theme.php b/public/app/views/components/theme.php index 4e95193..a769dce 100644 --- a/public/app/views/components/theme.php +++ b/public/app/views/components/theme.php @@ -1,9 +1,29 @@ 'Doc Searls: Amazing Santa Barbara sunset (2014/01)' ], + 'f9' => [ + 'css' => 'fall-09', + 'url' => 'https://www.freepik.com/free-photo/flock-birds-flying-during-sunset_13962565.htm', + 'label' => 'wirestock: View of a flock of birds flying into a beautiful sky during sunset' + ], + # --- winter --- + 'w3' => [ + 'css' => 'winter-03', + 'url' => 'https://unsplash.com/photos/yzkoleKww6w', + 'label' => 'Raimond Klavins: Snow covered mountain under blue sky during daytime, Himalayas' + ], + + 'w8' => [ + 'css' => 'winter-08', + 'url' => 'https://www.freepik.com/free-photo/3d-iceberg-blue-sea_3585791.htm', + 'label' => 'kjpargeter: 3d iceberg in blue sea' + ], + 'w9' => [ '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' ], + 'w10' => [ + 'css' => 'winter-10', + 'url' => 'https://unsplash.com/photos/D1eFDB4CMj0', + 'label' => 'Vidar Nordli-Mathisen: Skogsøya, Norway' + ], + + # --- spring --- 'g1' => [ @@ -111,21 +135,28 @@ $theme_def = [ $themes = [ - 'summer' => [ 's1', 's5', 'g9', 's2', 'g1' ], + 'summer' => [ 's1', 's2', 's5', 'g9', 'g1' ], - 'fall' => [ 'f8', 's5', 'g4', 's2' ], + 'fall' => [ 'f8', 's5', 'g4', 's2', 'f9' ], - 'winter' => [ 'w9' ], + 'winter' => [ 'w3', 'w8', 'w9', 'w10' ], - 'spring' => [ 'g1', 'g4', 'g9' ] + 'spring' => [ 'g1', 'g4', 'w3', 'g9', 'f9' ] ]; +/** check algo in the begining of this file */ +$day = intval(date('d')); +$themesLen = count($themes[$season]); +if ($mo == 12) { $mo = 0; } +if ($mo == 6 && $day == 1) { $day == 2; } +$imageID = intdiv( ( ( $mo*31 + $day) % $themesLen*4 ), 4 ); -define('THEME', $theme_def[ $themes['summer'][0] ]); +define('THEME', $theme_def[ $themes[ $season ][ $imageID ] ]); +// testing: define('THEME', $theme_def[ $themes[ 'winter' ][ 1 ] ]); ?> -- cgit v1.2.3