Commit 4ac0e8a6 authored by imac's avatar imac

[Update]Fixed menu

parent a174e96c
......@@ -810,6 +810,9 @@ nav ul ul{
display: none;
width: 190px;
}
.header .nav-wrapper ul li.current ul{
display: block;
}
/*nav ul ul li:before{
content: "•";
padding-right: 5px;
......@@ -2682,7 +2685,7 @@ div.wpcf7-mail-sent-ok{
top: 0;left:0;right: 0;
/*margin:0 -4px -5px -2px;*/
transition: all .2s ease;
z-index: 9999999999999999;
z-index: 999999;
}
#loading-container-subpage{
display: none;
......
......@@ -72,13 +72,13 @@ var initFunction=function(){
elemToScroll = $(document).find(".main");
scrollAnchor('body', true);
}
elemToScroll.on("scroll",{ items: "ul.phototheque li .subcat a"},onScroll);
elemToScroll.on("scroll",onScroll);
document.getElementById('load-page').addEventListener('scroll', window.scrollAnimation.throttledEvent, false);
$(document).find('ul.phototheque').on('click',' li.parent-cat>a',function(e){
$(document).find('ul.main-list-nav').on('click',' li.parent-cat>a',function(e){
var windowWidth = $(window).width();
e.preventDefault();
e.stopPropagation();
$('.phototheque>li').removeClass('current');
$('.main-list-nav>li').removeClass('current');
$(this).parent().addClass('current');
//if (windowWidth < 860){
//$('.nav-phototeque .nav-content>ul>li').addClass('animated fadeOutLeft');
......@@ -87,9 +87,9 @@ var initFunction=function(){
//$('.nav-phototeque .nav-content li.current ul').css('display','inline-block !important');
//.phototheque-content nav li
//}else{
$('.phototheque .subcat').slideUp('slow');
$('.phototheque .off .subcat').slideUp();
$(this).parent().find('.subcat').slideDown('slow');
$('.main-list-nav .subcat').stop().slideUp('slow');
// $('.main-list-nav .off .subcat').slideUp();
$(this).parent().find('.subcat').stop().slideDown('slow');
//}
......@@ -97,7 +97,7 @@ var initFunction=function(){
setTimeout(function(){
$('.gallery-wrapper').removeClass('hidden-elem').addClass('animated visible-elem fadeInUp');
$.fn.responsive();
},50)
},100);
}
function appendLoading() {
$('.load-page').append($('#loading-container-subpage').clone());
......@@ -110,11 +110,30 @@ var initFunction=function(){
e.preventDefault();
var link = $(this).attr("href"),
windowWidth = $(window).width();
if ($(this).parent().parent().hasClass('nav-page')){
$(document).find('.right-container').first().remove();
$('.load-page').parent().css({
'left':$('.nav-wrapper').outerWidth()
});
$('.load-page').css('opacity',1);
$(document).find('#loading-container-subpage').css({
'left': $('.nav-wrapper').outerWidth(),
'width': 'calc(100% - ' + $('.nav-wrapper').outerWidth()+'px)',
})
/**/
$('nav ul li').removeClass('current').addClass('off');
$(this).parent().addClass('current');
$(window)
/**/
}else{
$('.load-page').parent().css({
'left':0,
});
$('.load-page').parent().addClass('active');
}
history.pushState(null, null, link);
$('.load-page').load(link,function(){
$('.load-page').load(link,{'ajax' : 1},function(){
$.fn.loadPageContent();
$('#loading-container-subpage').hide();
});
if (windowWidth < 860){
$( ".c-hamburger" ).trigger( "click" );
......@@ -161,6 +180,7 @@ $('#file-p').on('change',function(e){
$(document).on('click','.int-link',function(e){
e.preventDefault();
$('.load-page').parent().removeClass('active');
$('.load-page').parent().css('left','100%');
history.pushState(null, null, $(this).find('a').attr('href'));
$('html').css('overflow','auto');
tlProduct.reverse();
......@@ -634,6 +654,7 @@ function scrollAnchor(elemId, skipZero){
$('.subcat').each(function(){
$(this).find('a[href^="#"]').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
$('a').each(function () {
$(this).removeClass('active');
})
......
......@@ -310,7 +310,7 @@ function nap_menu() {
} else {
$nappe_sets = false;
}
$menu.= '<li class ="parent-cat" data-page = "' . $category_id . '" data-img = "' . nap_category_image($category_id) . '"><a href="' . get_term_link($cat->slug, 'product_cat') . '">' . $cat->name . '</a>';
$menu.= '<li class ="parent-cat to-slide" data-page = "' . $category_id . '" data-img = "' . nap_category_image($category_id) . '"><a href="' . get_term_link($cat->slug, 'product_cat') . '">' . $cat->name . '</a>';
$args2 = array(
'taxonomy' => $taxonomy,
......
<div class="nav-content font-big">
<?php
$arrow = 'arrow-white';
$arrow = 'arrow-white nav-page';
if (isset($current_page) and $current_page == 'phototheque') {
$arrow = 'arrow-blue phototheque';
}
?>
<ul class = "<?php echo $arrow ?>">
<ul class = "main-list-nav <?php echo $arrow ?>">
<?php echo nap_menu(); ?>
<li data-page = "uniqpaper" data-img = "<?php echo nap_attachment_image(151);?>"><a href="<?php echo get_permalink(151);?>">Personnalisation</a></li>
<li class="to-slide" data-page = "uniqpaper" data-img = "<?php echo nap_attachment_image(151);?>"><a href="<?php echo get_permalink(151);?>">Personnalisation</a></li>
</ul>
<?php if (!(isset($current_page) and $current_page == 'phototheque')) { ?>
<ul class= "font-medium arrow-pink pink-list">
<li data-page = "stories" data-img = "<?php echo nap_attachment_image(154);?>"><a href="<?php echo get_permalink(154);?>">Stories</a></li>
<li data-page = "contact" data-img = "<?php echo nap_attachment_image(157);?>" ><a href="<?php echo get_permalink(157);?>">Contact</a></li>
<li class="to-slide" data-page = "stories" data-img = "<?php echo nap_attachment_image(154);?>"><a href="<?php echo get_permalink(154);?>">Stories</a></li>
<li class="to-slide" data-page = "contact" data-img = "<?php echo nap_attachment_image(157);?>" ><a href="<?php echo get_permalink(157);?>">Contact</a></li>
</ul>
<?php } ?>
</div>
......@@ -20,7 +20,10 @@ if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
}
$current_page = 'catalogue';
get_header();
if (!(isset($_POST['ajax']))) {
get_header();
}
$product;
$cate = get_queried_object();
$cateID = $cate->term_id;
......@@ -33,8 +36,9 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
?>
<div class="container clearfix" id="catalogue" data-page = "<?php echo $cateID; ?>">
<?php if (!(isset($_POST['ajax']))) { ?>
<div class="container-bg abs-full"></div>
<?php get_sidebar() ?>
<?php get_sidebar(); } ?>
<div class="header mobile-nav display--only-mobile blue-bg fixed">
<div class="nav-wrapper blue-bg">
<ul></ul>
......@@ -245,4 +249,7 @@ $child_category = get_terms('product_cat', array('parent' => $cateID, 'child_of'
</div>
</div>
</div>
<?php get_footer(); ?>
<?php
if (!(isset($_POST['ajax']))) {
get_footer();
} ?>
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