1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00
vichan/templates/post/image.html

46 lines
1.6 KiB
HTML
Raw Normal View History

<a href="
2015-08-11 03:09:26 +02:00
{% if post.file|extension == 'webm' or post.file|extension == 'mp4' %}
2023-07-14 07:11:59 +02:00
{{ config.root }}player.php?v={{ config.uri_img }}{{ post.file }}&amp;t={% if config.show_filename %}{{ post.filename|e('url') }}{% else %}{{ post.file }}{% endif %}&amp;loop=1
{% else %}
{{ config.uri_img }}{{ post.file }}
{% endif %}
"
target="_blank"
2015-08-11 03:09:26 +02:00
{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' or post.filename|extension == 'webm' or post.file|extension == 'mp4' %}
class="file"
{% endif %}
>
2015-08-11 03:09:26 +02:00
{% if post.thumb|extension == 'webm' or post.thumb|extension == 'mp4' %}
<video autoplay class="post-image" src="{{ config.uri_thumb }}{{ post.thumb }}"
poster="
{{ config.root }}
{% if config.file_icons[post.filename|extension] %}
{{ config.file_thumb|sprintf(config.file_icons[post.filename|extension]) }}
{% else %}
{{ config.file_thumb|sprintf(config.file_icons.default) }}
{% endif %}
"
style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px"
>
</video>
{% else %}
2014-07-09 19:45:17 +02:00
<img class="post-image"
src="
{% if post.thumb == 'file' %}
{{ config.root }}
{% if config.file_icons[post.filename|extension] %}
{{ config.file_thumb|sprintf(config.file_icons[post.filename|extension]) }}
{% else %}
{{ config.file_thumb|sprintf(config.file_icons.default) }}
{% endif %}
{% elseif post.thumb == 'spoiler' %}
{{ config.root }}{{ config.spoiler_image }}
{% else %}
{{ config.uri_thumb }}{{ post.thumb }}
{% endif %}
"
style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px" alt=""
/>
{% endif %}
</a>