correction pb header au scroll et scroll sur les ancres
This commit is contained in:
parent
e71ace994c
commit
cc9ce4e38a
@ -801,6 +801,7 @@ header .navbar {
|
|||||||
margin-top: 6.5rem;
|
margin-top: 6.5rem;
|
||||||
left: 50px;
|
left: 50px;
|
||||||
right: 50px;
|
right: 50px;
|
||||||
|
transition: opacity 0.5s;
|
||||||
}
|
}
|
||||||
header .navbar ul {
|
header .navbar ul {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -1559,7 +1560,8 @@ footer section {
|
|||||||
}
|
}
|
||||||
@media screen and (max-width: 700px) {
|
@media screen and (max-width: 700px) {
|
||||||
Header .title {
|
Header .title {
|
||||||
height: 110px;
|
height: auto;
|
||||||
|
padding-bottom: 0;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
Header .navbar {
|
Header .navbar {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -17,8 +17,10 @@ function scrollHeader() {
|
|||||||
|
|
||||||
if (scroll >= 10) {
|
if (scroll >= 10) {
|
||||||
$Header.addClass("Hc");
|
$Header.addClass("Hc");
|
||||||
|
window.innerWidth < 700 ? document.querySelector('.navbar').style.opacity = 0 : document.querySelector('.navbar').style.opacity = 1;
|
||||||
} else {
|
} else {
|
||||||
$Header.removeClass("Hc");
|
$Header.removeClass("Hc");
|
||||||
|
document.querySelector('.navbar').style.opacity = 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -53,7 +55,7 @@ function scrollNav() {
|
|||||||
// $('.'+theClass).parent('li').addClass('active');
|
// $('.'+theClass).parent('li').addClass('active');
|
||||||
//Animate
|
//Animate
|
||||||
$('html, body').stop().animate({
|
$('html, body').stop().animate({
|
||||||
scrollTop: $( $(this).attr('href') ).offset().top - 140
|
scrollTop: $( $(this).attr('href') ).offset().top - 240
|
||||||
}, 400);
|
}, 400);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -87,4 +89,5 @@ jQuery(document).ready(function($){
|
|||||||
open();
|
open();
|
||||||
scrollbar();
|
scrollbar();
|
||||||
navFooter();
|
navFooter();
|
||||||
|
$(window).scrollTop() > 10 ? $('header').addClass('Hc') : $('header').removeClass('Hc');
|
||||||
});
|
});
|
||||||
|
@ -44,6 +44,7 @@ header{
|
|||||||
margin-top: 6.5rem;
|
margin-top: 6.5rem;
|
||||||
left: 50px;
|
left: 50px;
|
||||||
right: 50px;
|
right: 50px;
|
||||||
|
transition: opacity 0.5s;
|
||||||
ul{
|
ul{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
li{
|
li{
|
||||||
|
@ -52,7 +52,8 @@
|
|||||||
@media screen and (max-width: 700px) {
|
@media screen and (max-width: 700px) {
|
||||||
Header{
|
Header{
|
||||||
.title{
|
.title{
|
||||||
height: 110px;
|
height: auto;
|
||||||
|
padding-bottom: 0;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
}
|
}
|
||||||
.navbar {
|
.navbar {
|
||||||
|
@ -21,8 +21,10 @@
|
|||||||
{% if show_onpage_menu %}
|
{% if show_onpage_menu %}
|
||||||
<ul class="navigation">
|
<ul class="navigation">
|
||||||
{% for module in page.collection() if module.template == 'blog' %}
|
{% for module in page.collection() if module.template == 'blog' %}
|
||||||
|
{% if module.menu != "Méthode" %}
|
||||||
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
|
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
|
||||||
<li><a class="{{ current_module }}" href="#{{ macro.pageLinkName(module.menu)|hyphenize }}">{{ module.menu }}</a></li>
|
<li><a class="{{ current_module }}" href="#{{ macro.pageLinkName(module.menu)|hyphenize }}">{{ module.menu }}</a></li>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for mitem in site.menu %}
|
{% for mitem in site.menu %}
|
||||||
<li>
|
<li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user