aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/base.html20
-rw-r--r--templates/blog.html20
-rw-r--r--templates/index.html38
-rw-r--r--templates/orphan.html10
-rw-r--r--templates/page.html28
-rw-r--r--templates/section.html16
6 files changed, 132 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..7eeeaf6
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ lang }}" xml:lang="{{ lang }}">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
+ <link rel="canonical" href="{{- current_url|safe -}}" />
+ <link rel="stylesheet" href="/css/custom.css" />
+
+ <meta name="author" content="{{- config.author -}}" />
+ <meta name="description" content="{%- block description -%}{{- config.description -}}{%- endblock description -%}" />
+ <link rel="alternate" type="application/atom+xml" title="Blog posts" href="{{ get_url(path="/blog/atom.xml", trailing_slash=false) }}" />
+
+ <title>{% block title %}{{- config.title -}}{% endblock title %}</title>
+ </head>
+
+ <body>
+ {% block content %}{% endblock content %}
+ </body>
+
+</html>
diff --git a/templates/blog.html b/templates/blog.html
new file mode 100644
index 0000000..0e3c2bf
--- /dev/null
+++ b/templates/blog.html
@@ -0,0 +1,20 @@
+{% extends "section.html" %}
+
+{%- block content -%}
+<h1>{{ section.title }}</h1>
+{%- for year, posts in section.pages | group_by(attribute="year") -%}
+<section class="times">
+<h2>{{ year }}</h2>
+
+<ul>
+{%- for post in posts %}
+ <li>
+ <h3><a href="{{- post.path|safe -}}">{{- post.title -}}</a></h3>
+ <time datetime="{{ post.date | date(format="%+")}}">{{ post.date | date(format="%d %h %Y")}}</time>
+ </li>
+{%- endfor %}
+</ul>
+
+</section>
+{%- endfor %}
+{%- endblock content -%}
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..4f848be
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,38 @@
+{% extends "base.html" %}
+
+{%- block content -%}
+<section id="blog" class="times">
+
+{% if section.content %}
+<section id="introduction">
+ {{ section.content | safe }}
+</section>
+{% endif %}
+
+<h2>articles</h2>
+{%- set blog = get_section(path="blog/_index.md") -%}
+{%- set post_count = blog.pages | length -%}
+<ul>
+{%- for post in blog.pages %}
+<li><article>
+ <h3><a href="{{- post.path|safe -}}">{{- post.title -}}</a></h3>
+ <time datetime="{{ post.date | date(format="%+")}}">{{ post.date | date(format="%B %m, %Y")}}</time>
+</article></li>
+{%- endfor %}
+</ul>
+
+<h2>notes</h2>
+{%- set notes = get_section(path="notes/_index.md") -%}
+{%- set post_count = notes.pages | length -%}
+<ul>
+{%- for post in notes.pages %}
+<li><article>
+ <h3><a href="{{- post.path|safe -}}">{{- post.title -}}</a></h3>
+ <time datetime="{{ post.date | date(format="%+")}}">{{ post.date | date(format="%B %m, %Y")}}</time>
+</article></li>
+{%- endfor %}
+</ul>
+
+</section>
+
+{%- endblock content -%}
diff --git a/templates/orphan.html b/templates/orphan.html
new file mode 100644
index 0000000..2469ecf
--- /dev/null
+++ b/templates/orphan.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+
+{% block title %}{{ page.title }} - {{ config.title }}{% endblock title %}
+
+{% block content -%}
+<main>
+<h1>{{- page.title -}}</h1>
+{{ page.content | safe -}}
+</main>
+{%- endblock content -%}
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..1026cd0
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,28 @@
+{% extends "base.html" %}
+
+{% block title %}{{ page.title }} - {{ config.title }}{% endblock title %}
+
+{% block content -%}
+<main>
+<h1>{{ page.title }}</h1>
+<p class="date">
+ <time datetime="{{ page.date | date(format="%+") }}">
+ {{- page.date | date(format="%B %m, %Y") -}}
+ </time>
+ {%- if page.updated %}
+ •
+ updated <time datetime="{{ page.updated | date(format="%+") }}">
+ {{- page.updated | date(format="%B %m, %Y") -}}
+ </time>
+ {%- endif %}
+</p>
+
+{{ page.content | safe -}}
+</main>
+
+<hr>
+<p>
+<b><a href="/">↑ back home</a></b>
+</p>
+
+{%- endblock content %}
diff --git a/templates/section.html b/templates/section.html
new file mode 100644
index 0000000..7130c84
--- /dev/null
+++ b/templates/section.html
@@ -0,0 +1,16 @@
+{% extends "orphan.html" %}
+
+{% block title %}{{ section.title }} - {{ config.title }}{% endblock title %}
+
+{% block content %}
+<h1>{{ section.title }}</h1>
+<ul>
+{% for post in section.pages %}
+ <li>
+ <a href="{{ post.permalink }}">{{ post.title }}</a>
+ <br>
+ <small>{{ post.date | date(format="%d %h %Y") }}</small>
+ </li>
+{% endfor %}
+</ul>
+{% endblock content %}