From: Jan Szejko Date: Tue, 12 Apr 2016 15:18:17 +0000 (+0200) Subject: clean dev X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/2864109d874d74c0da1bf8cae4b53edfb3636c01 clean dev --- diff --git a/src/catalogue/templates/catalogue/plain_list.html b/src/catalogue/templates/catalogue/plain_list.html index fb2abe0e8..e26bb7f15 100644 --- a/src/catalogue/templates/catalogue/plain_list.html +++ b/src/catalogue/templates/catalogue/plain_list.html @@ -3,21 +3,21 @@
-
-{% for initial, object_list in names %} - {% if initial_blocks %}
{% endif %} - {% if initial %} +
+
+
+
+ {% for initial, object_list in names %} + {% if initial_blocks %}
{% endif %} + {% if initial %}

{{ initial }}

- {% endif %} - {% for item in object_list %} + {% endif %} + {% for item in object_list %}

{{ item }}{% if item.count %} ({{ item.count}}){% endif %}

- {% endfor %} + {% endfor %} {% if initial_blocks %}
{% endif %} -{% endfor %} -
-
-
-
+ {% endfor %} +
{% endspaceless %} diff --git a/src/catalogue/templates/catalogue/tagged_object_list.html b/src/catalogue/templates/catalogue/tagged_object_list.html index 9af03f51e..7603d7b97 100644 --- a/src/catalogue/templates/catalogue/tagged_object_list.html +++ b/src/catalogue/templates/catalogue/tagged_object_list.html @@ -42,6 +42,7 @@ {% endif %}
+{% comment %} {% if list_type == 'books' and not tags %}

{% trans "Recent publications" %}

@@ -57,6 +58,7 @@ {% endfor %}
{% endif %} +{% endcomment %} {% if theme_is_set %} {% work_list object_list %} diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 3cd6bc1c4..98dafc51b 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -133,13 +133,14 @@ def object_list(request, objects, fragments=None, related_tags=None, tags=None, def literature(request): books = Book.objects.filter(parent=None) - last_published = Book.objects.exclude(cover_thumb='').filter(parent=None).order_by('-created_at')[:20] - most_popular = Book.objects.exclude(cover_thumb='')\ - .order_by('-popularity__count', 'sort_key_author', 'sort_key')[:20] - return object_list(request, books, related_tags=get_top_level_related_tags([]), extra={ - 'last_published': last_published, - 'most_popular': most_popular, - }) + # last_published = Book.objects.exclude(cover_thumb='').filter(parent=None).order_by('-created_at')[:20] + # most_popular = Book.objects.exclude(cover_thumb='')\ + # .order_by('-popularity__count', 'sort_key_author', 'sort_key')[:20] + return object_list(request, books, related_tags=get_top_level_related_tags([])) + # extra={ + # 'last_published': last_published, + # 'most_popular': most_popular, + # }) def gallery(request): @@ -199,7 +200,7 @@ def theme_list(request, tags, list_type): books = Book.tagged.with_all(shelf_tags).order_by() fragments = fragments.filter(Q(book__in=books) | Q(book__ancestor__in=books)) - if not fragments and len(tags) == 1: + if not fragments and len(tags) == 1 and list_type == 'books': tag = tags[0] if tag.category == 'theme' and ( PictureArea.tagged.with_any([tag]).exists() or @@ -221,7 +222,7 @@ def tagged_object_list(request, tags, list_type): if list_type == 'gallery' and any(tag.category == 'set' for tag in tags): raise Http404 - if any(tag.category == 'theme' for tag in tags): + if any(tag.category in ('theme', 'thing') for tag in tags): return theme_list(request, tags, list_type=list_type) if list_type == 'books': @@ -261,6 +262,7 @@ def book_fragments(request, slug, theme_slug): 'book': book, 'theme': theme, 'fragments': fragments, + 'active_menu_item': 'books', }, context_instance=RequestContext(request)) @@ -274,6 +276,7 @@ def book_detail(request, slug): 'book': book, 'tags': book.tags.exclude(category__in=('set', 'theme')), 'book_children': book.children.all().order_by('parent_number', 'sort_key'), + 'active_menu_item': 'books', }, context_instance=RequestContext(request)) @@ -329,7 +332,7 @@ def book_text(request, slug): if not book.has_html_file(): raise Http404 - return render_to_response('catalogue/book_text.html', {'book': book,}, context_instance=RequestContext(request)) + return render_to_response('catalogue/book_text.html', {'book': book}, context_instance=RequestContext(request)) # ========== diff --git a/src/wolnelektury/static/img/read-white.png b/src/wolnelektury/static/img/read-white.png index 47f7e17f2..7db8916a0 100644 Binary files a/src/wolnelektury/static/img/read-white.png and b/src/wolnelektury/static/img/read-white.png differ diff --git a/src/wolnelektury/static/img/read-white.svg b/src/wolnelektury/static/img/read-white.svg index 7fd5af1fe..294d8c7cc 100644 --- a/src/wolnelektury/static/img/read-white.svg +++ b/src/wolnelektury/static/img/read-white.svg @@ -11,7 +11,7 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="13.0625" - height="21" + height="9.0397387" id="svg6288" inkscape:version="0.48.4 r9939" sodipodi:docname="read-white.svg" @@ -33,7 +33,7 @@ showgrid="false" inkscape:zoom="11.271642" inkscape:cx="6.426905" - inkscape:cy="15.412616" + inkscape:cy="10.355676" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" @@ -52,12 +52,12 @@ image/svg+xml - + a, span { - &, &:hover, &:focus { - z-index: 2; - color: #fff; - cursor: default; - background-color: #337ab7; - border-color: #337ab7; - } + .current { + &, &:hover, &:focus { + z-index: 2; + color: #fff; + cursor: default; + background-color: #337ab7; + border-color: #337ab7; } } .disabled { diff --git a/src/wolnelektury/static/scss/main/book_box.scss b/src/wolnelektury/static/scss/main/book_box.scss index 084c278b2..bf87d7544 100755 --- a/src/wolnelektury/static/scss/main/book_box.scss +++ b/src/wolnelektury/static/scss/main/book_box.scss @@ -403,6 +403,9 @@ @include size(margin-right, 3.71px); vertical-align: middle; font-weight: normal; + // ugly quick fix + position: relative; + bottom: 2px; } }