summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/app/config/setup_application.php8
-rw-r--r--public/app/controllers/Auth.php142
-rw-r--r--public/app/models/Access_model.php22
-rw-r--r--public/app/views/components/header_includes.php6
-rw-r--r--public/app/views/components/theme.php98
-rw-r--r--public/app/views/js/credits.php10
-rw-r--r--public/app/views/templates/application.php28
-rw-r--r--public/app/views/templates/penalty.php8
-rw-r--r--public/app/views/user/invitation.php7
-rw-r--r--public/app/views/user/login.php4
-rw-r--r--public/app/views/user/panel.php8
-rw-r--r--public/app/views/user/update_properties.php9
-rw-r--r--public/assets/css/class.css20
-rw-r--r--public/assets/css/overides.css145
-rw-r--r--public/assets/css/themes/spring-04.css7
-rw-r--r--public/assets/css/themes/summer-01.css7
-rw-r--r--public/assets/css/themes/summer-02.css7
-rw-r--r--public/assets/css/themes/summer-05.css7
-rw-r--r--public/assets/css/themes/winter-09.css7
-rw-r--r--public/assets/media/.comments/fall-08.jpg.xml7
-rw-r--r--public/assets/media/.comments/summer-0.jpg.xml49
-rw-r--r--public/assets/media/.comments/summer-02.jpg.xml (renamed from public/assets/media/.comments/spring-05.jpg.xml)0
-rw-r--r--public/assets/media/.comments/winter-07.jpg.xml19
-rw-r--r--public/assets/media/summer-0.jpgbin0 -> 160764 bytes
-rw-r--r--public/assets/media/summer-01.webpbin0 -> 91758 bytes
-rw-r--r--public/assets/media/summer-09.jpgbin0 -> 35091554 bytes
-rw-r--r--public/assets/media/winter-09.jpgbin0 -> 77899 bytes
27 files changed, 499 insertions, 126 deletions
diff --git a/public/app/config/setup_application.php b/public/app/config/setup_application.php
index f56cc1a..e7d2ca4 100644
--- a/public/app/config/setup_application.php
+++ b/public/app/config/setup_application.php
@@ -125,6 +125,14 @@ define('NOT_VALID_ACTIVATION_TITLE', 'Σφάλμα!');
define('NOT_VALID_ACTIVATION_MESSAGE', 'Ο λογαριασμός δεν έχει ενεργοποιηθεί.
Ξαναδοκιμάστε αργότερα κι αν το σφάλμα επιμείνει, επικοινωνήστε με την υπεύθυνη του προγράμμαρος.');
+// update properties
+// ---
+define('ACCOUNT_UPDATED_TITLE','Ο λογαριασμός σας ενημερώθηκε!');
+define('ACCOUNT_UPDATED_MESSAGE','Τώρα μπορείτε να επιστρέψετε
+<a href="/panel">στον πίνακα ελέγχου</a>.');
+
+
+
define ('PETITION_TYPE', [
1 => 'common',
2 => 'penalty'
diff --git a/public/app/controllers/Auth.php b/public/app/controllers/Auth.php
index cbf4d19..02a059f 100644
--- a/public/app/controllers/Auth.php
+++ b/public/app/controllers/Auth.php
@@ -20,23 +20,18 @@ use app\extends\SendMail_service;
*/
class Auth {
- /** AJAX POST: login
+ ## handle user's record / token / session
+ ## -------------------------------------------------------------------------
+
+ /** user from record
*
- * checks visitor's credentials;
- * if valid, authenticates user
+ * create and return a user based on the record of properties
*
+ * @param array $record
+ * @return AppUser
*/
- public static function login()
+ private static function user_fromRecord($record)
{
- $req = Registry::get('REQUEST');
-
- // get the record of the target user
- $record = Access_model::checkUser($req->POST['email']);
-
- // if no user exists, return false
- if ($record === false) return false;
-
- // user is valid; check user password
// create a user object
$user = (new App_user())
->setID($record['id'])
@@ -56,37 +51,89 @@ class Auth {
->set('position', $record['position'])
->set('registration_number', $record['registration_number'])
->set('belonging_school', $record['belonging_school']);
+ return $user;
+ }
- // let user manager to validate user credentials
+ /** setSessionToken_forUser
+ * (RE-)set Session-Token for specified user object
+ *
+ * @param AppUser $user
+ */
+ private static function setSessionToken_forUser($user)
+ {
$userManager = new App_manager();
+
+ // regeneration session ID (prevent session fixation)
+ session_unset(); // unset $_SESSION variable for the run-time
+ session_destroy(); // destroy session data in storage before continue
+ session_start();
+ session_regenerate_id();
+
+ // set cookie for connected user
+ setcookie(
+ CONNECTION_COOKIE,
+ rawurlencode(json_encode(
+ [ 'rid' => $user->getRoles()[0], 'name' => $user->getName() ],
+ JSON_UNESCAPED_UNICODE
+ )),
+ [
+ 'expires' =>time()+60*60*10, // 10 hours
+ 'path' => '/',
+ // 'domain' => COOKIE_DOMAIN,
+ 'secure' => COOKIE_SECURE,
+ 'samesite' => COOKIE_SAMESITE
+ ]
+ );
+
+ // login OK, set Token in session
+ $userManager->createUserToken($user);
+
+ return true;
+ }
+
+
+ /** update session token
+ *
+ */
+ private static function reset_user_token($uid)
+ {
+ $rec = Access_model::getUser_byID($uid);
+ if ($rec !== false) {
+ $user = self::user_fromRecord($rec);
+ self::setSessionToken_forUser($user);
+ }
+ return true;
+ }
+
+
+ ## handle comon ajax requests
+ ## (login, activate. update etc )
+ ## -------------------------------------------------------------------------
+
+ /** AJAX POST: login
+ *
+ * checks visitor's credentials;
+ * if valid, authenticates user
+ *
+ */
+ public static function login()
+ {
+ $req = Registry::get('REQUEST');
+
+ // get the record of the target user
+ $record = Access_model::checkUser($req->POST['email']);
+
+ // if no user exists, return false
+ if ($record === false) return false;
+ // user is valid; check user password
+ $user = self::user_fromRecord($record); // create User object
+ $userManager = new App_manager(); // let Manager to check
if ($userManager->isPasswordValid($user, $req->POST['password'])) {
- // regeneration session ID (prevent session fixation)
- session_unset(); // unset $_SESSION variable for the run-time
- session_destroy(); // destroy session data in storage before continue
- session_start();
- session_regenerate_id();
-
- // set cookie for connected user
- setcookie(
- CONNECTION_COOKIE,
- rawurlencode(json_encode(
- [ 'rid' => $record['role_id'], 'name' => $user->getName() ],
- JSON_UNESCAPED_UNICODE
- )),
- [
- 'expires' =>time()+60*60*10, // 10 hours
- 'path' => '/',
- // 'domain' => COOKIE_DOMAIN,
- 'secure' => COOKIE_SECURE,
- 'samesite' => COOKIE_SAMESITE
- ]
- );
-
- // login OK, set Token in session
- $userManager->createUserToken($user);
+ self::setSessionToken_forUser($user); // re-set Session Token
+
return [
'success' => true,
'goto' => '/panel'
@@ -143,24 +190,28 @@ class Auth {
{
$req = Registry::get('REQUEST');
$manager = new App_manager();
- ;
- // print_r($req->POST); die();
+ $uid = $manager->getUserToken()->getUser()->getID();
// ask model to update user; get user-id from user-manager
$check = Access_model::update_user(
$req->POST,
- $manager->getUserToken()->getUser()->getID()
+ $uid
);
- // TODO: message for user updating properties
+ // user properties changed, so update user's session token
+ self::reset_user_token($uid);
+
Render::json([
- 'title' => ACCOUNT_ACTIVATED_TITLE,
- 'message' => ACCOUNT_ACTIVATED_MESSAGE . '<br>(msg code: '. $check .')'
+ 'title' => ACCOUNT_UPDATED_TITLE,
+ 'message' => ACCOUNT_UPDATED_MESSAGE . '<br>(msg code: '. $check .')'
]);
}
+ ## serve user management forms
+ ## -------------------------------------------------------------------------
+
/** SERVE FORM: invitation
*
* setups and renders the form for a certain invitation
@@ -260,6 +311,9 @@ class Auth {
}
+ ## suplamentary methods
+ ## -------------------------------------------------------------------------
+
/** is_connected
* checks if the user is connected
*
diff --git a/public/app/models/Access_model.php b/public/app/models/Access_model.php
index 5c9f991..2d36285 100644
--- a/public/app/models/Access_model.php
+++ b/public/app/models/Access_model.php
@@ -33,6 +33,22 @@ class Access_model
}
+ /** get user by id
+ *
+ */
+ public static function getUser_byID($uid)
+ {
+ $user = Registry::use('database')->query(
+ "SELECT * FROM user WHERE id = :uid AND active = 1",
+ [ ':uid' => $uid ]
+ )->getFirst();
+
+ // if no user, return false
+ if ($user === false) return false;
+
+ return $user;
+ }
+
/** getUserByInvitation
*
* @param string $invitation
@@ -173,7 +189,7 @@ class Access_model
* @param array $post;
* @param int $id: user id
*/
- public static function update_user($post, $id)
+ public static function update_user($post, $uid)
{
// Update and set activate = true
$rowCount = Registry::use('database')->query(
@@ -201,14 +217,14 @@ class Access_model
':position' => $post['position'],
':phone' => $post['phone'],
':active' => 1,
- ':id' => $id
+ ':id' => $uid
]
)->rowCount();
// update history
if ($rowCount != 0) {
History_model::trackUserAccess(
- $id, TRACK_ACCOUNT, 'User properties changed'
+ $uid, TRACK_ACCOUNT, 'User properties changed'
);
}
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>
diff --git a/public/assets/css/class.css b/public/assets/css/class.css
index 53602d3..81be1f2 100644
--- a/public/assets/css/class.css
+++ b/public/assets/css/class.css
@@ -39,6 +39,13 @@
--background-image: #fafafa; /* main background */
--menu-hover-bgr: #def /* <-- spring-04 ; default: #def */;
--info-text-color: #554e;
+
+ /* image credits */
+ --img-credit-bgr: #fff5;
+ --img-credit-bgr-hover: #fffa;
+ --img-credit-color: #333e;
+ --img-credit-hover-color: #f77;
+
}
@@ -182,4 +189,15 @@ html, body {
.office .page-container { max-width: 1024px; }
-
+.image-credits { position: fixed;
+ bottom: 8px; right: 8px;
+ border-radius: 4px;
+ background: var(--img-credit-bgr);
+ transition: ease background .15s;
+}
+.image-credits:hover { background: var(--img-credit-bgr-hover); transition: ease background .15s; }
+.image-credits a { font-size: 12px; padding: 2px 14px;
+ color: var(--img-credit-color);
+}
+.image-credits a:hover { color: var(--img-credit-hover-color); }
+
diff --git a/public/assets/css/overides.css b/public/assets/css/overides.css
index 937195b..cbd333c 100644
--- a/public/assets/css/overides.css
+++ b/public/assets/css/overides.css
@@ -145,7 +145,7 @@ ul.select2-selection__rendered { margin-bottom: 0; }
/* class.css | http://localhost/assets/css/class.css */
- .info li.list-group-item.separator {
+.info li.list-group-item.separator {
/* border: none; */
/* background: #f2f2f299; */
/* color: #345; */
@@ -154,7 +154,7 @@ ul.select2-selection__rendered { margin-bottom: 0; }
color: #776;
background: #fff;
border-top: 1px solid #edd;
- }
+}
.info li.list-group-item:hover { background: var(--menu-hover-bgr); }
.info li.list-group-item.separator:hover { background: #fff; }
@@ -185,6 +185,114 @@ ul.select2-selection__rendered { margin-bottom: 0; }
/** cc photo sources
+https://www.vecteezy.com/vector-art/6849519
+https://www.vecteezy.com/vector-art/6691097
+
+summer
+++ https://www.freepik.com/free-photo/north-beach-ocean-nazare-portugal_7487020.htm
++ https://www.freepik.com/free-photo/north-beach-ocean-nazare-portugal_7487026.htm
+++ https://www.freepik.com/free-photo/waves-sea-sunset_975712.htm
+https://www.freepik.com/free-photo/beautiful-shot-tree-trunks-water-with-blue-sky-background_9282923.htm
++ https://www.freepik.com/free-photo/vertical-overhead-shot-wavy-sea-against-seashore_11354068.htm
++ https://www.freepik.com/free-photo/top-view-sand-meeting-seawater_9818948.htm
+++ https://www.freepik.com/free-photo/summer-beach-clean-holiday-destination_2971748.htm
+!! https://www.freepik.com/free-photo/body-water_13126578.htm
++ https://www.freepik.com/free-photo/waves-sea-sunset_975711.htm
+!! https://www.freepik.com/free-photo/overhead-shot-people-enjoying-sunny-day-sandy-beach-near-beautiful-waves-sea_9970655.htm
+!! https://www.freepik.com/free-photo/aerial-shot-beach-surrounded-by-greenery-sea_11527527.htm
+++ https://www.freepik.com/free-photo/north-beach-ocean-nazare-portugal_7487013.htm#page=7&position=10&from_view=author
+
+
+spring
++ https://www.pexels.com/photo/pink-flowers-photography-1128797/
++ https://www.freepik.com/free-photo/sunrise-farmland_10304055.htm
+
+
+fall
+++ https://www.freepik.com/free-photo/orange-fall-foliage-with-copy-space_5285370.htm
+++ https://www.freepik.com/free-photo/top-view-see-through-leaf-texture_10205892.htm
+++ https://www.freepik.com/free-photo/flat-lay-see-through-leaf-texture_10205888.htm
+++ https://www.freepik.com/free-photo/top-view-transparent-leaves-with-orange-light_23404485.htm
+++ https://www.freepik.com/free-photo/close-up-colourful-autumn-leaf-concept_8034414.htm
++++ https://www.freepik.com/free-photo/beautiful-autumn-leaves-autumn-red-background-sunny-daylight-horizontal-toning_1284515.htm
+++ https://www.freepik.com/free-photo/flat-lay-close-up-autumn-leaf_12356800.htm
+++ https://www.freepik.com/free-photo/beautiful-autumn-leaves-autumn-red-background-sunny-daylight-horizontal_1284510.htm
+++ https://www.freepik.com/free-photo/beautiful-autumn-leaves-autumn-red-background-sunny-daylight-horizontal-toning_1284514.htm
++ https://www.freepik.com/free-vector/watercolor-autumnal-leaves_15637300.htm
+++ https://www.freepik.com/free-photo/vertical-shot-lake-pukaki-mount-cook-new-zealand_12177133.htm
+++ https://www.freepik.com/free-photo/beautiful-landscape-with-river-bridge-background_1014581.htm
+
+
+
+fall + winter
+++ https://www.freepik.com/free-vector/blurred-background-with-fog_974277.htm
+++ https://www.freepik.com/free-photo/dense-blue-cloud-haze_4284790.htm
+++ https://www.freepik.com/free-vector/abstract-watercolour-style-landscape_2114994.htm
+++ https://www.freepik.com/free-photo/breathtaking-shot-lake-wanaka-wanaka-village-new-zealand_11111328.htm
+++ https://www.freepik.com/free-photo/look-from-coast-blue-mountains-touching-sea_1621928.htm
+
+
+winter+spring
+++ https://www.freepik.com/free-photo/aerial-view-from-drone-flying-clouds_45141892.htm
+++ https://www.freepik.com/free-photo/breathtaking-shot-lake-wanaka-wanaka-village-new-zealand_11486702.htm
+++ https://www.freepik.com/free-photo/beautiful-shot-lake-with-snowy-trees-distance-fog_12040255.htm
+++ https://www.freepik.com/free-photo/closeup-shot-moss-plants-growing-tree-branch-forest_10186581.htm
+++ https://www.freepik.com/free-photo/beautiful-view-bohemian-switzerland-landscape-czech-republic-with-trees_16226217.htm
++ https://www.freepik.com/free-photo/aerial-shot-colorful-autumn-forest_16226032.htm
+
+
+
+winter
+++ https://www.freepik.com/free-photo/3d-iceberg-blue-sea_3585791.htm
+++ https://www.freepik.com/free-photo/fantastic-winter-landscape-mountains-magical-sunset_9144399.htm
++++ https://www.freepik.com/free-photo/cottage-glen-etive-scotland_16462487.htm
+
+
+all
+https://www.freepik.com/free-photo/abstract-light-reflection-wall_3216895.htm
+++ https://www.freepik.com/free-photo/panorama-paris-sunset_800495.htm
+++ https://www.freepik.com/free-photo/peter-paul-fortress-summer-dawn_1491317.htm#from_view=detail_alsolike
+++ https://www.freepik.com/free-photo/pier-with-multiple-fishing-walking-people-sunset-parked-bike-land-lampposts-greece_12311187.htm
+++ https://www.freepik.com/free-photo/fenced-paddock-foggy-lake-during-sunset-radasjon-sweden_11062843.htm
++ https://www.freepik.com/free-photo/colorful-wooden-abstract-background_13971810.htm
++ https://www.freepik.com/free-photo/gold-texture_986435.htm
++ https://www.freepik.com/free-photo/bottom-view-blurred-office-buildings_943255.htm
+++ https://www.freepik.com/free-photo/new-jersey-march-20-empty-sky-memorial-with-sunshine-march-20-2014-new-jersey-it-is-official-new-jersey-september-11-memorial-victims-september-11-attacks_26824431.htm
+++ https://www.freepik.com/free-photo/contemporary-building-exterior-skyscraper-design-concept_3540049.htm
+++ https://www.freepik.com/free-photo/skyscrapers-from-low-angle-view_1120766.htm
++ https://www.freepik.com/free-photo/los-angeles-night-with-urban-buildings-black-white_26740414.htm
+++ https://www.freepik.com/free-photo/motion-blur-automatic-train-moving-inside-tunnel-tokyo-japan_10695396.htm
+++ https://www.freepik.com/free-photo/motion-blur-automatic-train-moving-inside-tunnel-tokyo-japan_10824403.htm
+++ https://www.freepik.com/free-photo/vestrahorn-mountains-sunset-stokksnes-iceland_11768884.htm
+++ https://www.freepik.com/free-photo/snow-mountains-during-sunrise_6336525.htm
+++ https://www.freepik.com/free-photo/landscape-shot-purple-scenery-with-mountain-orange-sky-background_9852316.htm
+++ https://www.freepik.com/free-photo/bukhansan-mountains-is-covered-by-morning-fog-sunrise-bukhansan-national-park-seoul-south-korea_11306413.htm
+++ https://www.freepik.com/free-photo/landmarks-shanghai-along-huangpu-river_1193610.htm
+++ https://www.freepik.com/free-photo/arab-people-with-camel-caravan_800493.htm
+++ https://www.freepik.com/free-photo/candle-turned-off_4230644.htm
+++ https://www.freepik.com/free-photo/blurred-traffic-light-trails-road_1193586.htm
+++ https://www.freepik.com/free-photo/wooden-terrace-by-river_1120768.htm
+++ https://www.freepik.com/free-photo/full-frame-shot-cloudscape-with-plane-flying_1120708.htm
+++ https://www.freepik.com/free-photo/breathtaking-shot-sunset-along-street-middle-modern-city_9932265.htm
++ https://www.freepik.com/free-photo/high-angle-shot-buildings-cloudy-sky-captured-kenya-nairobi-samburu_9282503.htm
+++ https://www.freepik.com/free-photo/high-angle-shot-lot-buildings-with-lights-bridge-evening_8409178.htm
+++ https://www.freepik.com/free-photo/autumn-morning-prague_20712458.htm
++++ https://www.freepik.com/free-photo/clean-city-streets-prague_26731940.htm
+++ https://www.freepik.com/free-photo/prague_1253938.htm
++ https://www.freepik.com/free-photo/high-angle-shot-gloomy-piazzale-michelangelo-florence-with-reflections-river_8990585.htm
+++ https://www.freepik.com/free-photo/skyline-tehran-sunset_27738312.htm
+
+no winter
+++ https://www.freepik.com/free-photo/old-town-stockholm-during-sunrise_8857566.htm
+
+
+no-summer
+++ https://www.freepik.com/free-photo/view-foggy-mountain-landscape_1120953.htm
+++ https://www.freepik.com/free-photo/view-cityscape-landscapes-stockholm-sweden_3737890.htm
+++ https://www.freepik.com/free-photo/amazing-aerial-view-mountains-partially-covered-with-snow-positioned-higher-than-clouds_10606093.htm
+
+
+
https://www.flickr.com/photos/31176607@N05/34285736050/
https://www.flickr.com/photos/138748077@N02/45718622541/
https://www.flickr.com/photos/ralf_wimmer/27036520782/
@@ -243,36 +351,3 @@ https://www.flickr.com/photos/129030830@N02/37032688484/
https://www.flickr.com/photos/drtonygeorge/1474585836/ !
*/
-/** themes
- * --- -- -- - - -
- * auto select one id of 7, per month:
- * ( ( (month*31 + day) % 14 ) div 2 ) + 1
- */
-
-/* summer 05
- --- -- -- - - -
- :root {
- --background-image: url(/assets/media/summer-05.jpg);
- --bs-heading-color: #132;
- --menu-hover-bgr: #efefa6;
- }
- .central-form .content-form { background: #dddb; }
- .central-form .content-form { border: 1px solid #dddb }
- .info li.list-group-item:hover { background: #c9f490; }
- --- -- -- - - -
-*/
-
-
-/* spring 04
- --- -- -- - - -*/
- :root {
- --background-image: url(/assets/media/spring-04.jpg);
- --bs-heading-color: #230;
- --menu-hover-bgr: #efefa6;
- --info-text-color: #334;
- }
- .central-form .content-form { background: #dddb; }
- .central-form .content-form { border: 1px solid #dddb }
- .info li.list-group-item:hover { background: #c9f490; }
-/* --- -- -- - - -
-*/ \ No newline at end of file
diff --git a/public/assets/css/themes/spring-04.css b/public/assets/css/themes/spring-04.css
new file mode 100644
index 0000000..92eae2c
--- /dev/null
+++ b/public/assets/css/themes/spring-04.css
@@ -0,0 +1,7 @@
+:root {
+ --background-image: url(/assets/media/spring-04.jpg);
+ --bs-heading-color: #230;
+ --menu-hover-bgr: #efefa6;
+ --info-text-color: #334;
+ --img-credit-hover-color: #d43;
+}
diff --git a/public/assets/css/themes/summer-01.css b/public/assets/css/themes/summer-01.css
new file mode 100644
index 0000000..d22d5d5
--- /dev/null
+++ b/public/assets/css/themes/summer-01.css
@@ -0,0 +1,7 @@
+:root {
+ --background-image: url(/assets/media/summer-01.webp);
+ --bs-heading-color: #230;
+ --menu-hover-bgr: #bee;
+ --info-text-color: #334;
+ --img-credit-hover-color: #334;
+}
diff --git a/public/assets/css/themes/summer-02.css b/public/assets/css/themes/summer-02.css
new file mode 100644
index 0000000..0e7c003
--- /dev/null
+++ b/public/assets/css/themes/summer-02.css
@@ -0,0 +1,7 @@
+:root {
+ --background-image: url(/assets/media/summer-02.jpg);
+ --bs-heading-color: #132;
+ --menu-hover-bgr: #f4e1b7;
+ --info-text-color: #334;
+ --img-credit-hover-color: #b04028;
+}
diff --git a/public/assets/css/themes/summer-05.css b/public/assets/css/themes/summer-05.css
new file mode 100644
index 0000000..e463dbb
--- /dev/null
+++ b/public/assets/css/themes/summer-05.css
@@ -0,0 +1,7 @@
+:root {
+ --background-image: url(/assets/media/summer-05.jpg);
+ --bs-heading-color: #132;
+ --menu-hover-bgr: #ffe89d;
+ --info-text-color: #334;
+ --img-credit-hover-color: #253;
+}
diff --git a/public/assets/css/themes/winter-09.css b/public/assets/css/themes/winter-09.css
new file mode 100644
index 0000000..815ccdd
--- /dev/null
+++ b/public/assets/css/themes/winter-09.css
@@ -0,0 +1,7 @@
+:root {
+ --background-image: url(/assets/media/winter-09.jpg);
+ --bs-heading-color: #230;
+ --menu-hover-bgr: #bcecff;
+ --info-text-color: #334;
+ --img-credit-hover-color: #334;
+}
diff --git a/public/assets/media/.comments/fall-08.jpg.xml b/public/assets/media/.comments/fall-08.jpg.xml
deleted file mode 100644
index fb4c15c..0000000
--- a/public/assets/media/.comments/fall-08.jpg.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<comment version="3.0">
- <caption/>
- <note>Vertical ratio size of sunset background. sky with soft and blur pastel colored clouds. gradient cloud on the beach resort. nature. sunrise. peaceful morning.</note>
- <place/>
- <categories/>
-</comment>
diff --git a/public/assets/media/.comments/summer-0.jpg.xml b/public/assets/media/.comments/summer-0.jpg.xml
new file mode 100644
index 0000000..9c6546c
--- /dev/null
+++ b/public/assets/media/.comments/summer-0.jpg.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<comment version="3.0">
+ <caption>North Beach in Nazare Portugal</caption>
+ <note>North Beach in Nazare Portugal with foaming waves</note>
+ <place/>
+ <categories>
+ <category value="wave"/>
+ <category value="sea"/>
+ <category value="portugal"/>
+ <category value="beach"/>
+ <category value="raging"/>
+ <category value="travelling"/>
+ <category value="coast"/>
+ <category value="cold"/>
+ <category value="travel"/>
+ <category value="huge"/>
+ <category value="closeup"/>
+ <category value="holiday"/>
+ <category value="relaxing"/>
+ <category value="ocean"/>
+ <category value="open"/>
+ <category value="freshness"/>
+ <category value="water"/>
+ <category value="shore"/>
+ <category value="danger"/>
+ <category value="wind"/>
+ <category value="place"/>
+ <category value="summer"/>
+ <category value="splash"/>
+ <category value="nature"/>
+ <category value="wild"/>
+ <category value="cool"/>
+ <category value="atlantic"/>
+ <category value="vacation"/>
+ <category value="algarve"/>
+ <category value="motion"/>
+ <category value="foam"/>
+ <category value="power"/>
+ <category value="fresh"/>
+ <category value="recreation"/>
+ <category value="powerful"/>
+ <category value="surfing"/>
+ <category value="speed"/>
+ <category value="storming"/>
+ <category value="nobody"/>
+ <category value="sandy"/>
+ <category value="blue"/>
+ </categories>
+</comment>
diff --git a/public/assets/media/.comments/spring-05.jpg.xml b/public/assets/media/.comments/summer-02.jpg.xml
index ca4540e..ca4540e 100644
--- a/public/assets/media/.comments/spring-05.jpg.xml
+++ b/public/assets/media/.comments/summer-02.jpg.xml
diff --git a/public/assets/media/.comments/winter-07.jpg.xml b/public/assets/media/.comments/winter-07.jpg.xml
new file mode 100644
index 0000000..58ddc92
--- /dev/null
+++ b/public/assets/media/.comments/winter-07.jpg.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<comment version="3.0">
+ <caption>Lake Hjälmanren</caption>
+ <note/>
+ <place/>
+ <categories>
+ <category value="Hjälmaren"/>
+ <category value="Lake view"/>
+ <category value="Stora Sundby Slott"/>
+ <category value="Stora sundby. Stora Sundby gård"/>
+ <category value="dimma"/>
+ <category value="fog"/>
+ <category value="lake"/>
+ <category value="landscape"/>
+ <category value="landskap"/>
+ <category value="mist"/>
+ <category value="sjö"/>
+ </categories>
+</comment>
diff --git a/public/assets/media/summer-0.jpg b/public/assets/media/summer-0.jpg
new file mode 100644
index 0000000..e4deb86
--- /dev/null
+++ b/public/assets/media/summer-0.jpg
Binary files differ
diff --git a/public/assets/media/summer-01.webp b/public/assets/media/summer-01.webp
new file mode 100644
index 0000000..4dc572a
--- /dev/null
+++ b/public/assets/media/summer-01.webp
Binary files differ
diff --git a/public/assets/media/summer-09.jpg b/public/assets/media/summer-09.jpg
new file mode 100644
index 0000000..db6b0b7
--- /dev/null
+++ b/public/assets/media/summer-09.jpg
Binary files differ
diff --git a/public/assets/media/winter-09.jpg b/public/assets/media/winter-09.jpg
new file mode 100644
index 0000000..573c318
--- /dev/null
+++ b/public/assets/media/winter-09.jpg
Binary files differ