leilukin-tumbleblog/themes/sparrow/feathers/photo.twig

18 lines
716 B
Twig
Raw Normal View History

2024-06-20 14:10:42 +00:00
{% extends "content" ~ DIR ~ "post.twig" %}
{% block content %}
{% if post.title is not empty %}
<h2 class="post_title">
<a href="{{ post.url() }}" rel="bookmark" title="{{ 'Permanent link to &#8220;%s&#8221;' | translate | format(post.title | striptags | normalize | fix(true)) }}">{{ post.title }}</a>
</h2>
{% endif %}
<section class="photo" aria-label="{{ 'File Attachment' | translate }}">
{{ post.filename | thumbnail(post.alt_text, post.source, ["max_width=960", "max_height=960", "quality=80"], "(min-width: 780px) 716px, 90vw") }}
</section>
{% if post.caption is not empty %}
<section class="caption" aria-label="{{ 'Text Content' | translate }}">
{{ post.caption }}
</section>
{% endif %}
{% endblock %}