From 42702140731d3f9a2c40bc2d804ee020ac57505b Mon Sep 17 00:00:00 2001 From: Carmine De Rosa Date: Thu, 21 Dec 2017 17:19:32 +0100 Subject: [PATCH] add load autoscroll --- blocks/hours.php | 4 ++ content.php | 2 +- css/styles.css | 44 ++++++++++++------ header.php | 17 ++----- home.php | 4 ++ js/scripts.js | 11 ++++- menu-left.php | 2 +- .../_768up.scssc | Bin 19060 -> 21066 bytes .../global.scssc | Bin 20774 -> 20774 bytes .../header.scssc | Bin 26420 -> 27037 bytes scss/global.scss | 2 +- scss/header.scss | 18 ++++--- scss/mediaqueries/viewports/_768up.scss | 11 +++++ 13 files changed, 76 insertions(+), 39 deletions(-) create mode 100644 blocks/hours.php diff --git a/blocks/hours.php b/blocks/hours.php new file mode 100644 index 0000000..2a0e52c --- /dev/null +++ b/blocks/hours.php @@ -0,0 +1,4 @@ +Orario di apertura sede: +Lun e Mar 9:00-14:00 +Mer, Gio e Ven 9:00-14:00 e 15:30-18:30 +Sab 9:00-13:00 diff --git a/content.php b/content.php index 714d63a..f604113 100644 --- a/content.php +++ b/content.php @@ -1,5 +1,5 @@ -
+
"> diff --git a/css/styles.css b/css/styles.css index b56d468..89d2e5d 100644 --- a/css/styles.css +++ b/css/styles.css @@ -14576,7 +14576,7 @@ a:hover { /* line 92, global.scss */ #MainContent { - top: 90px; + top: 40px; z-index: 0; min-height: 200vh; overflow: hidden; @@ -14671,7 +14671,7 @@ input[type="checkbox"]:checked + label::before { /* line 2, header.scss */ header { - background: #71986e; + background: #4e984a; height: 70px; width: 100%; } @@ -14686,7 +14686,7 @@ header .logo { header .container.main { height: 70px; position: fixed; - background: #71986e; + background: #4e984a; z-index: 500; } /* line 23, header.scss */ @@ -14746,21 +14746,24 @@ header .topmenu ul { /* line 77, header.scss */ header .topmenu ul li { list-style: none; - padding: 15px; + padding: 5px 15px; display: block; - border-top: 1px solid rgba(255, 255, 255, 0.6); } /* line 82, header.scss */ header .topmenu ul li a { - color: white; + color: #4e984a; text-decoration: none; transition: .4s; + background: white; + display: block; + border-radius: 3px; + padding: 5px; } -/* line 86, header.scss */ +/* line 92, header.scss */ header .topmenu ul li a:hover { - color: rgba(255, 255, 255, 0.6); + color: #71986e; } -/* line 94, header.scss */ +/* line 100, header.scss */ header .breadcrumb { font-size: 0.75rem; padding: 5px; @@ -14775,24 +14778,24 @@ header .breadcrumb { height: 30px; z-index: 1; } -/* line 108, header.scss */ +/* line 114, header.scss */ header .breadcrumb .container { overflow: hidden; overflow-x: auto; } -/* line 112, header.scss */ +/* line 118, header.scss */ header .breadcrumb .container .crumbs { height: 20px; display: ruby; } -/* line 115, header.scss */ +/* line 121, header.scss */ header .breadcrumb .container .crumbs a { color: #4e984a; text-decoration: none; transition: .4s; cursor: pointer; } -/* line 120, header.scss */ +/* line 126, header.scss */ header .breadcrumb .container .crumbs a:hover { color: #666; } @@ -15108,12 +15111,23 @@ header .breadcrumb .container .crumbs a:hover { header .topmenu ul li:first-child { border-left: none; } - /* line 85, mediaqueries/viewports/_768up.scss */ + /* line 82, mediaqueries/viewports/_768up.scss */ + header .topmenu ul li a { + color: white; + background: none; + display: inline; + padding: 5px; + } + /* line 88, mediaqueries/viewports/_768up.scss */ + header .topmenu ul li a:hover { + color: rgba(255, 255, 255, 0.6); + } + /* line 96, mediaqueries/viewports/_768up.scss */ header .breadcrumb { top: 120px; } - /* line 92, mediaqueries/viewports/_768up.scss */ + /* line 103, mediaqueries/viewports/_768up.scss */ #MainContent { top: 160px; } diff --git a/header.php b/header.php index db4db9b..121212b 100644 --- a/header.php +++ b/header.php @@ -8,10 +8,7 @@
- Orario di apertura sede: - Lun e Mar 9:00-14:00 - Mer, Gio e Ven 9:00-14:00 e 15:30-18:30 - Sab 9:00-13:00 +
@@ -28,6 +25,7 @@
  • Albo
  • Farmacie
  • Parafarmacie
  • +
  • Notizie
  • Contatti
  • @@ -42,14 +40,5 @@
    - -
    -
    - Orario di apertura sede: - Lun e Mar 9:00-14:00 - Mer, Gio e Ven 9:00-14:00 e 15:30-18:30 - Sab 9:00-13:00 -
    -
    - + diff --git a/home.php b/home.php index e4a3238..a832615 100644 --- a/home.php +++ b/home.php @@ -10,6 +10,10 @@ Fax: 089.798628
    E-Mail: info@ordinefarmacistisalerno.it
    E-Mail certificata: ordinefarmacistisa@pec.fofi.it
    + +
    + +
    diff --git a/js/scripts.js b/js/scripts.js index 6e78e61..7f0c579 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -4,22 +4,31 @@ $(document).ready(function(){ if($(window).width() < 1024 && $(window).width() >= 768){ $('#menuRight .banner').clone().appendTo('#menuLeft'); $('#menuRight').empty(); + } + + if($(window).width() < 1024){ + if(!$('#MainContainer').hasClass('is-home')){ + $('html, body').animate({scrollTop: $('#MainContainer').offset().top - 74}); + } } + + $('.hamburger').on('click', function(){ $(this).toggleClass('is-active'); if($(this).hasClass('is-active')){ $('.topmenu').fadeIn(); + $('html, body').css({overflow: 'hidden'}); }else{ $('.topmenu').fadeOut(); + $('html, body').css({overflow: 'auto'}); } }); $('.dropdown .title').on('click', function(){ -// $('.dropdown').removeClass('active'); $(this).parent().toggleClass('active'); if($(this).parent().hasClass('active')){ diff --git a/menu-left.php b/menu-left.php index 4a24231..82d77f3 100644 --- a/menu-left.php +++ b/menu-left.php @@ -1,7 +1,7 @@