tfcconnection-zola/templates/simple_page.html
2025-05-21 13:49:51 -05:00

92 lines
4.5 KiB
HTML

{% extends "layout.html" %}
{% block content %}
<div class="flex px-4">
<h1 class="text-3xl text-bold mt-12 mb-6 mx-auto">
{{ page.title }}
</h1>
</div>
<div class="flex gap-x-8 p-4 justify-center">
<!-- Content -->
<div id="page-content" class="text-bold mt-2 [&>*]:py-4">
{{ page.content | safe }}
</div>
<!-- Table of content -->
{% if page.extra.toc %}
<div class="hidden sm:block sm:w-1/4 sm:flex sm:items-center sm:flex-col sm:mt-10 sm:w-1/5">
<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>
<ul id="toc">
{% for h1 in page.toc %}
<li class="pl-2 my-2">
<a id="link-{{h1.id}}" class="text-md block rounded-lg p-2" href="{{ h1.permalink | safe }}">
- {{ h1.title }}
</a>
{% if h1.children %}
{% for h2 in h1.children %}
<li class="pl-4 my-2">
<a id="link-{{h2.id}}" class="text-sm block rounded-lg p-2" href="{{ h2.permalink | safe }}">
- {{ h2.title }}
</a>
</li>
{% endfor %}
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
</div>
{% endblock %}
{% block pagination %}
{% if page.earlier or page.later or page.lighter or page.heavier %}
<div class="max-w-7xl px-2 sm:px-6 lg:px-8 mx-auto">
<div class="flex items-center space-x-56 mt-4">
{% if page.later %}
<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 }}">
<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 %}
<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 }}">
{{ 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 %}
<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 }}">
<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 %}
<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 }}">
{{ 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 %}
{% block extra_js %}
<script defer src="/js/page.js"></script>
{% endblock %}