summaryrefslogtreecommitdiff
path: root/layouts/post.njk
diff options
context:
space:
mode:
authorAlexis Hovorka <[email protected]>2022-10-24 22:14:06 -0600
committerAlexis Hovorka <[email protected]>2022-10-24 22:14:06 -0600
commit634301e45433bf06fcdae500d51275677e568adb (patch)
treef7a5a3051648322c6243420667b120440e7fa1df /layouts/post.njk
Initial commit
Diffstat (limited to 'layouts/post.njk')
-rw-r--r--layouts/post.njk25
1 files changed, 25 insertions, 0 deletions
diff --git a/layouts/post.njk b/layouts/post.njk
new file mode 100644
index 0000000..0c0e4a9
--- /dev/null
+++ b/layouts/post.njk
@@ -0,0 +1,25 @@
+---
+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>
+
+ {%- 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" href="TODO" 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>