From e55841149d9259f26f4d117daba34b5666a52097 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 11 Sep 2026 22:02:29 +0200 Subject: src/themes/serene: Update to newest version --- src/themes/serene/templates/_components/prose.html | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/themes/serene/templates/_components/prose.html (limited to 'src/themes/serene/templates/_components/prose.html') diff --git a/src/themes/serene/templates/_components/prose.html b/src/themes/serene/templates/_components/prose.html new file mode 100644 index 0000000..c478a58 --- /dev/null +++ b/src/themes/serene/templates/_components/prose.html @@ -0,0 +1,72 @@ +{# + Components in this file are used inside markdown content, which is rendered + as a Tera template first and *then* processed as markdown (zola >= 0.23). + Their HTML output must therefore stay markdown-safe: no blank lines in the + middle of an HTML block, and no lines indented by 4+ spaces. +#} + +{% component back_link(path: string, config) %} +
+ +
+{% endcomponent back_link %} + + +{% component quote(cite: string = "") -%} +{%- set icon = load_data(path="icon/quote.svg") -%} +
+ +
+{{ body | markdown | trim | safe }} +
+{%- if cite -%} +{%- set from_text = "— " ~ cite -%} +
+{{ from_text | markdown | trim | safe }} +
+{%- endif -%} +
+{%- endcomponent quote %} + + +{% component detail(title: string = "", default_open: bool = false) -%} + +{{ title }} +{{ body | markdown | trim | safe }} + +{%- endcomponent detail %} + + +{% component figure(src: string, alt: string = "", caption: string = "", width: string = "", height: string = "", page = {}, section = {}) -%} +{%- if src is starting_with(pat="/") or src is starting_with(pat="http://") or src is starting_with(pat="https://") or src is starting_with(pat="//") or src is starting_with(pat="data:") -%} +{%- set image_src = src -%} +{%- elif page?.colocated_path -%} +{%- set image_src = get_url(path=page.colocated_path ~ src) -%} +{%- elif section?.colocated_path -%} +{%- set image_src = get_url(path=section.colocated_path ~ src) -%} +{%- else -%} +{%- set image_src = src -%} +{%- endif -%} +
+ +{%- if caption -%} +
{{ caption | trim | markdown | trim | safe }}
+{%- endif -%} +
+{%- endcomponent figure %} + + +{% component mermaid() -%} +
+{{ body }}
+
+{%- endcomponent mermaid %} + + +{% component youtube(id: string, autoplay: bool = false) -%} +
+ +
+{%- endcomponent youtube %} -- cgit v1.3.1