changeset 160:ff48d544bfdd default tip

gallery: replaced <video> tag by <img> for videos thumbnails
author Goffi <goffi@goffi.org>
date Sun, 23 Sep 2018 16:41:30 +0200
parents d893828f58f0
children
files sat_website/templates/sat_website/gallery.html
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/sat_website/templates/sat_website/gallery.html	Sun Sep 23 16:19:10 2018 +0200
+++ b/sat_website/templates/sat_website/gallery.html	Sun Sep 23 16:41:30 2018 +0200
@@ -36,9 +36,7 @@
             {% for entry in row %}
                 <div class="col-md-4">
                     {% if entry.poster %}
-                        <video index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" poster="{{ entry.poster }}" controls preload="none">
-                            {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}.{% endblocktrans %}
-	                    </video>
+                        <img index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" src="{{ entry.poster }}" >
                     {% else %}
                         <img index="{{ forloop.counter0 }}" class="thumbnail img-responsive" src="{% static entry.path %}">
                     {% endif %}
@@ -80,7 +78,7 @@
                                 {% if entry.poster %}
                                     {% include "sat_website/video.html" with entry=entry style="img-responsive" width=640 height=400 %}
                                 {% else %}
-                                    <img class="img-responsive" src="{% static entry.path %}">                            
+                                    <img class="img-responsive" src="{% static entry.path %}">
                                 {% endif %}
                                 <div class="carousel-caption">
                                     {{ entry.description }}<br/>
@@ -117,11 +115,11 @@
            $('#carousel-{{ name }}-modal img, #carousel-{{ name }}-modal video')[index].play();
         }
     });
-    
+
     // thumbail's video starts playing when clicked, pause it
     $('#carousel-{{ name }} video.thumbnail').each(function(index) {
         $(this).on('play', function(e) { $(this)[0].pause(); });
     });
 
 });
-</script>
\ No newline at end of file
+</script>