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

23 lines
839 B
Twig
Raw Permalink Normal View History

2024-06-20 14:10:42 +00:00
{% extends "content" ~ DIR ~ "post.twig" %}
{% block content %}
{% if post.title is not empty %}
<header>
<h2>
<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>
<h3>
<a href="{{ url('author/' ~ post.author.id) }}">{{ "Written by %s" | translate | format(post.author.name) }}</a>
</h3>
</header>
{% 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"], "(max-width: 959px) 95vw, 75vw") }}
</section>
{% if post.caption is not empty %}
<section class="caption" aria-label="{{ 'Text Content' | translate }}">
{{ post.caption }}
</section>
{% endif %}
{% endblock %}