This commit is contained in:
2024-07-01 12:26:37 +02:00
parent b32487c269
commit 09cd038feb
6 changed files with 65 additions and 47 deletions
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -170,6 +170,8 @@
} }
.layout-content { .layout-content {
position: relative;
top: 110px;
order: 2; order: 2;
padding-top: 3rem; padding-top: 3rem;
padding-bottom: 6rem; padding-bottom: 6rem;
@@ -295,8 +297,7 @@ header {
z-index: 101; z-index: 101;
width: 100vw; width: 100vw;
max-width: 100vw; max-width: 100vw;
position: -webkit-sticky; position: fixed;
position: sticky;
top: 0; top: 0;
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px; box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
} }
@@ -2584,11 +2585,10 @@ html.js body.node-type-operation.node-id-7 div.dialog-off-canvas-main-canvas div
position: relative; position: relative;
} }
.page-programme .layout__region--first .block-region-first { .page-programme .layout__region--first .block-region-first {
padding-left: 20%; padding-left: 3rem;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
position: -webkit-sticky; position: fixed;
position: sticky;
top: 10rem; top: 10rem;
} }
.page-programme .layout__region--first .block-region-first > .block-block-content { .page-programme .layout__region--first .block-region-first > .block-block-content {
+29 -15
View File
@@ -194,27 +194,41 @@ jQuery(document).ready(function($){
//// ancre dans texte au click parragraphe correspondant arrive en dessous du header //// ancre dans texte au click parragraphe correspondant arrive en dessous du header
// (function($, window) {
// function adjustAnchor() { // var adjustAnchor = function() {
// var $anchor = $(window.location.hash); // Select the anchor element based on the hash in the URL // var $anchor = $('.block-region-first'),
// var fixedElementHeight = $('.block-region-first').outerHeight(); // Get the height of the sticky element // fixedElementHeight = 300;
// console.log($anchor);
// if ($anchor.length > 0) { // if ($anchor.length > 0) {
// $('html, body').stop().animate({ // $('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0);
// scrollTop: $anchor.offset().top - fixedElementHeight // Adjust the scroll position to account for the sticky element height
// }, 0);
// }
// } // }
// };
// // Call the function on page load if there's a hash
// if (window.location.hash) {
// adjustAnchor();
// }
// // Adjust the anchor on hash change
// $(window).on('hashchange', function() { // $(window).on('hashchange', function() {
// adjustAnchor(); // adjustAnchor();
// }); // });
// });
function adjustAnchor() {
var $anchor = $(window.location.hash); // Select the anchor element based on the hash in the URL
var fixedElementHeight = $('.block-region-first').outerHeight(); // Get the height of the sticky element
if ($anchor.length > 0) {
$('html, body').stop().animate({
scrollTop: $anchor.offset().top - fixedElementHeight // Adjust the scroll position to account for the sticky element height
}, 0);
}
}
// Call the function on page load if there's a hash
if (window.location.hash) {
adjustAnchor();
}
// Adjust the anchor on hash change
$(window).on('hashchange', function() {
adjustAnchor();
});
@@ -29,6 +29,8 @@ $width-menu-slidedown : 550px;
} }
.layout-content{ .layout-content{
position: relative;
top: $header-height;
order: 2; order: 2;
padding-top: 3rem; padding-top: 3rem;
padding-bottom: 6rem; padding-bottom: 6rem;
@@ -1,17 +1,20 @@
.page-programme{ .page-programme{
.layout__region--first{ .layout__region--first{
position: relative; position: relative;
.block-region-first{ .block-region-first{
// position: relative;
padding-left: 20%; padding-left:3rem;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
position: -webkit-sticky; position: fixed;
position: sticky;
top: 10rem; top: 10rem;
> .block-block-content{ > .block-block-content{
// position: -webkit-sticky;
// position: sticky;
// top: 10rem;
width: 100%; width: 100%;
ul{ ul{
padding-left: 0; padding-left: 0;
@@ -7,8 +7,7 @@ header{
z-index: 101; z-index: 101;
width: 100vw; width: 100vw;
max-width: 100vw; max-width: 100vw;
position: -webkit-sticky; position: fixed;
position: sticky;
top: 0; top: 0;
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px; box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
@media (max-width:800px) { @media (max-width:800px) {