commit d29e9fb383519121534ade6ab6c44c7a4234d47a
parent 89a33929d5a7c2f06131427cd8468a6de73ce8f4
Author: FIGBERT <figbert@figbert.com>
Date: Tue, 21 Dec 2021 01:22:28 -0800
Update templates
Diffstat:
14 files changed, 90 insertions(+), 248 deletions(-)
diff --git a/content/_index.md b/content/_index.md
@@ -4,23 +4,24 @@ title = "Home"
# d3c3nt
-d3c3nt is a simple{{ emoji(id="E24C", alt="A simple circle") }}, clean{{ emoji(id="1F9F9", alt="A broom") }}, and flexible{{ emoji(id="1F483", alt="A dancer") }} them for
-personal sites, made by [FIGBERT][figbert] for the [Zola static site generator][zola]. This theme{{ emoji(id="1F3A8", alt="A paint palette") }} is actively developed mainly for
-use on my personal site{{ emoji(id="1F3E0", alt="A house") }}, so new features and styles{{ emoji(id="1F484", alt="lipstick") }} will be added when I stumble onto the need to
-make them. All in all, it's fairly decent.
+d3c3nt is a simple, clean, and flexible theme for personal sites, made by
+[FIGBERT] for the [Zola static site generator][zola]. This theme is
+actively developed mainly for use on my personal site, so new features
+and styles will be added when I stumble onto the need to make them. All
+in all, it's fairly decent.
For more information, [check out the documentation][docs].
## whoami
-To learn more about me, feel free to check out [my website][figbert]{{ emoji(id="1F310", alt="A globe with meridians") }} and subscribe via the [Atom feed][atom]. You can
-contact me via email at: [figbert@figbert.com][email]{{ emoji(id="1F4E9", alt="An envelope") }}. Feel free to encrypt emails to this address with [this PGP key][pgp]{{
-emoji(id="1F511", alt="A key") }}.
+To learn more about me, feel free to check out [my website][FIGBERT] and
+subscribe via the [Atom feed][atom]. You can contact me via email at:
+[figbert@figbert.com][email]. Feel free to encrypt emails to this
+address with [this PGP key][pgp].
-[figbert]: https://figbert.com/
+[FIGBERT]: https://figbert.com/
[zola]: https://getzola.org/
[docs]: @/config.md
[atom]: https://figbert.com/atom.xml
[email]: mailto:figbert+d3c3nt@figbert.com
[pgp]: https://figbert.com/publickey-pgp.asc
-
diff --git a/content/posts/_index.md b/content/posts/_index.md
@@ -1,7 +1,7 @@
+++
title = "Posts"
sort_by = "date"
-template = "page-list.html"
+template = "list.html"
page_template = "article.html"
+++
diff --git a/content/posts/emoji-support.md b/content/posts/emoji-support.md
@@ -1,52 +0,0 @@
-+++
-title = "Emoji Support"
-description = "Guide to emoji usage in d3c3nt"
-date = 2020-08-25
-+++
-
-Emoji can be used with the d3c3nt theme using the `emoji` shortcode in your markdown files. d3c3nt's emojis are provided by [OpenMoji][openmoji] for a consistent,
-stylized look across all platforms and embedded as inline `svg`s to reduce network requests.<!-- more -->
-
-## Shortcode
-
-The emoji shortcode expects two parameters, `id` and `alt`.
-
-The `id` parameter is the Unicode codepoint/s of the emoji. You can find this either from the Unicode parameter of an
-emoji as listed on [the OpenMoji library][lib], or from the "Codepoints" section on [Emojipedia][emojipedia] (the section after "U+". For multiple codepoints, combine them
-with a dash).
-
-The `alt` parameter provides a description of the image for better accessibility.
-
-## Examples
-### Unicode
-**Grinning Face:** {{ emoji(id="1F600", alt="A grinning face") }}
-```rs
-{{/* emoji(id="1F600", alt="A grinning face") */}}
-```
-**Flag of Antarctica:** {{ emoji(id="1F1E6-1F1F6", alt="Flag of Antarctica") }}
-```rs
-{{/* emoji(id="1F1E6-1F1F6", alt="Flag of Antarctica") */}}
-```
-### Extra Unicode
-**Hacker Cat:** {{ emoji(id="1F431-200D-1F4BB", alt="Hacker Cat") }}
-```rs
-{{/* emoji(id="1F431-200D-1F4BB", alt="Hacker Cat") */}}
-```
-### Extra OpenMoji
-**Flag of the United Federation of Planets:** {{ emoji(id="1F3F3-FE0F-200D-1F7E6-200D-1F30C", alt="Flag of the United Federation of Planets") }}
-```rs
-{{/* emoji(id="1F3F3-FE0F-200D-1F7E6-200D-1F30C", alt="Flag of the United Federation of Planets") */}}
-```
-**Github Logo:** {{ emoji(id="E045", alt="Github Logo") }}
-```rs
-{{/* emoji(id="E045", alt="Github Logo") */}}
-```
-**Web Syndication:** {{ emoji(id="E381", alt="Web Syndication") }}
-```rs
-{{/* emoji(id="E381", alt="Web Syndication") */}}
-```
-
-[openmoji]: https://openmoji.org/
-[lib]: https://openmoji.org/library/
-[emojipedia]: https://emojipedia.org/
-
diff --git a/content/posts/rich-content.md b/content/posts/rich-content.md
@@ -5,7 +5,7 @@ date = 2020-08-26
+++
d3c3nt ships with several custom shortcodes to augment CommonMark and add additional functionality to your posts, in addition to those [already provided by Zola][built-in].
-`video`, `image`, `gif`, `audio`, and `emoji` were created as simple, privacy-friendly tools for you to use in your markdown.<!-- more -->
+`video`, `image`, `gif`, and `audio` were created as simple, privacy-friendly tools for you to use in your markdown.<!-- more -->
## Video
@@ -65,11 +65,5 @@ should be a path to an audio file of a different type (`wav`, `ogg`, `mp3`, etc)
{{ audio(sources=["example.wav", "example.ogg", "example.mp3"]) }}
```
-## Emoji
-
-To learn how to use the `emoji` shortcode, check out the post on [emoji support in d3c3nt][emoji]!
-
[built-in]: https://www.getzola.org/documentation/content/shortcodes/#built-in-shortcodes
[video]: @/posts/rich-content.md#video
-[emoji]: @/posts/emoji-support.md
-
diff --git a/templates/404.html b/templates/404.html
@@ -1,10 +1,9 @@
-{% extends "base.html" %}
+{% extends "index.html" %}
{% block content %}
- <div class="error">
- <img src="{% if config.extra.404_message %}{{ config.extra.404_image }}{% else %}/404.svg{% endif %}" alt="404 Page Not Found"/>
- <strong>404</strong>
- <p>{% if config.extra.404_message %}{{ config.extra.404_message }}{% else %}Page Not Found{% endif %}</p>
- </div>
+ <div class="error">
+ <svg viewBox="0 0 1080 1080" xmlns="http://www.w3.org/2000/svg"><clipPath id="a"><path d="M555.73 633.88s69.93.45 89.58 5.47 71.66 122.73 93.18 134S778.29 765.9 802 752s45.44-30.72 46.12-37.74-9.39-35.07-18.1-40.73-34-6.06-47.49 2.58c-19.82-54-48-132.75-73.84-143.59s-104.15-16-104.15-16z"/></clipPath><path d="M289.08 381.9s-34 13.45-39 46.12 72.26 128.37 72.26 128.37L560.6 428l-75.33-132.2z" fill="#c7dcf9"/><g fill="#e1ecff"><path d="M341.76 412.78S316.69 438.52 309 467s-8.68 79.34-7.4 98.39C339 600 486.83 571 486.83 571l142.46-167.58s-24.15-45.85-36.41-58.42-52-28.2-97.85-9.75c-26.91 38.19-153.27 77.53-153.27 77.53z"/><path d="M330.57 426.09s55.31 17.75 117.57-6.3S521.68 328 521.68 328L495 335.26l-153.24 77.52zm225.16 207.79s69.93.45 89.58 5.47 71.66 122.73 93.18 134S778.29 765.9 802 752s45.44-30.72 46.12-37.74-9.39-35.07-18.1-40.73-34-6.06-47.49 2.58c-19.82-54-48-132.75-73.84-143.59s-104.15-16-104.15-16z"/></g><g clip-path="url(#a)"><path d="M629.29 582.34s56.94 6.23 72.67 27.42 46.9 150.85 81.79 153.92c.56 42-71.7 57.17-71.7 57.17L538.84 628.39z" fill="#e1ecff" opacity=".51"/></g><path d="M367.85 623.26s43 90.19 82 114.79S559.51 760.66 579 776.77s15.37 93.5 34.85 114 46.89 33.06 72.51 30.75 46.12-14.6 46.38-26.13-.77-21.53-12.81-27.68-29-11.27-29.73-18.44-14.35-116.33-20-146-49.53-70.94-106.08-91.73c-53.55-44.84-135.8-25.63-135.8-25.63z" fill="#e1ecff"/><path d="M380.36 647.39s49.35 2.52 93.67-16.95c-8.47-45.1-34.6-58.42-34.6-58.42l-71.58 51.24zm68.29-470.99C410 155.71 329 148.73 279 210.74S253.92 337.06 274.93 367c22 31.42 97.62 79.44 178.33 34.34s89.17-174.72-4.61-224.94z" fill="#e1ecff"/><path d="M442 214.32c34.33 8.2 56.63 56.37 45.1 102.49s-51.25 77.13-95.83 77.38-88.91-30.19-88.67-87.11c.24-54.7 64.85-110.56 139.4-92.76z" fill="#1c3177"/><path d="M343.09 574.58c44.73-20.76 11.27-68.16 55.86-78.94C457.74 504 474 501 474 501s-112.47 98.78-130.91 73.58z" fill="#e1ecff"/><path d="M380.36 447.8l74.44 191.55 105.31-2.51 96.34-60.98 28.7-87.12-69.69-209.08-33.83 97.88L494 447.23z" fill="#ff97c9"/><path d="M343.09 574.58c24.68-2 37.25-18.07 44.73-25.2 3.81-3.64 3.05-6.83 1.13-17.33s4.74-21.27 13.84-25.88c5 13.45 11.14 16 15.88 15.37s9.61-28.95 25.11-28.7 27.93 20.76 30 31-7.94 39.45-20.5 59.95-30.28 45.88-70.17 53.82-62.57-12.43-75.64-38.18c-4.41-8.69-6-20.7-5.86-34.08 0 0 8.93 11.79 41.48 9.23zm296.37-222.91s4.75 15.45 1.55 21.47-7.56 11-10.76 18.71 1.54 36.77 15.63 41.76 25.75-8.07 29.47-15.63 1.66-27.41-3.85-41.25-15.87-26.14-32.04-25.06z" fill="#e1ecff"/><path d="M655.66 159.71l3.16 6.4a2.65 2.65 0 002 1.46l7.07 1a2.67 2.67 0 011.48 4.56l-5.11 5a2.66 2.66 0 00-.77 2.36l1.2 7a2.67 2.67 0 01-3.87 2.82l-6.33-3.32a2.65 2.65 0 00-2.48 0l-6.33 3.32a2.67 2.67 0 01-3.88-2.82l1.21-7a2.66 2.66 0 00-.77-2.36l-5.11-5a2.67 2.67 0 011.48-4.56l7.07-1a2.65 2.65 0 002-1.46l3.16-6.4a2.68 2.68 0 014.82 0zM317.34 837l2.65 5.37a2.2 2.2 0 001.68 1.22l5.93.86a2.24 2.24 0 011.24 3.82l-4.29 4.18a2.22 2.22 0 00-.64 2l1 5.9a2.25 2.25 0 01-3.25 2.37l-5.3-2.79a2.25 2.25 0 00-2.08 0L309 862.7a2.24 2.24 0 01-3.25-2.37l1-5.9a2.26 2.26 0 00-.65-2l-4.28-4.18a2.24 2.24 0 011.24-3.82l5.92-.86a2.23 2.23 0 001.69-1.22l2.65-5.37a2.24 2.24 0 014.02.02z" fill="#fec272"/><ellipse cx="408.56" cy="256.06" fill="#fff" opacity=".48" rx="45.63" ry="16.14" transform="rotate(-12.43 408.544 256.062)"/><path d="M468.08 552.56s-28.31-25.3-33.44-25.3-18.79 20-15.71 25.3 18.9 22.66 36.27 28c5.63-10.74 12.88-28 12.88-28z" fill="#e1ecff"/><path d="M494 447.23l66.11 189.61 96.34-60.98-74.82-198.32z" fill="#ff97c9" opacity=".5"/><path d="M675.87 739.49a123 123 0 01-33 19.57c-11.21 4.32-15 13.16-11.61 29.38s5.29 41.51 12.29 48.17 31.08 3.12 43.56-12.36c-3.91-30.5-11.24-84.76-11.24-84.76zm65.25-165.37s-14 6.1-12.67 15.83 15.63 56.76 21.27 61 22.33-3.28 22.33-3.28c-17.14-48.56-30.93-73.55-30.93-73.55z" fill="#e1ecff"/><path d="M150.32 686.66c-11.13-23.08 25.14-47.78 56-46s43.83 30.27 54.76 40.9c22.83 22.18 22.11 43.88 6.3 53.21s-102.33-17.58-117.06-48.11zm622.56-357.55c-9-7.88.26-44.92 21.52-53.59s47.66.81 53.3 15.67-56.37 54.06-74.82 37.92zm104.18 19.82c-4.61 6.57-7.68 25.28 2.05 28.61s17.09-15.92 13.67-25.94-12.64-7.06-15.72-2.67z" fill="#99adf9"/><path d="M884.06 197.1c-7.26 3.42-19.23 18.12-12.43 25.85s22.73-5.33 24.74-15.72-7.46-12.41-12.31-10.13zM201.38 783.77c-6.28-5-24.75-9.25-28.69.26s14.82 18 25 15.26 7.87-12.18 3.69-15.52z" fill="#99adf9" opacity=".44"/><path d="M255.61 675.23c-11.17 2.1-9.37 12.09-5.79 21.14S266 708 274.89 699.73c-5.77-13.73-19.28-24.5-19.28-24.5zm-64.21-15.07c-8 .89-14.52 12.47-8.88 21.86s16.39 16.23 22.54 13.67 7.18-16.4 2.74-25.28-8.71-11.11-16.4-10.25zM822.74 283.5c-4.39 1.4-8.84 6.15-8.45 11.28s4.87 9.61 9.73 9 9-8.46 8-14.1-5.93-7.24-9.28-6.18zm-46.49 10s6 6 5 12.81-11.34 6.18-11.34 6.18 1.54-11.61 6.34-18.99z" fill="#99adf9" opacity=".64"/></svg>
+ <strong>404</strong>
+ <p>Page Not Found</p>
+ </div>
{% endblock content %}
-
diff --git a/templates/anchor-link.html b/templates/anchor-link.html
@@ -0,0 +1,15 @@
+<a class="zola-anchor" href="#{{ id | safe }}" aria-label="Anchor link for: {{ id | safe }}">
+ {%- if level == 1 -%}
+ #
+ {%- elif level == 2 -%}
+ ##
+ {%- elif level == 3 -%}
+ ###
+ {%- elif level == 4 -%}
+ ####
+ {%- elif level == 5 -%}
+ #####
+ {%- elif level == 6 -%}
+ ######
+ {%- endif -%}
+</a>
diff --git a/templates/article.html b/templates/article.html
@@ -1,63 +1,11 @@
-{% extends "base.html" %}
-
-{% block posthead %}
- <script type="application/ld+json">
- {
- "@context": "https://schema.org",
- "@type": "NewsArticle",
- "mainEntityOfPage": {
- "@type": "WebPage",
- "@id": "https://google.com/article"
- },
- "headline": "{{ page.title }}",
- "image": [],
- "datePublished": "{{ page.date | date(format="%+") }}",
- "dateModified": "{{ page.date | date(format="%+") }}"{% if config.extra.author %},
- "author": {
- "@type": "Person",
- "name": "{{ config.extra.author }}"
- },
- "publisher": {
- "@type": "Organization",
- "name": "{{ config.extra.author }}"{% if config.extra.icon %},
- "logo": {
- "@type": "ImageObject",
- "url": "{{ get_url(path=config.extra.icon) }}"
- }
- {% endif %}
- }
- {% endif %}
- }
- </script>
-
- <script type="application/ld+json">
- {
- "@context": "https://schema.org",
- "@type": "BreadcrumbList",
- "itemListElement": [
- {
- "@type": "ListItem",
- "position": 1,
- "name": "Blog",
- "item": "{{ get_url(path="@/posts/_index.md") }}"
- },
- {
- "@type": "ListItem",
- "position": 2,
- "name": "{{ page.title }}",
- "item": "{{ page.permalink }}"
- }
- ]
- }
- </script>
-{% endblock %}
-
+{% extends "index.html" %}
{% block content %}
- <div>
- <h1>{{ page.title }}</h1>
- <small>{{ page.date | date(format="%B %d, %Y") }}</small>
- </div>
-
- <div>{{ page.content | safe }}</div>
+ <article>
+ <h1><a href="{{ current_url | safe }}">{{ page.title | safe }}</a></h1>
+ <small>
+ <time datetime="{{ page.date }}">{{ page.date | date(format="%B %d, %Y") }}</time>
+ by <a href="{{ config.base_url | safe }}">FIGBERT</a>
+ </small>
+ {{ page.content | safe }}
+ </article>
{% endblock content %}
-
diff --git a/templates/base.html b/templates/base.html
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta http-equiv="x-ua-compatible" content="ie=edge" />
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta
- name="viewport"
- content="width=device-width, initial-scale=1.0, viewport-fit=cover"
- />
-
- <meta name="theme-color" content="#4169e1"/>
- <link rel="icon" href="{{ config.extra.icon }}"/>
-
- <meta property="og:type" content="website">
-
- <meta name="twitter:card" content="summary">
- {% if config.extra.twitter %}
- <meta name="twitter:creator" content="{{ config.extra.twitter }}">
- <meta name="twitter:site" content="{{ config.extra.twitter }}">
- {% endif %}
-
- {% block description %}
- {% if page.description %}
- <meta name="description" content="{{ page.description }}" />
- <meta name="twitter:description" content="{{ page.description }}">
- {% else %}
- <meta name="description" content="{{ config.description }}" />
- <meta name="twitter:description" content="{{ config.description}}">
- {% endif %}
- {% endblock description %}
-
- {% if page.title %}
- <meta name="twitter:title" content="{{ page.title }}">
- {% else %}
- <meta name="twitter:title" content="{{ config.title }}">
- {% endif %}
-
- {% for link in config.extra.nav %}
- <link rel="prerender" href="{{ link.path }}" />
- {% endfor %}
-
- <title>
- {% block title %}
- {% if page.title %}{{ page.title }} :: {% endif %}{{ config.title }}
- {% endblock title %}
- </title>
-
- {% block head %}{% endblock head %}
- {% block styles %}
- <link rel="stylesheet" href="{{ get_url(path="global.css") | safe }}">
- {% endblock styles %}
- {% block posthead %}{% endblock posthead %}
- </head>
- <body>
- {% block header %}
- <header>
- <nav>
- {% for link in config.extra.nav %}
- <a href="{{ link.path }}">{{ link.name }}</a>
- {% endfor %}
- </nav>
- </header>
- {% endblock header %}
- <main>
- {% block content %}{% endblock content %}
- </main>
- {% if config.extra.goatcounter %}
- <script data-goatcounter="https://{{ config.extra.goatcounter }}.goatcounter.com/count" async src="https://gc.zgo.at/count.js"></script>
- {% endif %}
- </body>
-</html>
-
diff --git a/templates/index.html b/templates/index.html
@@ -1,6 +1,33 @@
-{% extends "base.html" %}
-
-{% block content %}
- {{ section.content | safe }}
-{% endblock content %}
-
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width">
+ <title>{% if page.title %}{{ page.title }} :: {% endif %}{{ config.title }}</title>
+ <link rel="stylesheet" href="{{ get_url(path="global.css") | safe }}">
+ <meta name="description" content="{% if page.description %}{{ page.description | safe }}{% else %}{{ config.description | safe }}{% endif %}">
+ <meta property="og:title" content="{% if page.title %}{{ page.title | safe }} :: {% endif %}{{ config.title | safe }}">
+ <meta property="og:description" content="{% if page.description %}{{ page.description | safe }}{% else %}{{ config.description | safe }}{% endif %}">
+ <meta property="og:type" content="website">
+ {%- if current_url %}
+ <meta property="og:url" content="{{ current_url | safe }}">
+ <link rel="canonical" href="{{ current_url | safe }}">
+ {% endif -%}
+ <meta name="twitter:card" content="summary">
+ <meta name="twitter:creator" content="@therealFIGBERT">
+ <link rel="icon" href="/icon.png">
+ <meta name="theme-color" content="#1F1E1E">
+ </head>
+ <body>
+ <header>
+ <nav>
+ {%- for link in config.extra.d3_nav %}
+ <a href="{{ link.path | safe }}">{{ link.name }}</a>
+ {%- endfor %}
+ </nav>
+ <hr>
+ </header>
+ <main>
+ {%- block content %}{% endblock content %} </main>
+ </body>
+</html>
diff --git a/templates/list.html b/templates/list.html
@@ -0,0 +1,8 @@
+{% extends "index.html" %}
+{% block content %}
+ <ul class="date-list">
+ {%- for page in section.pages %}
+ <li><a href="{{ page.permalink | safe }}">{{ page.title | safe }}</a> {{ page.date | date(format="%B %d, %Y") }}</li>
+ {%- endfor %}
+ </ul>
+{% endblock content %}
diff --git a/templates/page-list.html b/templates/page-list.html
@@ -1,18 +0,0 @@
-{% extends "base.html" %}
-
-{% import "page-preview.html" as page_macro %}
-
-{% block posthead %}
- {% for page in section.pages %}
- <link rel="prerender" href="{{ page.permalink }}" />
- {% endfor %}
-{% endblock posthead %}
-
-{% block content %}
- {{ section.content | safe }}
-
- {% for page in section.pages %}
- {{ page_macro::page_preview(page=page) }}
- {% endfor %}
-{% endblock content %}
-
diff --git a/templates/page-preview.html b/templates/page-preview.html
@@ -1,14 +0,0 @@
-{% macro page_preview(page) %}
- <div class="page-preview">
- <h3><a href="{{ page.permalink }}">{{ page.title }}</a></h3>
- <small>{{ page.date | date(format="%B %d, %Y") }} :: {{ page.word_count }} words :: {{ page.reading_time }} mins</small>
- <div>
- {% if page.summary -%}
- {{ page.summary | markdown | safe }}
- {% else %}
- {{ page.content | safe | striptags | truncate(length=300) }}
- {%- endif %}
- </div>
- </div>
-{% endmacro input %}
-
diff --git a/templates/page.html b/templates/page.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "index.html" %}
{% block content %}
{{ page.content | safe }}
diff --git a/templates/section.html b/templates/section.html
@@ -0,0 +1,6 @@
+{% extends "index.html" %}
+
+{% block content %}
+ {{ section.content | safe }}
+{% endblock content %}
+