summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html30
-rw-r--r--templates/index.html14
-rw-r--r--templates/page.html16
-rw-r--r--templates/section.html29
4 files changed, 89 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..09c565d
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="{{ lang | default(value="en") }}">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>{% block title %}{{ config.title }}{% endblock title %}</title>
+ <meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
+ <meta name="color-scheme" content="dark light">
+ <link rel="stylesheet" href="{{ get_url(path="main.css", cachebust=true) | safe }}">
+ <link rel="icon" href="{{ get_url(path="favicon.svg") | safe }}">
+</head>
+<body>
+ <header class="site-header">
+ <a class="brand" href="{{ get_url(path="/") | safe }}">krazy warez</a>
+ <nav class="site-nav">
+ <a href="{{ get_url(path="/services/") | safe }}">services</a>
+ <span class="sep">·</span>
+ <a href="{{ get_url(path="/apps/") | safe }}">apps</a>
+ </nav>
+ </header>
+
+ <main class="site-main">
+ {% block content %}{% endblock content %}
+ </main>
+
+ <footer class="site-footer">
+ <p class="foot-links"><a href="mailto:{{ config.extra.email }}">{{ config.extra.email }}</a> · <a href="{{ config.extra.github }}">github</a> · &copy; {{ now() | date(format="%Y") }} · public domain</p>
+ </footer>
+</body>
+</html>
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..a9dd0fc
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,14 @@
+{% extends "base.html" %}
+
+{% block content %}
+<p class="tagline">small, durable software · privacy-first tools you control</p>
+
+<div class="hero-actions">
+ <a class="btn btn-primary" href="{{ get_url(path="/services/") | safe }}">view services &rarr;</a>
+ <a class="btn" href="{{ get_url(path="/apps/") | safe }}">browse apps</a>
+</div>
+
+<article class="prose">
+ {{ section.content | safe }}
+</article>
+{% endblock content %}
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..32b1607
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+
+{% block title %}{{ page.title | lower }} &middot; {{ config.title }}{% endblock title %}
+{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %}
+
+{% block content %}
+<p class="back"><a href="{{ section.permalink | default(value=get_url(path="/")) | safe }}">&larr; back</a></p>
+<article class="prose">
+ <h1 class="page-label">{{ page.title }}</h1>
+ {% if page.description %}<p class="lede">{{ page.description }}</p>{% endif %}
+ {{ page.content | safe }}
+ {% if page.extra.link %}
+ <p><a class="btn btn-primary" href="{{ page.extra.link }}">{{ page.extra.link_label | default(value="source") | lower }} &rarr;</a></p>
+ {% endif %}
+</article>
+{% endblock content %}
diff --git a/templates/section.html b/templates/section.html
new file mode 100644
index 0000000..c3a9489
--- /dev/null
+++ b/templates/section.html
@@ -0,0 +1,29 @@
+{% extends "base.html" %}
+
+{% block title %}{{ section.title | lower }} &middot; {{ config.title }}{% endblock title %}
+{% block description %}{{ section.description | default(value=config.description) }}{% endblock description %}
+
+{% block content %}
+<article class="prose">
+ <h1 class="page-label">{{ section.title }}</h1>
+ {{ section.content | safe }}
+</article>
+
+{% if section.pages %}
+<ul class="plainlist">
+ {% for page in section.pages %}
+ <li>
+ <span class="pl-main">
+ <span class="pl-name">{{ page.title }}</span>
+ {% if page.description %}<span class="pl-desc">— {{ page.description }}</span>{% endif %}
+ </span>
+ <span class="pl-links">
+ {% if page.extra.appstore %}<a class="pl-link" href="{{ page.extra.appstore }}">app store &rarr;</a>
+ {% else %}<span class="pl-link pl-link-off" aria-disabled="true">app store — soon</span>{% endif %}
+ {% if page.extra.link %}<a class="pl-link" href="{{ page.extra.link }}">{{ page.extra.link_label | default(value="source") | lower }} &rarr;</a>{% endif %}
+ </span>
+ </li>
+ {% endfor %}
+</ul>
+{% endif %}
+{% endblock content %}