diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-06-12 01:12:30 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-06-12 01:12:30 +0300 |
| commit | 5375e22de976b74f5f04d800014c30d9c66f0fe5 (patch) | |
| tree | 3f9d79b898c4bbb392c2a4ec5ec65c0fde5c6f01 /public/assets | |
| parent | 0b0076b2ece062f248b7c048d6bb28abbe9174a5 (diff) | |
| download | gyraf1gov-5375e22de976b74f5f04d800014c30d9c66f0fe5.tar.gz gyraf1gov-5375e22de976b74f5f04d800014c30d9c66f0fe5.tar.bz2 gyraf1gov-5375e22de976b74f5f04d800014c30d9c66f0fe5.zip | |
official Reliese Candidate; themes added; routes organized; fine tuning
Diffstat (limited to 'public/assets')
| -rw-r--r-- | public/assets/css/class.css | 5 | ||||
| -rw-r--r-- | public/assets/css/themes/fall-09.css | 8 | ||||
| -rw-r--r-- | public/assets/css/themes/spring-09.css | 2 | ||||
| -rw-r--r-- | public/assets/css/themes/winter-03.css | 13 | ||||
| -rw-r--r-- | public/assets/css/themes/winter-08.css | 11 | ||||
| -rw-r--r-- | public/assets/css/themes/winter-10.css | 25 | ||||
| -rw-r--r-- | public/assets/js/panel/admin_users.js | 177 | ||||
| -rw-r--r-- | public/assets/media/credits.txt | 13 | ||||
| -rw-r--r-- | public/assets/media/fall-09.webp | bin | 0 -> 43856 bytes | |||
| -rw-r--r-- | public/assets/media/summer-0.jpg | bin | 160764 -> 0 bytes | |||
| -rw-r--r-- | public/assets/media/summer-01.jpg | bin | 56385 -> 0 bytes | |||
| -rw-r--r-- | public/assets/media/winter-03.jpg | bin | 312425 -> 0 bytes | |||
| -rw-r--r-- | public/assets/media/winter-03.webp | bin | 0 -> 68082 bytes | |||
| -rw-r--r-- | public/assets/media/winter-08.jpg | bin | 41860 -> 0 bytes | |||
| -rw-r--r-- | public/assets/media/winter-08.webp | bin | 0 -> 153164 bytes | |||
| -rw-r--r-- | public/assets/media/winter-10.webp | bin | 0 -> 50930 bytes |
16 files changed, 249 insertions, 5 deletions
diff --git a/public/assets/css/class.css b/public/assets/css/class.css index 6c0c1bf..7aa3a2a 100644 --- a/public/assets/css/class.css +++ b/public/assets/css/class.css @@ -25,6 +25,7 @@ /* layer backgrounds */ --form-layer-bgr: #dddb; /* form layer background */ --backlayer-bgr: transparent; + --clear-read-bgr: #fff5; /* select2 */ --select2-arrow-top: 10px; @@ -350,6 +351,8 @@ input.form-control-sm { height: var(--form-input-height); } } - .btn-xs { height: 24px; padding: 1px 8px; font-size: 14px; } + +.clear-read p { padding: 8px; border-radius: 6px; } +.clear-read p:hover, .clear-read p:active { background: var(--clear-read-bgr); }
\ No newline at end of file diff --git a/public/assets/css/themes/fall-09.css b/public/assets/css/themes/fall-09.css new file mode 100644 index 0000000..05681ef --- /dev/null +++ b/public/assets/css/themes/fall-09.css @@ -0,0 +1,8 @@ +:root { + --background-image: url(/assets/media/fall-09.webp); + --form-layer-bgr: #cccc; + --bs-heading-color: #657; + --menu-hover-bgr: #fff0dc; + --info-text-color: #112; + --img-credit-hover-color: #334; +} diff --git a/public/assets/css/themes/spring-09.css b/public/assets/css/themes/spring-09.css index 97fe4bb..39c3ed3 100644 --- a/public/assets/css/themes/spring-09.css +++ b/public/assets/css/themes/spring-09.css @@ -1,7 +1,7 @@ :root { --background-image: url(/assets/media/spring-09.webp); --bs-heading-color: #230; - --menu-hover-bgr: #bee; + --menu-hover-bgr: #d6f899; --info-text-color: #334; --img-credit-hover-color: #334; } diff --git a/public/assets/css/themes/winter-03.css b/public/assets/css/themes/winter-03.css new file mode 100644 index 0000000..b8e9df7 --- /dev/null +++ b/public/assets/css/themes/winter-03.css @@ -0,0 +1,13 @@ +:root { + --background-image: url(/assets/media/winter-03.webp); + --bs-heading-color: #035; + --menu-hover-bgr: #cef; + --info-text-color: #223; + + --img-credit-hover-color: #334; + --img-credit-bgr: transparent; + --img-credit-color: #9aa; +} + +.central-form form label { color: #313; } +tbody, td, tfoot, th, thead, tr { border-color: #def7; }
\ No newline at end of file diff --git a/public/assets/css/themes/winter-08.css b/public/assets/css/themes/winter-08.css new file mode 100644 index 0000000..c589e34 --- /dev/null +++ b/public/assets/css/themes/winter-08.css @@ -0,0 +1,11 @@ +:root { + --background-image: url(/assets/media/winter-08.webp); + --bs-heading-color: #035; + --menu-hover-bgr: #cef; + --info-text-color: #223; + + --img-credit-hover-color: #334; +} + +.central-form form label { color: #313; } +tbody, td, tfoot, th, thead, tr { border-color: #def7; }
\ No newline at end of file diff --git a/public/assets/css/themes/winter-10.css b/public/assets/css/themes/winter-10.css new file mode 100644 index 0000000..0673bd0 --- /dev/null +++ b/public/assets/css/themes/winter-10.css @@ -0,0 +1,25 @@ +/* dark theme */ +:root { + --background-image: url(/assets/media/winter-10.webp); + --light-grey-shade: 1px 5px 7px #2227; + --form-layer-bgr: #878b; + --clear-read-bgr: transparent; + + --table-row-bgr: #eee2; + --table-odd-row-bgr: #fff3; + --table-head-bgr: #fff5; + --table-row-hover-bgr: #0137; + + --bs-heading-color: #dcb; + --info-text-color: #c8b5a3; + --menu-hover-bgr: #fcc; + + --img-credit-hover-color: #334; + --img-credit-bgr: transparent; + --img-credit-color: #9aa; +} + +.central-form form label { color: #fed; } + +tbody, td, tfoot, th, thead, tr { border-color: transparent; } +table.dt-table tr > td, table.dt-table tr > th { color: #fff; } diff --git a/public/assets/js/panel/admin_users.js b/public/assets/js/panel/admin_users.js new file mode 100644 index 0000000..62a2aff --- /dev/null +++ b/public/assets/js/panel/admin_users.js @@ -0,0 +1,177 @@ +// Globals +// ----------------------------------------------------------------------------- +var petitions = []; +var table; + + + +// Supplamentary functions +// ----------------------------------------------------------------------------- + +// array.indexOf polyfill +// --- -- -- - - - +if (!Array.prototype.indexOf) +{ + Array.prototype.indexOf = function(elt /*, from*/) + { + var len = this.length >>> 0; + + var from = Number(arguments[1]) || 0; + from = (from < 0) + ? Math.ceil(from) + : Math.floor(from); + if (from < 0) + from += len; + + for (; from < len; from++) + { + if (from in this && + this[from] === elt) + return from; + } + return -1; + }; +} + + +// return petitions user by user-id +// --- -- -- - - - +function user_record(id) { + var record = false; + petitions.forEach(el => { if (el.id == id) record = el; }); + + return record; +} + + +// create actions html (edit and delete buttons) +// --- -- -- - - - +function create_actions_html(el) { + if (el.deprecated == null) { + icon = '<i class="fa-solid fa-minus"></i>'; + action = 'deprecate'; + title = 'κατάργηση'; + type = 'warning'; + + } else { + icon = '<i class="fa-solid fa-plus"></i>'; + action = 'activate'; + title = 'προσθήκη'; + type = 'primary'; + } + + return [ + '<button type="button" class="btn btn-xs btn-'+ type +'" title="'+ title +'"', + 'data-id="'+ el.id +'" data-action="'+ action +'" >', + icon, + '</button>' + ].join('\n'); + +} + + + +$(document).ready(function() { + + // When document is ready + // ------------------------------------------------------------------------- + + + /** init_table + * --- -- -- - - - + * get categories + * constuct categories array + * render dataTable + */ + function init_table() { + + // get all categories from server (ajax) + $.getJSON( "/admin/get/users") + .done(function( json ) { + // then ... + console.log(json); + + // reset categories + petitions.length = 0; + + // construct petitions data + json.forEach( el => { + rec = { + id: parseInt(el.id), + first_name: el.first_name, + last_name: el.last_name, + email: el.email, + sector: el.sector, + status: (el.deprecated == 1) + ? ('<i class="fa-regular fa-eye-slash"></i> / deprecated') + : ('<i class="fa-regular fa-eye"></i> / ' + ((el.active == 1) + ? 'active' + : 'pending') + ), + deprecated: el.deprecated + } + rec.actions = create_actions_html(rec); + petitions.push(rec); + }); + + + // destroy previous datatable table instances + $('#dt-petitions').dataTable().fnClearTable(); + $('#dt-petitions').dataTable().fnDestroy(); + + // (re-)create categories datatable + table = $('#dt-petitions').DataTable({ + language: { url: '/assets/js/DataTables/localization/Greek.json' }, + data: petitions, + // ordering: false, + columns: [ + { data: 'last_name' }, + { data: 'first_name'}, + { data: 'email' }, + { data: 'sector' }, + { data: 'status' }, + { data: 'actions', class: 'dt-actions' } + ] + }); + + }) + .fail(function( jqxhr, textStatus, error ) { + console.log( "Request Failed (" + error +")" ); + }); + + } + init_table(); // init table on first run + + + + /** When click to action button + * ------------------------------------------------------------------------- + */ + $('body').on('click', '.dt-actions button', event => { + event.preventDefault(); + var button; + + if ($(event.target).data('id')) { // click on button + button = $(event.target) + + } else { // click on button's content + button = $(event.target).parent('button'); + } + + var id = button.data('id'); // user-id from data-id + var action = button.data('action'); // action to take + + console.log(action, id); + + var request = '/admin/user/'+ action +'/'+ id; + + $.get(request) + .done(function(data) { + init_table(); + }); + + }) + + + +}); diff --git a/public/assets/media/credits.txt b/public/assets/media/credits.txt index ba6120d..adcf74d 100644 --- a/public/assets/media/credits.txt +++ b/public/assets/media/credits.txt @@ -59,7 +59,6 @@ https://unsplash.com/photos/2s3fI3M1lO0 +? https://unsplash.com/photos/OF7jUVrEDJQ ++ https://unsplash.com/photos/DxRXjBQAb8I : Nykvåg, Norway -> text:#fee ++ https://unsplash.com/photos/NWANKTV5yHU : Leknes, Norway -++ https://unsplash.com/photos/D1eFDB4CMj0 : -> text:#dcb ++ https://unsplash.com/photos/wyM1KmMUSbA : Vittangi, Sweden ++ https://unsplash.com/photos/6gVOt8qOJ08 : Ljungskile, Sweden ++ https://unsplash.com/photos/AkUR27wtaxs : Högakustenbron, Sweden -> text:#fed @@ -192,7 +191,6 @@ winter+spring 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 @@ -292,7 +290,7 @@ https://www.flickr.com/photos/138402863@N02/23445581921/ !++ https://www.flickr.com/photos/78423546@N06/43429924691/ = PD https://www.flickr.com/photos/78423546@N06/42135640880/ = PD https://www.flickr.com/photos/78423546@N06/52780304947/ = PD -https://www.flickr.com/photos/tomcollinsphoto/40178410432/ !++ +https://www.flickr.com/photos/tomcollinsphoto/40178410432/ !+++ https://www.flickr.com/photos/164417177@N06/44004978630/ ? https://www.flickr.com/photos/94284791@N05/39229046194/ ! https://www.flickr.com/photos/hoanghaithinh/45678059161/ @@ -306,3 +304,12 @@ https://www.flickr.com/photos/129030830@N02/37032688484/ https://www.flickr.com/photos/drtonygeorge/1474585836/ ! */ + + + +[downloaded] +wirestock +Breathtaking shot of the lake wanaka in wanaka village, new zealand +breathtaking-shot-lake-wanaka-wanaka-village-new-zealand.jpg +https://www.freepik.com/free-photo/breathtaking-shot-lake-wanaka-wanaka-village-new-zealand_11111328.htm + diff --git a/public/assets/media/fall-09.webp b/public/assets/media/fall-09.webp Binary files differnew file mode 100644 index 0000000..09795e1 --- /dev/null +++ b/public/assets/media/fall-09.webp diff --git a/public/assets/media/summer-0.jpg b/public/assets/media/summer-0.jpg Binary files differdeleted file mode 100644 index e4deb86..0000000 --- a/public/assets/media/summer-0.jpg +++ /dev/null diff --git a/public/assets/media/summer-01.jpg b/public/assets/media/summer-01.jpg Binary files differdeleted file mode 100644 index b769bf5..0000000 --- a/public/assets/media/summer-01.jpg +++ /dev/null diff --git a/public/assets/media/winter-03.jpg b/public/assets/media/winter-03.jpg Binary files differdeleted file mode 100644 index 383cb91..0000000 --- a/public/assets/media/winter-03.jpg +++ /dev/null diff --git a/public/assets/media/winter-03.webp b/public/assets/media/winter-03.webp Binary files differnew file mode 100644 index 0000000..aa1303e --- /dev/null +++ b/public/assets/media/winter-03.webp diff --git a/public/assets/media/winter-08.jpg b/public/assets/media/winter-08.jpg Binary files differdeleted file mode 100644 index 291bc9d..0000000 --- a/public/assets/media/winter-08.jpg +++ /dev/null diff --git a/public/assets/media/winter-08.webp b/public/assets/media/winter-08.webp Binary files differnew file mode 100644 index 0000000..c06cc6c --- /dev/null +++ b/public/assets/media/winter-08.webp diff --git a/public/assets/media/winter-10.webp b/public/assets/media/winter-10.webp Binary files differnew file mode 100644 index 0000000..7885773 --- /dev/null +++ b/public/assets/media/winter-10.webp |
