twig et css /node-site block third projet lié
This commit is contained in:
@@ -4018,10 +4018,23 @@ body {
|
||||
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 {
|
||||
width: 80%;
|
||||
font-family: "gilroy-light";
|
||||
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 {
|
||||
position: relative;
|
||||
@@ -4044,6 +4057,14 @@ body {
|
||||
z-index: -1;
|
||||
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 {
|
||||
width: 80%;
|
||||
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 {
|
||||
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 {
|
||||
font-family: "gilroy-semibold";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
a<<?php
|
||||
|
||||
|
||||
use Drupal\Core\Url;
|
||||
@@ -6,14 +6,7 @@ use Drupal\Core\Link;
|
||||
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) {
|
||||
$node = \Drupal::routeMatch()->getParameter('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) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for node.html.twig.
|
||||
*/
|
||||
function quartiers_de_demain_preprocess_node(&$variables) {
|
||||
$node = &$variables['node'];
|
||||
$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) {
|
||||
|
||||
@@ -81,8 +67,6 @@ function quartiers_de_demain_preprocess_region(&$variables) {
|
||||
}
|
||||
|
||||
|
||||
/* implements template_preprocess_field() */
|
||||
|
||||
function quartiers_de_demain_preprocess_field(&$variables) {
|
||||
$node = \Drupal::routeMatch()->getParameter('node');
|
||||
|
||||
|
||||
@@ -376,6 +376,7 @@
|
||||
div{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
// margin-bottom: 1rem;
|
||||
@media(max-width: 810px){
|
||||
justify-content: center;
|
||||
@@ -389,10 +390,25 @@
|
||||
margin-bottom: 1rem;
|
||||
width: fit-content;
|
||||
}
|
||||
div:has(h2){
|
||||
border-bottom: solid black 1px;
|
||||
padding-left: 0.3rem;
|
||||
}
|
||||
h2{
|
||||
width: 80%;
|
||||
font-family: "gilroy-light";
|
||||
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 {
|
||||
position: relative;
|
||||
@@ -415,6 +431,14 @@
|
||||
z-index: -1;
|
||||
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{
|
||||
width: 80%;
|
||||
padding-left: 0.5rem;
|
||||
@@ -422,6 +446,7 @@
|
||||
background-color: #f6f7f3;
|
||||
div{
|
||||
border-bottom: solid black 1px;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
p{
|
||||
font-family: "gilroy-semibold";
|
||||
|
||||
@@ -62,65 +62,45 @@
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{# <article{{ attributes }}>
|
||||
<article{{ attributes }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if label and not page %}
|
||||
<h2{{ title_attributes }}>
|
||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
{{ title_prefix }}
|
||||
{% if label and not page %}
|
||||
<h2{{ title_attributes }}>
|
||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
|
||||
{% if display_submitted %}
|
||||
<footer>
|
||||
{{ author_picture }}
|
||||
<div{{ author_attributes }}>
|
||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||
{{ metadata }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
<div{{ content_attributes }}>
|
||||
{{ content }}
|
||||
</div>
|
||||
{% if display_submitted %}
|
||||
<footer>
|
||||
{{ author_picture }}
|
||||
<div{{ author_attributes }}>
|
||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||
{{ metadata }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
</article> #}
|
||||
|
||||
<div{{ content_attributes }}>
|
||||
{% set node_title = node.label %}
|
||||
{% set node_url = (url is defined and url) ? url : path('entity.node.canonical', {'node': node.id}) %}
|
||||
|
||||
{% if node_title %}
|
||||
{{ title_prefix }}
|
||||
<h3{{ title_attributes }} class="node-projet-title">
|
||||
<a href="{{ node_url }}" rel="bookmark">{{ node_title }}</a>
|
||||
</h3>
|
||||
{{ title_suffix }}
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
|
||||
</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' : '') }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if label and not page %}
|
||||
<h2{{ title_attributes }}>
|
||||
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
|
||||
</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
|
||||
{% if display_submitted %}
|
||||
<footer>
|
||||
{{ author_picture }}
|
||||
<div{{ author_attributes }}>
|
||||
{% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
|
||||
{{ metadata }}
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
|
||||
<div{{ content_attributes }}>
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{# views-view-fields--sites_projets--page_1.html.twig (or your variant) #}
|
||||
|
||||
|
||||
{% import _self as m %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user