started projet viewmode full page

This commit is contained in:
2026-08-15 18:58:29 +02:00
parent d3799fb3b3
commit 9f9a2501ee
12 changed files with 4439 additions and 33 deletions
File diff suppressed because it is too large Load Diff
+29
View File
@@ -0,0 +1,29 @@
uuid: 013d1fb2-1c81-4b8b-93ca-0da2e401fd88
langcode: fr
status: false
dependencies:
module:
- ctools_block
theme:
- leshed
id: leshed_titre
theme: leshed
region: content
weight: 0
provider: null
plugin: 'entity_field:node:title'
settings:
id: 'entity_field:node:title'
label: Titre
label_display: '0'
provider: ctools_block
context_mapping:
entity: '@node.node_route_context:node'
formatter:
type: string
weight: 0
label: above
settings:
link_to_entity: false
third_party_settings: { }
visibility: { }
+8
View File
@@ -0,0 +1,8 @@
uuid: 177f93c8-cb82-4d48-a9f0-ba1f88df350b
langcode: fr
status: true
dependencies: { }
id: d_m_y
label: 'd M Y'
locked: false
pattern: 'd M Y'
@@ -31,7 +31,7 @@ content:
label: hidden label: hidden
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
weight: 101 weight: 1
region: content region: content
field_artiste_s_invite_s: field_artiste_s_invite_s:
type: entity_reference_label type: entity_reference_label
@@ -39,18 +39,18 @@ content:
settings: settings:
link: true link: true
third_party_settings: { } third_party_settings: { }
weight: 105 weight: 6
region: content region: content
field_dates: field_dates:
type: daterange_default type: daterange_default
label: above label: visually_hidden
settings: settings:
timezone_override: '' timezone_override: ''
format_type: medium format_type: medium
from_to: both from_to: both
separator: '-' separator: '-'
third_party_settings: { } third_party_settings: { }
weight: 102 weight: 2
region: content region: content
field_fichiers: field_fichiers:
type: file_default type: file_default
@@ -58,7 +58,7 @@ content:
settings: settings:
use_description_as_link_text: true use_description_as_link_text: true
third_party_settings: { } third_party_settings: { }
weight: 110 weight: 9
region: content region: content
field_images: field_images:
type: image type: image
@@ -69,7 +69,7 @@ content:
image_loading: image_loading:
attribute: lazy attribute: lazy
third_party_settings: { } third_party_settings: { }
weight: 109 weight: 10
region: content region: content
field_invite_accompagne_curate_p: field_invite_accompagne_curate_p:
type: entity_reference_label type: entity_reference_label
@@ -77,7 +77,7 @@ content:
settings: settings:
link: true link: true
third_party_settings: { } third_party_settings: { }
weight: 106 weight: 4
region: content region: content
field_partenaire_s: field_partenaire_s:
type: entity_reference_label type: entity_reference_label
@@ -85,14 +85,14 @@ content:
settings: settings:
link: true link: true
third_party_settings: { } third_party_settings: { }
weight: 104 weight: 5
region: content region: content
field_portage: field_portage:
type: list_default type: list_default
label: above label: above
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
weight: 107 weight: 7
region: content region: content
field_projet_s_lie_s: field_projet_s_lie_s:
type: entity_reference_label type: entity_reference_label
@@ -100,20 +100,20 @@ content:
settings: settings:
link: true link: true
third_party_settings: { } third_party_settings: { }
weight: 108 weight: 8
region: content region: content
field_type_de_projet: field_type_de_projet:
type: entity_reference_label type: entity_reference_label
label: above label: visually_hidden
settings: settings:
link: true link: true
third_party_settings: { } third_party_settings: { }
weight: 103 weight: 3
region: content region: content
links: links:
settings: { } settings: { }
third_party_settings: { } third_party_settings: { }
weight: 100 weight: 0
region: content region: content
hidden: hidden:
langcode: true langcode: true
@@ -0,0 +1,115 @@
uuid: 3e27c55e-5165-4118-bd03-5c0433642e42
langcode: fr
status: true
dependencies:
config:
- core.entity_view_mode.node.full
- field.field.node.projet.body
- field.field.node.projet.field_artiste_s_invite_s
- field.field.node.projet.field_dates
- field.field.node.projet.field_fichiers
- field.field.node.projet.field_images
- field.field.node.projet.field_invite_accompagne_curate_p
- field.field.node.projet.field_partenaire_s
- field.field.node.projet.field_portage
- field.field.node.projet.field_projet_s_lie_s
- field.field.node.projet.field_type_de_projet
- node.type.projet
module:
- datetime_range
- file
- image
- layout_builder
- options
- text
- user
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
id: node.projet.full
targetEntityType: node
bundle: projet
mode: full
content:
body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 3
region: content
field_artiste_s_invite_s:
type: entity_reference_label
label: hidden
settings:
link: true
third_party_settings: { }
weight: 0
region: content
field_dates:
type: daterange_default
label: hidden
settings:
timezone_override: ''
format_type: d_m_y
from_to: both
separator: '-'
third_party_settings: { }
weight: 2
region: content
field_fichiers:
type: file_default
label: above
settings:
use_description_as_link_text: true
third_party_settings: { }
weight: 7
region: content
field_images:
type: image
label: hidden
settings:
image_link: ''
image_style: ''
image_loading:
attribute: lazy
third_party_settings: { }
weight: 8
region: content
field_invite_accompagne_curate_p:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 1
region: content
field_partenaire_s:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 4
region: content
field_portage:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 5
region: content
field_projet_s_lie_s:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 6
region: content
hidden:
field_type_de_projet: true
langcode: true
links: true
search_api_excerpt: true
+2 -1
View File
@@ -76,8 +76,9 @@ import { hyphenateSync } from "hyphen/fr";
}; };
function initTitles() { function initTitles() {
const titles = document.querySelectorAll('#block-leshed-identitedusite>a, article.node-type-projet>header>h2'); const titles = document.querySelectorAll('#block-leshed-identitedusite>a, article.node-type-projet>header>h2, article.node-type-projet>.cols>.left>h2');
for (const txt of titles) { for (const txt of titles) {
txt.classList.add("variable-title");
const splitted = Splitting({ target: txt, by: 'chars' }); const splitted = Splitting({ target: txt, by: 'chars' });
for (const word of splitted[0].words) { for (const word of splitted[0].words) {
const chars = Array.from(word.getElementsByClassName('char')); const chars = Array.from(word.getElementsByClassName('char'));
+77 -22
View File
@@ -1,3 +1,4 @@
@import "partials/variables";
@import "partials/colors"; @import "partials/colors";
@import "partials/fonts"; @import "partials/fonts";
@import "partials/mixins"; @import "partials/mixins";
@@ -11,6 +12,8 @@ a, a:visited{
body{ body{
margin: 0; margin: 0;
// background-color: green; // background-color: green;
font-weight: $default_fwght;
line-height: 1.5;
} }
// Splitting met .word ET .char en inline-block : // Splitting met .word ET .char en inline-block :
@@ -25,7 +28,6 @@ body{
display: inline; display: inline;
} }
$header_height: 50px;
// _ _ // _ _
// | | | | // | | | |
@@ -183,30 +185,11 @@ header[role="banner"]{
} // end of header[role="banner"]{ } // end of header[role="banner"]{
// _____ _____ __ ____ ___ _ ____ .variable-title{
// |_ _/ _ \ \ / / / ___/ _ \| | / ___|
// | || | | \ \ /\ / / | | | | | | | \___ \
// | || |_| |\ V V / | |__| |_| | |___ ___) |
// |_| \___/ \_/\_/ \____\___/|_____|____/
div.layout.layout--twocol-section--50-50{
flex-wrap: nowrap;
column-gap: 2%;
div.layout__region{
max-width: 49%;
flex: 1 0 50%;
.views-row{
// border: 1px solid red;
// box-sizing: border-box;
margin-bottom: 2em;
max-width: 100%;
article.node-type-projet{
>header{
>h2{
margin: 0; margin: 0;
font-size: 5em;
font-weight: 200; font-weight: 200;
text-transform:lowercase; text-transform:lowercase;
line-height: 1;
// margin-left: -0.04em; // margin-left: -0.04em;
filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #fff); filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 15px #fff);
span.word{ span.word{
@@ -217,6 +200,30 @@ div.layout.layout--twocol-section--50-50{
// span.whitespace{ // span.whitespace{
// letter-spacing: 0.5em; // letter-spacing: 0.5em;
// } // }
}
// _____ _____ __ ____ ___ _ ____
// |_ _/ _ \ \ / / / ___/ _ \| | / ___|
// | || | | \ \ /\ / / | | | | | | | \___ \
// | || |_| |\ V V / | |__| |_| | |___ ___) |
// |_| \___/ \_/\_/ \____\___/|_____|____/
div.layout.layout--twocol-section--50-50{
flex-wrap: nowrap;
column-gap: $colsgap;
div.layout__region{
max-width: calc(50% - $colsgap / 2);
flex: 1 0 calc(50% - $colsgap / 2);
.views-row{
// border: 1px solid red;
// box-sizing: border-box;
margin-bottom: 2em;
max-width: 100%;
article.node-type-projet{
>header{
>h2{
font-size: 5em;
} }
} }
>div{ >div{
@@ -253,3 +260,51 @@ div.layout.layout--twocol-section--50-50{
} }
} }
} }
article.node-type-projet.view-mode-full{
div.cols{
display: flex;
flex-direction: row;
gap: $colsgap;
// column-gap: 2em;
div.col{
flex:0 0 calc(50% - $colsgap / 2);
// max-width: 48%;
&.left{
>h2{
font-size: 12em;
margin: 0;
}
.field_artiste_s_invite_s{
font-size: 1.8em;
font-weight: 300;
}
.field_invite_accompagne_curate_p{
font-weight: 400;
.field-label{
font-weight: $default_fwght;
}
>div{
display: inline-block;
}
}
.field_dates{
time{
font-weight: 400;
}
}
}
&.right{
img{
max-width: 100%;
height: auto;
}
}
}
}
}
@@ -0,0 +1,3 @@
$default_fwght: 200;
$header_height: 50px;
$colsgap: 2em;
+2
View File
@@ -82,6 +82,8 @@ function leshed_preprocess_node(&$variables) {
} }
$variables["attributes"]['class'][] = "node-type-{$node_type}"; $variables["attributes"]['class'][] = "node-type-{$node_type}";
$variables["attributes"]['class'][] = "view-mode-{$variables['view_mode']}";
if ($variables['view_mode'] === "teaser") { if ($variables['view_mode'] === "teaser") {
/** @var \Drupal\file\Plugin\\Field\FieldType\FileFieldItemList $field_images */ /** @var \Drupal\file\Plugin\\Field\FieldType\FileFieldItemList $field_images */
$field_images = $node->get('field_images'); $field_images = $node->get('field_images');
@@ -0,0 +1,72 @@
{#
/**
* @file
* Default theme implementation for a field.
*
* To override output, copy the "field.html.twig" from the templates directory
* to your theme's directory and customize it, just like customizing other
* Drupal templates such as page.html.twig or node.html.twig.
*
* Instead of overriding the theming for all fields, you can also just override
* theming for a subset of fields using
* @link themeable Theme hook suggestions. @endlink For example,
* here are some theme hook suggestions that can be used for a field_foo field
* on an article node type:
* - field--node--field-foo--article.html.twig
* - field--node--field-foo.html.twig
* - field--node--article.html.twig
* - field--field-foo.html.twig
* - field--text-with-summary.html.twig
* - field.html.twig
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether to show the field label or not.
* - title_attributes: HTML attributes for the title.
* - label: The label for the field.
* - multiple: TRUE if a field can contain multiple items.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item's content.
* - entity_type: The entity type to which the field belongs.
* - field_name: The name of the field.
* - field_type: The type of the field.
* - label_display: The display settings for the label.
*
* @see template_preprocess_field()
*
* @ingroup themeable
*/
#}
{%
set title_classes = [
label_display == 'visually_hidden' ? 'visually-hidden',
]
%}
{% if label_hidden %}
{% if multiple %}
<div{{ attributes.addClass("field-items").addClass("multiple") }}>
{% for item in items %}
<div{{ item.attributes }}>{{ item.content }}</div>
{% endfor %}
</div>
{% else %}
{% for item in items %}
<div{{ attributes }}>{{ item.content }}</div>
{% endfor %}
{% endif %}
{% else %}
<div{{ attributes }}>
<div{{ title_attributes.addClass(title_classes) }}>{{ label }}</div>
{% if multiple %}
<div class="field-items multiple">
{% endif %}
{% for item in items %}
<div{{ item.attributes.addClass("field-item") }}>{{ item.content }}</div>
{% endfor %}
{% if multiple %}
</div>
{% endif %}
</div>
{% endif %}
@@ -0,0 +1,79 @@
{#
/**
* @file
* Default theme implementation to display a node.
*
* Available variables:
* - node: The node entity with limited access to object properties and methods.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - node.getCreatedTime() will return the node creation timestamp.
* - node.hasField('field_example') returns TRUE if the node bundle includes
* field_example. (This does not indicate the presence of a value in this
* field.)
* - node.isPublished() will return whether the node is published or not.
* Calling other methods, such as node.delete(), will result in an exception.
* See \Drupal\node\Entity\Node for a full list of public properties and
* methods for the node object.
* - label: (optional) The title of the node.
* - content: All node items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use
* {{ content|without('field_example') }} to temporarily suppress the printing
* of a given child element.
* - author_picture: The node author user entity, rendered using the "compact"
* view mode.
* - metadata: Metadata for this node.
* - date: (optional) Themed creation date field.
* - author_name: (optional) Themed author name field.
* - url: Direct URL of the current node.
* - display_submitted: Whether submission information should be displayed.
* - attributes: HTML attributes for the containing element.
* The attributes.class element may contain one or more of the following
* classes:
* - node: The current template type (also known as a "theming hook").
* - node--type-[type]: The current node type. For example, if the node is an
* "Article" it would result in "node--type-article". Note that the machine
* name will often be in a short form of the human readable label.
* - node--view-mode-[view_mode]: The View Mode of the node; for example, a
* teaser would result in: "node--view-mode-teaser", and
* full: "node--view-mode-full".
* The following are controlled through the node publishing options.
* - node--promoted: Appears on nodes promoted to the front page.
* - node--sticky: Appears on nodes ordered above other non-sticky nodes in
* teaser listings.
* - node--unpublished: Appears on unpublished nodes visible only to site
* admins.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - content_attributes: Same as attributes, except applied to the main
* content tag that appears in the template.
* - author_attributes: Same as attributes, except applied to the author of
* the node tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
* - view_mode: View mode; for example, "teaser" or "full".
* - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'.
* - page: Flag for the full page state. Will be true if view_mode is 'full'.
*
* @see template_preprocess_node()
*
* @ingroup themeable
*/
#}
<article{{ attributes }}>
<div class="cols">
<div class="col left">
<h2{{ title_attributes }}>
{{ label }}
</h2>
{{ content|without('field_images') }}
</div>
<div class="col right">
{{ content.field_images }}
</div>
</div>
</article>
@@ -65,9 +65,13 @@
<article{{ attributes }}> <article{{ attributes }}>
{{ title_prefix }} {{ title_prefix }}
{% if label and not page %} {% if label %}
<h2{{ title_attributes }}> <h2{{ title_attributes }}>
{% if not page %}
<a href="{{ url }}" rel="bookmark">{{ label }}</a> <a href="{{ url }}" rel="bookmark">{{ label }}</a>
{% else %}
{{ label }}
{% endif %}
</h2> </h2>
{% endif %} {% endif %}
{{ title_suffix }} {{ title_suffix }}