diff --git a/web/modules/custom/q2d_mod/assets/js/carte-interactive-qdd.js b/web/modules/custom/q2d_mod/assets/js/carte-interactive-qdd.js index 3e002e9..3c27139 100644 --- a/web/modules/custom/q2d_mod/assets/js/carte-interactive-qdd.js +++ b/web/modules/custom/q2d_mod/assets/js/carte-interactive-qdd.js @@ -46,6 +46,8 @@ svgElement.addEventListener('mouseover', function(event) { const content = event.target.getAttribute('data-content'); const dataId = event.target.getAttribute('data-id'); const correspondingRow = document.querySelector(`.views-row[data-id="${dataId}"]`); + const correspondingProjetRow = document.querySelector(`.node-type-projet[data-id="${dataId}"]`); + // Interaction pour la page d'accueil if (isHomePage) { @@ -68,7 +70,7 @@ svgElement.addEventListener('mouseover', function(event) { } // Interaction pour la page #lessites - if (isLessitesPage && correspondingRow) { + if (isLessitesPage && correspondingRow && correspondingProjetRow) { correspondingRow.style.border = '2px solid red'; // Bordure rouge autour du .views-row correspondant } } @@ -89,6 +91,8 @@ svgElement.addEventListener('mouseout', function(event) { if (event.target.classList.contains('site-link')) { const dataId = event.target.getAttribute('data-id'); const correspondingRow = document.querySelector(`.views-row[data-id="${dataId}"]`); + const correspondingProjetRow = document.querySelector(`.node-type-projet[data-id="${dataId}"]`); + // Ferme le popup pour la page d'accueil if (isHomePage || isCandidaturePage) { @@ -97,7 +101,7 @@ svgElement.addEventListener('mouseout', function(event) { } // Supprime la bordure rouge autour du .views-row pour la page #lessites - if (isLessitesPage && correspondingRow) { + if (isLessitesPage && correspondingRow && correspondingProjetRow) { correspondingRow.style.border = 'none'; } } diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/css/bundle.css b/web/themes/custom/quartiers_de_demain/dist/assets/css/bundle.css index ac4c549..e462b6c 100644 --- a/web/themes/custom/quartiers_de_demain/dist/assets/css/bundle.css +++ b/web/themes/custom/quartiers_de_demain/dist/assets/css/bundle.css @@ -4023,26 +4023,56 @@ body { text-transform: uppercase; font-size: 0.5rem; } -.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .field_field_nom_de_l_equipe { - width: 80%; - border-bottom: solid black 1px; - font-size: 0.6rem; +.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet { + position: relative; } -.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .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:has(.laureat:not(:empty)) { + padding-top: 1.5rem; +} +.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet:has(.laureat:not(:empty))::before { + content: ""; + position: absolute; + top: 0; + left: -1rem; + width: 2.5rem; + height: 2.5rem; + background-color: #f6f7f3; + background-image: url("../img/LAUREAT.svg"); + background-repeat: no-repeat; + background-position: center; + background-size: contain; + 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 .field_field_nom_de_l_equipe { + width: 80%; + padding-left: 0.5rem; + font-size: 0.6rem; + background-color: #f6f7f3; +} +.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; +} +.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"; margin-bottom: 0.5rem; font-size: 0.6rem; + margin-top: 0.2rem; } -.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .field_field_nom_de_l_equipe div.more-link { +.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.more-link { margin-bottom: 1rem; padding-left: 0rem; } -.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .field_field_nom_de_l_equipe div.more-link a { +.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.more-link a { font-size: 0.5rem; } -.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .field_field_laureats { - color: red; +.node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third div .node-type-projet .field_field_laureats { + color: rgb(247, 0, 43); text-transform: uppercase; + display: inline-flex; + align-items: flex-start; + height: auto; + font-size: 0px; } .node-type-site .layout--threecol-25-50-25 .layout__region--third .block-region-third .prevnext { flex-direction: row; @@ -4429,6 +4459,7 @@ body { .node-type-projet .layout--threecol-25-50-25 .layout__region--third .block-region-third div .field_field_laureats { color: red; text-transform: uppercase; + content: url("/web/themes/custom/quartiers_de_demain/dist/assets/img/LAUREAT.png"); } .node-type-ressource .layout-content { diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/LAUREAT.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/LAUREAT.png new file mode 100644 index 0000000..482730a Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/LAUREAT.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/LAUREAT.svg b/web/themes/custom/quartiers_de_demain/dist/assets/img/LAUREAT.svg new file mode 100644 index 0000000..ef72509 --- /dev/null +++ b/web/themes/custom/quartiers_de_demain/dist/assets/img/LAUREAT.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/caen.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/caen.png new file mode 100644 index 0000000..93b80ee Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/caen.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/colmar.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/colmar.png new file mode 100644 index 0000000..ed1d04f Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/colmar.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/corbeil-essonnes.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/corbeil-essonnes.png new file mode 100644 index 0000000..bffd9b4 Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/corbeil-essonnes.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/coulommiers.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/coulommiers.png new file mode 100644 index 0000000..e75cc0c Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/coulommiers.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/le-mans.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/le-mans.png new file mode 100644 index 0000000..795d393 Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/le-mans.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/lodeve.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/lodeve.png new file mode 100644 index 0000000..63ed646 Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/lodeve.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/manosque.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/manosque.png new file mode 100644 index 0000000..b8471d0 Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/manosque.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/marseille.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/marseille.png new file mode 100644 index 0000000..735df94 Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/marseille.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/pessac.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/pessac.png new file mode 100644 index 0000000..51ae91f Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/pessac.png differ diff --git a/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/sedan.png b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/sedan.png new file mode 100644 index 0000000..158956c Binary files /dev/null and b/web/themes/custom/quartiers_de_demain/dist/assets/img/pictos_sites/sedan.png differ diff --git a/web/themes/custom/quartiers_de_demain/src/assets/scss/pages/node-type-projet.scss b/web/themes/custom/quartiers_de_demain/src/assets/scss/pages/node-type-projet.scss index 8f30743..fd6794c 100644 --- a/web/themes/custom/quartiers_de_demain/src/assets/scss/pages/node-type-projet.scss +++ b/web/themes/custom/quartiers_de_demain/src/assets/scss/pages/node-type-projet.scss @@ -301,6 +301,7 @@ .field_field_laureats{ color: red; text-transform: uppercase; + content: url('/web/themes/custom/quartiers_de_demain/dist/assets/img/LAUREAT.png'); } } diff --git a/web/themes/custom/quartiers_de_demain/src/assets/scss/pages/node-type-site.scss b/web/themes/custom/quartiers_de_demain/src/assets/scss/pages/node-type-site.scss index 28e897a..94dbb71 100644 --- a/web/themes/custom/quartiers_de_demain/src/assets/scss/pages/node-type-site.scss +++ b/web/themes/custom/quartiers_de_demain/src/assets/scss/pages/node-type-site.scss @@ -394,27 +394,63 @@ text-transform: uppercase; font-size: 0.5rem; } - .field_field_nom_de_l_equipe{ - width: 80%; - border-bottom: solid black 1px; - font-size: 0.6rem; - p{ - font-family: "gilroy-semibold"; - margin-bottom: 0.5rem; - font-size: 0.6rem; + .node-type-projet { + position: relative; + &:has(.laureat:not(:empty)){ + padding-top: 1.5rem; } - div.more-link{ - margin-bottom: 1rem; - padding-left: 0rem; - a{ - font-size: 0.5rem; + &:has(.laureat:not(:empty))::before { + content: ""; + position: absolute; + // display: block; + top: 0; // adapte la position selon ton visuel + left: -1rem; + width: 2.5rem; + height: 2.5rem; + background-color: #f6f7f3; + background-image: url("../img/LAUREAT.svg"); + background-repeat: no-repeat; + background-position: center; + background-size: contain; + z-index: -1; + margin-top: 0.3rem; + } + .field_field_nom_de_l_equipe{ + width: 80%; + padding-left: 0.5rem; + font-size: 0.6rem; + background-color: #f6f7f3; + div{ + border-bottom: solid black 1px; + } + p{ + font-family: "gilroy-semibold"; + margin-bottom: 0.5rem; + font-size: 0.6rem; + margin-top: 0.2rem; + } + div.more-link{ + margin-bottom: 1rem; + padding-left: 0rem; + a{ + font-size: 0.5rem; + } } } - } - .field_field_laureats{ - color: red; - text-transform: uppercase; - } + + .field_field_laureats{ + color:$red_QDD; + text-transform: uppercase; + display: inline-flex; + align-items: flex-start; + height: auto; + font-size: 0px; + + } + } + + + } .prevnext{ diff --git a/web/themes/custom/quartiers_de_demain/templates/field--field-laureats.html.twig b/web/themes/custom/quartiers_de_demain/templates/field--field-laureats.html.twig index e1ed116..74e5acb 100644 --- a/web/themes/custom/quartiers_de_demain/templates/field--field-laureats.html.twig +++ b/web/themes/custom/quartiers_de_demain/templates/field--field-laureats.html.twig @@ -69,7 +69,7 @@
{% endif %} {% for item in items %} - {{ item.content }}
+
{{ item.content }}
{% endfor %} {% if multiple %} diff --git a/web/themes/custom/quartiers_de_demain/templates/node--projets-lies.html.twig b/web/themes/custom/quartiers_de_demain/templates/node--projets-lies.html.twig new file mode 100644 index 0000000..0eb9e2d --- /dev/null +++ b/web/themes/custom/quartiers_de_demain/templates/node--projets-lies.html.twig @@ -0,0 +1,126 @@ +{# +/** + * @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 + */ +#} +{# + + {{ title_prefix }} + {% if label and not page %} + + {{ label }} + + {% endif %} + {{ title_suffix }} + + {% if display_submitted %} +
+ {{ author_picture }} + + {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %} + {{ metadata }} + +
+ {% endif %} + + + {{ content }} + + + #} + + + +{# 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 +%} + + + + {{ title_prefix }} + {% if label and not page %} + + {{ label }} + + {% endif %} + {{ title_suffix }} + + {% if display_submitted %} +
+ {{ author_picture }} + + {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %} + {{ metadata }} + +
+ {% endif %} + + + {{ content }} + + + +