From: Radek Czajka Date: Wed, 29 Feb 2012 11:38:05 +0000 (+0100) Subject: prettier player window, X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/24e09bc235b3ff6e659e901dfbdbcc23e6e14ba7 prettier player window, minor display fixes --- diff --git a/apps/catalogue/templatetags/catalogue_tags.py b/apps/catalogue/templatetags/catalogue_tags.py index e2aac35c7..14ed64da8 100644 --- a/apps/catalogue/templatetags/catalogue_tags.py +++ b/apps/catalogue/templatetags/catalogue_tags.py @@ -148,6 +148,17 @@ def book_tree(book_list, books_by_parent): else: return '' +@register.simple_tag +def audiobook_tree(book_list, books_by_parent): + text = "".join("
  • %s%s
  • " % ( + reverse("book_player", args=[book.slug]), book.title, audiobook_tree(books_by_parent.get(book, ()), books_by_parent) + ) for book in book_list) + + if text: + return "
      %s
    " % text + else: + return '' + @register.simple_tag def book_tree_texml(book_list, books_by_parent, depth=1): return "".join(""" diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 6405a49a9..fad77751e 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -246,10 +246,11 @@ def player(request, slug): else: have_oggs = False audiobooks.append(media) - print audiobooks projects = sorted(projects) + extra_info = book.get_extra_info_value() + return render_to_response('catalogue/player.html', locals(), context_instance=RequestContext(request)) diff --git a/lib/librarian b/lib/librarian index 361fd53b4..6badff080 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit 361fd53b42fae8bafe8fd680a0c697757aa19cf3 +Subproject commit 6badff0808ac498cca8f405d047316940aac8a03 diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index 54359513e..ac80dafff 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -221,6 +221,7 @@ COMPRESS_CSS = { 'player': { 'source_filenames': [ 'jplayer/jplayer.blue.monday.css', + 'css/player.css', ], 'output_filename': 'css/player.min?.css', }, diff --git a/wolnelektury/static/css/catalogue.css b/wolnelektury/static/css/catalogue.css index c23547b44..74338f877 100755 --- a/wolnelektury/static/css/catalogue.css +++ b/wolnelektury/static/css/catalogue.css @@ -123,7 +123,7 @@ margin: 0; } .inline-body li { - display: inline; + display: inline-block; margin-right: 1em; } diff --git a/wolnelektury/static/css/header.css b/wolnelektury/static/css/header.css index cdb74f84d..ef47897e3 100755 --- a/wolnelektury/static/css/header.css +++ b/wolnelektury/static/css/header.css @@ -41,6 +41,7 @@ #logo a { color:#f7f7f7; font-size: 2.05em; + text-shadow: 0 0 10px #17CFDB; } #tagline { diff --git a/wolnelektury/static/css/main_page.css b/wolnelektury/static/css/main_page.css index e52a28341..bc8e68fda 100755 --- a/wolnelektury/static/css/main_page.css +++ b/wolnelektury/static/css/main_page.css @@ -80,6 +80,9 @@ line-height: 1.45em; } +.infopages-box li { + margin-bottom: .25em; +} .infopages-box .social-links { margin-top: 1em; diff --git a/wolnelektury/static/css/player.css b/wolnelektury/static/css/player.css new file mode 100644 index 000000000..c449803e5 --- /dev/null +++ b/wolnelektury/static/css/player.css @@ -0,0 +1,17 @@ +#player h1 { + font-size: 2em; + margin: .5em; +} + +.player-info { + margin: 1em; +} + + +.play { + cursor: pointer; +} + +.play:hover { + color: #0D7E85; +} diff --git a/wolnelektury/static/img/logo-220.png b/wolnelektury/static/img/logo-220.png new file mode 100644 index 000000000..9b15e88a3 Binary files /dev/null and b/wolnelektury/static/img/logo-220.png differ diff --git a/wolnelektury/static/jplayer/jplayer.blue.monday.css b/wolnelektury/static/jplayer/jplayer.blue.monday.css index 3cef6fa0a..f8b314b6e 100644 --- a/wolnelektury/static/jplayer/jplayer.blue.monday.css +++ b/wolnelektury/static/jplayer/jplayer.blue.monday.css @@ -379,7 +379,7 @@ div.jp-playlist ul { list-style-type:none; margin:0; padding:0 20px; - font-size:.72em; + font-size:.8em; } div.jp-title li { @@ -411,10 +411,10 @@ div.jp-type-playlist div.jp-playlist a { text-decoration: none; } div.jp-type-playlist div.jp-playlist a:hover { - color:#0d88c1; + color:#0D7E85; } div.jp-type-playlist div.jp-playlist a.jp-playlist-current { - color:#0d88c1; + color:#0D7E85; } div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove { @@ -426,7 +426,7 @@ div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove { color:#666; } div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover { - color:#0d88c1; + color:#0D7E85; } div.jp-type-playlist div.jp-playlist span.jp-free-media { float:right; @@ -438,7 +438,7 @@ div.jp-type-playlist div.jp-playlist span.jp-free-media a{ color:#565656; } div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{ - color:#0d88c1; + color:#0D7E85; } span.jp-artist { font-size:.8em; diff --git a/wolnelektury/static/js/base.js b/wolnelektury/static/js/base.js index 7c02f030a..33026ac04 100755 --- a/wolnelektury/static/js/base.js +++ b/wolnelektury/static/js/base.js @@ -101,7 +101,7 @@ $('.open-player').click(function(event) { event.preventDefault(); window.open($(this).attr('href'), 'player', - 'width=420, height=500' + 'width=422, height=500' ); }); diff --git a/wolnelektury/templates/catalogue/audiobook_list.html b/wolnelektury/templates/catalogue/audiobook_list.html index d794cd938..427f89934 100644 --- a/wolnelektury/templates/catalogue/audiobook_list.html +++ b/wolnelektury/templates/catalogue/audiobook_list.html @@ -1,5 +1,6 @@ {% extends "catalogue/book_list.html" %} {% load i18n %} +{% load catalogue_tags %} {% block bodyid %}book-a-list{% endblock %} @@ -19,3 +20,17 @@ Możecie z niej korzystać bezpłatnie i bez ograniczeń. Audiobooki nagrywają znani aktorzy, wśród nich Danuta Stenka i Jan Peszek.{% endblocktrans %}

    {% endblock %} + + +{% block book_list %} + {% audiobook_tree orphans books_by_parent %} + {% for author, group in books_by_author.items %} + {% if group %} + +
    +

    {{ author }}

    + {% audiobook_tree group books_by_parent %} +
    + {% endif %} + {% endfor %} +{% endblock %} diff --git a/wolnelektury/templates/catalogue/book_list.html b/wolnelektury/templates/catalogue/book_list.html index 318f1b446..a32f60f01 100644 --- a/wolnelektury/templates/catalogue/book_list.html +++ b/wolnelektury/templates/catalogue/book_list.html @@ -15,7 +15,7 @@
    - +
    {% trans "Table of Content" %} @@ -35,7 +35,7 @@ {% book_tree orphans books_by_parent %} {% for author, group in books_by_author.items %} {% if group %} - +

    {{ author }}

    {% book_tree group books_by_parent %} diff --git a/wolnelektury/templates/catalogue/book_text.html b/wolnelektury/templates/catalogue/book_text.html index 6754ac6d5..cef76f8b5 100644 --- a/wolnelektury/templates/catalogue/book_text.html +++ b/wolnelektury/templates/catalogue/book_text.html @@ -47,9 +47,7 @@
      diff --git a/wolnelektury/templates/catalogue/menu.html b/wolnelektury/templates/catalogue/menu.html index 99d85157e..1a90b5c4a 100644 --- a/wolnelektury/templates/catalogue/menu.html +++ b/wolnelektury/templates/catalogue/menu.html @@ -5,27 +5,27 @@ {% endfor %} @@ -74,22 +106,6 @@
    -

    {% trans "Download as" %}: - MP3{% if have_oggs %}, - Ogg Vorbis{% endif %}. -

    - - - {% if book.has_daisy_file %} -

    DAISY:

    - - {% endif %} - - {% if projects|length > 1 %}

    {% trans "Audiobooks were prepared as a part of the projects:" %}