datat.fi/_includes/page-intro.html

39 lines
1.7 KiB
HTML
Raw Normal View History

2017-03-16 20:34:29 +02:00
<header class="intro">
{% if page.image %}
2021-07-06 03:59:07 +03:00
{% assign intro_image = page.image.path | default: page.image | relative_url | escape %}
<div class="intro-image">
<img src="{{ intro_image }}" alt="{{ page.title }}">
</div>
{% endif %}
2017-03-07 23:12:17 +02:00
<div class="inner">
<div class="intro-text">
<h1 id="page-title" class="intro-title">{{ page.alt_title | default: page.title | default: site.title | markdownify | strip_html }}</h1>
2017-03-07 23:12:17 +02:00
{% if page.sub_title %}
2017-03-08 23:07:06 +02:00
<p class="intro-subtitle">{{ page.sub_title | markdownify | strip_html }}</p>
2017-03-07 23:12:17 +02:00
{% endif %}
{% if page.date %}
{% include author %}
<p class="entry-meta">
2017-03-17 15:36:47 +02:00
{% if author_name %}<span class="byline-item">{{ author_name | prepend: 'by ' }}</span>{% endif %}<span class="byline-item"><span class="icon">{% include icon-calendar.svg %}</span><time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %-d, %Y" }}</time></span>{% if page.read_time %} <span class="byline-item"><span class="icon">{% include icon-stopwatch.svg %}</span>{% capture read_time %}{% include read-time.html %}{% endcapture %}{{ read_time | strip }}</span>{% endif %}
2017-03-07 23:12:17 +02:00
</p>
{% endif %}
{% if page.introduction %}
<div class="intro-more">
{{ page.introduction | markdownify }}
</div>
{% endif %}
{% if page.actions %}
<ul class="intro-actions">
{% for action in page.actions %}
<li><a href="{{ action.url }}" class="btn">{% if action.icon %}<span class="icon">{% include {{ action.icon | prepend: 'icon-' | append: '.svg' }} %}</span>{% endif %}{{ action.label }}</a></li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
2017-03-16 20:34:29 +02:00
</header>