aboutsummaryrefslogtreecommitdiff
path: root/theme/templates
diff options
context:
space:
mode:
Diffstat (limited to 'theme/templates')
-rw-r--r--theme/templates/base.html39
-rw-r--r--theme/templates/blog.html15
-rw-r--r--theme/templates/feed.xml37
-rw-r--r--theme/templates/index.html60
-rw-r--r--theme/templates/page.html11
-rw-r--r--theme/templates/post.html21
-rw-r--r--theme/templates/wiki.html12
7 files changed, 195 insertions, 0 deletions
diff --git a/theme/templates/base.html b/theme/templates/base.html
new file mode 100644
index 0000000..d6b37d2
--- /dev/null
+++ b/theme/templates/base.html
@@ -0,0 +1,39 @@
+<!doctype html>
+<html lang="en-us">
+<head>
+ {% block head %}
+ <meta charset="utf-8">
+ <title>
+ {% block subtitle %}{% endblock %}
+ {% block title %}{{ site_name | default("weblorg website") }}{% endblock %}
+ </title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ {% if site_owner is defined %}<meta name="author" content="{{ site_owner }}" >{% endif %}
+ {% if site_description is defined %}<meta name="description" content="{{ site_description }}" >{% endif %}
+ {% if site_keywords is defined %}<meta name="keywords" content="{{ site_keywords }}" >{% endif %}
+ <link rel="stylesheet" href="{{ url_for("static", file="styles.min.css") }}" type="text/css">
+ <link rel="icon" href="data:,">
+ {% block meta %}{% endblock %}
+ {% endblock %}
+</head>
+<body>
+ <nav class="site-nav" aria-label="site-nav" role="navigation">
+ <ul>
+ <li><a href="/">Home</a></li>
+ <li><a href="/blog/">Blog</a></li>
+ <li><a href="/services/">Services</a></li>
+ <li><a href="/wiki/">Wiki</a></li>
+ </ul>
+ </nav>
+ <main>{% block main %}{% endblock %}</main>
+ <footer>
+ <p>Last build: &lt;{{ now() | strftime("%Y-%m-%d %a %H:%M:%S") }}&gt;</p>
+ <p>
+ <a href="https://git.sr.ht/~cyborg/cleberg.net"
+ target="_blank" rel="noopener">Source Code</a>
+ &middot;
+ <a href="/feed.xml">RSS Feed</a>
+ </p>
+ </footer>
+</body>
+</html>
diff --git a/theme/templates/blog.html b/theme/templates/blog.html
new file mode 100644
index 0000000..daa36ee
--- /dev/null
+++ b/theme/templates/blog.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %} {% block subtitle %}Blog | {% endblock %} {% block
+main %}
+<h1>Blog</h1>
+<p>Use <code>Ctrl + F</code> to search blog post titles for keywords.</p>
+<p>
+ You can also add the <a href="/feed.xml">RSS Feed</a> to your feed reader.
+</p>
+{% for post in posts %}
+<div class="post">
+ <time datetime='{{ post.date | strftime("%Y-%m-%d") }}'
+ >{{ post.date|strftime("%Y-%m-%d") }}</time
+ >
+ <a href='{{ url_for("blog", slug=post.slug) }}'>{{ post.title }}</a>
+</div>
+{% endfor %} {% endblock %}
diff --git a/theme/templates/feed.xml b/theme/templates/feed.xml
new file mode 100644
index 0000000..7b23994
--- /dev/null
+++ b/theme/templates/feed.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<rss version="2.0"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xmlns:wfw="http://wellformedweb.org/CommentAPI/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
+ xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
+ xmlns:georss="http://www.georss.org/georss"
+ xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
+ xmlns:media="http://search.yahoo.com/mrss/">
+ <channel>
+ <title>{{ site_name | default("cleberg.net") }}</title>
+ <atom:link
+ href="{{ url_for("rss") }}"
+ rel="self" type="application/rss+xml" />
+ <link>{{ url_for("index") }}</link>
+ <description><![CDATA[]]></description>
+ <language>en</language>
+ <pubDate>{{ posts | first | getattr("date") | strftime("%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
+ <lastBuildDate>{{ now() | strftime("%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
+ <generator>{{ meta.generator }}</generator>
+ <webMaster>{{ site_owner | default("hello@cleberg.net") }}</webMaster>
+
+ {% for post in posts %}
+ <item>
+ <title>{{ post.title }}</title>
+ <link>{{ url_for("blog", slug=post.slug) }}</link>
+ <author>{{ post.author|default("hello@cleberg.net") }}</author>
+ <guid isPermaLink="false">{{ url_for("blog", slug=post.slug) }}</guid>
+ <pubDate>{{ post.date|strftime("%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
+ <description><![CDATA[{{ post.html|safe }}]]></description>
+ </item>
+ {% endfor %}
+
+ </channel>
+</rss>
diff --git a/theme/templates/index.html b/theme/templates/index.html
new file mode 100644
index 0000000..c77e57d
--- /dev/null
+++ b/theme/templates/index.html
@@ -0,0 +1,60 @@
+{% extends "base.html" %} {% block main %}
+<section>
+ <h1>cleberg.net</h1>
+ <pre>pub rsa4096 2022-11-16 [SC]
+ <a href="/gpg.txt">3917 973F B159 BBB8 6194 5385 6945 1A51 7AC0 CB37</a>
+uid [ultimate] Christian Cleberg &lt;hello@cleberg.net&gt;</pre>
+</section>
+<section>
+ <h2>Recent Blog Posts</h2>
+
+ <div class="post">
+ <time datetime="2024-07-11 20:24:02">2024-07-11</time>
+ <a href="/blog/emacs-on-ipad/">Emacs on iPadOS</a>
+ </div>
+
+ <div class="post">
+ <time datetime="2024-06-19 08:00:00">2024-06-19</time>
+ <a href="/blog/deprecated-trusted-gpg-fix/"
+ >Fixing Ubuntu Error: 'Key is stored in legacy trusted.gpg keyring'</a
+ >
+ </div>
+
+ <div class="post">
+ <time datetime="2024-05-03 00:00:00">2024-05-03</time>
+ <a href="/blog/ubuntu-on-macos/"
+ >Running Ubuntu Linux on macOS with OrbStack</a
+ >
+ </div>
+
+ <br />
+ <a href="/blog/">All Posts →</a>
+</section>
+
+<section>
+ <h2>Everything Else</h2>
+ <ul>
+ <li><a href="https://cv.cleberg.net">Curriculum Vitae</a></li>
+ <li><a href="/salary/">Salary</a></li>
+ <li><a href="/services/">Services</a></li>
+ <li><a href="/wiki/">Wiki</a></li>
+ </ul>
+</section>
+
+<section>
+ <h2>Contact</h2>
+ <ul>
+ <li>
+ hello [at] cleberg.net (<a href="https://cleberg.net/gpg.txt">GPG</a>)
+ </li>
+ <li>cyb0rg on <a href="https://libera.chat/">libera.chat</a></li>
+ <li>
+ <a href="https://matrix.to/#/@cyborg:matrix.tchncs.de"
+ >@cyborg:@matrix.tchncs.de</a
+ >
+ </li>
+ <li><a href="https://git.sr.ht/~cyborg/">Sourcehut</a></li>
+ </ul>
+</section>
+
+{% endblock %}
diff --git a/theme/templates/page.html b/theme/templates/page.html
new file mode 100644
index 0000000..7a53b78
--- /dev/null
+++ b/theme/templates/page.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+
+{% block subtitle %}
+ {{ post.title }}
+{% endblock %}
+{% block main %}
+<article role="article">
+ <h1>{{ post.title }}</h1>
+ <section>{{ post.html | safe }}</section>
+</article>
+{% endblock %}
diff --git a/theme/templates/post.html b/theme/templates/post.html
new file mode 100644
index 0000000..58bdb72
--- /dev/null
+++ b/theme/templates/post.html
@@ -0,0 +1,21 @@
+{% extends "base.html" %} {% block subtitle %} {{ post.title }} | {% endblock %}
+{% block meta %}
+<meta property="og:title" content="{{ post.title }}" />
+<meta property="og:url" content="{{ post.url }}" />
+{% if post.description is defined %}
+<meta property="og:description" content="{{ post.description }}" />
+{% elif project_description is defined %}
+<meta property="og:description" content="{{ project_description }}" />
+{% endif %} {% endblock %} {% block main %}
+<article role="article">
+ <section class="post-metadata">
+ <h1 class="post__title">{{ post.title }}</h1>
+ {% if post.date is defined %}
+ <time datetime='{{ post.date|strftime("%Y-%m-%d") }}'
+ >&lt;{{ post.date|strftime("%Y-%m-%d %a %H:%M:%S") }}&gt;</time
+ >
+ {% endif %}
+ </section>
+ <section>{{ post.html | safe }}</section>
+</article>
+{% endblock %}
diff --git a/theme/templates/wiki.html b/theme/templates/wiki.html
new file mode 100644
index 0000000..6087b36
--- /dev/null
+++ b/theme/templates/wiki.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %} {% block subtitle %}Wiki | {% endblock %} {% block
+main %}
+<h1>Wiki</h1>
+<p>Use <code>Ctrl + F</code> to search wiki pages for keywords.</p>
+{% for post in posts %}
+<div class="post">
+ <time datetime='{{ post.date | strftime("%Y-%m-%d") }}'
+ >{{ post.date|strftime("%Y-%m-%d") }}</time
+ >
+ <a href='{{ url_for("wiki", slug=post.slug) }}'>{{ post.title }}</a>
+</div>
+{% endfor %} {% endblock %}