summaryrefslogtreecommitdiff
path: root/sysret.org/themes/tabi-lean/templates/partials/hcard.html
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2025-09-13 15:01:06 -0600
committerAlejandro Soto <alejandro@34project.org>2025-09-13 15:01:06 -0600
commitf4fcda54638685899c730b3fa90a87d80d6dbef5 (patch)
tree0737e627cce304c3a9c4e757bc5f6571a7456091 /sysret.org/themes/tabi-lean/templates/partials/hcard.html
parentd8b9cf1f61cc07d625f1c37ccc28adfd58918416 (diff)
parent2c13119932765c6d788f08fb53abc244407c0d80 (diff)
Merge commit '6a7d3111b31e73fc66af5360149d41f690fbcaa4'
Diffstat (limited to 'sysret.org/themes/tabi-lean/templates/partials/hcard.html')
-rw-r--r--sysret.org/themes/tabi-lean/templates/partials/hcard.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/sysret.org/themes/tabi-lean/templates/partials/hcard.html b/sysret.org/themes/tabi-lean/templates/partials/hcard.html
new file mode 100644
index 0000000..6479da6
--- /dev/null
+++ b/sysret.org/themes/tabi-lean/templates/partials/hcard.html
@@ -0,0 +1,75 @@
+{%- set hcard = config.extra.hcard -%}
+
+{% set full_name = config.author %}
+{% if hcard.full_name %}
+ {% set full_name = hcard.full_name %}
+{% endif %}
+
+{%- set homepage = config.base_url -%}
+{% if hcard.homepage %}
+ {%- set homepage = hcard.homepage -%}
+{% endif %}
+
+{% if hcard.enable %}
+<div class="h-card hidden">
+ <div>
+ {%- if hcard.avatar -%}
+ <img
+ class="u-photo"
+ src="{{ get_url(path=hcard.avatar, cachebust=true) }}"
+ width="200"
+ height="200"
+ alt="{{ full_name }}"
+ />
+ {%- endif -%}
+
+ <span class="p-name" rel="me">{{ full_name }}</span>
+
+ {% if hcard.p_nickname %}
+ ( <span class="p-nickname">{{ hcard.p_nickname }}</span> )
+ {% endif %}
+ </div>
+
+ {% if hcard.biography %}
+ <p class="p-note">{{ hcard.biography }}</p>
+ {% endif %}
+
+ {# links #}
+ <div>
+ {%- if hcard.with_mail and config.extra.email and not config.extra.encode_plaintext_email -%}
+ <span>
+ <a class="u-email" href="mailto:{{ config.extra.email | safe }}">email</a>
+ </span> -
+ {%- endif -%}
+
+ <span>
+ <a class="u-url u-id" href="{{ homepage }}">homepage</a>
+ </span> -
+
+ {%- if hcard.with_social_links and config.extra.socials %}
+ {% for social in config.extra.socials %}
+ <span>
+ <a class="p-url" rel="me" href="{{ social.url | safe }}">{{ social.name }}</a>
+ </span> -
+ {% endfor %}
+ {% endif %}
+ </div>
+
+ {# additional properties #}
+ {% set dl_started = false %}
+ {% for key, value in hcard %}
+ {% if key not in ['enable', 'with_mail', 'with_social_links', 'homepage', 'full_name', 'avatar', 'biography', 'p_nickname'] %}
+ {% if not dl_started %}
+ <dl>
+ {% set_global dl_started = true %}
+ {% endif %}
+ <dt>{{ key | replace(from="p_", to="") | replace(from="u_", to="") | replace(from="dt_", to="") | replace(from="_", to=" ") | capitalize }}</dt>
+ <dd class="{{ key | replace(from="_", to="-") }}">{{ value }}</dd>
+ {% endif %}
+ {% endfor %}
+ {% if dl_started %}
+ </dl>
+ {% endif %}
+
+ </div>
+{% endif %}