summaryrefslogtreecommitdiff
path: root/_includes/views/post-header.html
blob: b6ea964a13c4d189f225c0f7e3441d27a42b37bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<header class="post-header">
  <h1 class="post-title p-name" itemprop="name headline">{{ heading | default: page.title | escape }}</h1>
  <h2 class="post-subtitle">{{ subheading | default: page.subtitle | escape }}</h2>

  <div class="post-meta">
    <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
      {%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%}
      <i class="fa fa-calendar"></i> {{ page.date | date: date_format }}
    </time>

    {%- if page.author -%}
    <span class="post-author left-vsplit"><i class="fa fa-pencil"></i> {{ page.author | escape }}</span>
    {%- endif -%}

    {% assign article = page.content %}
    {% assign lang = page.lang %}
    {%- include functions.html func='get_reading_time' -%}
    {% assign reading_time = return %}
    <span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span>
  </div>

  {%- if page.tags.size > 0 -%}
  <div class="post-tags">
    {%- for tag in page.tags -%}
    <a class="post-tag" href="{{ '/tags.html ' | relative_url }}#{{tag}}">#{{tag}}</a>
    {%- endfor -%}
  </div>
  {%- endif -%}

</header>