From: Marcin Koziej Date: Wed, 28 Dec 2011 15:55:55 +0000 (+0100) Subject: some css tweaks to download popup and logo/tagline shifted right a bit X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/77baf8640ab29684909b9f57cd9d4999dad2071f some css tweaks to download popup and logo/tagline shifted right a bit --- diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 2effb3bc7..e4cd8c40e 100644 --- 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) - formats = [] + formats = {} # files generated during publication for ebook_format in self.ebook_formats: if self.has_media(ebook_format): - formats.append(u'%s' % ( - 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})) diff --git a/wolnelektury/static/css/base.css b/wolnelektury/static/css/base.css index f55a39e01..dd686c792 100755 --- 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; + z-index: 2; } #themes-list ul { list-style: none; diff --git a/wolnelektury/static/css/book_box.css b/wolnelektury/static/css/book_box.css index ca2e72696..b51750287 100755 --- 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 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; } @@ -109,7 +125,7 @@ .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; diff --git a/wolnelektury/static/css/header.css b/wolnelektury/static/css/header.css index 79e8815d6..8615d8b59 100755 --- a/wolnelektury/static/css/header.css +++ b/wolnelektury/static/css/header.css @@ -37,8 +37,8 @@ #logo { position: absolute; - top: 1.9em; - margin-left: 1.6em; + top: 5.5em; + margin-left: 1.5em; } #logo a { @@ -49,7 +49,7 @@ #tagline { display: inline-block; - margin-left: 24em; + margin-left: 25.5em; } #tagline span { font-size: 1.1em; diff --git a/wolnelektury/templates/catalogue/book_short.html b/wolnelektury/templates/catalogue/book_short.html index c80efff91..8ac23a3a6 100644 --- a/wolnelektury/templates/catalogue/book_short.html +++ b/wolnelektury/templates/catalogue/book_short.html @@ -49,18 +49,29 @@