mirror of
https://github.com/Dichgrem/Blog.git
synced 2025-08-01 17:29:31 -04:00
Initial commit
This commit is contained in:
8
templates/shortcodes/figure.html
Normal file
8
templates/shortcodes/figure.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% if src %}
|
||||
<figure class="{% if position %}{{ position }}{% else -%} center {%- endif %}" >
|
||||
<img src="{{ src | safe }}"{% if alt %} alt="{{ alt }}"{% endif %}{% if style %} style="{{ style }}"{% endif %} decoding="async" loading="lazy"/>
|
||||
{% if caption %}
|
||||
<figcaption class="{% if caption_position %}{{ caption_position }}{% else -%} center {%- endif %}"{% if caption_style %} style="{{ caption_style | safe }}"{% endif %}>{{ caption | markdown() | safe }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
{% endif %}
|
8
templates/shortcodes/image.html
Normal file
8
templates/shortcodes/image.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% if src %}
|
||||
{# If the image's URL is internal to the site... #}
|
||||
{% if src is not starting_with("http") %}
|
||||
{# ... then prepend the site's base URL to the image's URL. #}
|
||||
{% set src = config.base_url ~ src %}
|
||||
{% endif %}
|
||||
<img src="{{ src | safe }}"{% if alt %} alt="{{ alt }}"{% endif %} class="{% if position %}{{ position }}{% else -%} center {%- endif %}" {%- if style %} style="{{ style | safe }}" {%- endif %} decoding="async" loading="lazy"/>
|
||||
{% endif %}
|
Reference in New Issue
Block a user