summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorccd0 <admin@containerchan.org>2013-11-27 02:17:25 -0800
committerccd0 <admin@containerchan.org>2013-11-27 02:17:25 -0800
commit827ca377306585be8ad83c5e7d04bbe52b5f35e7 (patch)
tree849e7477a6d731edf1e5ee01b89cc9ee437c574c
parent1690392132719d6c898363af6541ec8dc6332172 (diff)
fallback to attachment image when video doesn't work
-rw-r--r--post_reply.html27
-rw-r--r--post_thread.html36
2 files changed, 41 insertions, 22 deletions
diff --git a/post_reply.html b/post_reply.html
index 876ee3a9..9b10a8f4 100644
--- a/post_reply.html
+++ b/post_reply.html
@@ -97,20 +97,29 @@
{% else %}
{{ 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 %}>
- <{% if post.thumb|extension == 'webm' %}video preload{% else %}img{% endif %} class="post-image" src="
- {% if post.thumb == 'file' %}
+ {% 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 %}
- {% 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"
- {% if post.thumb|extension == 'webm' %}></video>{% else %}alt="" />{% endif %}
+ {% endif %}" style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px"></video>
+ {% else %}
+ <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>
{% endif %}
{{ post.postControls }}
diff --git a/post_thread.html b/post_thread.html
index 1ea4ccba..abb232fa 100644
--- a/post_thread.html
+++ b/post_thread.html
@@ -47,20 +47,30 @@
{% else %}
{{ 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 %}>
-<{% if post.thumb|extension == 'webm' %}video preload{% else %}img{% endif %} 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 }}
+ {% 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 %}
- {{ config.uri_thumb }}{{ post.thumb }}
- {% endif %}" style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px"
- {% if post.thumb|extension == 'webm' %}></video>{% else %}alt="" />{% endif %}</a>
+ <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>
{% 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 }}" />