Merge branch 'django-1.5'
[wolnelektury.git] / apps / wolnelektury_core / templates / main_page.html
1 {% extends "base.html" %}
2 {% load static from staticfiles %}
3 {% load cache chunks i18n catalogue_tags infopages_tags social_tags %}
4
5
6 {% block title %}{% trans "Wolne Lektury internet library" %}{% endblock %}
7 {% block ogtitle %}{% trans "Wolne Lektury internet library" %}{% endblock %}
8
9 {% block body %}
10     <div id="big-cite"{% if cite.image %}
11         style="
12             background-image: url('{{ cite.image.url }}');
13             background-position: 50% {{ cite.image_shift|default_if_none:50 }}%;
14         "{% endif %} >
15         {% render_cite cite %}
16     </div>
17
18     {% spaceless %}
19
20
21     <div id="promo-box">
22                 <div id="promo-box-header"><h2 class="mono">
23                         {% trans "What's new?" %}
24                 </h2></div>
25                 <div id="promo-box-body">
26                 {% chunk "promo" %}
27         </div>
28     </div>
29
30
31     <h2 class="main-last"><span class="mono">{% trans "Recent publications" %}</span></h2>
32         {% cache 60 last-published-on-main %}
33             {% for book in last_published %}
34                 {% book_mini book %}
35             {% endfor %}
36         {% endcache %}
37
38     <div class="clearboth"></div>
39
40     <div class="infopages-box">
41         <h2><span class='mono'>{% trans "News" %}</span></h2>
42         {# 135 is the id of new publications category of our master blog. perhaps this URL should go to settings. #}
43         {% cache 1800 latest-blog-posts %}
44             {% latest_blog_posts "http://nowoczesnapolska.org.pl/feed/?cat=-135" %}
45         {% endcache %}
46     </div>
47
48
49     <div class="infopages-box">
50         <h2><span class='mono'>{% trans "Utilities" %}</span></h2>
51
52         <ul>
53             <li><a href="{% url 'suggest' %}" id="suggest" class="ajaxable">{% trans "Report a bug or suggestion" %}</a></li>
54             <!--li><a href="http://turniej.wolnelektury.pl">Turniej Elektrybałtów</a></li-->
55             <li><a href="{% url 'reporting_catalogue_pdf' %}">
56                         {% trans "Download the catalogue in PDF format." %}
57                 </a></li>
58             <!--li><a href="{% url 'infopage' "widget" %}">{% trans "Widget" %}</a></li-->
59             <li><a href="{% url 'suggest_publishing' %}" id="suggest-publishing" class="ajaxable">{% trans "Missing a book?" %}</a></li>
60             <li><a href="{% url 'publish_plan' %}">{% trans "Publishing plan" %}</a></li>
61             <li><a href="{% url 'api' %}">API</a></li>
62             <li><a href="{% url 'oaipmh' %}">OAI-PMH</a></li>
63             <li><a href="{% url 'lesmianator' %}" lang="pl">Leśmianator</a></li>
64             <li><a href="http://polski.wolnelektury.pl" lang="pl">Materiały do nauki j. polskiego</a></li>
65             
66         </ul>
67     </div>
68
69
70     <div class="infopages-box">
71         <h2><span class='mono'>{% trans "Information" %}</span></h2>
72         <ul>
73             <li><a href="http://nowoczesnapolska.org.pl/prywatnosc/">{% trans "Privacy policy" %}</a></li>
74         {% cache 60 infopages-on-main LANGUAGE_CODE %}
75             {% infopages_on_main %}
76         {% endcache %}
77         </ul>
78
79         <div class="social-links">
80             <a href="http://pl-pl.facebook.com/pages/Wolne-Lektury/203084073268"
81                 title='Wolne Lektury @ Facebook'>
82                 <img src="{% static "img/social/f.png" %}" alt="Wolne Lektury @ Facebook" />
83             </a>
84             <a href="http://nk.pl/profile/30441509"
85                 title='Wolne Lektury @ NK'>
86                 <img src="{% static "img/social/nk.png" %}" alt="Wolne Lektury @ NK.pl" />
87             </a>
88         </div>
89     </div>
90
91
92     {% endspaceless %}
93
94 {% endblock %}
95
96
97 {% block add_footer %}
98 <p>{% trans "Image used:" %} 
99 {% if cite.image %}
100     {% if cite.image_link %}<a href="{{ cite.image_link }}">{% endif %}
101     {% if cite.image_title %}
102         {{ cite.image_title }}{% else %}
103         untitled{% endif %}{% if cite.image_link %}</a>{% endif %},
104     {% if cite.image_author %}{{ cite.image_author }},{% endif %}
105     {% if cite.image_license_link %}<a href="{{ cite.image_license_link }}">{% endif %}
106     {{ cite.image_license }}
107     {% if cite.image_license_link %}</a>{% endif %}
108 {% else %}
109     <a href="http://www.flickr.com/photos/lou/430980641/">books about architecture</a>,
110     saikofish@Flickr,
111     <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">CC BY NC SA</a>.
112 {% endif %}
113 </p>
114 {% endblock %}