fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9fbf0c4
)
some css tweaks to download popup and logo/tagline shifted right a bit
author
Marcin Koziej
<marcin.koziej@nowoczesnapolska.org.pl>
Wed, 28 Dec 2011 15:55:55 +0000
(16:55 +0100)
committer
Marcin Koziej
<marcin.koziej@nowoczesnapolska.org.pl>
Wed, 28 Dec 2011 15:55:55 +0000
(16:55 +0100)
apps/catalogue/models.py
patch
|
blob
|
history
wolnelektury/static/css/base.css
patch
|
blob
|
history
wolnelektury/static/css/book_box.css
patch
|
blob
|
history
wolnelektury/static/css/header.css
patch
|
blob
|
history
wolnelektury/templates/catalogue/book_short.html
patch
|
blob
|
history
diff --git
a/apps/catalogue/models.py
b/apps/catalogue/models.py
index
2effb3b
..
e4cd8c4
100644
(file)
--- a/
apps/catalogue/models.py
+++ b/
apps/catalogue/models.py
@@
-510,16
+510,12
@@
class Book(models.Model):
tags = self.tags.filter(category__in=('author', 'kind', 'genre', 'epoch'))
tags = split_tags(tags)
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):
# 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}))
short_html = unicode(render_to_string('catalogue/book_short.html',
{'book': self, 'tags': tags, 'formats': formats}))
diff --git
a/wolnelektury/static/css/base.css
b/wolnelektury/static/css/base.css
index
f55a39e
..
dd686c7
100755
(executable)
--- a/
wolnelektury/static/css/base.css
+++ b/
wolnelektury/static/css/base.css
@@
-90,6
+90,7
@@
h2 {
-moz-box-shadow: 2px 2px 2px #ddd;
-webkit-box-shadow: 2px 2px 2px #ddd;
box-shadow: 2px 2px 2px #ddd;
-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;
}
#themes-list ul {
list-style: none;
diff --git
a/wolnelektury/static/css/book_box.css
b/wolnelektury/static/css/book_box.css
index
ca2e726
..
b517502
100755
(executable)
--- a/
wolnelektury/static/css/book_box.css
+++ b/
wolnelektury/static/css/book_box.css
@@
-87,21
+87,37
@@
.book-box-download {
position: relative;
}
.book-box-download {
position: relative;
}
+
+.book-box-download a {
+ position: relative;
+ z-index: 1;
+}
+
.book-box-formats {
display: none;
position: absolute;
.book-box-formats {
display: none;
position: absolute;
+ width: 16.363em;
border: 1px solid #ddd;
border: 1px solid #ddd;
- padding:
.8em 1
em;
+ padding:
3.454em 1.727em .818em 1.727
em;
background: #fff;
-moz-box-shadow: 2px 2px 2px #ddd;
-webkit-box-shadow: 2px 2px 2px #ddd;
box-shadow: 2px 2px 2px #ddd;
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;
}
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-download:hover .book-box-formats {
display: block;
}
@@
-109,7
+125,7
@@
.book-box-tools {
font-size: 1.1em;
}
.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;
content: "⇩";
font-family: WL-Nav;
font-size: 2em;
diff --git
a/wolnelektury/static/css/header.css
b/wolnelektury/static/css/header.css
index
79e8815
..
8615d8b
100755
(executable)
--- a/
wolnelektury/static/css/header.css
+++ b/
wolnelektury/static/css/header.css
@@
-37,8
+37,8
@@
#logo {
position: absolute;
#logo {
position: absolute;
- top:
1.9
em;
- margin-left: 1.
6
em;
+ top:
5.5
em;
+ margin-left: 1.
5
em;
}
#logo a {
}
#logo a {
@@
-49,7
+49,7
@@
#tagline {
display: inline-block;
#tagline {
display: inline-block;
- margin-left: 2
4
em;
+ margin-left: 2
5.5
em;
}
#tagline span {
font-size: 1.1em;
}
#tagline span {
font-size: 1.1em;
diff --git
a/wolnelektury/templates/catalogue/book_short.html
b/wolnelektury/templates/catalogue/book_short.html
index
c80efff
..
8ac23a3
100644
(file)
--- a/
wolnelektury/templates/catalogue/book_short.html
+++ b/
wolnelektury/templates/catalogue/book_short.html
@@
-49,18
+49,29
@@
<ul class="book-box-tools">
<li class="book-box-read">
{% if book.html_file %}
<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">
{% 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">
<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 %}
</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>
{% endif %}
</li>
</ul>