sticky anchor menu page static
This commit is contained in:
@@ -181,7 +181,9 @@ a {
|
|||||||
/*
|
/*
|
||||||
@import "pages/partials/header_footer";
|
@import "pages/partials/header_footer";
|
||||||
@import "pages/home";*/
|
@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;
|
padding-bottom: 3rem;
|
||||||
height: 30vh; }
|
height: 30vh; }
|
||||||
@media (max-width: 810px) {
|
@media (max-width: 810px) {
|
||||||
@@ -200,14 +202,14 @@ a {
|
|||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
text-transform: uppercase; }
|
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; }
|
position: relative; }
|
||||||
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first .block-region-first {
|
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first .block-region-first {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
position: -webkit-sticky;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 7rem; }
|
top: 9rem; }
|
||||||
@media (max-width: 810px) {
|
@media (max-width: 810px) {
|
||||||
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first .block-region-first {
|
.path-node.page-node-type-static .layout-container .layout-content .layout__region--first .block-region-first {
|
||||||
display: none; } }
|
display: none; } }
|
||||||
@@ -224,16 +226,15 @@ a {
|
|||||||
border-bottom: 1px solid #009ee3;
|
border-bottom: 1px solid #009ee3;
|
||||||
padding-bottom: 0.8rem;
|
padding-bottom: 0.8rem;
|
||||||
padding-right: 1rem;
|
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 {
|
.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; }
|
text-decoration: underline; }
|
||||||
|
@media (max-width: 810px) {
|
||||||
@media (max-width: 810px) {
|
|
||||||
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second {
|
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second {
|
||||||
flex: 0 1 80%;
|
flex: 0 1 80%;
|
||||||
margin: auto; } }
|
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;
|
margin-top: 1rem;
|
||||||
background-color: white; }
|
background-color: white; }
|
||||||
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second .block-entity-fieldnodefield-textes .field--name-field-titre {
|
.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; }
|
padding-right: 2rem; }
|
||||||
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second .block-entity-fieldnodefield-textes p {
|
.path-node.page-node-type-static .layout-container .layout-content .layout__region--second .block-entity-fieldnodefield-textes p {
|
||||||
margin-top: 0; }
|
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;
|
margin-top: 1rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -2900,6 +2900,7 @@ a {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding-inline-start: 0px;
|
||||||
padding: 1rem; }
|
padding: 1rem; }
|
||||||
#header-top .region-header-top-left ul .is-active {
|
#header-top .region-header-top-left ul .is-active {
|
||||||
color: #009ee3; }
|
color: #009ee3; }
|
||||||
@@ -2908,21 +2909,19 @@ a {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
display: none;
|
display: none;
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
|
width: 100%;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background: white; }
|
background: white;
|
||||||
|
padding-inline-start: 0px; }
|
||||||
#header-top .region-header-top-left ul ul .is-active {
|
#header-top .region-header-top-left ul ul .is-active {
|
||||||
color: #009ee3; }
|
color: #009ee3; }
|
||||||
#header-top .region-header-top-left ul li {
|
#header-top .region-header-top-left ul li {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding-bottom: 0.8rem;
|
padding-bottom: 0.8rem;
|
||||||
max-width: inherit;
|
max-width: inherit;
|
||||||
align-items: center;
|
align-items: center; }
|
||||||
padding-left: 0; }
|
|
||||||
#header-top .region-header-top-left ul li .menuOpen {
|
|
||||||
display: flex; }
|
|
||||||
#header-top .region-header-top-left ul li a {
|
#header-top .region-header-top-left ul li a {
|
||||||
color: black; }
|
color: black; }
|
||||||
#header-top .region-header-top-left ul li .is-active {
|
#header-top .region-header-top-left ul li .is-active {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -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
|
//// ancre dans texte
|
||||||
// document.querySelector('.paragraph--view-mode--textes-toc').click( function() {
|
// document.querySelector('.paragraph--view-mode--textes-toc').click( function() {
|
||||||
@@ -178,25 +145,4 @@ jQuery(function($) {
|
|||||||
// return false;
|
// 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");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
///////////////////
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
.path-node.page-node-type-static{
|
.path-node.page-node-type-static{
|
||||||
.layout-container{
|
.layout-container{
|
||||||
|
overflow: unset;
|
||||||
// display: flex;
|
// display: flex;
|
||||||
// flex-direction: column;
|
// flex-direction: column;
|
||||||
// flex-flow: row wrap;
|
// flex-flow: row wrap;
|
||||||
@@ -9,6 +10,7 @@
|
|||||||
// main{
|
// main{
|
||||||
// flex: 0 0 100%;
|
// flex: 0 0 100%;
|
||||||
.layout-content{
|
.layout-content{
|
||||||
|
|
||||||
// padding-top: 0;
|
// padding-top: 0;
|
||||||
.layout__region--top{ //bandeau titre page static
|
.layout__region--top{ //bandeau titre page static
|
||||||
|
|
||||||
@@ -40,13 +42,15 @@
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// menu ancres a gauche
|
||||||
.layout__region--first{ // menu ancres a gauche
|
.layout__region--first{ // menu ancres a gauche
|
||||||
position: relative;
|
position: relative;
|
||||||
.block-region-first{
|
.block-region-first{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
position: -webkit-sticky;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 7rem;
|
top: 9rem;
|
||||||
@media (max-width: 810px){
|
@media (max-width: 810px){
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -65,6 +69,7 @@
|
|||||||
padding-bottom: 0.8rem;
|
padding-bottom: 0.8rem;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
scroll-margin-top: 7em;
|
||||||
|
|
||||||
&:hover{
|
&:hover{
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
@@ -75,11 +80,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout__region--second{ // paragraphe texte
|
// paragraphe texte
|
||||||
|
.layout__region--second{
|
||||||
@media (max-width: 810px){
|
@media (max-width: 810px){
|
||||||
flex: 0 1 80%;
|
flex: 0 1 80%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
} // paragraphe texte
|
}
|
||||||
|
// paragraphe texte
|
||||||
.block-entity-fieldnodefield-textes{
|
.block-entity-fieldnodefield-textes{
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
@@ -109,13 +116,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// colone de droite fichiers et ressources liées
|
||||||
.layout__region--third{ // colone de droite fichiers et ressources liées
|
.layout__region--third{
|
||||||
.block-region-third{
|
.block-region-third{
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
|
// position: -webkit-sticky;
|
||||||
|
// position: sticky;
|
||||||
|
// top: 11rem;
|
||||||
@media (max-width: 810px){
|
@media (max-width: 810px){
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
// margin-right: 20px;
|
// margin-right: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding-inline-start: 0px;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
.is-active{
|
.is-active{
|
||||||
color:$blue-light;
|
color:$blue-light;
|
||||||
@@ -88,9 +89,11 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
display: none;
|
display: none;
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
|
width: 100%;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background:$white;
|
background:$white;
|
||||||
// padding-inline-start: 0;
|
// padding-inline-start: 0;
|
||||||
|
padding-inline-start: 0px;
|
||||||
|
|
||||||
.is-active{
|
.is-active{
|
||||||
color:$blue-light;
|
color:$blue-light;
|
||||||
@@ -99,15 +102,17 @@
|
|||||||
li{
|
li{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
padding-bottom: 0.8rem;
|
padding-bottom: 0.8rem;
|
||||||
max-width: inherit;
|
max-width: inherit;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 0;
|
// padding-left: 0;
|
||||||
.menuOpen{
|
// text-align: none
|
||||||
display: flex;
|
;
|
||||||
}
|
// .menuOpen{
|
||||||
|
// display: flex;
|
||||||
|
// }
|
||||||
a {
|
a {
|
||||||
color: $black;
|
color: $black;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user