diff options
Diffstat (limited to 'public/app/views')
| -rw-r--r-- | public/app/views/components/header_includes.php | 6 | ||||
| -rw-r--r-- | public/app/views/components/theme.php | 98 | ||||
| -rw-r--r-- | public/app/views/js/credits.php | 10 | ||||
| -rw-r--r-- | public/app/views/templates/application.php | 28 | ||||
| -rw-r--r-- | public/app/views/templates/penalty.php | 8 | ||||
| -rw-r--r-- | public/app/views/user/invitation.php | 7 | ||||
| -rw-r--r-- | public/app/views/user/login.php | 4 | ||||
| -rw-r--r-- | public/app/views/user/panel.php | 8 | ||||
| -rw-r--r-- | public/app/views/user/update_properties.php | 9 |
9 files changed, 142 insertions, 36 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"> + diff --git a/public/app/views/js/credits.php b/public/app/views/js/credits.php new file mode 100644 index 0000000..ca0f15c --- /dev/null +++ b/public/app/views/js/credits.php @@ -0,0 +1,10 @@ +<script> +// create image-credits div +let ic_div = document.createElement('div'); +ic_div.innerHTML = '<a href="<?=THEME['url']?>" target="_blank" title="Attribution for the lovely background image"><?=THEME['label']?></a>'; +ic_div.className = 'image-credits'; + +// append image-credits div to body +document.querySelector('body').appendChild(ic_div); + +</script>
\ No newline at end of file diff --git a/public/app/views/templates/application.php b/public/app/views/templates/application.php index 4855383..35b1435 100644 --- a/public/app/views/templates/application.php +++ b/public/app/views/templates/application.php @@ -98,13 +98,11 @@ </script> - <?php // include select2 supplementary functions //////////////////////////////////////////////////////////////////////////// Render::view('js/select2-supplementary'); ?> - <script>// pass dynamic js prepared by form designer $(document).ready(function() { @@ -115,41 +113,23 @@ }); </script> - <?php // handle form submition //////////////////////////////////////////////////////////////////////////// Render::view('js/submit/application-form'); ?> - <?php // load application pdf-designer //////////////////////////////////////////////////////////////////////////// Render::view('js/pdf-designer/application'); ?> - <?php // include attachments handling //////////////////////////////////////////////////////////////////////////// Render::view('js/attachments-handling'); ?> -<!-- -<script> -var source = { - first_name: 'George', - last_name: 'Its me!', - father_name: 'Pipis', - message: 'Adhaesiones ratione beate arbitraretur detractis perdiscere, constituant hostis polyaeno.', - constants: { - organization: 'Ministry of Nothing' - } -} - - -// pdfMake.createPdf(designer(source)).open(); -// download (+title): .download('my-doc-title.pdf'); -// open in same window: .open({}, window); -// print: .print(); -</script> ---> +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); +?> </html> diff --git a/public/app/views/templates/penalty.php b/public/app/views/templates/penalty.php index 4709d60..cad9221 100644 --- a/public/app/views/templates/penalty.php +++ b/public/app/views/templates/penalty.php @@ -64,13 +64,11 @@ }; </script> - <?php // include select2 supplementary functions //////////////////////////////////////////////////////////////////////////// Render::view('js/select2-supplementary'); ?> - <script>// pass dynamic js prepared by form designer $(document).ready(function() { @@ -81,7 +79,6 @@ }); </script> - <?php // handle form submition //////////////////////////////////////////////////////////////////////////// Render::view('js/submit/penalty-form'); @@ -152,5 +149,8 @@ }); </script> --> - +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); +?> </html> diff --git a/public/app/views/user/invitation.php b/public/app/views/user/invitation.php index 030c1d3..328c621 100644 --- a/public/app/views/user/invitation.php +++ b/public/app/views/user/invitation.php @@ -64,7 +64,6 @@ var empty = ''; </script> - <?php // include select2 supplementary functions //////////////////////////////////////////////////////////////////////////// Render::view('js/select2-supplementary'); @@ -87,9 +86,13 @@ $(document).ready(function() { }); </script> - <?php // handle form submition //////////////////////////////////////////////////////////////////////////// Render::view('js/submit/invitation-form'); ?> + +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); +?> </html> diff --git a/public/app/views/user/login.php b/public/app/views/user/login.php index 871e501..6bf3b0a 100644 --- a/public/app/views/user/login.php +++ b/public/app/views/user/login.php @@ -96,4 +96,8 @@ }); </script> +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); +?> </html> diff --git a/public/app/views/user/panel.php b/public/app/views/user/panel.php index fbfdd0c..9ac7908 100644 --- a/public/app/views/user/panel.php +++ b/public/app/views/user/panel.php @@ -98,7 +98,7 @@ </body> - <script src="/assets/js/panel/<?=$content?>.js"></script> +<script src="/assets/js/panel/<?=$content?>.js"></script> <!-- scripts * handle show petition request @@ -106,6 +106,8 @@ if admin: * modal + give protocol-number --> - - +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); +?> </html> diff --git a/public/app/views/user/update_properties.php b/public/app/views/user/update_properties.php index 35a1b1e..f10e36b 100644 --- a/public/app/views/user/update_properties.php +++ b/public/app/views/user/update_properties.php @@ -39,7 +39,6 @@ var empty = ''; </script> - <?php // include select2 supplementary functions //////////////////////////////////////////////////////////////////////////// Render::view('js/select2-supplementary'); @@ -62,9 +61,13 @@ $(document).ready(function() { }); </script> - <?php // handle form submition //////////////////////////////////////////////////////////////////////////// - Render::view('js/submit/invitation-form'); + Render::view('js/submit/update-properties'); +?> + +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); ?> </html> |
