Mercurial > sat_legacy_website
diff templates/sat_website/gallery.html @ 89:4b4a5d7602f8
rename screenshots to media, since not only screenshots but also videos are listed
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 16 Jun 2015 12:35:32 +0200 |
parents | 45770a652636 |
children | 5de2a3dd4e67 |
line wrap: on
line diff
--- a/templates/sat_website/gallery.html Mon Jun 15 21:06:38 2015 +0200 +++ b/templates/sat_website/gallery.html Tue Jun 16 12:35:32 2015 +0200 @@ -23,31 +23,31 @@ {% load utils %} <div id="carousel-{{ name }}" class="carousel slide my-carousel" data-ride="carousel" data-interval="0"> - {% if screenshots|length > 9 %} + {% if media|length > 9 %} <ol class="carousel-indicators"> - {% for row in screenshots|buffer:9 %} + {% for row in media|buffer:9 %} <li data-target="#carousel-{{ name }}" data-slide-to="{{ forloop.counter0 }}"{% if not forloop.counter0 %} class="active"{% endif %}></li> {% endfor %} </ol> {% endif %} <div class="carousel-inner" role="listbox"> - {% for row in screenshots|buffer:9 %} + {% for row in media|buffer:9 %} <div class="item{% if not forloop.counter0 %} active{% endif %}"> - {% for screenshot in row %} + {% for entry in row %} <div class="col-md-4"> - {% if screenshot.poster %} - <video index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" poster="{{ screenshot.poster }}" controls preload="none"> - <source src="{{ screenshot.path }}" type='video/webm; codecs="vp8.0, vorbis"'> + {% if entry.poster %} + <video index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" poster="{{ entry.poster }}" controls preload="none"> + <source src="{{ entry.path }}" type='video/webm; codecs="vp8.0, vorbis"'> {% 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> {% else %} - <img index="{{ forloop.counter0 }}" class="thumbnail img-responsive" src="{% static screenshot.path %}"> + <img index="{{ forloop.counter0 }}" class="thumbnail img-responsive" src="{% static entry.path %}"> {% endif %} </div> {% endfor %} </div> {% endfor %} - {% if screenshots|length > 9 %} + {% if media|length > 9 %} <a class="left carousel-control" href="#carousel-{{ name }}" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> @@ -68,32 +68,32 @@ </div> <div class="modal-body"> <div id="carousel-{{ name }}-modal" class="carousel slide my-carousel-modal" data-ride="carousel" data-interval="0"> - {% if screenshots|length > 1 %} + {% if media|length > 1 %} <ol class="carousel-indicators"> - {% for screenshot in screenshots %} + {% for entry in media %} <li data-target="#carousel-{{ name }}-modal" data-slide-to="{{ forloop.counter0 }}"{% if not forloop.counter0 %} class="active"{% endif %}></li> {% endfor %} </ol> {% endif %} <div class="carousel-inner" role="listbox"> - {% for screenshot in screenshots %} + {% for entry in media %} <div class="item{% if not forloop.counter0 %} active{% endif %}"> - {% if screenshot.poster %} - <video class="img-responsive" width="640" height="400" poster="{{ screenshot.poster }}" controls preload="none"> - <source src="{{ screenshot.path }}" type='video/webm; codecs="vp8.0, vorbis"'> + {% if entry.poster %} + <video class="img-responsive" width="640" height="400" poster="{{ entry.poster }}" controls preload="none"> + <source src="{{ entry.path }}" type='video/webm; codecs="vp8.0, vorbis"'> {% 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> {% else %} - <img class="img-responsive" src="{% static screenshot.path %}"> + <img class="img-responsive" src="{% static entry.path %}"> {% endif %} <div class="carousel-caption"> - {{ screenshot.description }}<br/> - {{ screenshot.data|metadata }} + {{ entry.description }}<br/> + {{ entry.data|metadata }} </div> </div> {% endfor %} </div> - {% if screenshots|length > 1 %} + {% if media|length > 1 %} <a class="left carousel-control" href="#carousel-{{ name }}-modal" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span>