You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB
HTML

{% extends "index.html" %}
{% block content %}
<main class="w3-container w3-margin w3-padding">
{{ section.content | safe }}
{# === image assets === #}
<h2>Images</h2>
{% for asset in section.assets | sort() | reverse %}
{%- if asset is matching("[.](jpg|png|jpeg)$") -%}
<a href="{{ get_url(path=asset) }}"><img src="{{ resize_image(path=asset, width=240, height=240, op="fit_height") }}"/></a>
{%- elif asset is matching("[.](svg)$") -%}
<a href="{{ get_url(path=asset) }}"><img style="width:240px; height:240px;" src="{{ get_url(path=asset) }}"/></a>
{% else %}
{# nothing, will list assets later #}
{%- endif -%}
{% endfor %}
<br/>
{# === pdf assets === #}
<h2>PDFs</h2>
<ul>
{% for asset in section.assets | sort() | reverse %}
{%- if asset is matching("[.](pdf)$") -%}
<li><i class="fa fa-file-pdf-o"></i> <a href="{{ get_url(path=asset) }}">{{asset}}</a></li>
{%- endif -%}
{% endfor %}
</ul>
{# === audio assets === #}
<h2>Audio</h2>
<ul>
{% for asset in section.assets | sort() | reverse %}
{%- if asset is matching("[.](mp3|ogg)$") -%}
<li><i class="fa fa-file-audio-o"></i> <a href="{{ get_url(path=asset) }}">{{asset}}</a>
<audio controls>
<source src="{{ get_url(path=asset) }}" type="audio/ogg">
{# TODO use the good file format #}
</audio>
</li>
{%- endif -%}
{% endfor %}
</ul>
</main>
{% endblock content %}