bouton deposer une ressource hidden

This commit is contained in:
2022-02-18 11:01:01 +01:00
parent d76bb506dc
commit 36ba52614c
7 changed files with 217 additions and 77 deletions
+28 -24
View File
@@ -1548,30 +1548,7 @@ a {
background: white;
margin-top: 2rem; }
.path-ressources.basededonnees .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .block-region-content .block-block-content82917d0c-5004-4bfb-af66-ce334782d82d {
grid-column: 8 / span 9;
margin-top: 4rem;
background-color: #009ee3;
height: fit-content;
width: 60%;
margin-left: 2rem;
grid-row: 2; }
.path-ressources.basededonnees .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .block-region-content .block-block-content82917d0c-5004-4bfb-af66-ce334782d82d .field--name-field-lien {
display: flex;
flex-direction: column;
margin-top: 2rem;
margin-bottom: 2rem;
margin-left: 1.5rem;
margin-right: 1.5rem;
text-align: center; }
.path-ressources.basededonnees .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .block-region-content .block-block-content82917d0c-5004-4bfb-af66-ce334782d82d .field--name-field-lien a {
font-weight: 800;
color: white;
font-size: 1.3rem; }
.path-ressources.basededonnees .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .block-region-content .block-block-content82917d0c-5004-4bfb-af66-ce334782d82d .field--name-field-lien:after {
margin-left: auto;
padding-top: 1rem;
display: block;
content: url("../images/pictos/noun_Arrow_3771902.svg"); }
visibility: hidden; }
.path-ressources.basededonnees .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .block-region-content .block-views-blockbase-de-donnees-block-1 {
width: 80%;
grid-column: 3 / span 8; }
@@ -1666,6 +1643,33 @@ a {
flex-direction: column;
margin: auto; } }
.path-ressources.basededonnees.autres .block-block-content82917d0c-5004-4bfb-af66-ce334782d82d {
visibility: visible !important;
grid-column: 8 / span 9;
margin-top: 4rem;
background-color: #009ee3;
height: fit-content;
width: 60%;
margin-left: 2rem;
grid-row: 2; }
.path-ressources.basededonnees.autres .block-block-content82917d0c-5004-4bfb-af66-ce334782d82d .field--name-field-lien {
display: flex;
flex-direction: column;
margin-top: 2rem;
margin-bottom: 2rem;
margin-left: 1.5rem;
margin-right: 1.5rem;
text-align: center; }
.path-ressources.basededonnees.autres .block-block-content82917d0c-5004-4bfb-af66-ce334782d82d .field--name-field-lien a {
font-weight: 800;
color: white;
font-size: 1.3rem; }
.path-ressources.basededonnees.autres .block-block-content82917d0c-5004-4bfb-af66-ce334782d82d .field--name-field-lien:after {
margin-left: auto;
padding-top: 1rem;
display: block;
content: url("../images/pictos/noun_Arrow_3771902.svg"); }
.page-node-type-ressource .layout__region--top .block-region-top .block-block-content4e5df355-e76c-4e44-bec0-e211d94f2640 {
width: 100%;
font-family: 'Source Code Pro';
-25
View File
@@ -132,31 +132,6 @@ jQuery(function($) {
});
/////////////////////////////////////////
// masquer bouton proposer une ressource pour collection 50 ans
// jQuery(function($) {
// var path = window.location.href; // because the 'href' property of the DOM element is the absolute path
// console.log(path);
// $ (function bouton() {
// if (path.indexOf("/ressources/bdd/29") > -1) {
// (".block-block-content82917d0c-5004-4bfb-af66-ce334782d82d").addClass('.notdisplaid');
// }
// });
// });
// jQuery(function($) {
// var path = window.location.href; // because the 'href' property of the DOM element is the absolute path
// console.log(path);
// $(".block-block-content82917d0c-5004-4bfb-af66-ce334782d82d").each(function() {
// if (this.href === path) {
// $(this).parent().closest('.field--name-field-lien').addClass('notdisplaid');
// }
// });
// });
@@ -1,3 +1,4 @@
.path-ressources.basededonnees{
.layout-content{
width: 100vw;
@@ -144,38 +145,42 @@
//button proposer une ressource
.block-block-content82917d0c-5004-4bfb-af66-ce334782d82d{
// display: none;
grid-column: 8 / span 9;
margin-top: 4rem;
background-color: $blue-light;
height: fit-content;
width: 60%;
margin-left: 2rem;
grid-row: 2;
visibility: hidden;
// grid-column: 8 / span 9;
// margin-top: 4rem;
// background-color: $blue-light;
// height: fit-content;
// width: 60%;
// margin-left: 2rem;
// grid-row: 2;
// .display{
// display: block;
// }
.field--name-field-lien{
display: flex;
flex-direction: column;
margin-top: 2rem;
margin-bottom: 2rem;
margin-left: 1.5rem;
margin-right: 1.5rem;
text-align: center;
a{
font-weight: 800;
color: $white;
font-size: 1.3rem;
}
&:after{
margin-left: auto;
padding-top: 1rem;
display: block;
content:url("../images/pictos/noun_Arrow_3771902.svg")
// .field--name-field-lien{
// display: flex;
// flex-direction: column;
// margin-top: 2rem;
// margin-bottom: 2rem;
// margin-left: 1.5rem;
// margin-right: 1.5rem;
// text-align: center;
// a{
// font-weight: 800;
// color: $white;
// font-size: 1.3rem;
// }
// &:after{
// margin-left: auto;
// padding-top: 1rem;
// display: block;
// content:url("../images/pictos/noun_Arrow_3771902.svg")
}
// }
}
// }
}
// grille des ressources
.block-views-blockbase-de-donnees-block-1{
@@ -0,0 +1,40 @@
.path-ressources.basededonnees.autres{
//button proposer une ressource
.block-block-content82917d0c-5004-4bfb-af66-ce334782d82d{
visibility: visible !important;
grid-column: 8 / span 9;
margin-top: 4rem;
background-color: $blue-light;
height: fit-content;
width: 60%;
margin-left: 2rem;
grid-row: 2;
.field--name-field-lien{
display: flex;
flex-direction: column;
margin-top: 2rem;
margin-bottom: 2rem;
margin-left: 1.5rem;
margin-right: 1.5rem;
text-align: center;
a{
font-weight: 800;
color: $white;
font-size: 1.3rem;
}
&:after{
margin-left: auto;
padding-top: 1rem;
display: block;
content:url("../images/pictos/noun_Arrow_3771902.svg")
}
}
}
}
+2
View File
@@ -30,6 +30,8 @@
@import "pages/_faq";
@import "pages/_mentions-legales";
@import "pages/_basededonnees";
@import "pages/_basededonnees_autres";
@import "pages/_ressource";
@import "pages/_offresdeservices";
@import "pages/_offre";
@@ -0,0 +1,57 @@
{#
/**
* @file
* Theme override for the basic structure of a single Drupal page.
*
* Variables:
* - logged_in: A flag indicating if user is logged in.
* - root_path: The root path of the current page (e.g., node, admin, user).
* - node_type: The content type for the current node, if the page is a node.
* - head_title: List of text elements that make up the head_title variable.
* May contain one or more of the following:
* - title: The title of the page.
* - name: The name of the site.
* - slogan: The slogan of the site.
* - page_top: Initial rendered markup. This should be printed before 'page'.
* - page: The rendered page markup.
* - page_bottom: Closing rendered markup. This variable should be printed after
* 'page'.
* - db_offline: A flag indicating if the database is offline.
* - placeholder_token: The token for generating head, css, js and js-bottom
* placeholders.
*
* @see template_preprocess_html()
*/
#}
{%
set body_classes = [
logged_in ? 'user-logged-in',
not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class,
node_type ? 'page-node-type-' ~ node_type|clean_class,
db_offline ? 'db-offline',
'basededonnees',
'historiques',
]
%}
<!DOCTYPE html>
<html{{ html_attributes }}>
<head>
<head-placeholder token="{{ placeholder_token }}">
<title>{{ head_title|safe_join(' | ') }}</title>
<css-placeholder token="{{ placeholder_token }}">
<js-placeholder token="{{ placeholder_token }}">
</head>
<body{{ attributes.addClass(body_classes) }}>
{#
Keyboard navigation/accessibility link to main content section in
page.html.twig.
#}
<a href="#main-content" class="visually-hidden focusable skip-link">
{{ 'Skip to main content'|t }}
</a>
{{ page_top }}
{{ page }}
{{ page_bottom }}
<js-bottom-placeholder token="{{ placeholder_token }}">
</body>
</html>
@@ -0,0 +1,57 @@
{#
/**
* @file
* Theme override for the basic structure of a single Drupal page.
*
* Variables:
* - logged_in: A flag indicating if user is logged in.
* - root_path: The root path of the current page (e.g., node, admin, user).
* - node_type: The content type for the current node, if the page is a node.
* - head_title: List of text elements that make up the head_title variable.
* May contain one or more of the following:
* - title: The title of the page.
* - name: The name of the site.
* - slogan: The slogan of the site.
* - page_top: Initial rendered markup. This should be printed before 'page'.
* - page: The rendered page markup.
* - page_bottom: Closing rendered markup. This variable should be printed after
* 'page'.
* - db_offline: A flag indicating if the database is offline.
* - placeholder_token: The token for generating head, css, js and js-bottom
* placeholders.
*
* @see template_preprocess_html()
*/
#}
{%
set body_classes = [
logged_in ? 'user-logged-in',
not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class,
node_type ? 'page-node-type-' ~ node_type|clean_class,
db_offline ? 'db-offline',
'basededonnees',
'autres',
]
%}
<!DOCTYPE html>
<html{{ html_attributes }}>
<head>
<head-placeholder token="{{ placeholder_token }}">
<title>{{ head_title|safe_join(' | ') }}</title>
<css-placeholder token="{{ placeholder_token }}">
<js-placeholder token="{{ placeholder_token }}">
</head>
<body{{ attributes.addClass(body_classes) }}>
{#
Keyboard navigation/accessibility link to main content section in
page.html.twig.
#}
<a href="#main-content" class="visually-hidden focusable skip-link">
{{ 'Skip to main content'|t }}
</a>
{{ page_top }}
{{ page }}
{{ page_bottom }}
<js-bottom-placeholder token="{{ placeholder_token }}">
</body>
</html>