diff --git a/_config.yml b/_config.yml index d63747c833d25c9ef9c5ee08edd65283c4928c9c..21d85c65e020da1a591b9c8cc098219bcd9a5e50 100644 --- a/_config.yml +++ b/_config.yml @@ -278,9 +278,6 @@ defaults: values: layout: single author_profile: true - share: true toc_sticky: true - header: - show_overlay_excerpt: false sidebar: nav: true diff --git a/_includes/page__hero.html b/_includes/page__hero.html index bd9083b732fd0077ba8b8c44e03491d618194251..13e200afbdc23ee53fcab88fea8e8ade36e0ddf2 100644 --- a/_includes/page__hero.html +++ b/_includes/page__hero.html @@ -1,19 +1,48 @@ -{% if page.header.cta_url contains "://" %} - {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} +{% if page.header.type == 'default' %} + {% capture header_type %}overlay{% endcapture %} + {% capture overlay_title %}true{% endcapture %} + {% capture overlay_text %}{{ page.header.description }}{% endcapture %} + {% capture overlay_actions %}false{% endcapture %} + {% capture img_path %}{{ author.banner }}{% endcapture %} {% else %} - {% capture cta_path %}{{ page.header.cta_url | relative_url }}{% endcapture %} -{% endif %} -{% if page.header.fixed_image contains "://" %} - {% capture fixed_img_path %}{{ page.header.fixed_image}}{% endcapture %} -{% else %} - {% capture fixed_img_path %}{{ page.header.fixed_image | relative_url }}{% endcapture %} + {% capture header_type %}{{ page.header.type }}{% endcapture %} + + {% if page.header.fixed_image contains "://" %} + {% capture fixed_img_path %}{{ page.header.fixed_image}}{% endcapture %} + {% else %} + {% capture fixed_img_path %}{{ page.header.fixed_image | relative_url }}{% endcapture %} + {% endif %} + + {% if page.header.overlay_image contains "://" %} + {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} + {% elsif page.header.overlay_image %} + {% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %} + {% endif %} + + {% if header_type == 'overlay' %} + {% capture img_path %}{{ overlay_img_path }}{% endcapture %} + {% elsif header_type == 'image' %} + {% capture img_path %}{{ fixed_img_path }}{% endcapture %} + {% endif %} + + {% capture overlay_title %}{{ page.header.overlay_title }}{% endcapture %} + + {% if page.header.show_text == 'description' %} + {% capture overlay_text %}{{ page.description }}{% endcapture %} + {% elsif page.header.show_text == 'custom' %} + {% capture overlay_text %}{{ page.header.custom_text }}{% endcapture %} + {% endif %} + + {% if page.header.actions %} + {% assign overlay_actions = true %} + {% endif %} {% endif %} -{% if page.header.overlay_image contains "://" %} - {% capture overlay_img_path %}{{ page.header.overlay_image }}{% endcapture %} -{% elsif page.header.overlay_image %} - {% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %} +{% if page.header.cta_url contains "://" %} + {% capture cta_path %}{{ page.header.cta_url }}{% endcapture %} +{% else %} + {% capture cta_path %}{{ page.header.cta_url | relative_url }}{% endcapture %} {% endif %} {% if page.header.overlay_filter contains "rgba" %} @@ -22,18 +51,6 @@ {% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %} {% endif %} -{% if page.header.type == 'overlay' %} - {% capture img_path %}{{ overlay_img_path }}{% endcapture %} -{% elsif page.header.type == 'image' %} - {% capture img_path %}{{ fixed_img_path }}{% endcapture %} -{% endif %} - -{% if page.header.show_text == 'description' %} - {% capture overlay_text %}{{ page.description }}{% endcapture %} -{% elsif page.header.show_text == 'custom' %} - {% capture overlay_text %}{{ page.header.custom_text }}{% endcapture %} -{% endif %} - {% if page.header.image_description %} {% assign image_description = page.header.image_description %} {% else %} @@ -42,8 +59,8 @@ {% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %} -<div class="page__hero{% if page.header.type == 'overlay' %}--overlay{% endif %}" - style="{% if page.header.type == 'overlay' %} +<div class="page__hero{% if header_type == 'overlay' %}--overlay{% endif %}" + style="{% if header_type == 'overlay' %} {% if page.header.color %} background-color: {{ page.header.color | default: 'transparent' }}; {% endif %} @@ -55,9 +72,9 @@ {% endif %}url('{{ img_path }}'); {% endif %}" > - {% if page.header.type == "overlay" %} + {% if header_type == 'overlay' %} <div class="wrapper"> - {% if page.header.overlay_title %} + {% if overlay_title %} <h1 id="page-title" class="page__title" itemprop="headline"> {% if paginator and site.paginate_show_page_num %} {{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %} @@ -75,7 +92,7 @@ {% if page.header.cta_url %} <p><a href="{{ cta_path }}" class="btn btn--light-outline btn--large">{{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a></p> {% endif %} - {% if page.header.actions %} + {% if overlay_actions == true and page.header.actions %} <p> {% for action in page.header.actions %} {% if action.url contains "://" %} @@ -90,7 +107,11 @@ {% if page.header.caption %} <span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span> {% endif %} - {% elsif page.header.type == 'image' %} + {% elsif header_type == 'image' %} <img src="{{ img_path }}" alt="{{ img_path }}" class="page__hero-image"> + {% elsif page.header_type == 'video' %} + {% capture video_id %}{{ page.header.video.id }}{% endcapture %} + {% capture video_provider %}{{ page.header.video.provider }}{% endcapture %} + {% include video id=video_id provider=video_provider %} {% endif %} </div> diff --git a/_includes/page__hero_video.html b/_includes/page__hero_video.html deleted file mode 100644 index 8586a95a2b15195fa9f6fc9539d1e92ea6979d11..0000000000000000000000000000000000000000 --- a/_includes/page__hero_video.html +++ /dev/null @@ -1,4 +0,0 @@ -{% capture video_id %}{{ page.header.video.id }}{% endcapture %} -{% capture video_provider %}{{ page.header.video.provider }}{% endcapture %} - -{% include video id=video_id provider=video_provider %} diff --git a/_layouts/single.html b/_layouts/single.html index 9158ce2e11fe971dbaa989fc2b9ffbb8238ca0cb..8179a015b550c08dd754c29bdd99b7ff5393d048 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -26,7 +26,7 @@ layout: default {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: "%B %d, %Y" }}">{% endif %} <div class="page__inner-wrap"> - {% unless page.header.type == 'overlay' %} + {% unless page.has_header %} <header> {% if page.title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %} {% if page.read_time %} diff --git a/_pages/jardin/lorem-ipsum.md b/_pages/jardin/lorem-ipsum.md index 4cc41d0f4609667227934c029bdbb0ce9a258f30..67a159bd103180fd1477a85ccdcb5089ee398de6 100644 --- a/_pages/jardin/lorem-ipsum.md +++ b/_pages/jardin/lorem-ipsum.md @@ -1,25 +1,24 @@ --- last_modified_at: 2019-11-24T17:31:20.000+00:00 toc: true -has_header: true +has_header: false header: - type: default + type: overlay overlay_color: rgb(125, 103, 103) overlay_title: true - show_text: description - overlay_image: "/assets/images/atelier-combat.jpg" - image: '' + show_text: custom + overlay_image: #"/assets/images/atelier-combat.jpg" custom_text: '' caption: '' actions: - - label: Facebook - url: http://facebook.com/ - fa-icon: facebook color: "#B19292" fixed_image: "/assets/images/banniere-parvis.jpg" overlay_text: '' + video: + id: rKNMf4LFX44 + provider: youtube title: Lorem Ipsum -classes: '' +classes: 'wide' description: Description de ouf share: true