2021-11-11 16:58:52 +00:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
2024-07-27 12:25:32 +00:00
|
|
|
<div class="flex px-4">
|
2021-11-17 19:30:57 +00:00
|
|
|
<h1 class="text-2xl text-bold my-6 mx-auto">
|
2021-11-17 19:13:07 +00:00
|
|
|
{{ page.title }}
|
|
|
|
</h1>
|
|
|
|
</div>
|
2024-07-27 12:36:13 +00:00
|
|
|
<div class="flex gap-x-8 p-4 justify-center">
|
2021-11-17 19:29:28 +00:00
|
|
|
<div class="flex flex-col sm:w-3/4 w-full border border-2 border-gray-200 dark:border-black rounded-xl p-5 shadow-2xl bg-gray-200 dark:bg-gray-800">
|
2021-11-17 19:13:07 +00:00
|
|
|
|
2021-11-17 19:21:24 +00:00
|
|
|
<div class="flex flex-col py-2 justify-center">
|
|
|
|
<!-- <h2 class="text-2xl text-bold"><a href='{{ page.permalink }}'>{{ page.title }}</a></h2> -->
|
|
|
|
<p class="text-bold">{{ page.description }}</p>
|
|
|
|
</div>
|
2021-11-11 16:58:52 +00:00
|
|
|
|
2021-11-17 19:21:24 +00:00
|
|
|
<!-- Read time and word count -->
|
|
|
|
<div class="flex flex-wrap py-2">
|
|
|
|
<div class="flex items-center w-1/3">
|
2021-11-17 19:40:52 +00:00
|
|
|
<div class="flex flex-col sm:flex-row sm:space-x-3 text-gray-900 dark:text-gray-400">
|
2021-11-17 19:21:24 +00:00
|
|
|
<span class="flex">
|
|
|
|
<!-- Icon clock -->
|
|
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
|
|
</svg>
|
|
|
|
<span class="ml-1">{{ page.reading_time }} min</span>
|
|
|
|
</span>
|
|
|
|
<span class="flex">
|
|
|
|
<!-- Icon pencil -->
|
|
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"></path>
|
|
|
|
</svg>
|
|
|
|
<span class="ml-1">{{ page.word_count }} words</span>
|
|
|
|
</span>
|
2021-11-11 16:58:52 +00:00
|
|
|
</div>
|
2021-11-17 19:21:24 +00:00
|
|
|
</div>
|
|
|
|
<!-- Author and publish date -->
|
2021-11-17 19:40:52 +00:00
|
|
|
<div class="flex w-2/3 sm:space-x-3 text-gray-900 dark:text-gray-400 justify-end">
|
2021-11-17 19:21:24 +00:00
|
|
|
<span class="flex items-center">
|
|
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
|
|
|
|
</svg>
|
|
|
|
<span class="ml-1"><time datetime="{{ page.date }}">Published on {{ page.date | date(format='%B %d, %Y') }}</time></span>
|
|
|
|
</span>
|
|
|
|
<span class="flex items-center">
|
|
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path>
|
|
|
|
</svg>
|
|
|
|
{% if page.extra.author.name %}
|
|
|
|
<span class="ml-1">{{ page.extra.author.name }}</span>
|
|
|
|
{% if page.extra.author.avatar %}
|
2022-01-29 00:16:55 +00:00
|
|
|
<img class="rounded-full h-9 w-9 ml-1" src="{{ page.extra.author.avatar }}"{% if page.extra.author.avatar_alt %} alt="{{ page.extra.author.avatar_alt }}"{% endif %}>
|
2021-11-17 19:13:07 +00:00
|
|
|
{% endif %}
|
2021-11-17 19:21:24 +00:00
|
|
|
{% else %}
|
|
|
|
<span class="ml-1">{{ config.extra.default_author.name }}</span>
|
2022-01-29 00:16:55 +00:00
|
|
|
<img class="rounded-full h-9 w-9 ml-1" src="{{ config.extra.default_author.avatar }}" alt="{{ config.extra.default_author.avatar_alt }}">
|
2021-11-17 19:21:24 +00:00
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-11 16:58:52 +00:00
|
|
|
|
2021-11-17 19:21:24 +00:00
|
|
|
<!-- Categories and Tags -->
|
|
|
|
<div class="flex flex-wrap py-2">
|
|
|
|
<div class="w-2/3">
|
|
|
|
{% if page.taxonomies.categories %}
|
|
|
|
<p>
|
|
|
|
Categories:
|
|
|
|
{% for category in page.taxonomies.categories %}
|
|
|
|
<a class="text-gray-900 dark:text-gray-400 flex py-1 items-center" href="{{ get_taxonomy_url(kind='categories', name=category) }}">
|
|
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
|
|
|
|
</svg>
|
|
|
|
<span class="pl-1">{{category}}</span>
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-11-11 16:58:52 +00:00
|
|
|
</div>
|
2021-11-17 19:21:24 +00:00
|
|
|
<div class="w-1/3">
|
|
|
|
{% if page.taxonomies.tags %}
|
|
|
|
<p>
|
|
|
|
Tags:
|
|
|
|
{% for tag in page.taxonomies.tags %}
|
|
|
|
<a class="text-gray-900 dark:text-gray-400 flex py-1 items-center" href="{{ get_taxonomy_url(kind='tags', name=tag) }}">
|
|
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"></path>
|
|
|
|
</svg>
|
|
|
|
<span class="pl-1">{{tag}}</span>
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Content -->
|
2021-11-17 19:29:28 +00:00
|
|
|
<div id="page-content" class="text-bold mt-2">
|
2021-11-17 19:21:24 +00:00
|
|
|
{{ page.content | safe }}
|
|
|
|
</div>
|
2021-11-17 19:08:26 +00:00
|
|
|
|
2021-11-17 19:13:07 +00:00
|
|
|
|
|
|
|
|
2021-11-11 16:58:52 +00:00
|
|
|
</div>
|
2021-11-13 11:48:42 +00:00
|
|
|
|
2021-11-17 19:13:07 +00:00
|
|
|
|
|
|
|
<!-- Table of content -->
|
|
|
|
{% if page.extra.toc %}
|
2021-11-17 19:43:22 +00:00
|
|
|
<div class="hidden sm:block sm:w-1/4 sm:flex sm:items-center sm:flex-col sm:mt-10 sm:w-1/5">
|
2021-11-12 21:35:34 +00:00
|
|
|
<div class="border border-2 border-gray-200 dark:border-black rounded-xl p-5 shadow-2xl bg-gray-200 dark:bg-gray-800 sticky top-12">
|
|
|
|
<p class="text-bold text-xl">Table of contents</p>
|
2021-11-13 19:08:53 +00:00
|
|
|
<ul id="toc">
|
2021-11-12 21:14:20 +00:00
|
|
|
{% for h1 in page.toc %}
|
2021-11-13 17:58:20 +00:00
|
|
|
<li class="pl-2 my-2">
|
|
|
|
<a id="link-{{h1.id}}" class="text-md block rounded-lg p-2" href="{{ h1.permalink | safe }}">
|
2021-11-12 21:35:34 +00:00
|
|
|
- {{ h1.title }}
|
2021-11-12 21:14:20 +00:00
|
|
|
</a>
|
|
|
|
{% if h1.children %}
|
|
|
|
{% for h2 in h1.children %}
|
2021-11-13 17:58:20 +00:00
|
|
|
<li class="pl-4 my-2">
|
|
|
|
<a id="link-{{h2.id}}" class="text-sm block rounded-lg p-2" href="{{ h2.permalink | safe }}">
|
2021-11-13 12:30:26 +00:00
|
|
|
- {{ h2.title }}
|
|
|
|
</a>
|
|
|
|
</li>
|
2021-11-12 21:14:20 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2021-11-12 21:32:13 +00:00
|
|
|
</div>
|
2021-11-12 21:14:20 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-11-13 11:48:42 +00:00
|
|
|
|
2021-11-17 19:13:07 +00:00
|
|
|
|
2021-11-11 16:58:52 +00:00
|
|
|
</div>
|
2021-11-17 19:14:15 +00:00
|
|
|
{% endblock %}
|
2021-11-17 19:13:07 +00:00
|
|
|
|
|
|
|
|
2021-11-11 22:31:49 +00:00
|
|
|
|
|
|
|
{% block pagination %}
|
|
|
|
{% if page.earlier or page.later or page.lighter or page.heavier %}
|
2021-11-11 22:39:46 +00:00
|
|
|
<div class="max-w-7xl px-2 sm:px-6 lg:px-8 mx-auto">
|
2021-11-11 22:38:53 +00:00
|
|
|
<div class="flex items-center space-x-56 mt-4">
|
2021-11-11 22:31:49 +00:00
|
|
|
{% if page.later %}
|
2021-11-11 22:44:28 +00:00
|
|
|
<a class="flex items-center border border-gray-400 dark:border-black rounded-lg text-gray-800 dark:text-gray-300 dark:bg-gray-800 hover:bg-gray-300 dark:hover:bg-gray-600 dark:hover:text-white px-3 py-4 rounded-md text-sm font-medium transform transition duration-500 hover:scale-105 bg-gray-200 dark:bg-gray-800" href="{{ page.later.permalink }}">
|
2021-11-11 22:31:49 +00:00
|
|
|
<svg class="w-7 h-7 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16l-4-4m0 0l4-4m-4 4h18"></path>
|
|
|
|
</svg>
|
|
|
|
{{ page.later.title }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if page.earlier %}
|
2021-11-11 22:44:28 +00:00
|
|
|
<a class="flex items-center border border-gray-400 dark:border-black rounded-lg text-gray-800 dark:text-gray-300 dark:bg-gray-800 hover:bg-gray-300 dark:hover:bg-gray-600 dark:hover:text-white px-3 py-4 rounded-md text-sm font-medium transform transition duration-500 hover:scale-105 bg-gray-200 dark:bg-gray-800" href="{{ page.earlier.permalink }}">
|
2021-11-11 22:31:49 +00:00
|
|
|
{{ page.earlier.title }}
|
|
|
|
<svg class="w-7 h-7 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
|
|
|
|
</svg>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if page.heavier %}
|
2021-11-11 22:44:28 +00:00
|
|
|
<a class="flex items-center border border-gray-400 dark:border-black rounded-lg text-gray-800 dark:text-gray-300 dark:bg-gray-800 hover:bg-gray-300 dark:hover:bg-gray-600 dark:hover:text-white px-3 py-4 rounded-md text-sm font-medium transform transition duration-500 hover:scale-105 bg-gray-200 dark:bg-gray-800" href="{{ page.heavier.permalink }}">
|
2021-11-11 22:31:49 +00:00
|
|
|
<svg class="w-7 h-7 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16l-4-4m0 0l4-4m-4 4h18"></path>
|
|
|
|
</svg>
|
|
|
|
{{ page.heavier.title }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if page.lighter %}
|
2021-11-11 22:44:28 +00:00
|
|
|
<a class="flex items-center border border-gray-400 dark:border-black rounded-lg text-gray-800 dark:text-gray-300 dark:bg-gray-800 hover:bg-gray-300 dark:hover:bg-gray-600 dark:hover:text-white px-3 py-4 rounded-md text-sm font-medium transform transition duration-500 hover:scale-105 bg-gray-200 dark:bg-gray-800" href="{{ page.lighter.permalink }}">
|
2021-11-11 22:31:49 +00:00
|
|
|
{{ page.lighter.title }}
|
|
|
|
<svg class="w-7 h-7 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"></path>
|
|
|
|
</svg>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
2021-11-13 11:48:42 +00:00
|
|
|
|
|
|
|
{% block extra_js %}
|
|
|
|
<script defer src="/js/page.js"></script>
|
|
|
|
{% endblock %}
|