summaryrefslogtreecommitdiff
path: root/packages/web/site/templates
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web/site/templates')
-rw-r--r--packages/web/site/templates/404.html9
-rw-r--r--packages/web/site/templates/base.html31
-rw-r--r--packages/web/site/templates/index.html28
-rw-r--r--packages/web/site/templates/page.html17
-rw-r--r--packages/web/site/templates/section.html28
5 files changed, 113 insertions, 0 deletions
diff --git a/packages/web/site/templates/404.html b/packages/web/site/templates/404.html
new file mode 100644
index 0000000..a4669df
--- /dev/null
+++ b/packages/web/site/templates/404.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block content %}
+<head>
+ <title>Error 404!</title>
+</head>
+
+404!
+{% endblock content %}
diff --git a/packages/web/site/templates/base.html b/packages/web/site/templates/base.html
new file mode 100644
index 0000000..8f49bb2
--- /dev/null
+++ b/packages/web/site/templates/base.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>{% block title %}kleidi.ca{% endblock title %}</title>
+ <link href="/theme.css" rel="stylesheet" />
+ {% block head%}{% endblock head %}
+ </head>
+ <body>
+ <header
+ style="
+ margin: 3em 0 3em 0;
+ display: flex;
+ gap: 8px;
+ flex-direction: column;
+ font-family: monospace;
+ "
+ >
+ <span>
+ Kleidi Bujari &lt;<a href="mailto:mail@4kb.net">mail@4kb.net</a>&gt;
+ </span>
+ <nav style="display: flex; gap: 8px">
+ <span><a href="/">kleidi.ca</a> |</span>
+ <a href="/about">about</a>
+ <a target="_blank" href="https://github.com/kbujari">github</a>
+ </nav>
+ </header>
+ <main>{% block content %} {% endblock %}</main>
+ </body>
+</html>
diff --git a/packages/web/site/templates/index.html b/packages/web/site/templates/index.html
new file mode 100644
index 0000000..bc2994a
--- /dev/null
+++ b/packages/web/site/templates/index.html
@@ -0,0 +1,28 @@
+{% extends "base.html" %}
+{% block content %}
+
+{% for name in ["posts", "paper-reviews"] %}
+{% set section = get_section(path=name ~ "/_index.md") %}
+{%- if section.pages | length > 0 %}
+<div style="margin-bottom: 3em">
+ <h1>{{ section.title }}</h1>
+ <ul style="list-style: none; padding-left: 0">
+ {% for page in section.pages | slice(end=3) %}
+ <li style="margin-bottom: 1em">
+ <a href="{{ page.path }}">{{ page.title }}</a>
+ <br />
+ <time datetime="{{ page.date }}">
+ {{ page.date | date(format="%B %d, %Y") }}
+ </time>
+ </li>
+ {% endfor %}
+ </ul>
+
+ {%- if section.pages | length > 2 %}
+ <a href="{{ section.path }}">see more ↗</a>
+ {% endif %}
+</div>
+{% endif %}
+{% endfor %}
+
+{% endblock content %}
diff --git a/packages/web/site/templates/page.html b/packages/web/site/templates/page.html
new file mode 100644
index 0000000..8189fe6
--- /dev/null
+++ b/packages/web/site/templates/page.html
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+
+{% if page.title %}
+{% block title%}
+{{ page.title }} :: {{ super() }}
+{% endblock title %}
+{% endif %}
+
+{% block content %}
+
+<article>
+ <h1>{{ page.title }}</h1>
+
+ {{ page.content | safe}}
+</article>
+
+{% endblock content %}
diff --git a/packages/web/site/templates/section.html b/packages/web/site/templates/section.html
new file mode 100644
index 0000000..9bd8956
--- /dev/null
+++ b/packages/web/site/templates/section.html
@@ -0,0 +1,28 @@
+{% extends "base.html" %}
+
+{% block title %}
+{{ section.title | lower }} :: {{ super() }} {% endblock title %}
+{% block content %}
+
+{% block head %}
+<link
+ rel="alternate"
+ type="application/atom+xml"
+ title="ATOM"
+ href="{{ section.permalink }}atom.xml">
+{% endblock head%}
+
+<h1>{{ section.title }}</h1>
+<p>{{ section.content | safe }}</p>
+
+<hr style="margin-bottom: 1em" />
+<ul style="list-style: none; padding-left: 0">
+ {% for page in section.pages %}
+ <li style="margin-bottom: 1em">
+ <a href="{{ page.path }}">{{ page.title }}</a>
+ <br />
+ <span>{{ page.date | date(format="%B %d, %Y") }}</span>
+ </li>
+ {% endfor %}
+</ul>
+{% endblock content %}