safing-web/_includes/next_previous_item.html
davegson 397f7c9d44 Change padding top from next/previous item to margin
this way it moves closer up to the posts without a PM plug - it was too much before
2021-04-22 10:22:31 +02:00

28 lines
1.4 KiB
HTML

<div class="flex mt-24 justify-center grid grid-rows-2 grid-cols-2 row-gap-12 md:grid-rows-1 md:row-gap-0 md:col-gap-16 max-w-3xl mx-auto">
{% if page.next.url %}
<div class="text-left row-start-1 row-end-2 col-start-1 col-end-3 md:row-auto md:col-auto">
{% if page.next.category == "blog" %}
{% assign next_type = "Blog Post" %}
{% elsif page.next.category == "video" %}
{% assign next_type = "Video" %}
{% elsif page.next.category == "podcast" %}
{% assign next_type = "Podcast" %}
{% endif %}
<div class="pb-4 text-md opacity-55">Next {{ next_type }}</div>
<a href="{{ page.next.url }}" class="text-3xl tracking-tight font-extrabold leading-none break-normal">{{ page.next.title }}</a>
</div>
{% endif %}
{% if page.previous.url %}
<div class="text-right row-start-2 row-end-3 col-start-1 md:col-start-2 col-end-3 md:row-auto">
{% if page.previous.category == "blog" %}
{% assign previous_type = "Blog Post" %}
{% elsif page.previous.category == "video" %}
{% assign previous_type = "Video" %}
{% elsif page.previous.category == "podcast" %}
{% assign previous_type = "Podcast" %}
{% endif %}
<div class="pb-4 text-md opacity-55">Previous {{ previous_type }}</div>
<a href="{{ page.previous.url }}" class="text-3xl tracking-tight font-extrabold leading-none break-normal">{{ page.previous.title }}</a>
</div>
{% endif %}
</div>