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