Build out overlay header and feature row _include helper
This commit is contained in:
45
_includes/feature-row
Normal file
45
_includes/feature-row
Normal file
@ -0,0 +1,45 @@
|
||||
{% include base_path %}
|
||||
|
||||
{% if include.id %}
|
||||
{% assign feature_row = page.[include.id] %}
|
||||
{% else %}
|
||||
{% assign feature_row = page.feature_row %}
|
||||
{% endif %}
|
||||
|
||||
<div class="feature__wrapper">
|
||||
|
||||
{% for f in feature_row %}
|
||||
<div class="feature__item{% if include.type %}--{{ include.type }}{% endif %}">
|
||||
<div class="archive__item">
|
||||
{% if f.image_path %}
|
||||
<div class="archive__item-teaser">
|
||||
<img src=
|
||||
{% if f.image_path contains "http" %}
|
||||
"{{ f.image_path }}"
|
||||
{% else %}
|
||||
"{{ f.image_path | prepend: "/images/" | prepend: base_path }}"
|
||||
{% endif %}
|
||||
alt="{% if f.alt %}{{ f.alt }}{% endif %}">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="archive__item-body">
|
||||
{% if f.title %}
|
||||
<h2 class="archive__item-title">{{ f.title }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% if f.excerpt %}
|
||||
<div class="archive__item-excerpt">
|
||||
{{ f.excerpt | markdownify }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if f.url %}
|
||||
<p><a href="{{ f.url }}" class="btn {{ f.btn_class }}">{{ f.btn_label | default: site.data.ui-text[site.locale].more_label }}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
@ -22,7 +22,15 @@
|
||||
{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% if site.read_time and page.read_time %}<p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</p>{% endif %}
|
||||
{% if page.excerpt %}
|
||||
<p class="page__lead">{{ page.excerpt | markdownify | remove: "<p>" | remove: "</p>" }}</p>
|
||||
{% endif %}
|
||||
{% if site.read_time and page.read_time %}
|
||||
<p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</p>
|
||||
{% endif %}
|
||||
{% if page.header.cta_url %}
|
||||
<p><a href="{{ page.header.cta_url }}" class="btn btn--light-outline btn--x-large">{{ page.header.cta_label | default: site.data.ui-text[site.locale].more_label }}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<img src="{{ img_path }}" alt="{{ page.title }}" class="page__hero-image">
|
||||
|
@ -1,51 +0,0 @@
|
||||
{% include base_path %}
|
||||
|
||||
{% if include.id %}
|
||||
{% assign splash_row = page.[include.id] %}
|
||||
{% else %}
|
||||
{% assign splash_row = page.splash_row %}
|
||||
{% endif %}
|
||||
|
||||
{% capture splash_size %}{{ splash_row | size }}{% endcapture %}
|
||||
|
||||
{% if splash_size == '2' %}
|
||||
{% assign splash_layout = 'half' %}
|
||||
{% elsif splash_size >= '3' %}
|
||||
{% assign splash_layout = 'third' %}
|
||||
{% else %}
|
||||
{% assign splash_layout = '' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="splash__wrapper">
|
||||
|
||||
{% for s in splash_row %}
|
||||
<div class="splash__item">
|
||||
<div class="archive__item">
|
||||
{% if s.image_path %}
|
||||
<div class="archive__item-teaser">
|
||||
<img src=
|
||||
{% if s.image_path contains "http" %}
|
||||
"{{ s.image_path }}"
|
||||
{% else %}
|
||||
"{{ s.image_path | prepend: "/images/" | prepend: base_path }}"
|
||||
{% endif %}
|
||||
alt="{% if s.alt %}{{ s.alt }}{% endif %}">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if s.title %}
|
||||
<h2 class="archive__item-title">{{ s.title }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% if s.excerpt %}
|
||||
<div class="archive__item-excerpt">{{ s.excerpt | markdownify | remove: "<p>" | remove: "</p>" }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if s.url %}
|
||||
<p><a href="{{ s.url }}" class="btn {{ s.btn_class }}">{{ s.btn_label | default: site.data.ui-text[site.locale].more_label }}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user