summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-01-20 12:06:49 +0100
committerDennis Eriksen <d@ennis.no>2023-01-20 12:06:49 +0100
commitd1d65c94b888c2959c9da799e4329161ede449ea (patch)
tree7551a0488ebd56d337a5bf22d7b5ec21a0a4a4e2 /templates
parentrelative links on front page (diff)
downloadrikerz-d1d65c94b888c2959c9da799e4329161ede449ea.tar.gz
Made Riker into a Zola-theme - Rikerz
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html8
-rw-r--r--templates/atom.xml34
-rw-r--r--templates/index.html58
-rw-r--r--templates/page.html23
-rw-r--r--templates/rss.xml32
-rw-r--r--templates/sitemap.xml13
6 files changed, 168 insertions, 0 deletions
diff --git a/templates/404.html b/templates/404.html
new file mode 100644
index 0000000..02d0a66
--- /dev/null
+++ b/templates/404.html
@@ -0,0 +1,8 @@
+{% extends "index.html" %}
+
+{% block content %}
+ <article>
+ <center><h1>404</h1></center>
+ <center><p>Page not found, dude.</p></center>
+ </article>
+{% endblock content %}
diff --git a/templates/atom.xml b/templates/atom.xml
new file mode 100644
index 0000000..dd48482
--- /dev/null
+++ b/templates/atom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}">
+ <title>{{ config.title }}
+ {%- if term %} - {{ term.name }}
+ {%- elif section.title %} - {{ section.title }}
+ {%- endif -%}
+ </title>
+ {%- if config.description %}
+ <subtitle>{{ config.description }}</subtitle>
+ {%- endif %}
+ <link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
+ <link href="
+ {%- if section -%}
+ {{ section.permalink | escape_xml | safe }}
+ {%- else -%}
+ {{ config.base_url | escape_xml | safe }}
+ {%- endif -%}
+ "/>
+ <generator uri="https://www.getzola.org/">Zola</generator>
+ <updated>{{ last_updated | date(format="%+") }}</updated>
+ <id>{{ feed_url | safe }}</id>
+ {%- for page in pages %}
+ {%- if not page.extra.hidden|default(value=false) %}
+ <entry xml:lang="{{ page.lang }}">
+ <title>{{ page.title }}</title>
+ <published>{{ page.date | date(format="%+") }}</published>
+ <updated>{{ page.updated | default(value=page.date) | date(format="%+") }}</updated>
+ <link rel="alternate" href="{{ page.permalink | safe }}" type="text/html"/>
+ <id>{{ page.permalink | safe }}</id>
+ <content type="html">{{ page.content }}</content>
+ </entry>
+ {%- endif %}
+ {%- endfor %}
+</feed>
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..222ea74
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+
+<html class="no-js" lang="{{ config.default_language | default(value="en") }}">
+
+{% block head %}
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="x-ua-compatible" content="ie=edge">
+ <title>{% block title %}{{ config.extra.title }}{% endblock title %}</title>
+ <meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+ <link rel="stylesheet" href="/css/normalize.css">
+ <link rel="stylesheet" href="/css/main.css">
+
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
+</head>
+{% endblock head %}
+
+<body>
+
+{% block header %}
+<header>
+ <a href="/"><img id="logo" src="{{ config.extra.logo }}" /></a>
+ <h1>{{ config.extra.title }}</h1>
+</header>
+{% endblock header %}
+
+<main>
+{% block content %}
+<p>{{ config.extra.intro }}</p>
+<div class="archive">
+ <h2>Archive</h2>
+
+{%- for year, posts in section.pages | group_by(attribute="year") %}
+
+ <h3>{{ year }}</h3>
+ {%- for post in posts %}
+
+ <article class="list-item">
+ <a href="{{ post.permalink | safe }}" class="list-item-link">{{ post.title }}</a>
+ <span class="list-item-date">{{ post.date | date(format="%B %e, %Y") }}</span>
+ </article>
+ {%- endfor %}
+{% endfor %}
+</div>
+
+{% endblock content %}
+</main>
+
+{% block footer %}
+<footer>
+ {{ config.extra.copyright | safe }}
+</footer>
+{% endblock footer %}
+
+</body>
+</html>
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..6a83bc0
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,23 @@
+{% extends "index.html" %}
+
+{% block title %}{{ page.title }} &middot; {{ config.title }}{% endblock title %}
+
+{% block header %}
+<header>
+ <a href="/"><img id="logofloat" src="{{ config.extra.logo }}" /></a>
+</header>
+{% endblock header %}
+
+{% block content %}
+ <article>
+ <h1>{{ page.title }}</h1>
+ <span class="single-date">{{ page.date | date(format="%B %e, %Y") }}</span>
+{% if page.updated | date %}
+ <br>
+ <span class="single-date"><small>Last modified {{ page.updated | date(format="%B %e, %Y") }}</small></span>
+{% endif %}
+
+{{ page.content | safe }}
+
+ </article>
+{% endblock content %}
diff --git a/templates/rss.xml b/templates/rss.xml
new file mode 100644
index 0000000..ce12795
--- /dev/null
+++ b/templates/rss.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
+ <channel>
+ <title>{{ config.title }}
+ {%- if term %} - {{ term.name }}
+ {%- elif section.title %} - {{ section.title }}
+ {%- endif -%}
+ </title>
+ <link>{%- if section -%}
+ {{ section.permalink | escape_xml | safe }}
+ {%- else -%}
+ {{ config.base_url | escape_xml | safe }}
+ {%- endif -%}
+ </link>
+ <description>{{ config.description }}</description>
+ <generator>Zola</generator>
+ <language>{{ lang }}</language>
+ <atom:link href="{{ feed_url | safe }}" rel="self" type="application/rss+xml"/>
+ <lastBuildDate>{{ last_updated | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
+ {%- for page in pages %}
+ {%- if not page.extra.hidden|default(value=false) %}
+ <item>
+ <title>{{ page.title }}</title>
+ <pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
+ <link>{{ page.permalink | escape_xml | safe }}</link>
+ <guid>{{ page.permalink | escape_xml | safe }}</guid>
+ <description>{% if page.summary %}{{ page.summary }}{% else %}{{ page.content }}{% endif %}</description>
+ </item>
+ {%- endif %}
+ {%- endfor %}
+ </channel>
+</rss>
diff --git a/templates/sitemap.xml b/templates/sitemap.xml
new file mode 100644
index 0000000..e0cfc82
--- /dev/null
+++ b/templates/sitemap.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+ {%- for sitemap_entry in entries %}
+ {%- if not sitemap_entry.extra.hidden|default(value=false) %}
+ <url>
+ <loc>{{ sitemap_entry.permalink | escape_xml | safe }}</loc>
+ {%- if sitemap_entry.updated %}
+ <lastmod>{{ sitemap_entry.updated }}</lastmod>
+ {%- endif %}
+ </url>
+ {%- endif %}
+ {%- endfor %}
+</urlset>