diff options
Diffstat (limited to 'public/app/views/components')
| -rw-r--r-- | public/app/views/components/header_includes.php | 8 | ||||
| -rw-r--r-- | public/app/views/components/menu.php | 1 | ||||
| -rw-r--r-- | public/app/views/components/theme.php | 89 |
3 files changed, 68 insertions, 30 deletions
diff --git a/public/app/views/components/header_includes.php b/public/app/views/components/header_includes.php index bd72cb6..c096bd5 100644 --- a/public/app/views/components/header_includes.php +++ b/public/app/views/components/header_includes.php @@ -2,6 +2,10 @@ if (!isset($administration)) { $administration = false; } + + if (!isset($no_dataTables)) { + $no_dataTables = false; + } ?> <!-- FONTS and LIBRARY CSS (self-hosted) @@ -52,13 +56,15 @@ <script src="<?=SITE_URL?>/assets/js/pdfmake/pdfmake.min.js"></script> <script src="<?=SITE_URL?>/assets/js/pdfmake/vfs_fonts.js"></script> +<?php if (!$no_dataTables) : ?> <!-- DataTables js --> <script src="/assets/js/DataTables/datatables.min.js"></script> +<?php endif; ?> <!-- select2-4.1.0-rc.0 js --> <script src="/assets/js/select2-4.1.0-rc0/js/select2.min.js"></script> -<?php /* DEPRICATED: +<?php /* DEPRECATED: <!-- marked --> <script src="/assets/js/marked/marked.min.js"></script> */ diff --git a/public/app/views/components/menu.php b/public/app/views/components/menu.php index 30ed673..08d459b 100644 --- a/public/app/views/components/menu.php +++ b/public/app/views/components/menu.php @@ -21,6 +21,7 @@ <?php if ($is_admin) : ?> <li class="list-group-item separator">Διαχείριση</li> <li class="list-group-item"><a href="/admin/petitions">Κατάσταση πρακτικών & αιτήσεων</a></li> + <li class="list-group-item"><a href="/admin/users">Διαχείριση Χρηστών</a></li> <li class="list-group-item"><a href="/admin/invite">Αποστολή προσκλήσεων</a></li> <?php endif; ?> 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 @@ <?php +/** 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 + * + * + * 4-day rollup: + * --- -- -- - - - + * supports up to 21 themes/season + * = 84 themes/year + * + * algo: + * ( ( ( month*31 + day) % L*4 ) div 4 ) + * change seasonal theme every 4 days + * ... Catch Exceptions: + * if (month == 12) : month = 0 + * if (month == 6 && day == 1) then day = 2 + * + */ -// decide a theme according to month -$month = idate('m'); +// decide a theme season according to month +$mo = intval(date('m')); -switch ($month) { +switch ($mo) { case 12: case 1: case 2: $season = 'winter'; break; @@ -25,27 +45,6 @@ switch ($month) { } -/** 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 - * - * - * 4-day rollup: - * --- -- -- - - - - * supports up to 21 themes/season - * = 84 themes/year - * - * algo: - * ( ( ( month*31 + day) % L*4 ) div 4 ) - * change seasonal theme every 4 days - * ... Catch Exceptions: - * if (month == 12) : month = 0 - * if (month == 6 && day == 1) then day = 2 - * - */ - $theme_def = [ # --- summer --- @@ -76,15 +75,40 @@ $theme_def = [ 'label' => '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 ] ]); ?> <!-- theme overides --> |
