static page design integration
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
uuid: c377d627-db53-4f11-bb7f-8f3814a96a3b
|
||||||
|
langcode: fr
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
config:
|
||||||
|
- node.type.static
|
||||||
|
module:
|
||||||
|
- language
|
||||||
|
- node
|
||||||
|
id: static
|
||||||
|
label: static
|
||||||
|
type: 'canonical_entities:node'
|
||||||
|
pattern: '/[node:title]'
|
||||||
|
selection_criteria:
|
||||||
|
907f1c98-5147-4498-8335-82e3ebaf60ea:
|
||||||
|
id: 'entity_bundle:node'
|
||||||
|
negate: false
|
||||||
|
context_mapping:
|
||||||
|
node: node
|
||||||
|
bundles:
|
||||||
|
static: static
|
||||||
|
0c9618f8-e01d-4279-9e52-42448b85a480:
|
||||||
|
id: language
|
||||||
|
negate: false
|
||||||
|
context_mapping:
|
||||||
|
language: 'node:langcode:language'
|
||||||
|
langcodes:
|
||||||
|
fr: fr
|
||||||
|
en: en
|
||||||
|
selection_logic: and
|
||||||
|
weight: -10
|
||||||
|
relationships:
|
||||||
|
'node:langcode:language':
|
||||||
|
label: Langue
|
||||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -180,7 +180,7 @@ gsap.registerPlugin(ScrollTrigger);
|
|||||||
|
|
||||||
const headerScaleTarget = 0.4;
|
const headerScaleTarget = 0.4;
|
||||||
|
|
||||||
const cols = document.querySelector('article.node-type-projet.view-mode-full .cols, article.node-type-evenement.view-mode-full .cols');
|
const cols = document.querySelector('article.node-type-static.view-mode-full .cols, article.node-type-projet.view-mode-full .cols, article.node-type-evenement.view-mode-full .cols');
|
||||||
const leftColumn = cols && cols.querySelector('.col.left');
|
const leftColumn = cols && cols.querySelector('.col.left');
|
||||||
const rightColumn = cols && cols.querySelector('.col.right .field_images');
|
const rightColumn = cols && cols.querySelector('.col.right .field_images');
|
||||||
const spacer = leftColumn && leftColumn.querySelector('.spacer');
|
const spacer = leftColumn && leftColumn.querySelector('.spacer');
|
||||||
@@ -188,6 +188,7 @@ gsap.registerPlugin(ScrollTrigger);
|
|||||||
const spacerBaseHeight = spacer ? (parseFloat(getComputedStyle(spacer).height) || 0) : 0;
|
const spacerBaseHeight = spacer ? (parseFloat(getComputedStyle(spacer).height) || 0) : 0;
|
||||||
|
|
||||||
const pageHeader = document.querySelector('\
|
const pageHeader = document.querySelector('\
|
||||||
|
article.node-type-static.view-mode-full .cols>.col.left>header,\
|
||||||
article.node-type-projet.view-mode-full .cols>.col.left>header,\
|
article.node-type-projet.view-mode-full .cols>.col.left>header,\
|
||||||
article.node-type-evenement.view-mode-full .cols>.col.left>header\
|
article.node-type-evenement.view-mode-full .cols>.col.left>header\
|
||||||
');
|
');
|
||||||
@@ -344,7 +345,11 @@ gsap.registerPlugin(ScrollTrigger);
|
|||||||
function initFsLightbox(){
|
function initFsLightbox(){
|
||||||
console.log('initFsLightbox');
|
console.log('initFsLightbox');
|
||||||
// console.log(window.FsLightbox);
|
// console.log(window.FsLightbox);
|
||||||
let imgs_links = document.querySelectorAll('article.node-type-projet.view-mode-full .col.right .field_images.multiple .field-item a');
|
let imgs_links = document.querySelectorAll('\
|
||||||
|
article.node-type-static.view-mode-full .col.right .field_images.multiple .field-item a,\
|
||||||
|
article.node-type-projet.view-mode-full .col.right .field_images.multiple .field-item a,\
|
||||||
|
article.node-type-evenement.view-mode-full .col.right .field_images.multiple .field-item a\
|
||||||
|
');
|
||||||
for (const link of imgs_links) {
|
for (const link of imgs_links) {
|
||||||
link.setAttribute("data-fslightbox", "gallery")
|
link.setAttribute("data-fslightbox", "gallery")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
// ── Pages (l'ordre ci-dessous EST la cascade) ──────────────────────────────
|
// ── Pages (l'ordre ci-dessous EST la cascade) ──────────────────────────────
|
||||||
@use "partials/pages/home";
|
@use "partials/pages/home";
|
||||||
|
@use "partials/pages/static";
|
||||||
@use "partials/pages/projet";
|
@use "partials/pages/projet";
|
||||||
@use "partials/pages/evenement";
|
@use "partials/pages/evenement";
|
||||||
@use "partials/pages/views-archives-projets";
|
@use "partials/pages/views-archives-projets";
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
// ____ _ _ _
|
||||||
|
// / ___|| |_ __ _| |_(_) ___
|
||||||
|
// \___ \| __/ _` | __| |/ __|
|
||||||
|
// ___) | || (_| | |_| | (__
|
||||||
|
// |____/ \__\__,_|\__|_|\___|
|
||||||
|
|
||||||
|
@use "../abstracts/variables" as *;
|
||||||
|
@use "../abstracts/node-full" as *;
|
||||||
|
|
||||||
|
article.node-type-static.view-mode-full{
|
||||||
|
@include nodefull();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -252,6 +252,7 @@ function leshed_preprocess_node(&$variables) {
|
|||||||
// voir la typo brute le temps que le module s'exécute ; et le JS
|
// voir la typo brute le temps que le module s'exécute ; et le JS
|
||||||
// sélectionne cette même classe : une seule liste, aucune désynchro.
|
// sélectionne cette même classe : une seule liste, aucune désynchro.
|
||||||
$variable_titles = [
|
$variable_titles = [
|
||||||
|
'static' => ['full'],
|
||||||
'projet' => ['teaser', 'tableau_liste', 'lie', 'full'],
|
'projet' => ['teaser', 'tableau_liste', 'lie', 'full'],
|
||||||
'evenement' => ['teaser', 'tableau_liste', 'calendrier', 'full'],
|
'evenement' => ['teaser', 'tableau_liste', 'calendrier', 'full'],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @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">
|
||||||
|
<header>
|
||||||
|
<h2{{ title_attributes.addClass('node-title') }}>
|
||||||
|
{{ label }}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
{{ content|without('field_images') }}
|
||||||
|
<div class="spacer"></div>
|
||||||
|
</div>
|
||||||
|
<div class="col right">
|
||||||
|
{{ content.field_images }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</article>
|
||||||
Reference in New Issue
Block a user