A pile of code changes

This commit is contained in:
lf- 2021-03-09 03:41:36 -08:00
parent 33de49464e
commit a1bdad57dd
39 changed files with 639 additions and 78 deletions

View file

@ -0,0 +1,20 @@
{% set name_sanitized = name | replace(from=".", to="-") | replace(from="/", to="-") %}
{% set image_id = "image" ~ name_sanitized %}
{% set alt = alt | default(value=body) %}
{% set height = height | default(value=600) %}
<div class="image">
<a href="{{ get_url(path="images/" ~ name) }}">
<img src="{{ resize_image(path="../static/images/" ~ name, width=800, height=height, op="fit") }}"
alt="{{ alt }}"
title="{{ alt }}"
{% if label %}
aria-describedby="{{ image_id }}"
{% endif %}
>
</a>
{% if label %}
<span class="image-label" id="{{ image_id }}">
{{ label }}
</span>
{% endif %}
</div>