summaryrefslogtreecommitdiff
path: root/layouts/post.njk
blob: 0e8ba221faf8925146552a92a7302753d8597f0f (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
---
layout: page.njk
---
      <a id="up" title="Home" aria-label="Home" href="/"></a>
      <a id="back" title="Back" aria-label="Back" href="javascript:history.back()"></a>
      <h1>{{ title }}</h1>
      {%- set postDate = date.toISOString().slice(0,10) %}
      <p class="post-date"><time datetime="{{ postDate }}">{{ postDate }}</time></p>

      {%- if heroImg %}
      <img class="hero" src="{{ heroImg }}" alt="{{ heroImgAlt }}">
      {%- endif %}

      {{ content | safe }}

{%- if tags %}
      <p id="tags">{% for tag in tags %}
        <a class="tag" href="/{{ tag | slug }}/">#{{ tag }}</a>{% endfor %}
      </p>
{% endif %}
      <nav>
      <a id="like-post" title="Like Post" aria-label="Like Post"><span></span></a>
      {%- set prevPost = collections.all | getPreviousCollectionItem(page) %}
      {%- set nextPost = collections.all | getNextCollectionItem(page) %}
      {%- if nextPost %}<a id="next" rel="next" href="{{ nextPost.url }}">Next</a>{% else %}<div id="end" title="End of latest post"></div>{% endif %}
      {%- if prevPost %}<a id="prev" rel="prev" href="{{ prevPost.url }}">Prev</a>{% endif -%}
      </nav>