From: Radek Czajka Date: Tue, 27 Dec 2011 12:29:40 +0000 (+0100) Subject: layout changes X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/d628f5cb02cf0e7e69356a1eaf146daa76d50604?ds=sidebyside;hp=-c layout changes --- d628f5cb02cf0e7e69356a1eaf146daa76d50604 diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py index 288a18906..f92ebd38b 100644 --- a/apps/catalogue/models.py +++ b/apps/catalogue/models.py @@ -513,7 +513,7 @@ class Book(models.Model): for ebook_format in self.ebook_formats: if self.has_media(ebook_format): formats.append(u'%s' % ( - "", #self.get_media(ebook_format).url, + self.get_media(ebook_format).url, ebook_format.upper() )) diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index 0ba4476ea..b4a3ec51a 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -263,6 +263,14 @@ def tag_list(tags, choices=None): one_tag = tags[0] return locals() +@register.inclusion_tag('catalogue/inline_tag_list.html') +def inline_tag_list(tags, choices=None): + if choices is None: + choices = [] + if len(tags) == 1: + one_tag = tags[0] + return locals() + @register.inclusion_tag('catalogue/book_info.html') def book_info(book): diff --git a/apps/reporting/templates/reporting/main.html b/apps/reporting/templates/reporting/main.html index c629f105c..3960e79b7 100755 --- a/apps/reporting/templates/reporting/main.html +++ b/apps/reporting/templates/reporting/main.html @@ -14,10 +14,10 @@ - - - + + + {% for mt in media_types %} diff --git a/apps/reporting/templatetags/reporting_stats.py b/apps/reporting/templatetags/reporting_stats.py index dceee0001..6f20c087c 100755 --- a/apps/reporting/templatetags/reporting_stats.py +++ b/apps/reporting/templatetags/reporting_stats.py @@ -49,11 +49,11 @@ def count_books_all(): return Book.objects.all().count() @register_counter -def count_books_nonempty(): +def count_books(): return Book.objects.exclude(html_file='').count() @register_counter -def count_books_empty(): +def count_books_parent(): return Book.objects.filter(html_file='').count() @register_counter diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index e476d13ce..18e8d7573 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -201,6 +201,7 @@ COMPRESS_JS = { 'js/locale.js', 'js/dialogs.js', 'js/sponsors.js', + 'js/base.js', 'js/pdcounter.js', #~ 'js/jquery.autocomplete.js', diff --git a/wolnelektury/static/css/base.css b/wolnelektury/static/css/base.css index 35aed2ea8..f55a39e01 100755 --- a/wolnelektury/static/css/base.css +++ b/wolnelektury/static/css/base.css @@ -18,16 +18,32 @@ html { body { margin: 0; background: #f7f7f7; - font-size: .9em; - line-height: 1.4em; + font-size: .625em; + font-family: Georgia; + /*line-height: 1.4em;*/ } a { - color: #02adb7; + color: #01adba; text-decoration: none; } +h1 { + font-size: 3.5em; + font-weight: normal; + margin-top: .4em +} + +.left-column { + width: 48em; + float: left; +} +.right-column { + float:right; + width: 48em; +} + h2 { margin: 0; font-size: 1em; @@ -35,15 +51,8 @@ h2 { } -.grid-line { - height: 2.6em; - padding-top: 1.4em; - padding-bottom: 0; -} - -.mono, .mono-small { +.mono { font-family: "Lucida Sans Typewriter", courier; - font-size: .9em; } @@ -52,15 +61,88 @@ h2 { } #header-content, div#main-content, div#half-header-content { - width: 75em; + width: 97.5em; margin: auto; } +.page-desc { + margin-left: 1.5em; +} +.inline-tag-lists { + font-size: 1.1em; +} +#themes-list-toggle:after { + padding-left: 1em; + content: "↓"; + font-family: WL-Nav; + vertical-align: middle; +} +#themes-list-wrapper { + position: relative; +} +#themes-list { + position: absolute; + display: none; + border: 1px solid #ddd; + padding: 1em; + background: #fff; + -moz-box-shadow: 2px 2px 2px #ddd; + -webkit-box-shadow: 2px 2px 2px #ddd; + box-shadow: 2px 2px 2px #ddd; +} +#themes-list ul { + list-style: none; + padding: 0; + margin: 0; + font-size: 1.1em; + -moz-column-width: 12em; + width: 48em; +} + + +a.cite { + display: block; + color: black; + background: white; + padding: 3em 2em .1em 8em; +} +.cite-body { + font-size: 1.8em; + line-height: 1.3em; +} +.cite p { + color: #444; + font-size: 1.1em; + margin-top: 1.6em; +} + +.see-also { + margin-left: 8em; + float: left; + width: 14.3em; +} +.download { + margin-left: 2em; + float: left; +} + +.see-also, .download { + margin-top: 2em; + margin-bottom: 2em; +} +.see-also h2, .download h2 { + font-size: 1.1em; +} +.see-also ul, .download ul { + list-style: none; + padding: 0; + margin: 0; + font-size: 1.1em; +} #footer { - font-size: .75em; color: #777; border-top: 1px solid #ddd; margin-top: 2.5em; diff --git a/wolnelektury/static/css/book_box.css b/wolnelektury/static/css/book_box.css index 2faa1a2d8..ca2e72696 100755 --- a/wolnelektury/static/css/book_box.css +++ b/wolnelektury/static/css/book_box.css @@ -6,11 +6,11 @@ .book-box { - width: 37.5em; + width: 48.75em; } .book-mini-box { - width: 12.5em; + width: 16.15em; } .book-mini-box a, .book-box-inner { @@ -18,69 +18,97 @@ color: black; border: 1px solid #ddd; height: 20em; - padding: .75em; + padding: .8em 1em; margin: .1em; background: #fff; -moz-box-shadow: 2px 2px 2px #ddd; -webkit-box-shadow: 2px 2px 2px #ddd; box-shadow: 2px 2px 2px #ddd; - overflow: hidden; } .book-mini-box a { - height: 20em; + height: 27.1em; margin: .1em; + overflow: hidden; } .book-box-inner { - height: 14.4em; + height: 19.75em; margin: .5em; } .book-mini-box img, .book-box img { - width: 10.8em; - height: 14.4em; + width: 13.9em; + height: 19.3em; } .book-mini-box img { - margin-bottom: .3em; + margin-bottom: 1.8em; } .book-box img { float: left; margin-right: 1.5em; } +.book-mini-box .desc { + margin-left:0em; +} .book-mini-box .author { + font-size: 1.1em; color: #777; + display: block; +} +.book-mini-box .title { + font-size: 1.4em; } .book-box-body { - height: 13em; + height: 17em; overflow: hidden; } .book-box-head { min-height: 7em; + margin-top: 1.4em; + margin-bottom: 1em; +} +.book-box-head .author { + font-size: 1.1em; +} +.book-box-head .title { + font-size: 2.4em; + margin-top: .3em; +} +.book-box-body .tags { + font-size: 1.1em; } .book-box-tag { - font-size: .8em; margin-right: .5em; + margin-left: .4em; } .book-box-download { position: relative; } .book-box-formats { display: none; - top: -2em; position: absolute; - height: 2em; - width: 100em; + + border: 1px solid #ddd; + padding: .8em 1em; + background: #fff; + -moz-box-shadow: 2px 2px 2px #ddd; + -webkit-box-shadow: 2px 2px 2px #ddd; + box-shadow: 2px 2px 2px #ddd; + } .book-box-formats a { - margin-right: 1em; + display: block; } .book-box-download:hover .book-box-formats { display: block; } +.book-box-tools { + font-size: 1.1em; +} .book-box-tools a:before { content: "⇩"; font-family: WL-Nav; @@ -89,11 +117,11 @@ vertical-align: middle; } .book-box-read { - width: 10em; + width: 11em; } .book-box-download { - width: 6em; + width: 8em; } .book-box-audiobook { - width: 6em; + width: 8em; } diff --git a/wolnelektury/static/css/header.css b/wolnelektury/static/css/header.css index 9e81463df..79e8815d6 100755 --- a/wolnelektury/static/css/header.css +++ b/wolnelektury/static/css/header.css @@ -11,11 +11,15 @@ #header { + height: 3em; + padding-top: 1.9em; + padding-bottom: 0; color: #969696; background: #191919; } #half-header { + padding-bottom: 0; background: url('/static/img/bg-header.png'); background-position: center; background-size: 100%; @@ -33,43 +37,45 @@ #logo { position: absolute; - top: 4em; + top: 1.9em; + margin-left: 1.6em; } #logo a { font-family: WL-Logo; - font-size: 1.9em; + font-size: 2.05em; color:#f7f7f7; } -#logo img { - max-width: 15em; -} - #tagline { display: inline-block; - margin-left: 16em; + margin-left: 24em; +} +#tagline span { + font-size: 1.1em; } -#search { +#search-area { margin: 0; background: #444; - margin-left: 16em; - width: 59em; + margin-left: 24em; + width: 73.5em; } #search-field { display: inline-block; - width: 50em; - padding-left: .5; - padding-right: .5; - padding: .1em .5em 0 .5em; + width: 63.1em; + padding-left: .5em; + padding-right: .5em; + padding-top: 0; + padding-bottom: 0; } #search-field input { - height: 2.8em; + padding: 0; + height: 3.3em; border: none; - width: 49.5em; + width: 62.6em; font-size: 1em; padding-left: .5em; -webkit-border-radius: .5em; @@ -85,12 +91,11 @@ background: #02adb7; padding: 0; margin: 0; - width: 8em; + width: 9.4em; } #search-button button { font-size: 1em; - /* should match grid-line */ - height: 4em; + height: 4.5em; border: none; background: #02adb7; color: white; @@ -99,20 +104,20 @@ } #search-button button span { + font-size: 1.1em; position:relative; - top: -.2em; } #nav-line { background-color: #e2e2e2; - height: 3.95em; + height: 4.9em; } ul#catalogue { list-style: none; padding: 0; - margin: 0; + margin: 0 0 0 .6em; } ul#catalogue li { background-color: #e2e2e2; @@ -120,17 +125,22 @@ ul#catalogue li { } ul#catalogue a { display: block; - padding-left: 1.5em; - padding-right: 1.5em; + padding-left: 1.4em; + padding-right: 1.4em; /* must match grid-line */ - height: 2.7em; - padding-top: 1.3em; + height: 3.1em; + padding-top: 1.8em; +} +ul#catalogue span { + font-size: 1.1em; } - +#lang-button { + color: #aaa; +} #lang-button:after { - padding-left: .5em; + padding-left: 1em; content: "↓"; font-family: WL-Nav; vertical-align: middle; @@ -139,18 +149,18 @@ ul#catalogue a { position: relative; float: right; display: block; - padding-left: 1.5em; - padding-right: 1.5em; + padding-left: 2.5em; + padding-right: 2em; /* must match grid-line */ - height: 2.7em; - padding-top: 1.3em; + height: 3em; + padding-top: 1.9em; background: #f7f7f7; } #lang-menu-items button { display: none; background: #f7f7f7; - color: #444; + color: #777; cursor: pointer; width: 100%; border: solid #ddd; @@ -173,5 +183,5 @@ ul#catalogue a { } #lang-menu .active { - font-weight: bold; + color: #000; } diff --git a/wolnelektury/static/css/main_page.css b/wolnelektury/static/css/main_page.css index 94401cb51..d2ee5d4ff 100755 --- a/wolnelektury/static/css/main_page.css +++ b/wolnelektury/static/css/main_page.css @@ -1,6 +1,6 @@ #big-cite { background-color: white; - padding: 4em 12em; + padding: 10.75em 10em 8.5em 18.2em; margin: 0; } @@ -11,68 +11,101 @@ #big-cite h2 { margin: 0; + font-size: 1.1em; } #big-cite-text { - margin: .5em 0; - font-size: 1.75em; - line-height: 1.3em; + margin: .05em; + font-size: 2.8em; + line-height: 1.2em; } #big-cite-source { color: #02adb7; margin: 0; + font-size: 1.1em; + margin: 1.1em 0.2em; } #promo-box { float: right; - width: 24em; - /* should match grid-line */ - margin-top: -4em; + width: 32em; + margin-top: -5.1em; } #promo-box-header { - padding-left: 2em; - padding-right: 2em; + padding-top: 2em; + height: 3.1em; + padding-bottom: 0; + padding-left: 2.5em; + padding-right: 2.5em; background: #191919; color: white; } +#promo-box-header h2 { + font-size: 1.1em; + padding-top: .1em; +} #promo-box-body { border-bottom: 2px solid #efefef; - padding: 1.3em 2em; - height: 23em; + padding: 2em 2.8em; + height: 30em; background: #efefef; } #promo-box-title { color: #02ADB7; - height: 2.7em; + height: 2.75em; margin: 0; } +#promo-box-title span { + font-size: 1.1em; +} #promo-box-body p { margin-top: 0; } +#promo-box-content { + font-size: 1.2em; + line-height: 1.55em; + color: #666; +} + +.main-last { + padding-top: 1.9em; + height: 3.2em; + padding-left: 1.9em; +} +.main-last span { + font-size: 1.1em; +} + .infopages-box { - width: 16.75em; + width: 20.6em; display: inline-block; margin: .5em 0 0 0; - padding: 0 1em; + padding: 0 1.7em; vertical-align: top; } .infopages-box h2 { color: #02ADB7; + height: 2.8em; + padding-top: 2.5em; +} +.infopages-box h2 span { + font-size: 1.1em; } .infopages-box a { color: black; } .infopages-box ol, .infopages-box ul { - font-size: .8em; + font-size: 1.1em; list-style: none; padding: 0; margin: 0; + line-height: 1.45em; } .social-links { diff --git a/wolnelektury/static/js/base.js b/wolnelektury/static/js/base.js new file mode 100755 index 000000000..b5693830b --- /dev/null +++ b/wolnelektury/static/js/base.js @@ -0,0 +1,13 @@ +(function($) { + $(function() { + + +$('#themes-list-toggle').click(function(event) { + event.preventDefault(); + $('#themes-list').toggle('slow'); +}); + + + }); +})(jQuery) + diff --git a/wolnelektury/templates/base.html b/wolnelektury/templates/base.html index 534f5cfc1..4409486ed 100644 --- a/wolnelektury/templates/base.html +++ b/wolnelektury/templates/base.html @@ -2,6 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> {% load i18n compressed catalogue_tags sponsor_tags %} + {% load reporting_stats %} @@ -20,7 +21,7 @@ {% block bodycontent %} -
Utwory
Wszystkie utwory:{% count_books_all %}
Utwory z własną treścią:{% count_books_nonempty %}
Utwory bez własnej treści:{% count_books_empty %}
Utwory:{% count_books %}
Niezależne książki:{% count_books_root %}
Utwory nadrzędne:{% count_books_parent %}
Wszystkie utwory:{% count_books_all %}
MediaLiczbaRozmiarDo wymiany