Guide_Wii/_includes/page__hero.html

56 lines
3.1 KiB
HTML
Raw Normal View History

{% capture overlay_img_path %}{{ page.header.overlay_image | relative_url }}{% endcapture %}
2016-10-30 01:02:14 +02:00
{% if page.header.overlay_filter contains "gradient" %}
{% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %}
{% elsif page.header.overlay_filter contains "rgba" %}
2016-10-30 01:02:14 +02:00
{% capture overlay_filter %}{{ page.header.overlay_filter }}{% endcapture %}
{% capture overlay_filter %}linear-gradient({{ overlay_filter }}, {{ overlay_filter }}){% endcapture %}
2016-10-30 01:02:14 +02:00
{% elsif page.header.overlay_filter %}
{% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %}
{% capture overlay_filter %}linear-gradient({{ overlay_filter }}, {{ overlay_filter }}){% endcapture %}
2016-10-30 01:02:14 +02:00
{% endif %}
2017-10-28 21:58:34 +02:00
{% if page.header.image_description %}
{% assign image_description = page.header.image_description %}
{% else %}
{% assign image_description = page.title %}
{% endif %}
{% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %}
2016-10-30 01:02:14 +02:00
<div class="page__hero{% if page.header.overlay_color or page.header.overlay_image %}--overlay{% endif %}"
style="{% if page.header.overlay_color %}background-color: {{ page.header.overlay_color | default: 'transparent' }};{% endif %} {% if overlay_img_path %}background-image: {% if overlay_filter %}{{ overlay_filter }}, {% endif %}url('{{ overlay_img_path }}');{% endif %}"
2016-10-30 01:02:14 +02:00
>
{% if page.header.overlay_color or page.header.overlay_image %}
<div class="wrapper">
<h1 id="page-title" class="page__title" itemprop="headline">
2017-10-28 21:58:34 +02:00
{% if paginator and site.paginate_show_page_num %}
2016-10-30 01:02:14 +02:00
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
{% else %}
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
{% endif %}
</h1>
{% if page.tagline %}
<p class="page__lead">{{ page.tagline | markdownify | remove: "<p>" | remove: "</p>" }}</p>
{% elsif page.header.show_overlay_excerpt != false and page.excerpt %}
2016-10-30 01:02:14 +02:00
<p class="page__lead">{{ page.excerpt | markdownify | remove: "<p>" | remove: "</p>" }}</p>
{% endif %}
{% include page__meta.html %}
2016-10-30 01:02:14 +02:00
{% if page.header.cta_url %}
<p><a href="{{ page.header.cta_url | relative_url }}" 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 %}
<p>
{% for action in page.header.actions %}
<a href="{{ action.url | relative_url }}" class="btn btn--light-outline btn--large">{{ action.label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a>
{% endfor %}
2016-10-30 01:02:14 +02:00
{% endif %}
</div>
{% else %}
<img src="{{ page.header.image | relative_url }}" alt="{{ image_description }}" class="page__hero-image">
2016-10-30 01:02:14 +02:00
{% endif %}
{% if page.header.caption %}
<span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
{% endif %}
2016-11-23 02:29:35 +01:00
</div>