mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 13:21:35 +01:00
feat: support Simple Icons for social icons
This commit is contained in:
parent
01e0b32dcf
commit
968ba4178a
14 changed files with 14 additions and 24 deletions
8
templates/macros.html
Normal file
8
templates/macros.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{%- macro get_social_icon(icon) -%}
|
||||
{%- set meta = get_image_metadata(path="/static/icons/" ~ icon ~ ".svg", allow_missing=true) -%}
|
||||
{%- if meta -%}
|
||||
{{- get_url(path="icons/" ~ icon ~ ".svg") -}}
|
||||
{%- else -%}
|
||||
{{- "https://cdn.jsdelivr.net/npm/simple-icons/icons/" ~ icon ~ ".svg" -}}
|
||||
{%- endif -%}
|
||||
{%- endmacro get_social_icon -%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue