Skip to content

Commit

Permalink
fix: change order related, next/prev, about author
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoehnelt committed Mar 28, 2024
1 parent 818d274 commit 250073b
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions src/_layouts/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,7 @@ layout: base
{{ content | safe }}

<hr>

{% if 'post' in tags %}
<p class="uppercase text-xs mt-6">About the author</p>
<div class="flex items-center gap-8">
<div class="w-24">{% image src="src/images/justin-poehnelt.jpg", alt=site.author.name, class_="rounded-full w-full p-0" %}</div>
<div class="text-base">
{% include 'post-author.njk' %}
</div>
</div>
{% endif %}

{%- set nextPost = collections['post'] | getNextCollectionItem(page) %}
{%- if nextPost %}
<p class="uppercase text-xs mt-6">Next</p>
<p class="font-bold mb-2">
<a href="{{ nextPost.url | url }}">{{ nextPost.data.title }}</a>
</p>
{% endif %}
{%- set previousPost = collections['post'] | getPreviousCollectionItem(page) %}
{%- if previousPost %}
<p class="uppercase text-xs mt-6">Previous</p>

<p class="font-bold">
<a href="{{ previousPost.url | url }}">{{ previousPost.data.title }}</a>
</p>
{% endif %}


{% set post = {
data: {
title: title,
Expand All @@ -72,6 +46,32 @@ layout: base
</ul>
{% endif %}

{%- set nextPost = collections['post'] | getNextCollectionItem(page) %}
{%- if nextPost %}
<p class="uppercase text-xs mt-6">Next</p>
<p class="font-bold mb-2">
<a href="{{ nextPost.url | url }}">{{ nextPost.data.title }}</a>
</p>
{% endif %}
{%- set previousPost = collections['post'] | getPreviousCollectionItem(page) %}
{%- if previousPost %}
<p class="uppercase text-xs mt-6">Previous</p>

<p class="font-bold">
<a href="{{ previousPost.url | url }}">{{ previousPost.data.title }}</a>
</p>
{% endif %}

{% if 'post' in tags %}
<p class="uppercase text-xs mt-6">About the author</p>
<div class="flex items-center gap-8">
<div class="w-24">{% image src="src/images/justin-poehnelt.jpg", alt=site.author.name, class_="rounded-full w-full p-0" %}</div>
<div class="text-base">
{% include 'post-author.njk' %}
</div>
</div>
{% endif %}

{% include "webmentions.njk" %}

<hr>
Expand Down

0 comments on commit 250073b

Please sign in to comment.