else:
return ''
+@register.simple_tag
+def audiobook_tree(book_list, books_by_parent):
+ text = "".join("<li><a class='open-player' href='%s'>%s</a>%s</li>" % (
+ 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 "<ol>%s</ol>" % text
+ else:
+ return ''
+
@register.simple_tag
def book_tree_texml(book_list, books_by_parent, depth=1):
return "".join("""
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))
-Subproject commit 361fd53b42fae8bafe8fd680a0c697757aa19cf3
+Subproject commit 6badff0808ac498cca8f405d047316940aac8a03
'player': {
'source_filenames': [
'jplayer/jplayer.blue.monday.css',
+ 'css/player.css',
],
'output_filename': 'css/player.min?.css',
},
margin: 0;
}
.inline-body li {
- display: inline;
+ display: inline-block;
margin-right: 1em;
}
#logo a {
color:#f7f7f7;
font-size: 2.05em;
+ text-shadow: 0 0 10px #17CFDB;
}
#tagline {
line-height: 1.45em;
}
+.infopages-box li {
+ margin-bottom: .25em;
+}
.infopages-box .social-links {
margin-top: 1em;
--- /dev/null
+#player h1 {
+ font-size: 2em;
+ margin: .5em;
+}
+
+.player-info {
+ margin: 1em;
+}
+
+
+.play {
+ cursor: pointer;
+}
+
+.play:hover {
+ color: #0D7E85;
+}
list-style-type:none;\r
margin:0;\r
padding:0 20px;\r
- font-size:.72em;\r
+ font-size:.8em;\r
}\r
\r
div.jp-title li {\r
text-decoration: none;\r
}\r
div.jp-type-playlist div.jp-playlist a:hover {\r
- color:#0d88c1;\r
+ color:#0D7E85;\r
}\r
div.jp-type-playlist div.jp-playlist a.jp-playlist-current {\r
- color:#0d88c1;\r
+ color:#0D7E85;\r
}\r
\r
div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove {\r
color:#666;\r
}\r
div.jp-type-playlist div.jp-playlist a.jp-playlist-item-remove:hover {\r
- color:#0d88c1;\r
+ color:#0D7E85;\r
}\r
div.jp-type-playlist div.jp-playlist span.jp-free-media {\r
float:right;\r
color:#565656;\r
}\r
div.jp-type-playlist div.jp-playlist span.jp-free-media a:hover{\r
- color:#0d88c1;\r
+ color:#0D7E85;\r
}\r
span.jp-artist {\r
font-size:.8em;\r
event.preventDefault();
window.open($(this).attr('href'),
'player',
- 'width=420, height=500'
+ 'width=422, height=500'
);
});
{% extends "catalogue/book_list.html" %}
{% load i18n %}
+{% load catalogue_tags %}
{% block bodyid %}book-a-list{% endblock %}
Możecie z niej korzystać bezpłatnie i bez ograniczeń.
Audiobooki nagrywają znani aktorzy, wśród nich Danuta Stenka i Jan Peszek.{% endblocktrans %}</p>
{% endblock %}
+
+
+{% block book_list %}
+ {% audiobook_tree orphans books_by_parent %}
+ {% for author, group in books_by_author.items %}
+ {% if group %}
+ <a name="{{ author.slug }}"></a>
+ <div class="group">
+ <h2><a href="{{ author.get_absolute_url }}">{{ author }}</a></h2>
+ {% audiobook_tree group books_by_parent %}
+ </div>
+ {% endif %}
+ {% endfor %}
+{% endblock %}
<div style='clear:both;'></div>
- <a name="top">
+ <a name="top"></a>
<div id="book-list-nav" class="normal-text">
{% trans "Table of Content" %}
{% book_tree orphans books_by_parent %}
{% for author, group in books_by_author.items %}
{% if group %}
- <a name="{{ author.slug }}">
+ <a name="{{ author.slug }}"></a>
<div class="group">
<h2><a href="{{ author.get_absolute_url }}">{{ author }}</a></h2>
{% book_tree group books_by_parent %}
</ul>
</div>
<div id="header">
- <div id="logo">
- <a href="/">Wolne Lektury</a>
- </div>
+ <a href="/"><img src="{{ STATIC_URL }}img/logo-220.png" alt="Wolne Lektury" /></a>
</div>
<div id="themes">
<ol>
<li class="hidden-box-wrapper menu">
<a href="{% url catalogue %}#autorzy" class="hidden-box-trigger menu">
<span class='mono'>{% trans "Authors" %}</span></a>
- <div class="hidden-box">{% tag_list author %}</div>
+ <div class="hidden-box">{% if author %}{% tag_list author %}{% endif %}</div>
</li>
<li class="hidden-box-wrapper menu">
<a href="{% url catalogue %}#gatunki" class="hidden-box-trigger menu">
<span class='mono'>{% trans "Genres" %}</span></a>
- <div class="hidden-box">{% tag_list genre %}</div>
+ <div class="hidden-box">{% if genre %}{% tag_list genre %}{% endif %}</div>
</li>
<li class="hidden-box-wrapper menu">
<a href="{% url catalogue %}#rodzaje" class="hidden-box-trigger menu">
<span class='mono'>{% trans "Kinds" %}</span></a>
- <div class="hidden-box">{% tag_list kind %}</div>
+ <div class="hidden-box">{% if kind %}{% tag_list kind %}{% endif %}</div>
</li>
<li class="hidden-box-wrapper menu">
<a href="{% url catalogue %}#epoki" class="hidden-box-trigger menu">
<span class='mono'>{% trans "Epochs" %}</span></a>
- <div class="hidden-box">{% tag_list epoch %}</div>
+ <div class="hidden-box">{% if epoch %}{% tag_list epoch %}{% endif %}</div>
</li>
<li class="hidden-box-wrapper menu">
<a href="{% url catalogue %}#motywy" class="hidden-box-trigger menu">
<span class='mono'>{% trans "Themes" %}</span></a>
- <div class="hidden-box">{% tag_list theme %}</div>
+ <div class="hidden-box">{% if theme %}{% tag_list theme %}{% endif %}</div>
</li>
<li class="menu">
<a href="{% url book_list %}" class="menu">
<!DOCTYPE html>
<html>
{% load i18n compressed %}
+ {% load catalogue_tags %}
+ {% load thumbnail %}
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="description"
</head>
<body id="{% block bodyid %}player{% endblock %}">
+ {% if book.cover %}
+ <img src="
+ {% thumbnail book.cover "101x140" as thumb %}
+ {{ thumb.url }}
+ {% empty %}
+ {{ book.cover.url }}
+ {% endthumbnail %}
+ " alt="Cover" style="float: left; margin: .5em 1em 1em 1em;" />
+ {% endif %}
+
+
+<h1>{% book_title book %}</h1>
+
+<div class="player-info normal-text">
+ <p><a target="_blank" href="{{ book.get_absolute_url }}">{% trans "Book's page" %}</a>.</p>
+ <p>{% trans "Download as" %}
+ <a href="{% url download_zip_mp3 book.slug %}">MP3</a>{% if have_oggs %},
+ <a href="{% url download_zip_ogg book.slug %}">Ogg Vorbis</a>{% endif %}.
+ </p>
+ {% if book.has_daisy_file %}
+ <p>DAISY:</p>
+ <ul class="daisy-list">
+ {% for media in book.get_daisy %}
+ <li><a href="{{ media.file.url }}">{{ media.name }}</a></li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+</div>
+<div style="clear: both"></div>
<div class="jp-type-playlist">
<div id="jplayer" class="jp-jplayer"
(<a class='mp3' href='{{ i.mp3.file.url }}'>mp3</a>{% if i.ogg %}
| <a class='ogg' href='{{ i.ogg.file.url }}'>ogg</a>{% endif %})
</span>
- <span class='play'>{{ i.mp3.name }}</span>
+ <div class='play'>{{ i.mp3.name }}
<div class='extra-info'>
{% trans "Artist" %}: <span class='artist'>{{ i.mp3.get_extra_info_value.artist_name }}</span>,
{% trans "Director" %}: <span class='director'>{{ i.mp3.get_extra_info_value.director_name }}</span>
</div>
+ </div>
</li>
{% endfor %}
</div>
- <p>{% trans "Download as" %}:
- <a href="{% url download_zip_mp3 book.slug %}">MP3</a>{% if have_oggs %},
- <a href="{% url download_zip_ogg book.slug %}">Ogg Vorbis</a>{% endif %}.
- </p>
-
-
- {% if book.has_daisy_file %}
- <p>DAISY:</p>
- <ul class="audiobook-list" id="daisy-files">
- {% for media in book.get_daisy %}
- <li><a href="{{ media.file.url }}">{{ media.name }}</a></li>
- {% endfor %}
- </ul>
- {% endif %}
-
-
{% if projects|length > 1 %}
<p>{% trans "Audiobooks were prepared as a part of the projects:" %}</p>
<ul>
{% endif %}
-
-
-
-
-
-
-
- <div class="clearboth"></div>
-
-
-
-
-
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
{% compressed_js "player" %}
@never_cache
def main_page(request):
- last_published = Book.objects.exclude(html_file='').order_by('-created_at')[:4]
+ last_published = Book.objects.filter(parent=None).order_by('-created_at')[:4]
return render_to_response("main_page.html", locals(),
context_instance=RequestContext(request))