twig et css /node-site block third projet lié
This commit is contained in:
@@ -4018,10 +4018,23 @@ body {
|
|||||||
width: fit-content;
|
width: fit-content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div div:has(h2) {
|
||||||
|
border-bottom: solid black 1px;
|
||||||
|
padding-left: 0.3rem;
|
||||||
|
}
|
||||||
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div h2 {
|
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div h2 {
|
||||||
|
width: 80%;
|
||||||
font-family: "gilroy-light";
|
font-family: "gilroy-light";
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 0.5rem;
|
font-size: 0.6rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
margin-top: 1rem;
|
||||||
|
border-bottom: solid black 1px;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div h2::after {
|
||||||
|
content: " :";
|
||||||
}
|
}
|
||||||
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet {
|
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -4044,6 +4057,14 @@ body {
|
|||||||
z-index: -1;
|
z-index: -1;
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
}
|
}
|
||||||
|
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet .node-projet-title {
|
||||||
|
width: 80%;
|
||||||
|
padding-left: 0.5rem;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #f6f7f3;
|
||||||
|
font-family: "gilroy-regular";
|
||||||
|
}
|
||||||
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet .field_field_nom_de_l_equipe {
|
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet .field_field_nom_de_l_equipe {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
@@ -4052,6 +4073,7 @@ body {
|
|||||||
}
|
}
|
||||||
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet .field_field_nom_de_l_equipe div {
|
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet .field_field_nom_de_l_equipe div {
|
||||||
border-bottom: solid black 1px;
|
border-bottom: solid black 1px;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet .field_field_nom_de_l_equipe p {
|
.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet .field_field_nom_de_l_equipe p {
|
||||||
font-family: "gilroy-semibold";
|
font-family: "gilroy-semibold";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
a<<?php
|
||||||
|
|
||||||
|
|
||||||
use Drupal\Core\Url;
|
use Drupal\Core\Url;
|
||||||
@@ -6,14 +6,7 @@ use Drupal\Core\Link;
|
|||||||
use Drupal\Core\Render\Markup;
|
use Drupal\Core\Render\Markup;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
* Functions to support theming in the quartiers_de_demain theme.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements hook_preprocess_HOOK() for html.html.twig.
|
|
||||||
*/
|
|
||||||
function quartiers_de_demain_preprocess_html(&$variables) {
|
function quartiers_de_demain_preprocess_html(&$variables) {
|
||||||
$node = \Drupal::routeMatch()->getParameter('node');
|
$node = \Drupal::routeMatch()->getParameter('node');
|
||||||
if ($node){
|
if ($node){
|
||||||
@@ -22,18 +15,12 @@ function quartiers_de_demain_preprocess_html(&$variables) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements hook_preprocess_HOOK() for page.html.twig.
|
|
||||||
*/
|
|
||||||
|
|
||||||
function quartiers_de_demain_preprocess_page(&$variables) {
|
function quartiers_de_demain_preprocess_page(&$variables) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements hook_preprocess_HOOK() for node.html.twig.
|
|
||||||
*/
|
|
||||||
function quartiers_de_demain_preprocess_node(&$variables) {
|
function quartiers_de_demain_preprocess_node(&$variables) {
|
||||||
$node = &$variables['node'];
|
$node = &$variables['node'];
|
||||||
$variables['attributes']['class'][] = 'node-type-' . $node->gettype();
|
$variables['attributes']['class'][] = 'node-type-' . $node->gettype();
|
||||||
@@ -70,7 +57,6 @@ function quartiers_de_demain_preprocess_node(&$variables) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* implements template_preprocess_region() */
|
|
||||||
|
|
||||||
function quartiers_de_demain_preprocess_region(&$variables) {
|
function quartiers_de_demain_preprocess_region(&$variables) {
|
||||||
|
|
||||||
@@ -81,8 +67,6 @@ function quartiers_de_demain_preprocess_region(&$variables) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* implements template_preprocess_field() */
|
|
||||||
|
|
||||||
function quartiers_de_demain_preprocess_field(&$variables) {
|
function quartiers_de_demain_preprocess_field(&$variables) {
|
||||||
$node = \Drupal::routeMatch()->getParameter('node');
|
$node = \Drupal::routeMatch()->getParameter('node');
|
||||||
|
|
||||||
|
|||||||
@@ -376,6 +376,7 @@
|
|||||||
div{
|
div{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
// margin-bottom: 1rem;
|
// margin-bottom: 1rem;
|
||||||
@media(max-width: 810px){
|
@media(max-width: 810px){
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -389,10 +390,25 @@
|
|||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
}
|
}
|
||||||
|
div:has(h2){
|
||||||
|
border-bottom: solid black 1px;
|
||||||
|
padding-left: 0.3rem;
|
||||||
|
}
|
||||||
h2{
|
h2{
|
||||||
|
width: 80%;
|
||||||
font-family: "gilroy-light";
|
font-family: "gilroy-light";
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 0.5rem;
|
font-size: 0.6rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
margin-top: 1rem;
|
||||||
|
border-bottom: solid black 1px;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
&::after{
|
||||||
|
content: " :";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.node-type-projet {
|
.node-type-projet {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -415,6 +431,14 @@
|
|||||||
z-index: -1;
|
z-index: -1;
|
||||||
margin-top: 0.3rem;
|
margin-top: 0.3rem;
|
||||||
}
|
}
|
||||||
|
.node-projet-title{
|
||||||
|
width: 80%;
|
||||||
|
padding-left: 0.5rem;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
margin: 0;
|
||||||
|
background-color: #f6f7f3;
|
||||||
|
font-family: "gilroy-regular";
|
||||||
|
}
|
||||||
.field_field_nom_de_l_equipe{
|
.field_field_nom_de_l_equipe{
|
||||||
width: 80%;
|
width: 80%;
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
@@ -422,6 +446,7 @@
|
|||||||
background-color: #f6f7f3;
|
background-color: #f6f7f3;
|
||||||
div{
|
div{
|
||||||
border-bottom: solid black 1px;
|
border-bottom: solid black 1px;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
p{
|
p{
|
||||||
font-family: "gilroy-semibold";
|
font-family: "gilroy-semibold";
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
* @ingroup themeable
|
* @ingroup themeable
|
||||||
*/
|
*/
|
||||||
#}
|
#}
|
||||||
{# <article{{ attributes }}>
|
<article{{ attributes }}>
|
||||||
|
|
||||||
{{ title_prefix }}
|
{{ title_prefix }}
|
||||||
{% if label and not page %}
|
{% if label and not page %}
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{{ title_suffix }}
|
{{ title_suffix }}
|
||||||
|
|
||||||
|
|
||||||
{% if display_submitted %}
|
{% if display_submitted %}
|
||||||
<footer>
|
<footer>
|
||||||
{{ author_picture }}
|
{{ author_picture }}
|
||||||
@@ -82,45 +83,24 @@
|
|||||||
</footer>
|
</footer>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<div{{ content_attributes }}>
|
<div{{ content_attributes }}>
|
||||||
{{ content }}
|
{% set node_title = node.label %}
|
||||||
</div>
|
{% set node_url = (url is defined and url) ? url : path('entity.node.canonical', {'node': node.id}) %}
|
||||||
|
|
||||||
</article> #}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{# node--projets-lies.html.twig #}
|
|
||||||
|
|
||||||
{# On détecte si le node est lauréat via le champ field_laureats #}
|
|
||||||
{% set is_laureat = content.field_laureats is defined
|
|
||||||
and content.field_laureats['#items'] is defined
|
|
||||||
and content.field_laureats['#items']|length > 0
|
|
||||||
%}
|
|
||||||
|
|
||||||
<article{{ attributes.addClass('node-type-projet', is_laureat ? 'is-laureat' : '') }}>
|
|
||||||
|
|
||||||
|
{% if node_title %}
|
||||||
{{ title_prefix }}
|
{{ title_prefix }}
|
||||||
{% if label and not page %}
|
<h3{{ title_attributes }} class="node-projet-title">
|
||||||
<h2{{ title_attributes }}>
|
<a href="{{ node_url }}" rel="bookmark">{{ node_title }}</a>
|
||||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
</h3>
|
||||||
</h2>
|
|
||||||
{% endif %}
|
|
||||||
{{ title_suffix }}
|
{{ title_suffix }}
|
||||||
|
|
||||||
{% if display_submitted %}
|
|
||||||
<footer>
|
|
||||||
{{ author_picture }}
|
|
||||||
<div{{ author_attributes }}>
|
|
||||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
|
||||||
{{ metadata }}
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div{{ content_attributes }}>
|
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</article>
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{# views-view-fields--sites_projets--page_1.html.twig (or your variant) #}
|
|
||||||
|
|
||||||
{% import _self as m %}
|
{% import _self as m %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user