aboutsummaryrefslogtreecommitdiff
path: root/theme/templates
diff options
context:
space:
mode:
Diffstat (limited to 'theme/templates')
-rw-r--r--theme/templates/atom.xml42
-rw-r--r--theme/templates/base.html41
-rw-r--r--theme/templates/blog.html14
-rw-r--r--theme/templates/index.html55
-rw-r--r--theme/templates/page.html11
-rw-r--r--theme/templates/post.html30
-rw-r--r--theme/templates/wiki.html32
7 files changed, 225 insertions, 0 deletions
diff --git a/theme/templates/atom.xml b/theme/templates/atom.xml
new file mode 100644
index 0000000..8ff1e30
--- /dev/null
+++ b/theme/templates/atom.xml
@@ -0,0 +1,42 @@
+<?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("Simple Blog") }}</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>
+ <image>
+ <url>{{ url_for("index") }}media/img/8bitme.png</url>
+ <title>Blog Author</title>
+ <link>{{ url_for("index") }}</link>
+ </image>
+
+ {% 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/base.html b/theme/templates/base.html
new file mode 100644
index 0000000..167883c
--- /dev/null
+++ b/theme/templates/base.html
@@ -0,0 +1,41 @@
+
+<!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">
+ {% block meta %}{% endblock %}
+ {% endblock %}
+</head>
+<body>
+ {% block nav %}
+ <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>
+ {% endblock %}
+
+ <main>{% block main %}{% endblock %}</main>
+
+ {% block footer %}
+ <footer>
+ <p>Last Build: &lt;{{ now() | strftime("%Y-%m-%d %a %H:%M:%S") }}&gt;</p>
+ <p><a href="https://git.cleberg.net/cleberg.net.git" target="_blank" rel="noopener">Source Code</a></p>
+ <p><a href="/atom.xml">Atom RSS Feed</a></p>
+ </footer>
+ {% endblock %}
+</body>
+</html>
diff --git a/theme/templates/blog.html b/theme/templates/blog.html
new file mode 100644
index 0000000..b3b3a3f
--- /dev/null
+++ b/theme/templates/blog.html
@@ -0,0 +1,14 @@
+{% 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") }}">&lt;{{ post.date|strftime("%Y-%m-%d") }}&gt;</time>
+ <a href="{{ url_for("blog", slug=post.slug) }}">{{ post.title }}</a>
+ </div>
+ {% endfor %}
+{% endblock %}
diff --git a/theme/templates/index.html b/theme/templates/index.html
new file mode 100644
index 0000000..923d920
--- /dev/null
+++ b/theme/templates/index.html
@@ -0,0 +1,55 @@
+{% extends "base.html" %}
+
+{% block main %}
+<section>
+ <h1>cleberg.net</h1>
+ <blockquote>Do AIs dream in electric sheep?<br>He hoped it had nanosecond nightmares.</blockquote>
+</section>
+<section>
+ <h2>Recent Blog Posts</h2>
+<<<<<<< HEAD:templates/index.html
+ {% set section = get_section(path="blog/_index.md") %}
+ {% set i = 0 %}
+ {% for page in section.pages %}
+ {% if i < 3%}
+ {% set_global i = i + 1%}
+ <div class="post">
+ <time datetime="{{ page.date | date(format='%Y-%m-%d %H:%M:%S') }}">{{ page.date | date(format='%Y-%m-%d') }}</time>
+ <a href="/blog/{{ page.slug }}/">{{ page.title }}</a>
+ </div>
+ {% endif %}
+ {% endfor %}
+=======
+ <div class="post">
+ <time datetime="2024-03-15">&lt;2024-03-15&gt;</time>
+ <a href="/blog/self-hosting-ddns-updater.html">Self-Hosting DDNS Updater</a>
+ </div>
+ <div class="post">
+ <time datetime="2024-03-14">&lt;2024-03-14&gt;</time>
+ <a href="/blog/doom-emacs-org-mode.html">Doom Emacs & Org-Mode</a>
+ </div>
+ <div class="post">
+ <time datetime="2024-02-21">&lt;2024-02-21&gt;</time>
+ <a href="/blog/self-hosting-an-otter-wiki.html">Self-Hosting An Otter Wiki</a>
+ </div>
+>>>>>>> org:theme/templates/index.html
+ <br>
+ <a href="/blog/">All Posts &rarr;</a>
+</section>
+<section>
+ <h2>Everything Else</h2>
+ <ul>
+ <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="/gpg.txt">GPG</a>)</li>
+ <li><a href="https://matrix.to/#/@cyborg:matrix.tchncs.de" target="_blank" rel="noopener">@cyborg:@matrix.tchncs.de</a></li>
+ <li><a href="https://git.cleberg.net/cleberg.net.git" target="_blank" rel="noopener">Git</a></li>
+ </ul>
+</section>
+{% endblock %}
diff --git a/theme/templates/page.html b/theme/templates/page.html
new file mode 100644
index 0000000..fb7afa9
--- /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..d0b76db
--- /dev/null
+++ b/theme/templates/post.html
@@ -0,0 +1,30 @@
+{% 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 %}
+<link rel="stylesheet" href="/syntax-theme-dark.css" media="(prefers-color-scheme: dark)">
+<link rel="stylesheet" href="/syntax-theme-light.css" media="(prefers-color-scheme: light)">
+{% 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..ead64c4
--- /dev/null
+++ b/theme/templates/wiki.html
@@ -0,0 +1,32 @@
+{% extends "base.html" %}
+
+<<<<<<< HEAD:templates/wiki.html
+{% block content %}
+<h1>{{ section.title }}</h1>
+=======
+{% block subtitle %}Wiki | {% endblock %}
+{% block main %}
+<h1>Wiki</h1>
+>>>>>>> org:theme/templates/wiki.html
+<p>Use <code>Ctrl + F</code> to search wiki pages for keywords.</p>
+<div class="wiki-post">
+ <p>Wiki Page</p>
+ <p>Last Updated</p>
+</div>
+<<<<<<< HEAD:templates/wiki.html
+{% for page in section.pages %}
+ <div class="wiki-post">
+ <p><a href="/wiki/{{ page.slug }}/">{{ page.title }}</a></p>
+ <time datetime="{{ page.updated | date(format='%Y-%m-%d %H:%M:%S') }}">{{ page.updated | date(format='%Y-%m-%d')}}</p>
+ </div>
+{% endfor %}
+{% endblock content %}
+=======
+{% for post in posts %}
+ <div class="wiki-post">
+ <a href="{{ url_for("wiki", slug=post.slug) }}">{{ post.title }}</a>
+ <time datetime="{{ post.date | strftime("%Y-%m-%d") }}">&lt;{{ post.date|strftime("%Y-%m-%d") }}&gt;</time>
+ </div>
+{% endfor %}
+{% endblock %}
+>>>>>>> org:theme/templates/wiki.html