correction pb header au scroll et scroll sur les ancres

This commit is contained in:
Valentin Le Moign 2025-05-08 16:06:09 +02:00
parent e71ace994c
commit cc9ce4e38a
6 changed files with 13 additions and 4 deletions

View File

@ -801,6 +801,7 @@ header .navbar {
margin-top: 6.5rem;
left: 50px;
right: 50px;
transition: opacity 0.5s;
}
header .navbar ul {
text-align: center;
@ -1559,7 +1560,8 @@ footer section {
}
@media screen and (max-width: 700px) {
Header .title {
height: 110px;
height: auto;
padding-bottom: 0;
padding-top: 0;
}
Header .navbar {

File diff suppressed because one or more lines are too long

View File

@ -17,8 +17,10 @@ function scrollHeader() {
if (scroll >= 10) {
$Header.addClass("Hc");
window.innerWidth < 700 ? document.querySelector('.navbar').style.opacity = 0 : document.querySelector('.navbar').style.opacity = 1;
} else {
$Header.removeClass("Hc");
document.querySelector('.navbar').style.opacity = 1;
}
});
}
@ -53,7 +55,7 @@ function scrollNav() {
// $('.'+theClass).parent('li').addClass('active');
//Animate
$('html, body').stop().animate({
scrollTop: $( $(this).attr('href') ).offset().top - 140
scrollTop: $( $(this).attr('href') ).offset().top - 240
}, 400);
return false;
});
@ -87,4 +89,5 @@ jQuery(document).ready(function($){
open();
scrollbar();
navFooter();
$(window).scrollTop() > 10 ? $('header').addClass('Hc') : $('header').removeClass('Hc');
});

View File

@ -44,6 +44,7 @@ header{
margin-top: 6.5rem;
left: 50px;
right: 50px;
transition: opacity 0.5s;
ul{
text-align: center;
li{

View File

@ -52,7 +52,8 @@
@media screen and (max-width: 700px) {
Header{
.title{
height: 110px;
height: auto;
padding-bottom: 0;
padding-top: 0;
}
.navbar {

View File

@ -21,8 +21,10 @@
{% if show_onpage_menu %}
<ul class="navigation">
{% for module in page.collection() if module.template == 'blog' %}
{% if module.menu != "Méthode" %}
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
<li><a class="{{ current_module }}" href="#{{ macro.pageLinkName(module.menu)|hyphenize }}">{{ module.menu }}</a></li>
{% endif %}
{% endfor %}
{% for mitem in site.menu %}
<li>