Mercurial > sat_legacy_website
comparison 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 |
comparison
equal
deleted
inserted
replaced
88:f91363b1048c | 89:4b4a5d7602f8 |
---|---|
21 {% load i18n %} | 21 {% load i18n %} |
22 {% load staticfiles %} | 22 {% load staticfiles %} |
23 {% load utils %} | 23 {% load utils %} |
24 | 24 |
25 <div id="carousel-{{ name }}" class="carousel slide my-carousel" data-ride="carousel" data-interval="0"> | 25 <div id="carousel-{{ name }}" class="carousel slide my-carousel" data-ride="carousel" data-interval="0"> |
26 {% if screenshots|length > 9 %} | 26 {% if media|length > 9 %} |
27 <ol class="carousel-indicators"> | 27 <ol class="carousel-indicators"> |
28 {% for row in screenshots|buffer:9 %} | 28 {% for row in media|buffer:9 %} |
29 <li data-target="#carousel-{{ name }}" data-slide-to="{{ forloop.counter0 }}"{% if not forloop.counter0 %} class="active"{% endif %}></li> | 29 <li data-target="#carousel-{{ name }}" data-slide-to="{{ forloop.counter0 }}"{% if not forloop.counter0 %} class="active"{% endif %}></li> |
30 {% endfor %} | 30 {% endfor %} |
31 </ol> | 31 </ol> |
32 {% endif %} | 32 {% endif %} |
33 <div class="carousel-inner" role="listbox"> | 33 <div class="carousel-inner" role="listbox"> |
34 {% for row in screenshots|buffer:9 %} | 34 {% for row in media|buffer:9 %} |
35 <div class="item{% if not forloop.counter0 %} active{% endif %}"> | 35 <div class="item{% if not forloop.counter0 %} active{% endif %}"> |
36 {% for screenshot in row %} | 36 {% for entry in row %} |
37 <div class="col-md-4"> | 37 <div class="col-md-4"> |
38 {% if screenshot.poster %} | 38 {% if entry.poster %} |
39 <video index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" poster="{{ screenshot.poster }}" controls preload="none"> | 39 <video index="{{ forloop.counter0 }}" class="thumbnail img-responsive" width="640" height="400" poster="{{ entry.poster }}" controls preload="none"> |
40 <source src="{{ screenshot.path }}" type='video/webm; codecs="vp8.0, vorbis"'> | 40 <source src="{{ entry.path }}" type='video/webm; codecs="vp8.0, vorbis"'> |
41 {% 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 %} | 41 {% 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 %} |
42 </video> | 42 </video> |
43 {% else %} | 43 {% else %} |
44 <img index="{{ forloop.counter0 }}" class="thumbnail img-responsive" src="{% static screenshot.path %}"> | 44 <img index="{{ forloop.counter0 }}" class="thumbnail img-responsive" src="{% static entry.path %}"> |
45 {% endif %} | 45 {% endif %} |
46 </div> | 46 </div> |
47 {% endfor %} | 47 {% endfor %} |
48 </div> | 48 </div> |
49 {% endfor %} | 49 {% endfor %} |
50 {% if screenshots|length > 9 %} | 50 {% if media|length > 9 %} |
51 <a class="left carousel-control" href="#carousel-{{ name }}" role="button" data-slide="prev"> | 51 <a class="left carousel-control" href="#carousel-{{ name }}" role="button" data-slide="prev"> |
52 <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> | 52 <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> |
53 <span class="sr-only">Previous</span> | 53 <span class="sr-only">Previous</span> |
54 </a> | 54 </a> |
55 <a class="right carousel-control" href="#carousel-{{ name }}" role="button" data-slide="next"> | 55 <a class="right carousel-control" href="#carousel-{{ name }}" role="button" data-slide="next"> |
66 <div class="modal-header"> | 66 <div class="modal-header"> |
67 <button class="close" type="button" data-dismiss="modal">×</button> | 67 <button class="close" type="button" data-dismiss="modal">×</button> |
68 </div> | 68 </div> |
69 <div class="modal-body"> | 69 <div class="modal-body"> |
70 <div id="carousel-{{ name }}-modal" class="carousel slide my-carousel-modal" data-ride="carousel" data-interval="0"> | 70 <div id="carousel-{{ name }}-modal" class="carousel slide my-carousel-modal" data-ride="carousel" data-interval="0"> |
71 {% if screenshots|length > 1 %} | 71 {% if media|length > 1 %} |
72 <ol class="carousel-indicators"> | 72 <ol class="carousel-indicators"> |
73 {% for screenshot in screenshots %} | 73 {% for entry in media %} |
74 <li data-target="#carousel-{{ name }}-modal" data-slide-to="{{ forloop.counter0 }}"{% if not forloop.counter0 %} class="active"{% endif %}></li> | 74 <li data-target="#carousel-{{ name }}-modal" data-slide-to="{{ forloop.counter0 }}"{% if not forloop.counter0 %} class="active"{% endif %}></li> |
75 {% endfor %} | 75 {% endfor %} |
76 </ol> | 76 </ol> |
77 {% endif %} | 77 {% endif %} |
78 <div class="carousel-inner" role="listbox"> | 78 <div class="carousel-inner" role="listbox"> |
79 {% for screenshot in screenshots %} | 79 {% for entry in media %} |
80 <div class="item{% if not forloop.counter0 %} active{% endif %}"> | 80 <div class="item{% if not forloop.counter0 %} active{% endif %}"> |
81 {% if screenshot.poster %} | 81 {% if entry.poster %} |
82 <video class="img-responsive" width="640" height="400" poster="{{ screenshot.poster }}" controls preload="none"> | 82 <video class="img-responsive" width="640" height="400" poster="{{ entry.poster }}" controls preload="none"> |
83 <source src="{{ screenshot.path }}" type='video/webm; codecs="vp8.0, vorbis"'> | 83 <source src="{{ entry.path }}" type='video/webm; codecs="vp8.0, vorbis"'> |
84 {% 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 %} | 84 {% 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 %} |
85 </video> | 85 </video> |
86 {% else %} | 86 {% else %} |
87 <img class="img-responsive" src="{% static screenshot.path %}"> | 87 <img class="img-responsive" src="{% static entry.path %}"> |
88 {% endif %} | 88 {% endif %} |
89 <div class="carousel-caption"> | 89 <div class="carousel-caption"> |
90 {{ screenshot.description }}<br/> | 90 {{ entry.description }}<br/> |
91 {{ screenshot.data|metadata }} | 91 {{ entry.data|metadata }} |
92 </div> | 92 </div> |
93 </div> | 93 </div> |
94 {% endfor %} | 94 {% endfor %} |
95 </div> | 95 </div> |
96 {% if screenshots|length > 1 %} | 96 {% if media|length > 1 %} |
97 <a class="left carousel-control" href="#carousel-{{ name }}-modal" data-slide="prev"> | 97 <a class="left carousel-control" href="#carousel-{{ name }}-modal" data-slide="prev"> |
98 <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> | 98 <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> |
99 <span class="sr-only">Previous</span> | 99 <span class="sr-only">Previous</span> |
100 </a> | 100 </a> |
101 <a class="right carousel-control" href="#carousel-{{ name }}-modal" data-slide="next"> | 101 <a class="right carousel-control" href="#carousel-{{ name }}-modal" data-slide="next"> |