fallback to attachment image when video doesn't work
This commit is contained in:
parent
1690392132
commit
827ca37730
@ -97,7 +97,16 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ config.uri_img }}{{ post.file }}
|
{{ config.uri_img }}{{ post.file }}
|
||||||
{% endif %}" target="_blank"{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' or post.filename|extension == 'webm' %} class="file"{% endif %}>
|
{% endif %}" target="_blank"{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' or post.filename|extension == 'webm' %} class="file"{% endif %}>
|
||||||
<{% if post.thumb|extension == 'webm' %}video preload{% else %}img{% endif %} class="post-image" src="
|
{% if post.thumb|extension == 'webm' %}
|
||||||
|
<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 %}
|
||||||
|
<img class="post-image" src="
|
||||||
{% if post.thumb == 'file' %}
|
{% if post.thumb == 'file' %}
|
||||||
{{ config.root }}
|
{{ config.root }}
|
||||||
{% if config.file_icons[post.filename|extension] %}
|
{% if config.file_icons[post.filename|extension] %}
|
||||||
@ -109,8 +118,8 @@
|
|||||||
{{ config.root }}{{ config.spoiler_image }}
|
{{ config.root }}{{ config.spoiler_image }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ config.uri_thumb }}{{ post.thumb }}
|
{{ config.uri_thumb }}{{ post.thumb }}
|
||||||
{% endif %}" style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px"
|
{% endif %}" style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px" alt="" />
|
||||||
{% if post.thumb|extension == 'webm' %}></video>{% else %}alt="" />{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ post.postControls }}
|
{{ post.postControls }}
|
||||||
|
@ -47,7 +47,16 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ config.uri_img }}{{ post.file }}
|
{{ config.uri_img }}{{ post.file }}
|
||||||
{% endif %}" target="_blank"{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' or post.filename|extension == 'webm' %} class="file"{% endif %}>
|
{% endif %}" target="_blank"{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' or post.filename|extension == 'webm' %} class="file"{% endif %}>
|
||||||
<{% if post.thumb|extension == 'webm' %}video preload{% else %}img{% endif %} class="post-image" src="
|
{% if post.thumb|extension == 'webm' %}
|
||||||
|
<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 %}
|
||||||
|
<img class="post-image" src="
|
||||||
{% if post.thumb == 'file' %}
|
{% if post.thumb == 'file' %}
|
||||||
{{ config.root }}
|
{{ config.root }}
|
||||||
{% if config.file_icons[post.filename|extension] %}
|
{% if config.file_icons[post.filename|extension] %}
|
||||||
@ -59,8 +68,9 @@
|
|||||||
{{ config.root }}{{ config.spoiler_image }}
|
{{ config.root }}{{ config.spoiler_image }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ config.uri_thumb }}{{ post.thumb }}
|
{{ config.uri_thumb }}{{ post.thumb }}
|
||||||
{% endif %}" style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px"
|
{% endif %}" style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px" alt="" />
|
||||||
{% if post.thumb|extension == 'webm' %}></video>{% else %}alt="" />{% endif %}</a>
|
{% endif %}
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="post op"><p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}>
|
<div class="post op"><p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}>
|
||||||
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
||||||
|
Loading…
Reference in New Issue
Block a user