diff options
| author | czaks <marcin@6irc.net> | 2014-04-06 21:48:31 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-04-06 21:48:31 +0200 |
| commit | e034b9179dd2777353c369910e65350d5496b779 (patch) | |
| tree | aed0bed0c8e468829561871ddf9b9d8ac99c36bf /templates | |
| parent | 586ce420449dd70aca0e627b9dd47789550331a6 (diff) | |
fix paths in templates
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/post_reply.html | 33 | ||||
| -rw-r--r-- | templates/post_thread.html | 42 |
2 files changed, 53 insertions, 22 deletions
diff --git a/templates/post_reply.html b/templates/post_reply.html index 713ddac9..bdac289d 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -93,20 +93,35 @@ ) </span> </p> - <a href="{{ config.uri_img }}{{ post.file }}" target="_blank"{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' %} class="file"{% endif %}> - <img class="post-image" src=" - {% if post.thumb == 'file' %} + <a href=" + {% if post.file|extension == 'webm' %} + {{ config.root }}player.php?v={{ config.uri_img }}{{ post.file }}&t={{ post.filename|e('url') }}&loop=1 + {% 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 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" alt="" /> + {% 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/templates/post_thread.html b/templates/post_thread.html index 113444be..fdf6369a 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -41,20 +41,36 @@ {% endif %} ) </span></p> -<a href="{{ config.uri_img }}{{ post.file }}" target="_blank"{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' %} class="file"{% endif %}> -<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 }} +<a href=" + {% if post.file|extension == 'webm' %} + {{ config.root }}player.php?v={{ config.uri_img }}{{ post.file }}&t={{ post.filename|e('url') }}&loop=1 + {% 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 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" alt="" /></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 }}" /> |
