diff --git a/frontend/simple/ajax.php b/frontend/simple/ajax.php index 969f45302..de960d9c3 100644 --- a/frontend/simple/ajax.php +++ b/frontend/simple/ajax.php @@ -1,8 +1,9 @@ cookieConfirm(); + } ?> \ No newline at end of file diff --git a/frontend/simple/classes/DisplayController.php b/frontend/simple/classes/DisplayController.php index 30063c643..af264c783 100644 --- a/frontend/simple/classes/DisplayController.php +++ b/frontend/simple/classes/DisplayController.php @@ -964,4 +964,40 @@ class DisplayController{ echo ''; } + + + // Cookie notice + public function displayCookieNotice(){ + global $lang; + global $aai_instalacija; + global $cookie_domain; + + /*if(!$aai_instalacija){ + return; + }*/ + + if(isset($_COOKIE['simple_frontend_cookie'])){ + return; + } + + echo ''; + } + + // Confirm cookie + public function cookieConfirm(){ + + // Set cookie for 90 days + setcookie("simple_frontend_cookie", "1", time() + (60*60*24*90), "/"); + } } \ No newline at end of file diff --git a/frontend/simple/css/style.css b/frontend/simple/css/style.css index 21c840d0a..c7b3c75a0 100644 --- a/frontend/simple/css/style.css +++ b/frontend/simple/css/style.css @@ -57,6 +57,13 @@ a:hover { color: #4ca0ea; } +.aai a { + color: #e35205; +} +.aai a:hover { + color: #fa6c21; +} + .red { color: red; } @@ -223,6 +230,50 @@ footer .footer_content .col .logo_holder img { margin-bottom: 40px; } +.aai footer a:hover { + color: #e35205 !important; +} + +.cookie_notice { + position: fixed; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: auto; + box-sizing: border-box; + padding: 15px 20px; + background-color: white; + border-top: 1px #666 solid; + box-shadow: 0px 0px 5px 1px #999; +} +.cookie_notice .left { + margin-right: 50px; + text-align: left; +} +.cookie_notice .left p { + margin: 5px 0; + line-height: 22px; +} +.cookie_notice .right button { + padding: 13px; + font-weight: 600; + text-transform: none; + background-color: #1e88e5; + border-radius: 5px; +} +.cookie_notice .right button:hover { + background-color: #4ca0ea; +} + +.aai .cookie_notice button { + background-color: #e35205; +} +.aai .cookie_notice button:hover { + background-color: #fa6c21; +} + body.landing_page #main, body.register #main, body.login #main, @@ -907,6 +958,14 @@ body.login_noEmail #content.aai #main .main_content .app_subtitle { footer .footer_content .logo_holder img { margin: 20px auto 30px auto; } + + .cookie_notice { + flex-direction: column; + } + .cookie_notice .left { + margin: 0 0 20px 0; + text-align: center; + } } /*# sourceMappingURL=style.css.map */ diff --git a/frontend/simple/index.php b/frontend/simple/index.php index 61c3b6bbf..419105577 100644 --- a/frontend/simple/index.php +++ b/frontend/simple/index.php @@ -64,6 +64,10 @@ echo ''; echo ''; + + + // Cookie notice + $dc->displayCookieNotice(); echo ''; diff --git a/frontend/simple/script/script.js b/frontend/simple/script/script.js index 2569b5d15..f1b0cca9a 100644 --- a/frontend/simple/script/script.js +++ b/frontend/simple/script/script.js @@ -1,33 +1,8 @@ -function CookieAlertSubmit (form) { +function cookie_confirm() { - $("#kuki").dialog({ - modal: true, - buttons: { - "DA, Nadaljuj s prijavo": function() { - $(this).dialog( "close" ); - $('#' + form).submit(); - }, - "Ne": function() { - $(this).dialog( "close" ); - } - } - }); -} - -function CookieAlertFB () { - - $("#kuki").dialog({ - modal: true, - buttons: { - "DA, Nadaljuj s prijavo": function() { - $(this).dialog( "close" ); - document.location.href='../api/fb_login.php'; - }, - "Ne": function() { - $(this).dialog( "close" ); - } - } - }); + $.get('frontend/simple/ajax.php?a=cookie_confirm', function(){ + $('.cookie_notice').animate({bottom:'-100%'}, {duration: 1000}); + }); } function LostPassword(alert_text) { @@ -49,14 +24,6 @@ function LostPassword(alert_text) { } } -// function CheckEmailFP() { -// var Email = document.getElementById('em'); -// console.log(Email.value); -// if (Email.search('@') == -1 || Email.indexOf('.') == -1) -// alert ('Prosimo, popravite email'); -// } - - // Posljemo zahtevo za izbris (iz simple frontenda) function sendGDPRRequest(){ diff --git a/lang/1.php b/lang/1.php index 30e5b0f98..e18cdc829 100644 --- a/lang/1.php +++ b/lang/1.php @@ -7597,6 +7597,10 @@ $lang = array ( 'simple_footer_company_contact' => "Kontakt", 'simple_footer_company_web' => "Spletna stran", + 'simple_cookie_1' => "Spletno mesto uporablja piškotke zaradi boljše uporabniške izkušnje.", + 'simple_cookie_2' => "Z uporabo naše spletne strani potrjujete, da se z njihovo uporabo strinjate. Več o uporabi piškotkov >>", + 'simple_cookie_button'=> "Da, strinjam se", + // GDPR // 'srv_gdpr' => "GDPR", diff --git a/lang/2.php b/lang/2.php index f379cc61a..baa1e6bd4 100644 --- a/lang/2.php +++ b/lang/2.php @@ -7484,6 +7484,11 @@ $lang = array ( 'simple_footer_company_contact' => "Contact", 'simple_footer_company_web' => "Website", + 'simple_cookie_1' => "We use cookies on this site to enhance your user experience.", + 'simple_cookie_2' => "By clicking any link on this page you are giving your consent for us to set cookies. More info >>", + 'simple_cookie_button'=> "Yes, I agree", + + // GDPR // 'srv_gdpr' => "GDPR", diff --git a/resources/sass/frontend_simple/basic/basic.scss b/resources/sass/frontend_simple/basic/basic.scss index 98c64c5f6..d3bfd5ec7 100644 --- a/resources/sass/frontend_simple/basic/basic.scss +++ b/resources/sass/frontend_simple/basic/basic.scss @@ -42,6 +42,13 @@ a{ color: lighten($color_blue, 10%); } } +.aai a{ + color: #e35205; + + &:hover{ + color: #fa6c21; + } +} .red{ color: red; diff --git a/resources/sass/frontend_simple/basic/mobile.scss b/resources/sass/frontend_simple/basic/mobile.scss index f5a6d3de9..330c18572 100644 --- a/resources/sass/frontend_simple/basic/mobile.scss +++ b/resources/sass/frontend_simple/basic/mobile.scss @@ -171,4 +171,15 @@ } } } + + + + .cookie_notice{ + flex-direction: column; + + .left{ + margin: 0 0 20px 0; + text-align: center; + } + } } \ No newline at end of file diff --git a/resources/sass/frontend_simple/modules/cookie.scss b/resources/sass/frontend_simple/modules/cookie.scss new file mode 100644 index 000000000..2c181c248 --- /dev/null +++ b/resources/sass/frontend_simple/modules/cookie.scss @@ -0,0 +1,57 @@ +.cookie_notice{ + position: fixed; + bottom: 0; + + display: flex; + justify-content: center; + align-items: center; + + width: 100%; + height: auto; + + box-sizing: border-box; + padding: 15px 20px; + + background-color: white; + border-top: 1px #666 solid; + box-shadow: 0px 0px 5px 1px #999; + + .left{ + margin-right: 50px; + + text-align: left; + + p{ + margin: 5px 0; + line-height: 22px; + } + } + + .right{ + + button{ + padding: 13px; + + font-weight: 600; + text-transform: none; + + background-color: $color_blue; + border-radius: 5px; + + &:hover{ + background-color: lighten($color_blue, 10%); + } + } + } +} + +.aai .cookie_notice{ + + button{ + background-color: #e35205; + + &:hover{ + background-color: #fa6c21; + } + } +} \ No newline at end of file diff --git a/resources/sass/frontend_simple/modules/footer.scss b/resources/sass/frontend_simple/modules/footer.scss index 154cc4295..151808653 100644 --- a/resources/sass/frontend_simple/modules/footer.scss +++ b/resources/sass/frontend_simple/modules/footer.scss @@ -75,5 +75,8 @@ footer{ } } } +} -} \ No newline at end of file +.aai footer a:hover{ + color: #e35205 !important; +} diff --git a/resources/sass/frontend_simple/style.scss b/resources/sass/frontend_simple/style.scss index fbc4cc323..5ac53a437 100644 --- a/resources/sass/frontend_simple/style.scss +++ b/resources/sass/frontend_simple/style.scss @@ -18,6 +18,7 @@ @import "./modules/header.scss"; @import "./modules/main.scss"; @import "./modules/footer.scss"; +@import "./modules/cookie.scss"; @import "./modules/landing_page.scss"; @import "./modules/pages.scss";