Add Zola templates and browser-tested site scaffold

This commit is contained in:
ms2k 2026-09-15 19:30:08 +09:00
commit a33673243e
4 changed files with 2114 additions and 0 deletions

1
templates/404.html Symbolic link
View file

@ -0,0 +1 @@
base.html

28
templates/base.html Normal file
View file

@ -0,0 +1,28 @@
{% if page %}{% set content = page %}{% elif section %}{% set content = section %}{% else %}{% set content = get_page(path="404.md") %}{% endif %}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ content.title }} · Quorate{% endblock title %}</title>
<link rel="stylesheet" href="/style.css">
<script src="/theme.js"></script>
</head>
<body>
<div class="shell">
<header>
<a class="brand" href="/">Quorate</a>
<nav aria-label="Main"><a href="/about/">About</a><span aria-hidden="true">|</span><a href="/blog/">Blog</a><span aria-hidden="true">|</span><a href="https://code.quorate.dev">Code</a><span aria-hidden="true">|</span><a href="/up/">Health</a></nav>
</header>
<main>{% block main %}
<article{% if content.date %} class="post"{% endif %}>
<h1>{{ content.title }}</h1>
{% if content.date %}<time datetime="{{ content.date }}">{{ content.date }}</time>{% endif %}
{{ content.content | safe }}
</article>
{% if content.date %}<script type="module" src="/post.js"></script>{% endif %}
{% endblock main %}</main>
<footer><span>Quorate · a personal website.</span><button id="theme" type="button" aria-label="Theme: Auto"><svg width="16" height="16" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="8" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 4a8 8 0 0 1 0 16Z" fill="currentColor"/></svg></button></footer>
</div>
</body>
</html>

13
templates/blog.html Normal file
View file

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block title %}Blog · Quorate{% endblock title %}
{% block main %}
<h1>{{ section.title }}</h1>
<ul class="posts">
{% for page in section.pages %}
<li><a href="{{ page.permalink }}">
{% if page.extra.thumbnail %}<img src="{{ page.extra.thumbnail }}" alt="">{% endif %}
<div><h2>{{ page.title }}</h2><p>{{ page.description }}</p><time datetime="{{ page.date }}">{{ page.date }}</time></div>
</a></li>
{% endfor %}
</ul>
{% endblock main %}

11
templates/health.html Normal file
View file

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block title %}Health · Quorate{% endblock title %}
{% block main %}
<div class="masthead"><span class="badge">Q / 01</span><div><h1>{{ page.title }}</h1><p>Daily record</p></div></div>
<p id="observed" role="status">Loading observations…</p>
<div id="groups"></div>
<div class="controls" hidden><label>Target <select id="target"></select></label><label>Day <select id="day"></select></label></div>
<p id="detail" aria-live="polite"></p>
<noscript>JavaScript is needed to display observations.</noscript>
<script type="module" src="/health.js" data-api="{{ config.extra.health_url }}"></script>
{% endblock main %}