Merge branch 'reflow'
[wolnelektury.git] / src / picture / templates / picture / picture_viewer.html
1 {% extends "catalogue/viewer_base.html" %}
2 {% load i18n %}
3 {% load static from staticfiles %}
4 {% load catalogue_tags %}
5 {% load thumbnail %}
6 {% load ssi_include from ssify %}
7
8
9 {% block title %}{{ picture.pretty_title }}{% endblock %}
10
11
12 {% block body-id %}picture-viewer{% endblock %}
13
14
15 {% block js-dependencies %}
16     <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
17 {% endblock %}
18
19
20 {% block no-menu-extra %}
21 <li><a class="square button plus inactive" href="#">+<!--&#x2795;--><!-- heavy plus sign --></a></li><li><a class="square button minus inactive" href="#">-<!-- &#x2796;--><!-- heavy minus sign --></a></li>
22 {% endblock %}
23
24
25 {% block menu %}
26 <li><a style="width: 50%;display: inline-block;" class="square button plus inactive" href="#">+<!--&#x2795;--><!-- heavy plus sign --></a><a style="width: 50%;display: inline-block;" class="square button minus inactive" href="#">-<!-- &#x2796;--><!-- heavy minus sign --></a></li>
27
28 {% spaceless %}
29 <li>
30     {% with picture.get_previous as prev %}
31         <a style="width: 50%;display: inline-block;" {% if prev %}href="{% url 'picture_viewer' prev.slug %}"{% endif %}>{% if prev %}&lt;{%endif %}</a>
32     {% endwith %}
33     {% with picture.get_next as next %}
34         <a style="width: 50%;display: inline-block;" {% if next %}href="{% url 'picture_viewer' next.slug %}"{% endif %}>{% if next %}&gt;{% endif %}</a>
35     {% endwith %}
36 </li>
37 {% endspaceless %}
38
39
40 <li><a href="{{ picture.get_absolute_url }}" id="menu-book" data-box="book-short">
41     <img src="{% thumbnail picture.image_file '80x200' as thumb %}{{ thumb.url }}{% empty %}{{ picture.image_file.url }}{% endthumbnail %}"
42         width="80"
43         alt="{{ picture.pretty_title }}"
44         title="{{ picture.pretty_title }}">
45 </a></li>
46
47
48 <li><a href="#picture-objects" class="dropdown"><span class="label">{% trans "Objects" %}</span></a></li>
49 <li><a href="#picture-themes" class="dropdown"><span class="label">{% trans "Themes" %}</span></a></li>
50
51
52 <li id="menu-info"><a href="#info" data-box="info">
53     <span class="label">{% trans "Infobox" %}</span>
54 </a></li>
55
56 <li id="sponsors">
57     {% for sponsor in sponsors %}
58         {% thumbnail sponsor.logo "80x200" as logo %}
59             <a href="{{ sponsor.url }}" target="_blank"><img src="{{ logo.url }}" alt="{{ sponsor.name }}" /></a>
60         {% endthumbnail %}
61     {% endfor %}
62 </li>
63
64 {% endblock %}
65
66 {% block main %}
67         <div id="picture-view">
68           {% thumbnail picture.image_file "700x500" as pic %}
69           <div class="picture-wrap {% if picture.image_file|is_portrait %}portrait{% endif %}"
70                data-original-width="{{picture.width}}" data-original-height="{{picture.height}}"
71            data-original-url="{{ picture.image_file.url }}"
72                data-width="{{pic.width}}" data-height="{{pic.height}}" style="background-image: url('{{pic.url}}');  width: {{pic.width}}px; height: {{pic.height}}px;">
73           </div>
74           {% endthumbnail %}
75         </div>
76 {% endblock %}
77
78
79 {% block footer %}
80 {{ picture.html_file.read|safe }}
81
82 <div id="info" class="box">
83           <div class="sponsors">
84             <a href="/"><img src="{% static "img/logo-220.png" %}" alt="Wolne Lektury" ></img>
85             </a>
86         {% for sponsor in sponsors %}
87             {% thumbnail sponsor.logo "220x220" as logo %}
88                 <a href="{{ sponsor.url }}" target="_blank"><img src="{{ logo.url }}" alt="{{ sponsor.name }}" /></a>
89             {% endthumbnail %}
90         {% endfor %}
91           </div>
92
93     {% book_info picture %}
94 </div>
95
96 <div class="box Picture-item" id="book-short">
97     {% ssi_include 'picture_short' pk=picture.pk %}
98 </div>
99
100 {% endblock %}