From 6acf4ab874c58ee14f35da671029e56972745ce6 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 25 Apr 2025 12:09:21 +0200 Subject: feat(treewide): Migrate to zola --- src/themes/serene/templates/404.html | 14 ++ src/themes/serene/templates/_base.html | 38 +++++ src/themes/serene/templates/_custom_css.html | 59 ++++++++ src/themes/serene/templates/_custom_font.html | 0 src/themes/serene/templates/_footer.html | 52 +++++++ src/themes/serene/templates/_giscus_script.html | 0 src/themes/serene/templates/_head_extend.html | 0 src/themes/serene/templates/_section_title.html | 10 ++ src/themes/serene/templates/anchor-link.html | 1 + src/themes/serene/templates/blog.html | 50 +++++++ src/themes/serene/templates/categories/list.html | 3 + src/themes/serene/templates/categories/single.html | 3 + src/themes/serene/templates/feed.xml | 32 +++++ src/themes/serene/templates/home.html | 119 ++++++++++++++++ src/themes/serene/templates/macros/collection.html | 153 +++++++++++++++++++++ src/themes/serene/templates/macros/prose.html | 32 +++++ src/themes/serene/templates/post.html | 151 ++++++++++++++++++++ src/themes/serene/templates/prose.html | 82 +++++++++++ .../serene/templates/shortcodes/caution.html | 2 + .../serene/templates/shortcodes/collection.html | 23 ++++ src/themes/serene/templates/shortcodes/detail.html | 4 + src/themes/serene/templates/shortcodes/figure.html | 8 ++ .../serene/templates/shortcodes/important.html | 2 + .../serene/templates/shortcodes/mermaid.html | 3 + src/themes/serene/templates/shortcodes/note.html | 2 + src/themes/serene/templates/shortcodes/quote.html | 10 ++ src/themes/serene/templates/shortcodes/tip.html | 2 + .../serene/templates/shortcodes/warning.html | 2 + src/themes/serene/templates/tags/list.html | 29 ++++ src/themes/serene/templates/tags/single.html | 34 +++++ 30 files changed, 920 insertions(+) create mode 100644 src/themes/serene/templates/404.html create mode 100644 src/themes/serene/templates/_base.html create mode 100644 src/themes/serene/templates/_custom_css.html create mode 100644 src/themes/serene/templates/_custom_font.html create mode 100644 src/themes/serene/templates/_footer.html create mode 100644 src/themes/serene/templates/_giscus_script.html create mode 100644 src/themes/serene/templates/_head_extend.html create mode 100644 src/themes/serene/templates/_section_title.html create mode 100644 src/themes/serene/templates/anchor-link.html create mode 100644 src/themes/serene/templates/blog.html create mode 100644 src/themes/serene/templates/categories/list.html create mode 100644 src/themes/serene/templates/categories/single.html create mode 100644 src/themes/serene/templates/feed.xml create mode 100644 src/themes/serene/templates/home.html create mode 100644 src/themes/serene/templates/macros/collection.html create mode 100644 src/themes/serene/templates/macros/prose.html create mode 100644 src/themes/serene/templates/post.html create mode 100644 src/themes/serene/templates/prose.html create mode 100644 src/themes/serene/templates/shortcodes/caution.html create mode 100644 src/themes/serene/templates/shortcodes/collection.html create mode 100644 src/themes/serene/templates/shortcodes/detail.html create mode 100644 src/themes/serene/templates/shortcodes/figure.html create mode 100644 src/themes/serene/templates/shortcodes/important.html create mode 100644 src/themes/serene/templates/shortcodes/mermaid.html create mode 100644 src/themes/serene/templates/shortcodes/note.html create mode 100644 src/themes/serene/templates/shortcodes/quote.html create mode 100644 src/themes/serene/templates/shortcodes/tip.html create mode 100644 src/themes/serene/templates/shortcodes/warning.html create mode 100644 src/themes/serene/templates/tags/list.html create mode 100644 src/themes/serene/templates/tags/single.html (limited to 'src/themes/serene/templates') diff --git a/src/themes/serene/templates/404.html b/src/themes/serene/templates/404.html new file mode 100644 index 0000000..1e924de --- /dev/null +++ b/src/themes/serene/templates/404.html @@ -0,0 +1,14 @@ +{% extends "_base.html" %} + +{% block page %}not-found{% endblock page%} +{% block lang %}{{ config.default_language }}{% endblock lang %} +{% block title %}404{% endblock title %} + +{% block content %} +
+

+ {{ config.extra.not_found_error_text }} +

+ {{ config.extra.not_found_recover_text }} +
+{% endblock %} diff --git a/src/themes/serene/templates/_base.html b/src/themes/serene/templates/_base.html new file mode 100644 index 0000000..0bd7b3b --- /dev/null +++ b/src/themes/serene/templates/_base.html @@ -0,0 +1,38 @@ + + + + + + + + + {% block desc %}{% endblock desc %} + {% block title %}{% endblock title %} + + + + {% include "_custom_font.html" %} + {% include "_custom_css.html" %} + + {% block head %}{% endblock head %} + {% include "_head_extend.html" %} + + + + {% if not config.extra.force_theme %} + + {% endif %} + {% block content %}{% endblock content %} + {% block script %}{% endblock script %} + + + + diff --git a/src/themes/serene/templates/_custom_css.html b/src/themes/serene/templates/_custom_css.html new file mode 100644 index 0000000..f767a33 --- /dev/null +++ b/src/themes/serene/templates/_custom_css.html @@ -0,0 +1,59 @@ + diff --git a/src/themes/serene/templates/_custom_font.html b/src/themes/serene/templates/_custom_font.html new file mode 100644 index 0000000..e69de29 diff --git a/src/themes/serene/templates/_footer.html b/src/themes/serene/templates/_footer.html new file mode 100644 index 0000000..e9c1dd1 --- /dev/null +++ b/src/themes/serene/templates/_footer.html @@ -0,0 +1,52 @@ +{% if config.extra.blog_section_path is defined %} +{% set blog_section_path = config.extra.blog_section_path %} +{% endif %} + + +{% if blog_section_path is defined and section.path is starting_with(blog_section_path) %} +{% if section.generate_feeds or config.generate_feeds %} +{% set link = get_url(path=rss_path) %} + +
+ {{ link }} + {% set copy_icon = load_data(path="icon/copy.svg") %} + {% set check_icon = load_data(path="icon/check.svg") %} + +
+
+{% endif %} +{% endif %} diff --git a/src/themes/serene/templates/_giscus_script.html b/src/themes/serene/templates/_giscus_script.html new file mode 100644 index 0000000..e69de29 diff --git a/src/themes/serene/templates/_head_extend.html b/src/themes/serene/templates/_head_extend.html new file mode 100644 index 0000000..e69de29 diff --git a/src/themes/serene/templates/_section_title.html b/src/themes/serene/templates/_section_title.html new file mode 100644 index 0000000..191e079 --- /dev/null +++ b/src/themes/serene/templates/_section_title.html @@ -0,0 +1,10 @@ +{% if section.extra.title or section.extra.subtitle %} +
+ {% if section.extra.title %} +

{{ section.extra.title }}

+ {% endif %} + {% if section.extra.subtitle %} +

{{ section.extra.subtitle }}

+ {% endif %} +
+{% endif %} diff --git a/src/themes/serene/templates/anchor-link.html b/src/themes/serene/templates/anchor-link.html new file mode 100644 index 0000000..91e875b --- /dev/null +++ b/src/themes/serene/templates/anchor-link.html @@ -0,0 +1 @@ + diff --git a/src/themes/serene/templates/blog.html b/src/themes/serene/templates/blog.html new file mode 100644 index 0000000..c654e86 --- /dev/null +++ b/src/themes/serene/templates/blog.html @@ -0,0 +1,50 @@ +{% import "macros/prose.html" as macros %} +{% extends "_base.html" %} + +{% block page %}blog{% endblock page%} +{% block lang %}{% if section.extra.lang %}{{ section.extra.lang }}{% else %}{{ section.lang }}{% endif %}{% endblock lang %} +{% block title %}{{ section.title }}{% endblock title %} +{% block desc %} + {% if section.description %} + {% set desc = section.description %} + {% else %} + {% set desc = config.description %} + {% endif %} + +{% endblock desc %} + +{% block content %} +
+ {{ macros::back_link(path = get_url(path="/")) }} + {% include "_section_title.html" %} +
+ {% if section.extra.categorized %} + {% for category,posts in section.pages | sort(attribute="taxonomies.categories.0") | group_by(attribute="taxonomies.categories.0") %} + {% set category_name = category %} + {% if category is matching("^__[0-9]{2}__") %} + {% set category_name = category | split(pat="") | slice(start=7) | join(sep="") %} + {% endif %} +

{{ category_name }}

+
+ {% for post in posts %} + + {{ post.title }} + {{ post.date | date(format=section.extra.date_format) }} + + {% endfor %} +
+ {% endfor %} + {% else %} +
+ {% for post in section.pages %} + + {{ post.title }} + {{ post.date | date(format=section.extra.date_format) }} + + {% endfor %} +
+ {% endif %} +
+ {% include "_footer.html" %} +
+{% endblock content %} diff --git a/src/themes/serene/templates/categories/list.html b/src/themes/serene/templates/categories/list.html new file mode 100644 index 0000000..9069f6b --- /dev/null +++ b/src/themes/serene/templates/categories/list.html @@ -0,0 +1,3 @@ + diff --git a/src/themes/serene/templates/categories/single.html b/src/themes/serene/templates/categories/single.html new file mode 100644 index 0000000..9069f6b --- /dev/null +++ b/src/themes/serene/templates/categories/single.html @@ -0,0 +1,3 @@ + diff --git a/src/themes/serene/templates/feed.xml b/src/themes/serene/templates/feed.xml new file mode 100644 index 0000000..fe1f139 --- /dev/null +++ b/src/themes/serene/templates/feed.xml @@ -0,0 +1,32 @@ + + + {% if section.title %}{{ section.title }}{% else %}{{ config.title }}{% endif %} + {%- if section.description %} + {{ section.description }} + {%- elif config.description %} + {{ config.description }} + {%- endif %} + + + {{ last_updated | date(format="%+") }} + {{ feed_url | safe }} + {%- for page in pages %} + + {{ page.title }} + {{ page.date | date(format="%+") }} + {{ page.updated | default(value=page.date) | date(format="%+") }} + {%- if page.summary %} + {{ page.summary }} + {%- endif %} + + {{ page.permalink | safe }} + {{ page.content }} + + {%- endfor %} + \ No newline at end of file diff --git a/src/themes/serene/templates/home.html b/src/themes/serene/templates/home.html new file mode 100644 index 0000000..6f4c3ac --- /dev/null +++ b/src/themes/serene/templates/home.html @@ -0,0 +1,119 @@ +{% extends "_base.html" %} + +{% block page %}homepage{% endblock page%} +{% block lang %}{% if section.extra.lang %}{{ section.extra.lang }}{% else %}{{ section.lang }}{% endif %}{% endblock lang %} +{% block title %}{{ config.title }}{% endblock title %} +{% block desc %} + +{% endblock desc %} + +{% block head %} +{% if config.markdown.highlight_theme == "css" %} + {% if config.extra.force_theme == "dark" %} + + {% else %} + + {% endif %} +{% endif %} +{% if section.extra.math %} + + + + + +{% endif %} +{% endblock head %} + +{% block content %} +
+
+
+ {% if section.extra.avatar %} + avatar + {% endif %} +
+
+ {{ section.extra.name }} + {% if section.extra.id %} + @{{ section.extra.id }} + {% endif %} +
+ {% if section.extra.bio %} +
{{ section.extra.bio }}
+ {% endif %} +
+
+ +
+ {{ section.content | trim | safe }} +
+ {% if section.extra.recent %} + {% set blog_section_path = config.extra.blog_section_path | trim_start_matches(pat="/") %} + {% set section_md_path = blog_section_path ~ "/_index.md" %} + {% set blog_section = get_section(path=section_md_path) %} +
+
+ {% for post in blog_section.pages | slice(end=section.extra.recent_max) %} + + {{ post.title }} + + {{ post.date | date(format=section.extra.date_format) }} + + {% endfor %} +
+ +
+ {% endif %} +
+ {% if section.extra.footer %} + {% include "_footer.html" %} + {% endif %} +
+{% endblock content %} + +{% block script %} + +{% if section.extra.mermaid %} + +{% endif %} +{% endblock script %} diff --git a/src/themes/serene/templates/macros/collection.html b/src/themes/serene/templates/macros/collection.html new file mode 100644 index 0000000..796eae1 --- /dev/null +++ b/src/themes/serene/templates/macros/collection.html @@ -0,0 +1,153 @@ +{% macro card(item) %} +
+
+ {% if item.icon %} +
+ icon +
+ {% endif %} + {% if item.link %} + {{ item.title }} + {% else %} +
{{ item.title }}
+ {% endif %} + {% if item.date %} +
{{ item.date }}
+ {% endif %} +
+ {% if item.subtitle %} +
{{ item.subtitle }}
+ {% endif %} +
{{ item.content | trim | markdown | safe }}
+ {% if item.tags %} +
+ {% for tag in item.tags %} +
#{{ tag }}
+ {% endfor %} +
+ {% endif %} +
+{% endmacro %} + + +{% macro card_simple(item) %} +
+
+ {% if item.icon %} +
+ icon +
+ {% endif %} + {% if item.link %} + {{ item.title }} + {% else %} +
{{ item.title }}
+ {% endif %} +
{{ item.content | trim | markdown | safe }}
+ {% if item.date %} +
{{ item.date }}
+ {% endif %} +
+
{{ item.content | trim | markdown | safe }}
+
+{% endmacro %} + + +{% macro entry(item) %} +{% if item.link %} + +{% else %} +
+{% endif %} + {% if item.icon %} +
+ icon +
+ {% endif %} + {% if item.title or item.subtitle %} +
+ {% if item.title %} +
{{ item.title }}
+ {% endif %} + {% if item.subtitle %} +
{{ item.subtitle }}
+ {% endif %} +
+ {% endif %} +{% if item.link %} +
+{% else %} +
+{% endif %} +{% endmacro %} + + +{% macro box(item) %} +
+{% if item.link %} + +{% else %} +
+{% endif %} +
+
{{ item.title }}
+ {% if item.subtitle %} +
{{ item.subtitle }}
+ {% endif %} +
+ {% if item.img %} + {{ item.title }} + {% else %} +
+ {% endif %} +{% if item.link %} +
+{% else %} +
+{% endif %} +
+{% endmacro %} + + +{% macro art(item) %} +
+
+ {{ item.title }} +
+
+ {% if item.link %} + {{ item.title }} + {% else %} +
{{ item.title }}
+ {% endif %} + {% if item.subtitle %} +
{{ item.subtitle }}
+ {% endif %} + {% if item.content %} +
{{ item.content }}
+ {% endif %} + {% if item.footer %} + + {% endif %} +
+
+{% endmacro %} + + +{% macro art_simple(item) %} +
+
+ {{ item.title }} +
+
+ {% if item.link %} + {{ item.title }} + {% else %} +
{{ item.title }}
+ {% endif %} + {% if item.subtitle %} +
{{ item.subtitle }}
+ {% endif %} +
+
+{% endmacro %} diff --git a/src/themes/serene/templates/macros/prose.html b/src/themes/serene/templates/macros/prose.html new file mode 100644 index 0000000..bd9a894 --- /dev/null +++ b/src/themes/serene/templates/macros/prose.html @@ -0,0 +1,32 @@ +{% macro back_link(path) %} +
+ +
+{% endmacro %} + + +{% macro callout(name) %} +
+ {% set icon = load_data(path="icon/" ~ name ~ ".svg") %} + {% if title %} +

+ + {{ icon | safe }} + + {{ title }} +

+
+ {{ body | markdown | safe }} +
+ {% else %} +
+ {{ icon | safe }} +
+
+ {{ body | markdown | safe }} +
+ {% endif %} +
+{% endmacro %} diff --git a/src/themes/serene/templates/post.html b/src/themes/serene/templates/post.html new file mode 100644 index 0000000..f31810a --- /dev/null +++ b/src/themes/serene/templates/post.html @@ -0,0 +1,151 @@ +{% import "macros/prose.html" as macros %} +{% extends "_base.html" %} + +{% block page %}post{% endblock page %} +{% block lang -%} +{%- set blog_section_path = config.extra.blog_section_path | trim_start_matches(pat="/") -%} +{%- set section_md_path = blog_section_path ~ "/_index.md" -%} +{%- set section = get_section(path=section_md_path, metadata_only=true) -%} +{%- if page.extra.lang %}{{page.extra.lang}}{% elif section.extra.lang %}{{section.extra.lang}}{% else %}{{page.lang}}{% endif -%} +{%- endblock lang %} +{% block title %}{{ page.title }}{% endblock title %} +{% block desc %} + {% if page.summary %} + {% set desc = page.summary %} + {% elif page.description %} + {% set desc = page.description %} + {% elif section.description %} + {% set desc = section.description %} + {% else %} + {% set desc = config.description %} + {% endif %} + +{% endblock desc %} + +{% block head %} +{% if config.markdown.highlight_theme == "css" %} + +{% endif %} +{% if page.extra.math %} + + + + + +{% endif %} +{% endblock head %} + +{% block content %} +
+
+ +
+ {{ macros::back_link(path = get_url(path=section.path)) }} + +
+ {% if page.extra.copy is defined %}{% set allow_copy = page.extra.copy %}{% else %}{% set allow_copy = section.extra.copy %}{% endif %} + {% if allow_copy %} + {% set copy_icon = load_data(path="icon/copy.svg") %} + {% set check_icon = load_data(path="icon/check.svg") %} + + {% endif %} +
+

{{ page.title }}

+
+
+ {{ page.date | date(format=section.extra.date_format) }} + {% if page.updated and page.updated != page.date -%} + Updated on {{ page.updated | date(format=section.extra.date_format) }} + {% endif -%} +
+ + {% if page.taxonomies.tags is defined %} +
+ {% for tag in page.taxonomies.tags -%} + {% set tag_slugify = tag | slugify -%} + #{{ tag }} + {%- endfor %} +
+ {% endif %} +
+ + {% if page.extra.outdate_alert is defined %}{% set show_outdate_alert = page.extra.outdate_alert %}{% else %}{% set show_outdate_alert = section.extra.outdate_alert %}{% endif %} + {% if page.extra.outdate_alert_days is defined %}{% set outdate_alert_days = page.extra.outdate_alert_days %}{% else %}{% set outdate_alert_days = section.extra.outdate_alert_days %}{% endif %} + + {% if show_outdate_alert -%} + + {% endif %} + + {{ page.content | safe }} +
+ + {% if page.extra.reaction is defined %}{% set show_reaction = page.extra.reaction %}{% else %}{% set show_reaction = config.extra.reaction %}{% endif %} + {% if show_reaction %} +
+ {% endif %} + + {% if page.extra.comment is defined %}{% set show_comment = page.extra.comment %}{% else %}{% set show_comment = section.extra.comment %}{% endif %} + {% if show_comment %} +
+ {% include "_giscus_script.html" %} + {% endif %} +
+ + {% include "_footer.html" %} +
+
+{% endblock content %} + +{% block script %} + +{% if page.extra.mermaid %} + +{% endif %} +{% endblock script %} diff --git a/src/themes/serene/templates/prose.html b/src/themes/serene/templates/prose.html new file mode 100644 index 0000000..661c408 --- /dev/null +++ b/src/themes/serene/templates/prose.html @@ -0,0 +1,82 @@ +{% import "macros/prose.html" as macros %} +{% extends "_base.html" %} + +{% block page %}prose-page{% endblock page %} +{% block lang -%} +{%- if section.extra.lang %}{{section.extra.lang}}{% else %}{{section.lang}}{% endif -%} +{%- endblock lang %} +{% block title %}{{ section.title }}{% endblock title %} +{% block desc %} + {% if section.description %} + {% set desc = section.description %} + {% else %} + {% set desc = config.description %} + {% endif %} + +{% endblock desc %} + +{% block head %} +{% if config.markdown.highlight_theme == "css" %} + +{% endif %} +{% if section.extra.math %} + + + + + +{% endif %} +{% endblock head %} + +{% block content %} +
+
+ {{ macros::back_link(path = get_url(path="/")) }} + {% include "_section_title.html" %} +
+ {% if section.extra.copy %} + {% set copy_icon = load_data(path="icon/copy.svg") %} + {% set check_icon = load_data(path="icon/check.svg") %} + + {% endif %} +
+ {{ section.content | safe }} +
+ + {% if section.extra.reaction is defined %}{% set show_reaction = section.extra.reaction %}{% else %}{% set show_reaction = config.extra.reaction %}{% endif %} + {% if show_reaction %} +
+ {% endif %} + + {% if section.extra.comment %} +
+ {% include "_giscus_script.html" %} + {% endif %} +
+ + {% include "_footer.html" %} +
+
+{% endblock content %} + +{% block script %} + +{% if section.extra.mermaid %} + +{% endif %} +{% endblock script %} diff --git a/src/themes/serene/templates/shortcodes/caution.html b/src/themes/serene/templates/shortcodes/caution.html new file mode 100644 index 0000000..7d1797f --- /dev/null +++ b/src/themes/serene/templates/shortcodes/caution.html @@ -0,0 +1,2 @@ +{% import "macros/prose.html" as macros %} +{{ macros::callout(name="caution") }} diff --git a/src/themes/serene/templates/shortcodes/collection.html b/src/themes/serene/templates/shortcodes/collection.html new file mode 100644 index 0000000..c217a0c --- /dev/null +++ b/src/themes/serene/templates/shortcodes/collection.html @@ -0,0 +1,23 @@ +{% import 'macros/collection.html' as marcos -%} + +{% set data = load_data(path="content" ~ section.path ~ file, format="toml") %} + +
+{% for item in data.collection %} + {% if item.type == "card" %} + {{ marcos::card(item=item) }} + {% elif item.type == "card_simple" %} + {{ marcos::card_simple(item=item) }} + {% elif item.type == "entry" %} + {{ marcos::entry(item=item) }} + {% elif item.type == "box" %} + {{ marcos::box(item=item) }} + {% elif item.type == "art" %} + {{ marcos::art(item=item) }} + {% elif item.type == "art_simple" %} + {{ marcos::art_simple(item=item) }} + {% elif item.type == "br" %} +
+ {% endif %} +{% endfor %} +
diff --git a/src/themes/serene/templates/shortcodes/detail.html b/src/themes/serene/templates/shortcodes/detail.html new file mode 100644 index 0000000..0d34a74 --- /dev/null +++ b/src/themes/serene/templates/shortcodes/detail.html @@ -0,0 +1,4 @@ +
+ {{ title }} + {{ body | markdown | safe }} +
diff --git a/src/themes/serene/templates/shortcodes/figure.html b/src/themes/serene/templates/shortcodes/figure.html new file mode 100644 index 0000000..8a4123f --- /dev/null +++ b/src/themes/serene/templates/shortcodes/figure.html @@ -0,0 +1,8 @@ +
+ + {% if via %} +
via
+ {% else %} +
{{ caption }}
+ {% endif %} +
\ No newline at end of file diff --git a/src/themes/serene/templates/shortcodes/important.html b/src/themes/serene/templates/shortcodes/important.html new file mode 100644 index 0000000..451c141 --- /dev/null +++ b/src/themes/serene/templates/shortcodes/important.html @@ -0,0 +1,2 @@ +{% import "macros/prose.html" as macros %} +{{ macros::callout(name="important") }} diff --git a/src/themes/serene/templates/shortcodes/mermaid.html b/src/themes/serene/templates/shortcodes/mermaid.html new file mode 100644 index 0000000..3d3725d --- /dev/null +++ b/src/themes/serene/templates/shortcodes/mermaid.html @@ -0,0 +1,3 @@ +
+  {{ body }}
+
\ No newline at end of file diff --git a/src/themes/serene/templates/shortcodes/note.html b/src/themes/serene/templates/shortcodes/note.html new file mode 100644 index 0000000..b16657b --- /dev/null +++ b/src/themes/serene/templates/shortcodes/note.html @@ -0,0 +1,2 @@ +{% import "macros/prose.html" as macros %} +{{ macros::callout(name="note") }} diff --git a/src/themes/serene/templates/shortcodes/quote.html b/src/themes/serene/templates/shortcodes/quote.html new file mode 100644 index 0000000..c7e3c37 --- /dev/null +++ b/src/themes/serene/templates/shortcodes/quote.html @@ -0,0 +1,10 @@ +
+ {% set icon = load_data(path="icon/quote.svg") %} + +
{{ body | markdown | safe }}
+ {% if cite %} +
+ {{ "— " ~ cite | markdown | safe }} +
+ {% endif %} +
\ No newline at end of file diff --git a/src/themes/serene/templates/shortcodes/tip.html b/src/themes/serene/templates/shortcodes/tip.html new file mode 100644 index 0000000..8904437 --- /dev/null +++ b/src/themes/serene/templates/shortcodes/tip.html @@ -0,0 +1,2 @@ +{% import "macros/prose.html" as macros %} +{{ macros::callout(name="tip") }} diff --git a/src/themes/serene/templates/shortcodes/warning.html b/src/themes/serene/templates/shortcodes/warning.html new file mode 100644 index 0000000..0964b15 --- /dev/null +++ b/src/themes/serene/templates/shortcodes/warning.html @@ -0,0 +1,2 @@ +{% import "macros/prose.html" as macros %} +{{ macros::callout(name="warning") }} diff --git a/src/themes/serene/templates/tags/list.html b/src/themes/serene/templates/tags/list.html new file mode 100644 index 0000000..ff41838 --- /dev/null +++ b/src/themes/serene/templates/tags/list.html @@ -0,0 +1,29 @@ +{% import "macros/prose.html" as macros %} +{% extends "_base.html" %} + +{% block page %}tag-list{% endblock page%} +{% block lang -%} +{% set blog_section_path = config.extra.blog_section_path | trim_start_matches(pat="/") %} +{% set section_md_path = blog_section_path ~ "/_index.md"%} +{% set section = get_section(path=section_md_path, metadata_only=true) %} +{%- if section.extra.lang %}{{ section.extra.lang }}{% else %}{{ lang }}{% endif -%} +{%- endblock lang %} +{% block title %}Tags{% endblock title %} +{% block desc %} + +{% endblock desc %} + +{% block content %} +
+ {{ macros::back_link(path = get_url(path="/")) }} +
+

Tags

+
+ {% for tag in terms -%} + # {{ tag.name | lower }} + {% endfor %} +
+
+ {% include "_footer.html" %} +
+{% endblock content %} diff --git a/src/themes/serene/templates/tags/single.html b/src/themes/serene/templates/tags/single.html new file mode 100644 index 0000000..f8b9fc4 --- /dev/null +++ b/src/themes/serene/templates/tags/single.html @@ -0,0 +1,34 @@ +{% import "macros/prose.html" as macros %} +{% extends "_base.html" %} + +{% block page %}tag-single{% endblock page %} +{% block lang -%} +{% set blog_section_path = config.extra.blog_section_path | trim_start_matches(pat="/") %} +{% set section_md_path = blog_section_path ~ "/_index.md"%} +{% set section = get_section(path=section_md_path, metadata_only=true) %} +{%- if section.extra.lang %}{{ section.extra.lang }}{% else %}{{ lang }}{% endif -%} +{%- endblock lang %} +{% block title %}{{section.title}}{% endblock title %} +{% block desc %} + +{% endblock desc %} + +{% block content %} +
+ {{ macros::back_link(path = get_url(path="/tags")) }} +
+
+ # {{ term.name }} +
+
+ {% for post in term.pages %} + + {{ post.title }} + {{ post.date | date(format=section.extra.date_format) }} + + {% endfor %} +
+
+ {% include "_footer.html" %} +
+{% endblock content %} -- cgit 1.4.1