header fix

This commit is contained in:
2020-07-27 12:39:59 +02:00
parent e9761aa6ca
commit 34741c345d
31 changed files with 605 additions and 267 deletions
@@ -27,7 +27,7 @@
* @ingroup themeable
*/
#}
<div{{ attributes }}>
<div{{ attributes }} class="col-3 col-sm-2 col-xl">
{% block content %}
<div class="nav-main">
{{ content }}
@@ -27,7 +27,7 @@
* @ingroup themeable
*/
#}
<div{{ attributes }} class="col-md-3 col-lg-3 col-xl-2">
<div{{ attributes }} class="col-9 col-sm-10 col-xl-auto">
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes }}>{{ label }}</h2>
@@ -1,5 +1,5 @@
<div class="head">
<h3>{{ header }}</h3>
{{ header }}
<div class="more_link">
<a class="blue" href="{{more['#url']}}">{{ more['#title'] }}<span>+</span></a>
</div>
@@ -4,25 +4,32 @@
{% set class = "d-flex d-md-block" %}
{% endif %}
{% set url = url('<current>') %}
{% set title = label[0]['#context']['value'] %}
<div class="__rs {{class}}">
<div class="__mail">
<a href="#">
<a target="_blank" href="mailto:?Subject= {{title}} {{url}}">
<img src="/themes/custom/popsu_colloque/images/mail.svg" alt="Mail">
</a>
</div>
<div class="__facebook">
<a href="#">
<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={{url}}">
<img src="/themes/custom/popsu_colloque/images/facebook.svg" alt="facebook">
</a>
</div>
<div class="__twitter">
<a href="#">
<img src="/themes/custom/popsu_colloque/images/twitter.svg" alt="twitter">
</a>
<a target="_blank" href="https://twitter.com/intent/tweet?text={{title}}%20{{url}}%20@popsu_colloque">
<img src="/themes/custom/popsu_colloque/images/twitter.svg" alt="twitter">
</a>
</div>
<div class="__linkedin">
<a href="#">
<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url={{url}}/&title=&summary=&source=">
<img src="/themes/custom/popsu_colloque/images/linkedin.svg" alt="linkedin">
</a>
</div>
</div>
@@ -45,7 +45,7 @@
%}
<h4>{{ label }}</h4>
<div class="d-lg-flex flex-wrap d-block pb-4">
<div class="row flex-wrap pb-4 col-12 px-0 mx-auto">
{% for item in items %}
{{ item.content }}
{% endfor %}
@@ -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 }} class="__slide">
{% 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>
{% endif %}
{% for item in items %}
<div{{ item.attributes }}>{{ item.content }}</div>
{% endfor %}
{% if multiple %}
</div>
{% endif %}
</div>
{% endif %}
@@ -33,7 +33,7 @@
<css-placeholder token="{{ placeholder_token }}">
<js-placeholder token="{{ placeholder_token }}">
</head>
<body{{ attributes }} class="container-fluid px-0">
<body{{ attributes }}>
{#
Keyboard navigation/accessibility link to main content section in
page.html.twig.
@@ -32,7 +32,7 @@
{% import _self as menus %}
{% if items %}
{% if menu_level == 0 %}
<ul{{ attributes }} class="row m-0 pl-0">
<ul{{ attributes }} class="d-flex px-0">
{% else %}
<ul>
{% endif %}
@@ -77,7 +77,7 @@
<article{{ attributes }} class="row">
<div class="__wrapper col-sm-12 col-md-9">
<div class="__wrapper col-sm-12 col-md-9 px-0">
<div class="__img-hero">
{{content.field_image}}
</div>
@@ -87,11 +87,11 @@
<h2>{{label}}</h2>
</div>
<div class="__wrap_side col-md-12 col-lg-2 mt-3">
<div class="__wrap_side col-md-12 col-lg-1 mt-3">
{% include 'themes/custom/popsu_colloque/template/components/share_rs.html.twig' with { page : 'moments' } %}
</div>
<div class="__wrap_content col-12 col-lg-10 my-3">
<div class="__wrap_content col-12 col-lg-11 my-3">
<div class="__head mb-5">
<div class="d-flex flex-wrap">
{{ content.field_date_du_programme }} |
@@ -80,13 +80,13 @@
<div class="__wrapper col-sm-12 col-md-9 col-lg-8">
{% if content.field_ajouter_un_media[0]['#paragraph'].field_video %}
<div class="__hero">
<div class="__hero mb-4">
{{content.field_ajouter_un_media}}
</div>
{% endif %}
<div class="__wrap_content d-flex">
<div class="__wrap_content d-flex flex-wrap flex-lg-nowrap">
{% if content.field_ajouter_un_media[0]['#paragraph'].field_image %}
<div class="__hero">
<div class="__hero col-12 col-md-12 col-lg-4 px-0 pr-lg-4 m-0 my-4 mx-sm-0 my-lg-0">
{{content.field_ajouter_un_media}}
</div>
{% endif %}
@@ -72,19 +72,29 @@
* @ingroup themeable
*/
#}
<article{{ attributes }} class="thumbnails bibliographie">
<div>
<a href="{{url}}">
<div>
{{content.field_auteur}}
</div>
<div>
{{ label }}
</div>
<div>
{{ content|without('field_auteur') }}
</div>
</a>
{% set urlExt = content.field_lien_externe[0]['#title'] %}
{% if urlExt %}
{% set class = 'link_ext' %}
{% endif %}
<article{{ attributes }} class="thumbnails bibliographie {{class}}">
<div>
{% if urlExt %}
<a target="_blank" href="{{urlExt}}">
{% endif %}
<div class="__auteur">
{{content.field_auteur}}
</div>
<div>
{{ label }}
</div>
<div class="__body">
{{ content.body }}
</div>
{% if urlExt %}
</a>
{% endif %}
</div>
</article>
@@ -82,6 +82,7 @@
</div>
<div class="__wrap">
<div class="__content">
{{content.field_auteur|raw}}
{{ label|raw }}
{{content.field_complement_d_info|raw}}
</div>
@@ -46,7 +46,7 @@
*/
#}
<div class="layout-container">
<header role="banner" class="front">
<header role="banner" class="front container-fluid">
{{ page.header }}
</header>
@@ -15,7 +15,7 @@
*/
#}
{% if content %}
<div{{ attributes }} class="d-flex align-items-stretch">
<div{{ attributes }} class="row">
{{ content }}
</div>
{% endif %}
@@ -37,9 +37,9 @@
default_row_class ? 'thumbnails programme',
]
%}
<div{{ row.attributes.addClass(row_classes) }}>
<article{{ row.attributes.addClass(row_classes) }}>
{{- row.content -}}
</div>
</article>
{% endfor %}
</div>
</section>
@@ -17,14 +17,16 @@
* @ingroup themeable
*/
#}
{% if title %}
{% endif %}
{% for row in rows %}
{%
set row_classes = [
default_row_class ? 'views-row',
]
%}
<article class="thumbnails programme">
<article class="thumbnails programme" data-date="{{title}}">
{{- row.content -}}
</article>
{% endfor %}
@@ -34,7 +34,7 @@
#}
<div class="views col">
<div class="views col px-0">
{{ title_prefix }}
{{ title }}
@@ -34,7 +34,7 @@
#}
<div class="views col">
<div class="views col px-0">
{{ title_prefix }}
{{ title }}
@@ -51,9 +51,9 @@
{% if rows -%}
<section>
<div class="__slide">
{{ rows }}
</div>
<div class="__slide">
{{ rows }}
</div>
</section>
{% elseif empty -%}
{{ empty }}