Commit 733aa4a6 authored by imac's avatar imac

[Responsive]Page catalogue

parent 0aef6b1e
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 14 14" style="enable-background:new 0 0 14 14;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill:#FF6A5F;}
.st2{fill:#182566;}
.st3{opacity:8.000000e-02;}
.st4{fill:#071D3D;}
</style>
<g>
<path class="st2" d="M1,2.5h0.8C2,3.1,2.5,3.5,3.1,3.5s1.1-0.4,1.3-0.9H13c0.3,0,0.5-0.2,0.5-0.5S13.3,1.5,13,1.5H4.5
C4.3,1,3.8,0.6,3.1,0.6S2,1,1.8,1.5H1C0.7,1.5,0.5,1.7,0.5,2S0.7,2.5,1,2.5z M3.1,1.6c0.2,0,0.4,0.2,0.4,0.4c0,0.2-0.2,0.4-0.4,0.4
S2.7,2.3,2.7,2C2.7,1.8,2.9,1.6,3.1,1.6z"/>
<path class="st2" d="M13,6.5h-2C10.8,6,10.3,5.6,9.7,5.6S8.5,6,8.3,6.5H1C0.7,6.5,0.5,6.7,0.5,7S0.7,7.5,1,7.5h7.3
C8.5,8.1,9,8.4,9.7,8.4s1.1-0.4,1.3-0.9h2c0.3,0,0.5-0.2,0.5-0.5S13.3,6.5,13,6.5z M9.7,7.4C9.4,7.4,9.2,7.2,9.2,7s0.2-0.4,0.4-0.4
s0.4,0.2,0.4,0.4S9.9,7.4,9.7,7.4z"/>
<path class="st2" d="M13,11.5H7.4c-0.2-0.5-0.7-0.9-1.3-0.9s-1.1,0.4-1.3,0.9H1c-0.3,0-0.5,0.2-0.5,0.5s0.2,0.5,0.5,0.5h3.7
C4.9,13,5.4,13.4,6,13.4s1.1-0.4,1.3-0.9H13c0.3,0,0.5-0.2,0.5-0.5S13.3,11.5,13,11.5z M6,12.4c-0.2,0-0.4-0.2-0.4-0.4
c0-0.2,0.2-0.4,0.4-0.4s0.4,0.2,0.4,0.4C6.5,12.2,6.3,12.4,6,12.4z"/>
</g>
</svg>
......@@ -621,6 +621,7 @@ header{
.header .nav-wrapper li {
display: block;
}
.mobile-nav li.current:before,
.header .nav-content > ul>li:before{
content: '';
width: 0px;
......@@ -639,6 +640,7 @@ header{
-ms-transition: all .4s ease-in-out;
transition: all .4s ease-in-out;
}
.mobile-nav li.current:before,
.nav-content > ul >li.current:before,
.nav-content > ul >li.active:before,
.home-footer-nav .nav-content > ul >li:hover:before,
......@@ -649,6 +651,11 @@ header{
-o-transform: scaleX(1);
transform: scaleX(1);
}
.mobile-nav li.current:before{
background-size: 24px;
width: 33px;
}
.mobile-nav li.current:before,
.header .nav-content ul.arrow-white>li:before{
background-image: url(img/arrow-white.svg);
}
......@@ -696,6 +703,36 @@ header{
.nav-content ul {
position: relative;
}
.mobile-nav{
z-index: 999999;
left: 0;
right: 0;
height: auto;
position: fixed;
}
.mobile-nav .nav-wrapper{
position: relative;
padding: 19px 35px;
}
.mobile-nav li.current{
font-size: 18px;
line-height: 21px;
letter-spacing: 0.5px;
}
.mobile-nav li.current ul {
font-size: 14px;
width: 100% !important;
padding-top: 10px;
}
.mobile-nav li.current ul li{
display: inline-block;
padding-right: 10px;
width: 25%;
vertical-align: top;
}
.mobile-nav li.current ul li a{
opacity: 0.6;
}
.pink-list:before{
content: "";
height: 1px;
......@@ -734,6 +771,7 @@ nav ul ul{
.header .nav-content li li a {
opacity: 0.6;
}
.mobile-nav li.current a.active,
.header .nav-content li a.active,
.nav-content ul ul li.active{
opacity: 1 !important;
......@@ -1920,6 +1958,23 @@ label.chevron.bottom::first-letter {
-ms-transition: all .6s ease-in-out;
transition: all .6s ease-in-out;
}
.cover-mobile{
height: 275px;
position: relative;
background-size: cover;
background-attachment: fixed;
}
.cover-mobile .cover-desc-wrapper{
left: 22px;
padding: 15px;
bottom: 25px;
}
.cover-mobile .animated.fadeOutDown{
-webkit-animation-name: none;
-moz-animation-name: none;
-o-animation-name: none;
animation-name: none;
}
.right-container .right-panel{
position: absolute;
right: 0;
......
......@@ -122,18 +122,34 @@
.contact-form .footer{
padding: 30px 22px 32px;
}
/* Catalogue */
.right-container .left-panel{
width: 37%;
}
.right-container .right-panel{
padding: 0 27px;
}
}
/* ------------------------*/ /* ---------->>> 860 <<<-----------*/ /* ------------------------*/
@media screen and (min-width: 861px) {
.nav-content{
display: block !important;
}
.right-container{
padding-top: 0 !important;
}
.filter-btn .btn-container{
width: 30px !important;
}
}
@media screen and (max-width: 860px) {
/* general */
.display--only-mobile{
display: block;
}
.main{
height: auto !important;
}
.container-bg{
left: 0;
height: 100%;
......@@ -191,6 +207,9 @@
-o-animation-name: initial;
animation-name: initial;
}
.main-nav.nav-wrapper ul li ul{
display: none !important;
}
/*Home*/
.news-header{
position: initial;
......@@ -201,9 +220,11 @@
}
aside.news-wrapper{
width: 100%;
z-index: 9999999999;
z-index: 9999999;
max-width: 100%;
padding: 65px 10px;
overflow: auto;
position: fixed;
}
.news-header,
.news-content{
......@@ -361,12 +382,107 @@
display: none;
}
.commercial-details figure{
margin-left: auto;
margin-right: auto;
}
.active-com figure{
margin-left: 0;
}
/* Catalogue */
#catalogue .left-panel{
width: 0;
}
.cover-wrapper{
display: none;
}
.right-container .left-panel{
z-index: 999999;
left: 0 !important;
}
#catalogue .right-container .right-panel {
padding: 0px;
}
.filter-btn .btn-container{
left: 0px;
position: fixed;
left: 0;
right: 0;
width: 100% !important;
height: 38px;
bottom: 0px;
z-index: 99999999999999;
opacity: 1;
text-align: center;
}
.filter-btn span{
display: inline-block;
text-align: center;
-webkit-transform: none;
-moz-transform: none;
filter: none;
top: 0;
line-height: 38px;
bottom: 10px;
}
.filter-btn span:before{
bottom: 9px;
}
.filter-wrapper .close-btn{
top: 22px;
width: 25px;
height: 25px;
right: 0px;
}
.filter-wrapper .close-btn:before,
.filter-wrapper .close-btn:after {
left: 12px;
height: 10px;
top: 7px;
}
.filter-list{
width: 100%;
left: 0 !important;
padding: 80px 26px 15px 35px;
overflow: auto;
margin-left: 0px;
}
.filter-list .top-header{
position: fixed;
left: 0;
right: 0;
background: #fff;
z-index: 9999;
padding-top: 27px;
left: 20px;
right: 18px;
padding-bottom: 25px;
}
.top-header span{
font-size: 14px;
line-height: 16px;
}
.top-header span:first-child{
padding-left: 23px;
position: relative;
}
.top-header span:first-child:before{
content: '';
background: url(img/filtre_bleu.svg) no-repeat;
height: 16px;
width: 12px;
display: block;
z-index: 99999;
position: absolute;
background-size: 14px;
}
.filter-bloc{
width: 82%;
margin: 0 auto 9px;
}
.panel section > h2{
font-size: 25px;
padding: 40px 35px 16px;
}
.panel .product-list{
padding: 0 35px;
}
/* form */
.form-wrapper{
padding: 23px 20px 20px;
......@@ -407,7 +523,7 @@
padding-top: 9px;
}
/*footer*/
footer .footer{
footer{
display: none;
}
}
......@@ -417,8 +533,37 @@
.floated-bloc{
max-width: 85%;
}
/* Catalogue */
.mobile-nav li.current ul li{
width: 50%;
padding-bottom: 3px;
}
.panel section > h2{
font-size: 20px;
}
}
/* ------------------------*/ /* ---------->>> 420 <<<-----------*/ /* ------------------------*/
@media screen and (max-width: 420px) {
/* Catalogue */
.panel .product-list article{
width: 145px;
}
.panel .product-list article figure{
height: 145px;
width: 145px;
}
.right-container .right-panel {
padding: 0 10px;
}
.panel .product-list{
padding: 0 10px;
}
.cover-mobile{
height: 187px;
}
.panel section > h2 {
line-height: 24px;
padding: 40px 9px 16px;
letter-spacing: 0px;
}
}
\ No newline at end of file
......@@ -343,6 +343,18 @@ $.fn.appendMap = function(){
setTimeout(function(){
initMap();
},330)
}
$.fn.appendMobileMenu = function(){
var $this = $(this);
setTimeout(function(){
if (!($this.find('li.current').length)){
$('.main-nav .nav-content li.current').addClass('to-replace');
$('.main-nav .nav-content li.current').clone().find('ul').remove().end().appendTo($this);
$this.find("li.current").append($('.main-nav.nav-wrapper li.current ul'));
}
$('.right-container').css('padding-top',$this.parent().outerHeight());
},2000)
}
//Responsive function
$.fn.responsive = function(){
......@@ -369,6 +381,7 @@ $.fn.appendMap = function(){
$('.right-container').outerWidth(windowWidth - navMenuWidth);
$('.position--after-menu').css('left',navMenuWidth);
$('.right-panel').outerWidth(windowWidth - (navMenuWidth + filterWidth));
console.log(navMenuWidth);
$('.contact-form').height(windowHeight - footerHeight);
$('.contact-form .inner-form').outerHeight(windowHeight - footerContact);
if (lastSectionHeight < windowHeight - footerHeight)
......@@ -377,15 +390,22 @@ $.fn.appendMap = function(){
$('#fullpage .chevron').css('left',navMenuWidth);
$('.container-bg').css({'height':'100%' , 'width' : navMenuWidth});
$('.main').css('padding-top',0);
$('.search-filter h2').removeClass('show-filter');
$('.filter, .left-panel .map, .details').show();
$('.left-panel').appendMap();
$('.filter-list').css('margin-top',0);
$('.filter-list .top-header').css('top',"initial");
$('.header .nav-wrapper li.to-replace').append($('.mobile-nav .nav-wrapper li.current ul'));
$('.mobile-nav .nav-wrapper ul').find('li').remove();
}else{
$('.filter').appendMap();
$('.main').css('padding-top',navHeight);
$('.container-bg').css({'height':navHeight});
$('.search-filter h2').addClass('show-filter');
$('.filter-list').css('margin-top',navHeight);
$('.filter-list .top-header, .mobile-nav').css('top',navHeight);
$('.mobile-nav .nav-wrapper ul').appendMobileMenu();
}
checkFooterNavPosition();
}
......@@ -426,7 +446,7 @@ $.fn.animation = function(){
var tlCata = new TimelineMax();
tlCata.from('.right-container .right-panel',0.9,{autoAlpha:0,right:'-100%'},1);
tlCata.from('.right-container .left-panel',0.9,{autoAlpha:0,left:'0'},1);
tlCata.from('.btn-container',0.9,{autoAlpha:0,left:'-50'},2);
tlCata.from('.btn-container',0.9,{autoAlpha:0,left:'-50'},1.7);
tlCata.from('.floated-bloc h2',0.9,{autoAlpha:0,marginTop:'-100px'},1.4);
tlCata.from('.floated-bloc .text-content',0.9,{autoAlpha:0,marginLeft:'-40px'},2.2);
......@@ -445,7 +465,6 @@ function onScrollCover(){
$(this).prevAll('.cover-wrapper').addClass('prev');
$(this).nextAll('.cover-wrapper').addClass('next');
$(this).addClass('current-cover ');
setTimeout(function(){
$('.current-cover .cover-desc-wrapper').removeClass('fadeOutDown').addClass('animated fadeInDown');
}, 600);
......@@ -463,7 +482,6 @@ if ( timer ) clearTimeout(timer);
timer = setTimeout(function(){
onScrollCover();
}, 330);
$(items).each(function () {
var currLink = $(this);
var refElement = $(currLink.attr("href"));
......@@ -474,7 +492,7 @@ $(items).each(function () {
if ($('nav ul ul').find('li.active')){
$('nav ul li').removeClass('current').addClass('off');
parent = currLink.parent().parent().parent();
parent.addClass('current').removeClass('off');//('aaaaaaaaa');
parent.addClass('current').removeClass('off');
setTimeout(function(){
$('.phototheque .off .subcat').slideUp();
parent.find('ul').slideDown();
......@@ -499,7 +517,7 @@ function scrollAnchor(elemId, skipZero){
$target = $(target);
$parent = $('#load-page');
$(elemId).stop().animate({
'scrollTop': $target.position().top - temp //- $parent.offset().top
'scrollTop': $target.position().top //- $parent.offset().top
}, 1000, 'swing', function () {
window.location.hash = target;
});
......@@ -550,7 +568,7 @@ $(document).ready(function(){
onScrollCover();
}, 330);
$.fn.open_nav();
scrollAnchor('body', false);
scrollAnchor('html, body', false);
$('.news-btn').open_news();
$('.close-btn').close_news();
$('.filter-wrapper').open_filter();
......
......@@ -31,6 +31,11 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
<div class="container clearfix" id="catalogue" data-page = "<?php echo $cateID; ?>">
<div class="container-bg abs-full"></div>
<?php get_sidebar() ?>
<div class="header mobile-nav display--only-mobile blue-bg fixed">
<div class="nav-wrapper blue-bg">
<ul></ul>
</div>
</div>
<div class="right-container">
<div class="left-panel fixed-full position--after-menu ">
<div class="filter-wrapper">
......@@ -114,6 +119,11 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
<?php foreach ($child_category as $key => $value) : ?>
<section id = "cat<?php echo $value->term_id ?>">
<h2 class="crete small-title"><?php echo $value->name ?></h2>
<div class="cover-mobile display--only-mobile animated fadeInUp" style = "background-image: url('<?php echo nap_category_image($value->term_id) ?>')">
<div class="cover-desc-wrapper">
<p><?php echo $value->description; ?></p>
</div>
</div>
<div class="product-list">
<?php
$args = array('post_type' => 'product', 'stock' => 1, 'posts_per_page' => -1, 'product_cat' => $value->name, 'orderby' => 'title' , 'order' => 'ASC');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment