diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-08-03 13:22:07 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-08-03 13:22:07 +0300 |
| commit | 23821211e03cd69cf87b2f264b48e0125fcac29d (patch) | |
| tree | 42bd1a9fd7a8922a5351aed16309331d431acf7a /templates_html | |
| parent | 72a42e0449a0cbbbc455b36af9f53fc293c73fdf (diff) | |
Add gemini protocol
Diffstat (limited to 'templates_html')
| -rw-r--r-- | templates_html/atom.xml | 68 | ||||
| -rw-r--r-- | templates_html/base.html | 171 | ||||
| -rw-r--r-- | templates_html/index.html | 64 | ||||
| -rw-r--r-- | templates_html/macros.html | 45 | ||||
| -rw-r--r-- | templates_html/now.html | 11 | ||||
| -rw-r--r-- | templates_html/page.html | 37 | ||||
| -rw-r--r-- | templates_html/page_linklog.html | 6 | ||||
| -rw-r--r-- | templates_html/section_posts.html | 19 | ||||
| -rw-r--r-- | templates_html/section_projects.html | 5 | ||||
| -rw-r--r-- | templates_html/shortcodes/fig.html | 4 | ||||
| -rw-r--r-- | templates_html/shortcodes/linklog.html | 1 | ||||
| -rw-r--r-- | templates_html/shortcodes/toc.html | 1 |
12 files changed, 432 insertions, 0 deletions
diff --git a/templates_html/atom.xml b/templates_html/atom.xml new file mode 100644 index 0000000..b1721ce --- /dev/null +++ b/templates_html/atom.xml @@ -0,0 +1,68 @@ +<?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 rel="self" type="application/atom+xml" href="{{ feed_url | safe }}" /> + <link + rel="alternate" + type="text/html" + href=" + {%- if section -%} + {{ section.permalink | escape_xml | safe }} + {%- else -%} + {{ config.base_url | escape_xml | safe }} + {%- endif -%} + " + /> + <generator uri="https://www.getzola.org/">Zola</generator> + {% if last_updated is defined %}<updated + >{{ last_updated | date(format="%+") }}</updated>{% endif %} + <id>{{ feed_url | safe }}</id> + {%- for page in pages %} + <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> + {% for author in page.authors %} + <author> + <name> + {{ author }} + </name> + </author> + {% else %} + <author> + <name> + {%- if config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + </name> + </author> + {% endfor %} + <link + rel="alternate" + type="text/html" + href="{{ page.permalink | safe }}" + /> + <id>{{ page.permalink | safe }}</id> + {% if page.summary %} + <summary type="html">{{ page.summary }}</summary> + {% else %} + <content + type="html" + xml:base="{{ page.permalink | escape_xml | safe }}" + > + {{ page.content }} + </content> + {% endif %} + </entry> + {%- endfor %} +</feed> diff --git a/templates_html/base.html b/templates_html/base.html new file mode 100644 index 0000000..82f185e --- /dev/null +++ b/templates_html/base.html @@ -0,0 +1,171 @@ +<!doctype html> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> + <head> + <meta charset="utf-8" /> + <meta name="generator" content="pandoc" /> + <meta + name="viewport" + content="width=device-width, initial-scale=1.0, user-scalable=yes" + /> + <link rel="shortcut icon" type="image/png" href="/favicon.png" /> + <meta + name="author" + content="{{ page.author | default(value=config.author) }}" + /> + + {% if page.date %} + <meta name="dcterms.date" content="{{ page.date }}" /> + {% endif %} + + {% if page.extra.keywords %} + <meta + name="keywords" + content="{{ page.extra.keywords | join(sep=', ') }}" + /> + {% endif %} + + {% block title %} + {% if page.title %} + <title>{{ page.title }} β {{ config.title }}</title> + {% elif section.title %} + <title>{{ section.title }} β {{ config.title }}</title> + {% else %} + <title>{{ config.title }}</title> + {% endif %} + {% endblock %} + + {% block description %} + {% if page.description %} + <meta name="description" content="{{ page.description }}" /> + {% elif page.summary %} + <meta name="description" content="{{ page.summary | striptags }}" /> + {% else %} + <meta name="description" content="{{ config.description }}" /> + {% endif %} + {% endblock %} + + <style> + @font-face { + font-family: "PT Sans"; + src: url("/PTSans-Regular.ttf") format("truetype"); + font-weight: normal; + font-style: normal; + } + + @font-face { + font-family: "PT Sans"; + src: url("/PTSans-Bold.ttf") format("truetype"); + font-weight: bold; + font-style: normal; + } + + @font-face { + font-family: "PT Sans"; + src: url("/PTSans-Italic.ttf") format("truetype"); + font-weight: normal; + font-style: italic; + } + + @font-face { + font-family: "PT Sans"; + src: url("/PTSans-BoldItalic.ttf") format("truetype"); + font-weight: bold; + font-style: italic; + } + </style> + <link rel="stylesheet" href="/style.css" /> + + <link + rel="alternate" + type="application/atom+xml" + title="Atom Feed for jan.systems" + href="/atom.xml" + /> + + <link rel="authorization_endpoint" href="https://indieauth.com/auth" /> + </head> + <body> + <div class="header-row"> + <a class="page-title" href="/">Jan Tuomi</a> + <div id="dark-mode-btn"></div> + </div> + <nav> + <a href="/posts">posts</a> + <span aria-hidden="true"> • </span> + <a href="/linklog">linklog</a> + <span aria-hidden="true"> • </span> + <a href="/now">now</a> + <span aria-hidden="true"> • </span> + <a href="/projects">projects</a> + </nav> + + <main>{% block content %}{% endblock %}</main> + + <script> + const b = document.createElement("button"); + b.innerHTML = "π"; + b.setAttribute("id", "dark-mode-btn"); + b.setAttribute("aria-label", "Toggle dark mode"); + document.querySelector("#dark-mode-btn").replaceWith(b); + + const initialManualColorScheme = + localStorage.getItem("colorScheme"); + // If null, no manual color scheme is set + if (initialManualColorScheme === "dark") { + document.body.parentElement.classList.add("dark"); + } else if (initialManualColorScheme === "light") { + document.body.parentElement.classList.add("light"); + } + + function getCurrentManualColorScheme() { + if (document.body.parentElement.classList.contains("dark")) + return "dark"; + if (document.body.parentElement.classList.contains("light")) + return "light"; + return null; + } + + document + .querySelector("#dark-mode-btn") + .addEventListener("click", function () { + const manualColorScheme = getCurrentManualColorScheme(); + const userPreferenceIsDark = + window.matchMedia && + window.matchMedia("(prefers-color-scheme: dark)") + .matches; + + const currentColorScheme = + manualColorScheme ?? + (userPreferenceIsDark ? "dark" : "light"); + const newColorScheme = + currentColorScheme === "dark" ? "light" : "dark"; + + document.body.parentElement.classList.remove( + "dark", + "light", + ); + document.body.parentElement.classList.add(newColorScheme); + + localStorage.setItem("colorScheme", newColorScheme); + }); + </script> + + <div style="display: none" class="h-card"> + <a class="u-url" href="https://jan.systems">jan.systems</a> + <a class="u-url" href="https://github.com/jantuomi" rel="me" + >GitHub</a + > + <p class="p-note"> + Minimalist, digital gardener, senior software engineer. + </p> + <img + class="u-photo" + src="https://jan.systems/files/Jan_Tuomi_headshot.jpg" + loading="lazy" + /> + <p class="p-name">Jan Tuomi</p> + <p class="p-nickname">@jantuomi</p> + <p class="p-country-name">Finland</p> + </div> + </body> +</html> diff --git a/templates_html/index.html b/templates_html/index.html new file mode 100644 index 0000000..31d0a90 --- /dev/null +++ b/templates_html/index.html @@ -0,0 +1,64 @@ +{% extends "base.html" %} +{% block content %} + +<p><br> + <a href="/files/Jan_Tuomi_headshot.jpg"><img src="/files/Jan_Tuomi_headshot_220.jpg" style="float: right; width: 175px; margin: 0 0 0 20px;"></a> + Hi! My name is Jan. I am a senior software engineer based in Finland. Welcome to my personal blog and digital garden<a href="#footnote-digital-garden">ΒΉ</a>. +</p> +<p>I like keeping things simple and pragmatic. I'm a life-long learner, but I don't go chasing trends.</p> +<p>I enjoy spending time with my fiancΓ©e and our dog, tinkering with computer hardware and software, games of all kinds but mostly video-, tabletop and role-playing, electronics, music, language learning and linguistics.</p> +<p>I created this site<a href="#footnote-site">Β²</a> as a creative outlet for expressing myself and sharing my experiences.</p> + +{% set posts = get_section(path="posts/_index.md") %} +<section class="latest-posts"> +<h2>Latest posts</h2> +<ul class="archive-list"> +{% for page in posts.pages | slice(end=3) %} +<li class="archive-entry"> + <a href="{{ page.path }}">{{ page.title }}</a> + <small>({{ page.date | date(format="%Y-%m-%d") }})</small> +</li> +{% endfor %} +</section> + +<p>The <a href="/posts">posts</a> page is a listing of my posts. I post sporadically about various subjects and with varying levels of effort.</p> +<p>The <a href="/linklog">linklog</a> page contains a curated aggregation of bookmarks, saved blog posts and essays, books, series, papers or anything else that I feel like sharing or recommending, stored in <a href="https://ln.ht/~jant">Linkhut</a>.</p> +<p>On the <a href="/now">now</a> page I write what's currently going on in my life. Stuff that some would write onto their social media page.</p> +<p>The <a href="/projects">projects</a> page contains info about my hobby projects.</p> + +<div style="display: flex; flex-flow: row wrap; justify-content: space-between; margin: 0 -16px;"> +<div style="flex: 1; margin: 0 16px; min-width: 300px;"> +<h2>Contact</h2> +<ul> +<li><a href="https://fi.linkedin.com/in/jantuomi">LinkedIn</a> (jantuomi)</li> +<li><a href="https://dice.camp/@kal_jan">Mastodon</a> (dice.camp/@kal_jan)</li> +<li>Email (jan <i>at</i> jantuomi <i>dot</i> fi)</li> +<li><a href="https://kal-jan.itch.io/">itch.io</a> (kal_jan)</li> +<li><a href="https://github.com/jantuomi" rel="me">Github</a> (jantuomi)</li> +</ul> +</div> +<div style="flex: 1; margin: 0 16px; min-width: 300px;" class="webrings"> +<h2>Webrings</h2> +<a href="https://xn--sr8hvo.ws/previous">β</a> +An <a href="https://xn--sr8hvo.ws">IndieWeb Webring</a> <span style="font-family: initial">π</span> +<a href="https://xn--sr8hvo.ws/next">β</a> +<br> +<a href="https://fediring.net/previous?host=jan.systems">β</a> +<a href="https://fediring.net/">Fediring</a> +<a href="https://fediring.net/next?host=jan.systems">β</a> + +</div> +</div> + +<hr> + +<p id="footnote-digital-garden"> +[1] <em>The phrase "digital garden" is a metaphor for thinking about writing and creating that focuses less on the resulting "showpiece" and more on the process, care, and craft it takes to get there. β <a href="https://joelhooks.com/digital-garden/">Joel Hooks</a></em> +</p> + +<p id="footnote-site"> +[2] This site is written using the <a href="https://www.getzola.org/">Zola</a> static site generator. <a href="/posts/deploying-the-garden">At first</a>, the site was automatically deployed after every Markdown edit, but nowadays I use a more traditional manual deploy mechanism. +</p> + + +{% endblock %} diff --git a/templates_html/macros.html b/templates_html/macros.html new file mode 100644 index 0000000..3922659 --- /dev/null +++ b/templates_html/macros.html @@ -0,0 +1,45 @@ +{% macro toc(page) %} +<nav class="toc"> + <ul> + {% for h in page.toc %} + <li><a href="{{ h.permalink }}">{{ h.title }}</a></li> + {% if h.children %} + <ul> + {% for c in h.children %} + <li><a href="{{ c.permalink }}">{{ c.title }}</a></li> + {% endfor %} + </ul> + {% endif %} + {% endfor %} + </ul> +</nav> +{% endmacro %} + +{% macro linklog(page) %} +{% set lh_data = load_data(path="linklog.json") %} +<ul class="archive-list"> +{% for lh_post in lh_data.posts %} + <li class="archive-entry"> + <a href="{{ lh_post.href }}">{{ lh_post.description }}</a> + <small>({{ lh_post.time | date(format='%Y-%m-%d') }})</small> + </li> +{% endfor %} +</ul> +{% endmacro %} + +{% macro page_h1(page) %} +<h1> + {{ page.title }}<br /> + {% if page.date %} + <small>({{ page.date }})</small> + {% endif %} + {% if page.extra.kind %} + <small>[{{ page.extra.kind }}]</small> + {% endif %} +</h1> +{% endmacro %} + +{% macro page_content(page) %} +{{ self::page_h1(page=page) }} +{{ page.content | replace(from="<!-- toc -->", to=macros::toc(page=page)) | safe }} +{% endmacro %} diff --git a/templates_html/now.html b/templates_html/now.html new file mode 100644 index 0000000..f05b6aa --- /dev/null +++ b/templates_html/now.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% import "macros.html" as macros %} + +{% block content %} +{% set posts = get_section(path="posts/_index.md") %} +{% set nows = posts.pages | filter(attribute="extra.kind", value="now") %} +{% set latest_now = nows | sort(attribute="date") | last %} + +{{ macros::page_content(page=latest_now) }} + +{% endblock %} diff --git a/templates_html/page.html b/templates_html/page.html new file mode 100644 index 0000000..61db175 --- /dev/null +++ b/templates_html/page.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} +{% import "macros.html" as macros %} +{% block content %} + +{{ macros::page_content(page=page) }} + +<nav class="post-nav" aria-label="Post navigation"> + {% if page.higher %} + <div class="post-nav-left"> + <a class="post-nav-link" href="{{ page.higher.permalink }}" + >β {{ page.higher.title }}</a + > + </div> + {% endif %} {% if page.lower %} + <div class="post-nav-right"> + <a class="post-nav-link" href="{{ page.lower.permalink }}" + >{{ page.lower.title }} β</a + > + </div> + {% endif %} +</nav> + +<div style="display: none" class="h-entry"> + <div class="e-content p-name">{{ page.title }}</div> + <a rel="author" class="p-author h-card" href="https://jan.systems"> + <img + class="u-photo" + src="https://jan.systems/files/Jan_Tuomi_headshot.jpg" + loading="lazy" + /> + Jan Tuomi + </a> + <a class="u-url" href="https://jan.systems/{{ page.path }}"> + Published <time class="dt-published">{{ page.date }}</time> + </a> +</div> +{% endblock %} diff --git a/templates_html/page_linklog.html b/templates_html/page_linklog.html new file mode 100644 index 0000000..e4fc945 --- /dev/null +++ b/templates_html/page_linklog.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% import "macros.html" as macros %} + +{% block content %} +{{ page.content | replace(from="<!-- linklog -->", to=macros::linklog(page=page)) | safe }} +{% endblock %} diff --git a/templates_html/section_posts.html b/templates_html/section_posts.html new file mode 100644 index 0000000..f44321f --- /dev/null +++ b/templates_html/section_posts.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} +{% block content %} +{% set posts = get_section(path="posts/_index.md") %} + +<h1>{{ section.title }}</h1> +<p> + Follow via <a href="/atom.xml">Atom/RSS</a> (<a + href="https://aboutfeeds.com/" + >Huh?</a + >) +</p> +<ul class="archive-list"> + {% for page in posts.pages %} + <li class="archive-entry"> + <a href="{{ page.path }}">{{ page.title }}</a> + <small>({{ page.date | date(format="%Y-%m-%d") }})</small> + </li> + {% endfor %} {% endblock %} +</ul> diff --git a/templates_html/section_projects.html b/templates_html/section_projects.html new file mode 100644 index 0000000..be0db07 --- /dev/null +++ b/templates_html/section_projects.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +{{ section.content | safe }} +{% endblock %} diff --git a/templates_html/shortcodes/fig.html b/templates_html/shortcodes/fig.html new file mode 100644 index 0000000..4ac99b4 --- /dev/null +++ b/templates_html/shortcodes/fig.html @@ -0,0 +1,4 @@ +<figure> + <img src="{{ src }}" alt="{{ alt }}" /> + <figcaption aria-hidden="true">{{ alt }}</figcaption> +</figure> diff --git a/templates_html/shortcodes/linklog.html b/templates_html/shortcodes/linklog.html new file mode 100644 index 0000000..6f46a2b --- /dev/null +++ b/templates_html/shortcodes/linklog.html @@ -0,0 +1 @@ +<!-- linklog --> diff --git a/templates_html/shortcodes/toc.html b/templates_html/shortcodes/toc.html new file mode 100644 index 0000000..479abec --- /dev/null +++ b/templates_html/shortcodes/toc.html @@ -0,0 +1 @@ +<!-- toc --> |
