summaryrefslogtreecommitdiffstats
path: root/src/themes/serene/templates/macros
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes/serene/templates/macros')
-rw-r--r--src/themes/serene/templates/macros/collection.html153
-rw-r--r--src/themes/serene/templates/macros/prose.html32
2 files changed, 185 insertions, 0 deletions
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) %}
+<blockquote class="collection card{% if item.featured %} featured{% endif %}">
+ <div class="meta">
+ {% if item.icon %}
+ <div class="icon-wrapper">
+ <img class="icon no-lightense" src="{{ item.icon }}" alt="icon" width="16" height="16">
+ </div>
+ {% endif %}
+ {% if item.link %}
+ <a class="title" href="{{ item.link }}" target="_blank" rel="noreferrer noopener">{{ item.title }}</a>
+ {% else %}
+ <div class="title">{{ item.title }}</div>
+ {% endif %}
+ {% if item.date %}
+ <div class="date">{{ item.date }}</div>
+ {% endif %}
+ </div>
+ {% if item.subtitle %}
+ <div class="subtitle">{{ item.subtitle }}</div>
+ {% endif %}
+ <div class="content">{{ item.content | trim | markdown | safe }}</div>
+ {% if item.tags %}
+ <div class="tags">
+ {% for tag in item.tags %}
+ <div><span>#</span>{{ tag }}</div>
+ {% endfor %}
+ </div>
+ {% endif %}
+</blockquote>
+{% endmacro %}
+
+
+{% macro card_simple(item) %}
+<blockquote class="collection card-simple{% if item.featured %} featured{% endif %}">
+ <div class="meta">
+ {% if item.icon %}
+ <div class="icon-wrapper">
+ <img class="icon no-lightense" src="{{ item.icon }}" alt="icon" width="16" height="16">
+ </div>
+ {% endif %}
+ {% if item.link %}
+ <a class="title" href="{{ item.link }}" target="_blank" rel="noreferrer noopener">{{ item.title }}</a>
+ {% else %}
+ <div class="title">{{ item.title }}</div>
+ {% endif %}
+ <div class="content">{{ item.content | trim | markdown | safe }}</div>
+ {% if item.date %}
+ <div class="date">{{ item.date }}</div>
+ {% endif %}
+ </div>
+ <div class="content-narrow">{{ item.content | trim | markdown | safe }}</div>
+</blockquote>
+{% endmacro %}
+
+
+{% macro entry(item) %}
+{% if item.link %}
+<a href="{{ item.link }}" target="_blank" rel="noreferrer noopener" class="collection entry">
+{% else %}
+<blockquote class="collection entry">
+{% endif %}
+ {% if item.icon %}
+ <div class="icon-wrapper">
+ <img class="icon no-lightense" src="{{ item.icon }}" alt="icon" width="16" height="16" />
+ </div>
+ {% endif %}
+ {% if item.title or item.subtitle %}
+ <div class="text">
+ {% if item.title %}
+ <div class="title">{{ item.title }}</div>
+ {% endif %}
+ {% if item.subtitle %}
+ <div class="subtitle">{{ item.subtitle }}</div>
+ {% endif %}
+ </div>
+ {% endif %}
+{% if item.link %}
+</a>
+{% else %}
+</blockquote>
+{% endif %}
+{% endmacro %}
+
+
+{% macro box(item) %}
+<div class="collection-box-wrapper">
+{% if item.link %}
+<a href="{{ item.link }}" target="_blank" rel="noreferrer noopener" class="collection box">
+{% else %}
+<blockquote class="collection box">
+{% endif %}
+ <div class="text">
+ <div class="title">{{ item.title }}</div>
+ {% if item.subtitle %}
+ <div class="subtitle">{{ item.subtitle }}</div>
+ {% endif %}
+ </div>
+ {% if item.img %}
+ <img class="no-lightense{% if item.rotate %} rotate{% endif %}" src="{{ item.img }}" alt="{{ item.title }}" width="48" height="48" />
+ {% else %}
+ <div class="placehold"></div>
+ {% endif %}
+{% if item.link %}
+</a>
+{% else %}
+</blockquote>
+{% endif %}
+</div>
+{% endmacro %}
+
+
+{% macro art(item) %}
+<blockquote class="collection art">
+ <div class="img-wrapper">
+ <img src="{{ item.img }}" alt="{{ item.title }}" height="175">
+ </div>
+ <div class="text">
+ {% if item.link %}
+ <a class="title" href="{{ item.link }}" target="_blank" rel="noreferrer noopener" >{{ item.title }}</a>
+ {% else %}
+ <div class="title">{{ item.title }}</div>
+ {% endif %}
+ {% if item.subtitle %}
+ <div class="subtitle">{{ item.subtitle }}</div>
+ {% endif %}
+ {% if item.content %}
+ <div class="content">{{ item.content }}</div>
+ {% endif %}
+ {% if item.footer %}
+ <div class="footer">{{ item.footer }}</div>
+ {% endif %}
+ </div>
+</blockquote>
+{% endmacro %}
+
+
+{% macro art_simple(item) %}
+<blockquote class="collection art-simple">
+ <div class="img-wrapper">
+ <img src="{{ item.img }}" alt="{{ item.title }}" height="175">
+ </div>
+ <div class="text">
+ {% if item.link %}
+ <a class="title" href="{{ item.link }}" target="_blank" rel="noreferrer noopener" >{{ item.title }}</a>
+ {% else %}
+ <div class="title">{{ item.title }}</div>
+ {% endif %}
+ {% if item.subtitle %}
+ <div class="subtitle">{{ item.subtitle }}</div>
+ {% endif %}
+ </div>
+</blockquote>
+{% 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) %}
+<header>
+ <nav>
+ <a href="{{ path }}">← {{ config.extra.back_link_text }}</a>
+ </nav>
+</header>
+{% endmacro %}
+
+
+{% macro callout(name) %}
+<blockquote class="callout {{ name }} {% if title %}has-title{% else %}no-title{% endif %}">
+ {% set icon = load_data(path="icon/" ~ name ~ ".svg") %}
+ {% if title %}
+ <p class="title">
+ <span class="icon">
+ {{ icon | safe }}
+ </span>
+ <strong>{{ title }}</strong>
+ </p>
+ <div class="content">
+ {{ body | markdown | safe }}
+ </div>
+ {% else %}
+ <div class="icon">
+ {{ icon | safe }}
+ </div>
+ <div class="content">
+ {{ body | markdown | safe }}
+ </div>
+ {% endif %}
+</blockquote>
+{% endmacro %}