11 Commits

16 changed files with 1691 additions and 72 deletions

View File

@@ -24,7 +24,7 @@
"drupal/editor_advanced_link": "^2.2",
"drupal/geofield": "^1.60",
"drupal/image_delta_formatter": "^1.2",
"drupal/image_field_caption": "^2.0",
"drupal/image_field_caption": "2.0.x-dev@dev",
"drupal/leaflet": "^10.2",
"drupal/leaflet_more_maps": "^2.2",
"drupal/linked_field": "^1.5",
@@ -126,9 +126,17 @@
"merge-extra": true
},
"patches": {
"drupal/core": {
"Image field generates only default language URL when linking to corresponding entity. https://www.drupal.org/node/2645922?no_cache=1733132298":"https://www.drupal.org/files/issues/2021-03-15/2645922-45.patch"
},
"drupal/social_media_links":{
"Replace Twitter with X https://www.drupal.org/project/social_media_links/issues/3384469": "https://www.drupal.org/files/issues/2023-09-12/social_media_links-change_twitter_to_x-3384469-7.patch"
},
"drupal/image_field_caption":{
"Rewrite module to use default field storage https://www.drupal.org/project/image_field_caption/issues/3472997": "./patches/image_field_caption_3472997_12.patch"
}
},
"oldpatches": {
}
}
}

24
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "3f682451141745b61e2f384d1c28ce84",
"content-hash": "21ca923d67e614146f8e96c3190d1cde",
"packages": [
{
"name": "asm89/stack-cors",
@@ -4550,29 +4550,26 @@
},
{
"name": "drupal/image_field_caption",
"version": "2.0.1",
"version": "dev-2.0.x",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/image_field_caption.git",
"reference": "2.0.1"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/image_field_caption-2.0.1.zip",
"reference": "2.0.1",
"shasum": "053e1ccfc638b3b2cd5c59c3c6a053e4e5041183"
"reference": "b0c155d5aac125666f01c0aa102a8a1f88b1f955"
},
"require": {
"drupal/core": "^9 || ^10"
},
"type": "drupal-module",
"extra": {
"branch-alias": {
"dev-2.0.x": "2.0.x-dev"
},
"drupal": {
"version": "2.0.1",
"datestamp": "1705443097",
"version": "2.0.x-dev",
"datestamp": "1711647363",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
"status": "not-covered",
"message": "Dev releases are not covered by Drupal security advisories."
}
}
},
@@ -12961,6 +12958,7 @@
"drupal/entity_clone": 20,
"drupal/field_group": 20,
"drupal/filter_perms": 20,
"drupal/image_field_caption": 20,
"drupal/inline_entity_form": 5,
"drupal/linkit": 10,
"drupal/login_destination": 20,

View File

@@ -4,7 +4,7 @@ status: true
dependencies:
config:
- field.field.paragraph.site_diapo.field_images
- image.style.wide
- image.style.very_large
- paragraphs.paragraphs_type.site_diapo
module:
- image_field_caption
@@ -17,12 +17,12 @@ content:
type: image_caption
label: visually_hidden
settings:
image_style: wide
image_style: very_large
image_link: ''
image_loading:
attribute: lazy
third_party_settings: { }
weight: 0
weight: 2
region: content
hidden:
search_api_excerpt: true

View File

@@ -13,6 +13,7 @@ third_party_settings:
translation_sync:
alt: alt
title: title
caption: caption
file: '0'
id: node.actualite.field_images
field_name: field_images
@@ -43,6 +44,6 @@ settings:
width: null
height: null
caption: ''
caption_field: 1
caption_field_required: 0
caption_field: true
caption_field_required: false
field_type: image

View File

@@ -13,6 +13,7 @@ third_party_settings:
translation_sync:
alt: alt
title: title
caption: caption
file: '0'
id: paragraph.site_diapo.field_images
field_name: field_images
@@ -43,6 +44,6 @@ settings:
width: null
height: null
caption: ''
caption_field: 1
caption_field_required: 0
caption_field: true
caption_field_required: false
field_type: image

View File

@@ -21,6 +21,7 @@ settings:
title: ''
width: null
height: null
caption: ''
module: image
locked: false
cardinality: -1

View File

@@ -21,6 +21,7 @@ settings:
title: ''
width: null
height: null
caption: ''
module: image
locked: false
cardinality: -1

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@
text-align: center;
position: relative;
width: 155%;
max-width: 800px;
max-width: 600px;
margin: 0 auto;
height: auto;
}
@@ -63,7 +63,7 @@
color: white;
background: black;
text-transform: uppercase;
font-size: 0.6rem;
font-size: 0.5rem;
padding-left: 0.5rem;
text-decoration: none;
margin-top: 0.7rem;
@@ -83,9 +83,10 @@
#popup-content {
width: 300px;
padding-right: 30px;
font-size: 0.6rem !important;
}
#popup-content p {
font-size: 0.7rem;
font-size: 0.6rem !important;
}
@media (max-width: 810px) {
#popup-content {

View File

@@ -11,7 +11,7 @@
function q2d_mod_theme() {
return array(
'svg_mapsites' => array(
'variables' => array('vpw' => null, 'vph' => null, 'sites' => []),
'variables' => array('vpw' => null, 'vph' => null, 'sites' => [], 'label' => null),
),
);
}

View File

@@ -41,12 +41,14 @@ class SitesMap extends BlockBase {
foreach($allSites as $index => $site){
$langcode = \Drupal::languageManager()->getCurrentLanguage()->getId();
// $title = $site->get('title')->getString();
$title = $site->hasTranslation($language) ? $site->getTranslation($language)->get('title')->getString() : $site->get('title')->getString();
// $subtitle = $site->get('field_sous_titre')->getString();
$subtitle = $site->hasTranslation($language) ? $site->getTranslation($language)->get('field_sous_titre')->getString() : $site->get('field_sous_titre')->getString();
$link_options = ['absolute' => TRUE, 'attributes' => ['class' => 'site-link']]; // Passer 'absolute' à TRUE
$link_options = ['absolute' => TRUE, 'attributes' => ['class' => 'site-link'], 'language' => \Drupal::languageManager()->getLanguage($langcode)]; // Passer 'absolute' à TRUE
$site_url = $site->toUrl('canonical', $link_options)->toString(); // URL absolue pour le data-url
$site_link_object = Link::createFromRoute(t("got to site"), 'entity.node.canonical', ['node' => $site->id()], $link_options);
$link = $site_link_object->toString()->getGeneratedLink();
@@ -61,9 +63,9 @@ class SitesMap extends BlockBase {
$x = round(($lon - $lonLeft) / ($lonRight - $lonLeft) * $vp_w);
$y = round(($latTop - $lat) / ($latTop - $latBottom) * $vp_h);
$r = 15;
$r = 12;
$m = -$r/1.5+3;
$l = $r/1.5 +4;
$l = $r/1.5 +2.5;
$sites_paths .= <<<SVGSITEPATH
<g
id="site-$index"
@@ -99,6 +101,7 @@ class SitesMap extends BlockBase {
],
'svg_mapsites' => [
'#theme' => 'svg_mapsites',
'#label' => "Les 10 sites de projet",
'#sites' => $sites_paths,
'#vpw' => $vp_w,
'#vph' => $vp_h,
@@ -115,6 +118,7 @@ class SitesMap extends BlockBase {
// '#markup' => $this->t('Hello, Sites Map!'),
// ];
}
public function getCacheMaxAge() {
return 0;
}

View File

@@ -1,4 +1,7 @@
<div id="sites-map-container">
<h2>{{label}}</h2>
{# <svg {{ svg_attributes }}>
<path {{ path_attributes }}></path>
</svg> #}

View File

@@ -479,7 +479,7 @@ header .header_nav_container #block-quartiers-de-demain-entete ul li a {
font-size: 0.6rem;
}
}
@media (max-width: 500px) {
@media (max-width: 810px) {
header .header_nav_container #block-quartiers-de-demain-entete ul li a {
display: flex;
flex-direction: column;
@@ -3013,6 +3013,12 @@ body {
grid-column: 2/span 9;
}
}
@media (max-width: 510px) {
.node-type-static .layout-content .content_container #block-quartiers-de-demain-titredepage {
margin-top: 13rem;
grid-column: 2/span 9;
}
}
.node-type-static .layout-content .content_container #block-quartiers-de-demain-titredepage h1 {
text-transform: none;
color: black;
@@ -3377,9 +3383,6 @@ body {
border-bottom: none;
padding-bottom: 0;
}
.node-type-site .layout--threecol-25-50-25 .layout__region--second .block-region-second .field_field_parties div {
width: fit-content;
}
.node-type-site .layout--threecol-25-50-25 .layout__region--second .block-region-second div:has(.field_field_parties) {
margin-top: 2rem;
width: 100%;
@@ -3409,6 +3412,12 @@ body {
font-size: 0.8rem;
}
}
.node-type-site .layout--threecol-25-50-25 .layout__region--second .block-region-second .paragraph--type--site-video .field_field_titre_site {
display: none;
}
.node-type-site .layout--threecol-25-50-25 .layout__region--second .block-region-second .paragraph--type--site-video .field_field_video {
margin-bottom: 2rem;
}
.node-type-site .layout--threecol-25-50-25 .layout__region--second .block-region-second .paragraph--type--site-diapo .field_field_images .diaporama {
display: flex !important;
flex-direction: row !important;
@@ -3562,6 +3571,10 @@ body {
flex-direction: column;
}
.html.js.sr body.node-type-site.node-id-40 div.dialog-off-canvas-main-canvas div#page-node.layout-container main div.layout-content div.content_container div.layout.layout--threecol-25-50-25 div.layout__region.layout__region--third div.block-region-third div div.field_field_documents div div span {
visibility: hidden;
}
main {
background-color: #f6f7f3;
}

View File

@@ -244,7 +244,7 @@
}
.field_field_parties{
div{width: fit-content;}
// div{width: fit-content;}
// width: 70%;
}
div:has(.field_field_parties){
@@ -279,6 +279,15 @@
}
}
.paragraph--type--site-video{
.field_field_titre_site{
// margin-bottom: 1rem;
display: none;
}
.field_field_video{
margin-bottom: 2rem;
}
}
.paragraph--type--site-diapo{
.field_field_images {
.diaporama{
@@ -438,6 +447,8 @@
padding-bottom: 0.2rem;
}
}
}
}
@@ -448,4 +459,7 @@
.field_field_liens_site > div:nth-child(2) > div:nth-child(1){
display: flex;
flex-direction: column;
}
}
.html.js.sr body.node-type-site.node-id-40 div.dialog-off-canvas-main-canvas div#page-node.layout-container main div.layout-content div.content_container div.layout.layout--threecol-25-50-25 div.layout__region.layout__region--third div.block-region-third div div.field_field_documents div div span{
visibility: hidden;
}

View File

@@ -15,6 +15,10 @@
margin-top: 10rem;
grid-column: 2 /span 9;
}
@media(max-width: 510px){
margin-top: 13rem;
grid-column: 2 /span 9;
}
h1{
text-transform: none;

View File

@@ -221,7 +221,7 @@ header{
@media(max-width:1090px){
font-size: 0.6rem;
}
@media(max-width: 500px){
@media(max-width: 810px){
display: flex;
flex-direction: column;
align-items: center;
@@ -249,43 +249,6 @@ header{
#block-quartiers-de-demain-selecteurdelangue{
width: fit-content;
margin: auto;
// .language-switcher-language-url{
// text-transform: uppercase;
// color: white;
// ul{
// display: flex;
// flex-direction: row;
// font-size:0.6rem;
// padding: 0;
// @media(max-width: 660px){
// margin-bottom: 0;
// }
// @media(max-width: 500px){
// flex-direction: column;
// // margin-bottom: 0;
// margin: auto;
// }
// li a {
// color: white;
// font-family: 'gilroy-light';
// }
// li:nth-child(1){
// &::after{
// content: " / ";
// white-space: pre;
// @media(max-width: 660px){
// content:none ;
// }
// }
// }
// .is-active{
// font-family: 'gilroy-bold';
// }
// }
// }
}
}