From 25945b8fead989cca09a23983623b63ce36dcc0c Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 8 Jan 2024 20:11:17 -0600 Subject: feat: total re-write from Emacs org-mode to Zola markdown --- templates/base.html | 44 ++++++++++++++++++++++++++++++++++++++++++++ templates/index.html | 40 ++++++++++++++++++++++++++++++++++++++++ templates/page.html | 41 +++++++++++++++++++++++++++++++++++++++++ templates/section.html | 18 ++++++++++++++++++ 4 files changed, 143 insertions(+) create mode 100644 templates/base.html create mode 100644 templates/index.html create mode 100644 templates/page.html create mode 100644 templates/section.html (limited to 'templates') diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..59e8f5e --- /dev/null +++ b/templates/base.html @@ -0,0 +1,44 @@ + + + + cleberg.net + + {% if page %} + {% if page.description %} + + {% elif config.description %} + + {% endif %} + {% elif config.description %} + + {% endif %} + + {% block rss %} + + {% endblock %} + + {% block css %} + + {% endblock css %} + + {% block extra_head %}{% endblock extra_head %} + + + + +
{% block content %}{% endblock content %}
+ + + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..ff4d20c --- /dev/null +++ b/templates/index.html @@ -0,0 +1,40 @@ +{% extends "base.html" %} + +{% block content %} +
+

cleberg.net

+
Do AIs dream in electric sheep?
He hoped it had nanosecond nightmares.
+
+
+

Recent Blog Posts

+ {% set section = get_section(path="blog/_index.md") %} + {% set i = 0 %} + {% for page in section.pages %} + {% if i < 3%} + {% set_global i = i + 1%} +
+ + {{ page.title }} +
+ {% endif %} + {% endfor %} +
+ Older Posts → +
+
+

Everything Else

+ +
+
+

Contact

+ +
+{% endblock content %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..f668751 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,41 @@ +{% extends "base.html" %} + +{% block css %} + + +{% endblock css %} + +{% block content %} +
+

{{ page.title }}

+ {% if page.date %} +

+ {% endif %} +

{{ page.word_count }} words; {{ page.reading_time }} minute(s)

+{% if page.toc %} +
+ Table of Contents + +
+{% endif %} +
+ +{{ page.content | safe }} +{% endblock content %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..70e8cb1 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block content %} +

{{ section.title }}

+

Use Ctrl + f to search blog post titles for keywords. +
You can also add the Atom RSS Feed to your feed reader.

+{% set post_date = "1970-01-01" | date(format="%Y") %} +{% for page in section.pages %} + {% if post_date != page.date | date(format="%Y") %} + {% set_global post_date = page.date | date(format="%Y") %} +

{{ post_date }}

+ {% endif %} +
+ + {{ page.title }} +
+{% endfor %} +{% endblock content %} -- cgit v1.2.3-70-g09d2