feat: implement barebone zola templates

This commit is contained in:
Alexander Navarro 2024-11-10 21:45:59 +00:00
parent 9c20f5ed2e
commit f99a9ae2ac
198 changed files with 2434 additions and 227991 deletions

View file

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en" class="leading-relaxed text-base mx-auto mt-2 w-11/12 sm:w-2/3 sm:max-w-lg font-sans bg-slate-900 text-slate-50 no-underline">
<head>
<meta charset="utf-8">
{% block title %}
<title>{{ config.title }}</title>
{% endblock %}
<link rel="shortcut icon" type="image/png" href="{{ config.extra.emily_favicon }}">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link id="stylesheet" rel="stylesheet" type="text/css" href="/main.css">
<link id="stylesheet" rel="stylesheet" type="text/css" href="/typography.css">
<link rel="stylesheet" href="/foundation.min.css">
<script src="/highlight.min.js"></script>
<script defer>hljs.highlightAll();</script>
</head>
<div class="flex items-start border-slate-50">
<a href="/">
<div class="rounded-full">
<img class="rounded-full" width="60" height="auto" src="{{ config.extra.emily_icon }}" alt="{{ config.title }}">
</div>
</a>
<div class="ml-auto">
<a class="no-underline text-slate-50" href="/">{{ config.title }}</a>
</div>
</div>
<div class="flex justify-end">
<a class="flex items-start text-slate-50" href="/about">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
<path fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z"
clip-rule="evenodd" />
</svg>
about</a>
</div>
<hr class="border-amber-200" />
<body onload="getTheme()">
<section>
<div>
{% block content %} {% endblock %}
</div>
</section>
</body>
<div class="flex justify-end my-4">
<div class="flex flex-col">
<div><a class="underline text-slate-50" href="/">{{ config.title }}</a>&ensp;&copy; {{ config.extra.emily_author }}
</div>
<div>powered by <a class="text-slate-50" href="https://www.getzola.org/">zola</a>, theme <a class="text-slate-50"
href="https://github.com/kyoheiu/emily_zola_theme">emily</a></div>
</div>
</div>
</html>

View file

@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block title %}
<title>Categories</title>
{% endblock %}
{% block content %}
<p>Categories]</p>
<ul>
{% for term in terms %}
<li>
<a href="{{ term.permalink }}">/{{ term.name }}</a>
({{ term.pages | length }})
</li>
{% endfor %}
</ul>
{% endblock content %}

View file

@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block title %}
<title>{{ term.name }} | {{ config.title }}</title>
{% endblock %}
{% block content %}
<p>[Category: {{ term.name }}]</p>
{% for page in term.pages %}
<p>
<div class="date">
{{ page.date }}
</div>
<div>
<a class="no-underline text-sky-200 text-xl" href="{{ page.permalink | safe }}">{{ page.title }}</a>
</div>
</p>
{% endfor %}
{% endblock content %}

View file

@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block content %}
{% set section = get_section(path="post/_index.md") %}
{% for page in section.pages %}
{% if loop.index0 == config.extra.emily_indexposts %}{% break %}{% endif %}
<p>
<div class="text-slate-200 text-sm">
{{ page.date }}
</div>
<a class="no-underline text-sky-200 text-xl" href="{{ page.permalink | safe }}">{{ page.title }}</a>
<div>
{% if page.taxonomies.categories %}
{% for category in page.taxonomies.categories %}
&emsp;<a class="no-underline text-slate-50" href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a>
{% endfor %}
{% endif %}
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
&emsp;<a class="no-underline text-slate-50" href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a>
{% endfor %}
{% endif %}
</div>
</p>
{% endfor %}
<p>
<a class="no-underline text-slate-50 flex items-start" href="/post">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z" clip-rule="evenodd" />
</svg>
archives</a>
</p>
{% endblock content %}

View file

@ -0,0 +1,45 @@
{% extends "base.html" %}
{% block title %}
<title>{{ page.title }} | {{ config.title }}</title>
{% endblock %}
{% block content %}
<p>
<div class="text-3xl">{{ page.title }}</div>
</p>
<p>
<div class="text-sm mb-2 text-right">{{ page.date }}</div>
<div class="text-right">
{% if page.taxonomies.categories %}
{% for category in page.taxonomies.categories %}
&ensp;<a class="text-slate-50" href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a>
{% endfor %}
{% endif %}
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
&ensp;<a class="text-slate-50" href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a>
{% endfor %}
{% endif %}
</div>
</p>
<p>
{{ page.content | safe }}
</p>
<hr class="mb-4 border-amber-200" />
{% if page.extra.math %}
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
};
</script>
<script type="text/javascript" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
{% endif %}
{% endblock content %}

View file

@ -0,0 +1,54 @@
{% extends "base.html" %}
{% block content %}
<h2 class="text-indigo-200">
Categories & Tags
</h2>
<p>
{% set categories = get_taxonomy(kind="categories") %}
{% for term in categories.items %}
<a class="no-underline text-slate-50" href="{{ term.permalink }}">/{{ term.name }}
({{ term.pages | length }})</a>&nbsp;
{% endfor %}
</ul>
</p>
<p>
{% set tags = get_taxonomy(kind="tags") %}
{% for term in tags.items %}
<a class="no-underline text-slate-50" href="{{ term.permalink }}">#{{ term.name }}
({{ term.pages | length }})</a>&nbsp;
{% endfor %}
</ul>
</p>
{% for year, posts in section.pages | group_by(attribute="year") %}
<h3 class="text-indigo-200">{{ year }}</h3>
{% for post in posts %}
<p>
<div>
{{ post.date }}
</div>
<div>
<a class="text-sky-200 no-underline text-xl" href="{{ post.permalink }}">{{ post.title }}</a>
</div>
<div>
{% if post.taxonomies.categories %}
{% for category in post.taxonomies.categories %}
&emsp;<a class="no-underline text-slate-50" href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a>
{% endfor %}
{% endif %}
{% if post.taxonomies.tags %}
{% for tag in post.taxonomies.tags %}
&emsp;<a class="no-underline text-slate-50" href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a>
{% endfor %}
{% endif %}
</div>
</p>
{% endfor %}
{% endfor %}
{% endblock content %}

View file

@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block title %}
<title>Tags</title>
{% endblock %}
{% block content %}
<p class="archive_title">[Tags]</p>
<ul>
{% for term in terms %}
<li>
<a href="{{ term.permalink }}">#{{ term.name }}</a>
({{ term.pages | length }})
</li>
{% endfor %}
</ul>
{% endblock content %}

View file

@ -0,0 +1,21 @@
{% extends "base.html" %}
{% block title %}
<title>{{ term.name }} | {{ config.title }}</title>
{% endblock %}
{% block content %}
<p class="archive_title">[Tag: {{ term.name }}]</p>
{% for page in term.pages %}
<p>
<div class="date">
{{ page.date }}
</div>
<div class="archive_title">
<a class="no-underline text-sky-200 text-xl" href="{{ page.permalink | safe }}">{{ page.title }}</a>
</div>
</p>
{% endfor %}
{% endblock content %}