'chunks',
'compress',
'catalogue',
+ 'lessons',
]
CACHE_BACKEND = 'locmem:///?max_entries=3000'
color: #FFF;
background-color: #900;
text-decoration: none;
-}
\ No newline at end of file
+}
+
+/* =========== */
+/* = Lessons = */
+/* =========== */
+#lessons {
+ margin-top: 2.5em;
+}
+
+#document-list {
+ width: 380px;
+ float: left;
+}
+
+#document-list ol {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+#document-list li a {
+ padding: 0.5em;
+ background-color: #FFF;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+/* font-size: 1.2em;*/
+ font-weight: bold;
+ width: 370px;
+ margin-bottom: 0.25em;
+ display: block;
+}
+
+#document-list li a:hover, #document-list li a.active {
+ text-decoration: none;
+ background-color: #EEE;
+}
+
+#document-list-body #document-detail {
+ margin-left: 390px;
+}
+
+#document-detail {
+ width: 480px;
+}
+
+#document-detail h2 {
+ margin: 0.75em 0 0.75em 0;
+}
+
+#document-list-body #document-detail .download {
+ float: right;
+ margin: 0;
+ padding: 0
+}
<p>Stwórz własny zestaw lektur. Możesz się nim później podzielić z innymi, przesyłając im link do Twojej półki.</p>
<p>Aby zarządzać swoimi półkami, musisz się <a class="login-register-link" href="#">zalogować</a>.</p>
{% endif %}
+ <div id="lessons">
+ <h2><a href="{% url lessons_document_list %}">Materiały pomocnicze dla nauczycieli</a></h2>
+ <p>Scenariusze lekcji i inne pomysły na wykorzytanie serwisu WolneLektury.pl podczas nauczania.</p>
+ <p class="see-more"><a href="{% url lessons_document_list %}">Zobacz więcej ⇒</a></p>
+ </div>
<div id="czytamysluchajac">
<a href="http://czytamysluchajac.pl/"><img src="/static/img/czytamysluchajac-logo-small.png" /></a>
<p><a href="http://czytamysluchajac.pl/">Czytamy Słuchając</a> to profesjonalne nagrania tekstów literackich z naszego zbioru dostępne na wolnej licencji w formatach MP3, Ogg Vorbis oraz w systemie DAISY.</p>
--- /dev/null
+<div>
+ <p class="download"><a href="{{ object.file.url }}">Pobierz</a> {% if object.author %}(autor: {{ object.author }}){% endif %}</p>
+ <h2>{{ object.title }}</h2>
+ {% if object.slideshare_id %}
+ <object style="margin:0px" width="480" height="400">
+ <param name="movie" value="http://static.slidesharecdn.com/swf/{{ object.slideshare_player }}?doc={{ object.slideshare_id }}&rel=0&stripped_title={{ object.name|slugify }}" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/{{ object.slideshare_player }}?doc={{ object.slideshare_id }}&rel=0&stripped_title={{ object.name|slugify }}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="400"></embed></object>
+ {% endif %}
+ {% if object.description %}
+ <p>{{ object.description|urlize|linebreaks }}</p>
+ {% endif %}
+</div>
\ No newline at end of file
--- /dev/null
+{% extends 'base.html' %}
+
+{% block title %}{{ object.title }} w WolneLektury.pl{% endblock %}
+
+{% block body %}
+ <h1>{{ object.title }}</h1>
+ <form action="{% url search %}" method="GET" accept-charset="utf-8" id="search-form">
+ <p>{{ form.q }} <input type="submit" value="Szukaj" /> <strong>lub</strong> <a href="{% url lessons_document_list %}">wróć do listy materiałów</a></p>
+ </form>
+
+ <div id="document-detail">
+ <p class="download"><a href="{{ object.file.url }}">Pobierz</a> {% if object.author %}(autor: {{ object.author }}){% endif %}</p>
+ {% if object.slideshare_id %}
+ <object style="margin:0px" width="480" height="400">
+ <param name="movie" value="http://static.slidesharecdn.com/swf/{{ object.slideshare_player }}?doc={{ object.slideshare_id }}&rel=0&stripped_title={{ object.name|slugify }}" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/{{ object.slideshare_player }}?doc={{ object.slideshare_id }}&rel=0&stripped_title={{ object.name|slugify }}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="400"></embed></object>
+ {% endif %}
+ {% if object.description %}
+ <p>{{ object.description|urlize|linebreaks }}</p>
+ {% endif %}
+ </div>
+{% endblock body %}
\ No newline at end of file
--- /dev/null
+{% extends "base.html" %}
+{% load catalogue_tags chunks %}
+
+{% block bodyid %}document-list-body{% endblock %}
+
+{% block title %}Materiały pomocnicze dla nauczycieli w WolneLektury.pl{% endblock %}
+
+{% block extrahead %}
+ <script type="text/javascript" charset="utf-8">
+ $(function() {
+ $('#document-list a').click(function() {
+ if (!$(this).hasClass('active')) {
+ $('#document-list a').removeClass('active');
+ $(this).addClass('active');
+ document.location.hash = $(this).attr('data-hash');
+ }
+ return false;
+ });
+
+ var lastHash = null;
+
+ function checkHash() {
+ if (document.location.hash != lastHash) {
+ lastHash = document.location.hash;
+ var documentLink = $('#document-list a[data-hash=' + document.location.hash + ']');
+ if (!documentLink.hasClass('active')) {
+ $('#document-list a').removeClass('active');
+ documentLink.addClass('active');
+ };
+
+ if ($('#document-detail').attr('data-hash') != lastHash) {
+ $('#document-detail')
+ .attr('data-hash', lastHash)
+ .load(documentLink.attr('href'));
+ };
+ } else if (!document.location.hash) {
+ $('#document-list a:first').click();
+ }
+
+ setTimeout(checkHash, 500);
+ };
+
+ checkHash();
+ });
+ </script>
+{% endblock extrahead %}
+{% block body %}
+ <h1>Materiały pomocnicze dla nauczycieli</h1>
+ <form action="{% url search %}" method="GET" accept-charset="utf-8" id="search-form">
+ <p>{{ form.q }} <input type="submit" value="Szukaj" /> <strong>lub</strong> <a href="{% url main_page %}">wróć do strony głównej</a></p>
+ </form>
+
+ <div id="document-list">
+ <ol>
+ {% for object in object_list %}
+ <li><a href="{{ object.get_absolute_url }}" data-hash="#{{ object.slug }}">{{ object }}</a></li>
+ {% endfor %}
+ </ol>
+ </div>
+ <div id="document-detail">
+ </div>
+{% endblock %}
+
\ No newline at end of file
urlpatterns = patterns('',
url(r'^katalog/', include('catalogue.urls')),
+ url(r'^materialy/', include('lessons.urls')),
# Static pages
url(r'^wolontariat/$', 'django.views.generic.simple.direct_to_template',