summary refs log tree commit diff stats
path: root/src/themes/serene/templates/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes/serene/templates/shortcodes')
-rw-r--r--src/themes/serene/templates/shortcodes/caution.html2
-rw-r--r--src/themes/serene/templates/shortcodes/collection.html23
-rw-r--r--src/themes/serene/templates/shortcodes/detail.html4
-rw-r--r--src/themes/serene/templates/shortcodes/figure.html8
-rw-r--r--src/themes/serene/templates/shortcodes/important.html2
-rw-r--r--src/themes/serene/templates/shortcodes/mermaid.html3
-rw-r--r--src/themes/serene/templates/shortcodes/note.html2
-rw-r--r--src/themes/serene/templates/shortcodes/quote.html10
-rw-r--r--src/themes/serene/templates/shortcodes/tip.html2
-rw-r--r--src/themes/serene/templates/shortcodes/warning.html2
10 files changed, 58 insertions, 0 deletions
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") %}
+
+<section class="collection-wrapper">
+{% 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" %}
+    <br />
+  {% endif %}
+{% endfor %}
+</section>
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 @@
+<details {% if default_open %}open{% endif %}>
+  <summary><span>{{ title }}</span></summary>
+  {{ body | markdown | safe }}
+</details>
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 @@
+<figure>
+    <img src="{{ src }}" {% if alt %} alt="{{ alt }}"{% endif %}>
+    {% if via %}
+    <figcaption><a href="{{via}}">via</a></figcaption>
+    {% else %}
+    <figcaption>{{ caption }}</figcaption>
+    {% endif %}
+</figure>
\ 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 @@
+<pre class="mermaid">
+  {{ body }}
+</pre>
\ 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 @@
+<blockquote class="quote">
+  {% set icon = load_data(path="icon/quote.svg") %}
+  <div class="icon" style="display: none;">{{ icon | safe }}</div>
+  <div class="content">{{ body | markdown | safe }}</div>
+  {% if cite %}
+  <div class="from">
+    {{ "— " ~ cite | markdown | safe }}
+  </div>
+  {% endif %}
+</blockquote>
\ 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") }}