sticky anchor menu page static

This commit is contained in:
2022-01-28 10:16:39 +01:00
parent c643774767
commit a747887595
5 changed files with 262 additions and 283 deletions
+16 -17
View File
@@ -181,7 +181,9 @@ a {
/*
@import "pages/partials/header_footer";
@import "pages/home";*/
.path-node.page-node-type-static .layout-container .layout-content .layout__region--top {
.path-node.page-node-type-static .layout-container {
overflow: unset; }
.path-node.page-node-type-static .layout-container .layout-content .layout__region--top {
padding-bottom: 3rem;
height: 30vh; }
@media (max-width: 810px) {
@@ -200,14 +202,14 @@ a {
font-size: 2rem;
font-weight: 800;
text-transform: uppercase; }
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first {
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first {
position: relative; }
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first .block-region-first {
display: flex;
justify-content: flex-end;
position: -webkit-sticky;
position: sticky;
top: 7rem; }
top: 9rem; }
@media (max-width: 810px) {
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first .block-region-first {
display: none; } }
@@ -224,16 +226,15 @@ a {
border-bottom: 1px solid #009ee3;
padding-bottom: 0.8rem;
padding-right: 1rem;
margin-top: 1rem; }
margin-top: 1rem;
scroll-margin-top: 7em; }
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first .block-region-first .block-entity-fieldnodefield-textes .field--name-field-titre:hover {
text-decoration: underline; }
@media (max-width: 810px) {
@media (max-width: 810px) {
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second {
flex: 0 1 80%;
margin: auto; } }
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second .block-entity-fieldnodefield-textes {
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second .block-entity-fieldnodefield-textes {
margin-top: 1rem;
background-color: white; }
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second .block-entity-fieldnodefield-textes .field--name-field-titre {
@@ -253,8 +254,7 @@ a {
padding-right: 2rem; }
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second .block-entity-fieldnodefield-textes p {
margin-top: 0; }
.path-node.page-node-type-static .layout-container .layout-content .layout__region--third .block-region-third {
.path-node.page-node-type-static .layout-container .layout-content .layout__region--third .block-region-third {
margin-top: 1rem;
display: flex;
flex-direction: column;
@@ -2900,6 +2900,7 @@ a {
flex-direction: row;
justify-content: space-between;
width: 100%;
padding-inline-start: 0px;
padding: 1rem; }
#header-top .region-header-top-left ul .is-active {
color: #009ee3; }
@@ -2908,21 +2909,19 @@ a {
flex-direction: column;
display: none;
min-width: 100px;
width: 100%;
justify-content: space-between;
background: white; }
background: white;
padding-inline-start: 0px; }
#header-top .region-header-top-left ul ul .is-active {
color: #009ee3; }
#header-top .region-header-top-left ul li {
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: white;
padding-bottom: 0.8rem;
max-width: inherit;
align-items: center;
padding-left: 0; }
#header-top .region-header-top-left ul li .menuOpen {
display: flex; }
align-items: center; }
#header-top .region-header-top-left ul li a {
color: black; }
#header-top .region-header-top-left ul li .is-active {
File diff suppressed because one or more lines are too long
-54
View File
@@ -132,41 +132,8 @@ jQuery(function($) {
});
///////////////////////////////////////////
// border box change color when protagoniste change
// var protagoniste = document.getElementsByClassName("type-de-protagoniste-7");
// console.log(protagoniste);
// ressource.classList.add('opened');
/**
* Return the term id for a given term name.
*/
// function _get_tid_from_term_name($term_name) {
// $vocabulary = 'Type de protagoniste';
// $arr_terms = taxonomy_get_term_by_name($term_name, $vocabulary);
// if (!empty($arr_terms)) {
// $arr_terms = array_values($arr_terms);
// $tid = $arr_terms[0]->tid;
// }
// else {
// $vobj = taxonomy_vocabulary_machine_name_load($vocabulary);
// $term = new stdClass();
// $term->name = $term_name;
// $term->vid = $vobj->vid;
// taxonomy_term_save($term);
// $tid = $term->tid;
// }
// return $tid;
// }
// function getVal() {
// const val = document. querySelector('input').value;
// log(val);
// }
// /////////////////
//// ancre dans texte
// document.querySelector('.paragraph--view-mode--textes-toc').click( function() {
@@ -178,25 +145,4 @@ jQuery(function($) {
// return false;
// });
/// sticky header on scroll
// // When the user scrolls the page, execute myFunction
// window.onscroll = function() {stickyHeader()};
// console.log(Event);
// // Get the header
// var header = document.getElementById("header-top");
// // Get the offset position of the navbar
// var sticky = header.offsetTop;
// // Add the sticky class to the header when you reach its scroll position. Remove "sticky" when you leave the scroll position
// function stickyHeader() {
// if (window.pageYOffset > sticky) {
// header.classList.add("sticky");
// } else {
// header.classList.remove("sticky");
// }
// }
///////////////////
+15 -5
View File
@@ -1,5 +1,6 @@
.path-node.page-node-type-static{
.layout-container{
overflow: unset;
// display: flex;
// flex-direction: column;
// flex-flow: row wrap;
@@ -9,6 +10,7 @@
// main{
// flex: 0 0 100%;
.layout-content{
// padding-top: 0;
.layout__region--top{ //bandeau titre page static
@@ -40,13 +42,15 @@
// }
}
// menu ancres a gauche
.layout__region--first{ // menu ancres a gauche
position: relative;
.block-region-first{
display: flex;
justify-content: flex-end;
position: -webkit-sticky;
position: sticky;
top: 7rem;
top: 9rem;
@media (max-width: 810px){
display: none;
}
@@ -65,6 +69,7 @@
padding-bottom: 0.8rem;
padding-right: 1rem;
margin-top: 1rem;
scroll-margin-top: 7em;
&:hover{
text-decoration: underline;
@@ -75,11 +80,13 @@
}
}
.layout__region--second{ // paragraphe texte
// paragraphe texte
.layout__region--second{
@media (max-width: 810px){
flex: 0 1 80%;
margin: auto;
} // paragraphe texte
}
// paragraphe texte
.block-entity-fieldnodefield-textes{
margin-top: 1rem;
background-color: $white;
@@ -109,13 +116,16 @@
}
}
.layout__region--third{ // colone de droite fichiers et ressources liées
// colone de droite fichiers et ressources liées
.layout__region--third{
.block-region-third{
margin-top: 1rem;
display: flex;
flex-direction: column;
width: 70%;
// position: -webkit-sticky;
// position: sticky;
// top: 11rem;
@media (max-width: 810px){
margin: auto;
}
@@ -79,6 +79,7 @@
justify-content: space-between;
// margin-right: 20px;
width: 100%;
padding-inline-start: 0px;
padding: 1rem;
.is-active{
color:$blue-light;
@@ -88,9 +89,11 @@
flex-direction: column;
display: none;
min-width: 100px;
width: 100%;
justify-content: space-between;
background:$white;
// padding-inline-start: 0;
padding-inline-start: 0px;
.is-active{
color:$blue-light;
@@ -99,15 +102,17 @@
li{
display: flex;
flex-direction: column;
justify-content: space-between;
// justify-content: space-between;
background-color: $white;
padding-bottom: 0.8rem;
max-width: inherit;
align-items: center;
padding-left: 0;
.menuOpen{
display: flex;
}
// padding-left: 0;
// text-align: none
;
// .menuOpen{
// display: flex;
// }
a {
color: $black;
}