tags = self.tags.filter(category__in=('author', 'kind', 'genre', 'epoch'))
tags = split_tags(tags)
- formats = []
+ formats = {}
# files generated during publication
for ebook_format in self.ebook_formats:
if self.has_media(ebook_format):
- formats.append(u'<a href="%s">%s</a>' % (
- self.get_media(ebook_format).url,
- ebook_format.upper()
- ))
+ formats[ebook_format] = self.get_media(ebook_format)
- formats = [mark_safe(format) for format in formats]
short_html = unicode(render_to_string('catalogue/book_short.html',
{'book': self, 'tags': tags, 'formats': formats}))
-moz-box-shadow: 2px 2px 2px #ddd;
-webkit-box-shadow: 2px 2px 2px #ddd;
box-shadow: 2px 2px 2px #ddd;
+ z-index: 2;
}
#themes-list ul {
list-style: none;
.book-box-download {
position: relative;
}
+
+.book-box-download a {
+ position: relative;
+ z-index: 1;
+}
+
.book-box-formats {
display: none;
position: absolute;
+ width: 16.363em;
border: 1px solid #ddd;
- padding: .8em 1em;
+ padding: 3.454em 1.727em .818em 1.727em;
background: #fff;
-moz-box-shadow: 2px 2px 2px #ddd;
-webkit-box-shadow: 2px 2px 2px #ddd;
box-shadow: 2px 2px 2px #ddd;
-
+
+ z-index: 0;
+ top: -1.454em;
+ left: -1.727em;
}
-.book-box-formats a {
+.book-box-formats span {
display: block;
}
+
+
+.book-box-download:hover .book-box-formats:first {
+ margin-top: 1.454em;
+}
+
.book-box-download:hover .book-box-formats {
display: block;
}
.book-box-tools {
font-size: 1.1em;
}
-.book-box-tools a:before {
+.book-box-tools a.downarrow:before {
content: "⇩";
font-family: WL-Nav;
font-size: 2em;
#logo {
position: absolute;
- top: 1.9em;
- margin-left: 1.6em;
+ top: 5.5em;
+ margin-left: 1.5em;
}
#logo a {
#tagline {
display: inline-block;
- margin-left: 24em;
+ margin-left: 25.5em;
}
#tagline span {
font-size: 1.1em;
<ul class="book-box-tools">
<li class="book-box-read">
{% if book.html_file %}
- <a href="{% url book_text book.urlid %}" class="mono">{% trans "Read online" %}</a>
+ <a href="{% url book_text book.urlid %}" class="mono downarrow">{% trans "Read online" %}</a>
{% endif %}
</li>
<li class="book-box-download">
- <a class="mono">{% trans "Download" %}</a>
+ <a class="mono downarrow">{% trans "Download" %}</a>
<div class="book-box-formats mono">
- {{ formats|join:"" }}
+ {% if formats.pdf %}
+ <span><a href="{{formats.pdf.url}}">PDF</a> do wydruku</span>
+ {% endif %}
+ {% if formats.epub %}
+ <span><a href="{{formats.epub.url}}">EPUB</a> na czytnik</span>
+ {% endif %}
+ {% if formats.mobi %}
+ <span><a href="{{formats.mobi.url}}">MOBI</a> na Kindle</span>
+ {% endif %}
+ {% if formats.txt %}
+ <span><a href="{{formats.txt.url}}">TXT</a> do zadań specjalnych</span>
+ {% endif %}
</div>
</li>
<li class="book-box-audiobook">
{% if book.has_mp3_file %}
- <a href="" class="mono">{% trans "Audiobook" %}</a>
+ <a href="" class="mono downarrow">{% trans "Audiobook" %}</a>
{% endif %}
</li>
</ul>