summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSakamoto <me@sakamoto.network>2025-12-05 17:14:05 -0600
committerSakamoto <me@sakamoto.network>2025-12-05 17:14:05 -0600
commit35f13c2d308e7a077787af5cb5d4f03ca3d507ce (patch)
tree8ccb136d8708f502bc2c8c46f8c9231b54be6309 /templates
downloadsakamoto.network-35f13c2d308e7a077787af5cb5d4f03ca3d507ce.tar.xz
sakamoto.network-35f13c2d308e7a077787af5cb5d4f03ca3d507ce.zip
init
smolweb compliant
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html51
-rw-r--r--templates/blog-page.html12
-rw-r--r--templates/blog.html16
-rw-r--r--templates/index.html33
-rw-r--r--templates/page.html5
5 files changed, 117 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..83b5cc3
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>{% block title %} {% endblock title %}</title>
+ <link rel="stylesheet" href="/style.css" type="text/css" />
+ <link
+ rel="alternate"
+ type="application/rss+xml"
+ title="sakamoto.network"
+ href="/rss.xml"
+ />
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+ <meta property="og:type" content="website" />
+ <meta property="og:description" content="sakamoto.network" />
+ <meta
+ name="viewport"
+ content="width=device-width, initial-scale=1.0, user-scalable=yes"
+ />
+ <meta name="color-scheme" content="light dark" />
+ </head>
+
+ <body>
+ <!-- from sizeof.cat -->
+ <script type="text/javascript" src="/favicons.js"></script>
+ <script>
+ document.addEventListener("DOMContentLoaded", function (event) {
+ favicons();
+ });
+ </script>
+
+ <header>
+ <nav>
+ <a class="left" href="/">sakamoto</a>
+ <a class="left" href="/about">about</a>
+ <a class="left" href="https://git.sakamoto.network">git</a>
+ <a class="left" href="/blog">blog</a>
+ <a class="right" href="/rss.xml">rss</a>
+ <a class="right" href="/atom.xml">atom</a>
+ </nav>
+ </header>
+
+ <hr />
+
+ <main>{% block content %} {% endblock content %}</main>
+
+ <hr />
+
+ <footer>fish</footer>
+ </body>
+</html>
diff --git a/templates/blog-page.html b/templates/blog-page.html
new file mode 100644
index 0000000..3b02091
--- /dev/null
+++ b/templates/blog-page.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %} {% block title %} {{ page.title }} {% endblock title
+%} {% block content %}
+
+<h1>{{ page.title }}</h1>
+
+<strong
+ ><time datetime="{{ page.date }}"
+ >{{ page.date | date(format="%b %d, %Y") }}</time
+ ></strong
+>
+
+{{ page.content | safe }} {% endblock content %}
diff --git a/templates/blog.html b/templates/blog.html
new file mode 100644
index 0000000..38b96c1
--- /dev/null
+++ b/templates/blog.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %} {% block title %} {{ section.title }} {% endblock
+title %} {% block content %}
+<h1>{{ section.title }}</h1>
+<ul>
+ <!-- If you are using pagination, section.pages will be empty.
+ You need to use the paginator object -->
+ {% for page in section.pages %}
+ <li>
+ <a href="{{ page.permalink | safe }}">{{ page.title }}</a>
+ <time class="right" datetime="{{ page.date }}"
+ >{{ page.date | date(format="%b %d, %Y") }}</time
+ >
+ </li>
+ {% endfor %}
+</ul>
+{% endblock content %}
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..a01d58f
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,33 @@
+{% extends "base.html" %} {% block title %} sakamoto.network {% endblock title
+%} {% block content %}
+<h1>sakamoto.network</h1>
+
+<p>I host services for a few friends.</p>
+
+<h2>Services</h2>
+
+<ul>
+ <li><a href="https://git.sakamoto.network">git</a></li>
+ <li><a href="https://file.sakamoto.network">file</a></li>
+ <li><a href="https://ntfy.sakamoto.network">ntfy</a></li>
+ <li><a href="https://rss.sakamoto.network">ttrss</a></li>
+ <li><a href="https://paste.sakamoto.network">rustypaste</a></li>
+</ul>
+
+{% set blog = get_section(path="blog/_index.md") %}
+
+<h2>Recent posts</h2>
+
+{% if blog.pages %}
+<ul>
+ {% for post in blog.pages | slice(end=5) %}
+ <li>
+ <a href="{{ post.permalink | safe }}">{{ post.title }}</a>
+
+ <time class="right" datetime="{{ post.date }}"
+ >{{ post.date | date(format="%b %d, %Y") }}</time
+ >
+ </li>
+ {% endfor %}
+</ul>
+{% endif %} {% endblock content %}
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..4da2946
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,5 @@
+{% extends "base.html" %} {% block title %} {{page.title}} {% endblock title %}
+{% block content %}
+<h1>{{ page.title }}</h1>
+
+{{ page.content | safe }} {% endblock content %}