gaiety-life/_includes/postlayout.njk
2022-01-14 09:34:20 -06:00

52 lines
2.1 KiB
Text

{% extends "baselayout.njk" %}
{% block header %}
<div class="prose lg:prose-xl prose-invert m-auto text-center">
<p class="text-left">
<a href="/" class="pt-4 pr-1 inline-flex items-center text-sm font-medium text-slate-300 hover:text-slate-100">
<!-- Heroicon name: solid/arrow-narrow-left -->
<svg class="mr-3 h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd" />
</svg>
Back
</a>
</p>
<h1>{{ title }}</h1>
<p>{{ description }}</p>
<div class="mt-6 flex justify-between">
<div class="text-sm text-slate-200">
<time datetime="{{ date.toISOString() }}">
{{ date.toDateString() }}
</time>
</div>
<div class="text-sm text-slate-200">
<span>
{{ content | emojiReadTime }}
</span>
</div>
</div>
</div>
{% endblock %}
{% block main %}
<main class="flex flex-col rounded-lg shadow-lg overflow-hidden mx-auto max-w-lg lg:max-w-xl mt-8">
<div class="flex-shrink-0">
<img class="h-48 w-full object-cover" src="{{ coverImage if coverImage else '/images/default-thumb.png'}}" alt="">
</div>
<div class="flex-1 bg-white p-6 flex flex-col justify-between prose prose-slate">
{{ content | safe }}
</main>
{% endblock %}
{% block footer %}
<a href="/" class="pt-4 pr-1 inline-flex items-center text-sm font-medium text-slate-300 hover:text-slate-100">
<!-- Heroicon name: solid/arrow-narrow-left -->
<svg class="mr-3 h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd" />
</svg>
Back
</a>
{% endblock %}