mirror of
https://github.com/ParkerTenBroeck/ParkerTenBroeck.github.io.git
synced 2026-06-06 21:14:06 -04:00
added pictures/gallery. organized media better
This commit is contained in:
parent
b0d420c311
commit
4886fa19c9
65 changed files with 318 additions and 112 deletions
31
templates/macros/figures.html
Normal file
31
templates/macros/figures.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{% macro image(src, caption, class="") %}
|
||||
<figure class="{% if class %} {{ class }} {% endif %}">
|
||||
<img src="{{ get_url(path=src) }}" loading="lazy" alt="{{caption | default(value='')}}" decoding="async" class="zoomable">
|
||||
{% if caption != "" %}
|
||||
<figcaption>{{ caption | markdown() | safe }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% macro video(src, caption, loop=false, controls=true, autoplay=false, poster="", class="") %}
|
||||
<figure class="{% if class %} {{ class }} {% endif %}">
|
||||
<video
|
||||
{% if poster %} poster="{{ poster }}"{% endif %}
|
||||
{% if loop | default(value=false) %} loop {% endif %}
|
||||
{% if controls | default(value=true) %} controls {% endif %}
|
||||
preload="metadata"
|
||||
muted
|
||||
{% if autoplay | default(value=false) %} autoplay {% endif %}
|
||||
playsinline
|
||||
alt="{{caption | default(value='')}}"
|
||||
>
|
||||
<source src="{{ get_url(path=src) }}">
|
||||
</video>
|
||||
{% if caption != "" %}
|
||||
<figcaption>{{ caption | markdown() | safe }}</figcaption>
|
||||
{% endif %}
|
||||
</figure>
|
||||
|
||||
{% endmacro %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue