From 2864109d874d74c0da1bf8cae4b53edfb3636c01 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 12 Apr 2016 17:18:17 +0200 Subject: [PATCH] clean dev --- .../templates/catalogue/plain_list.html | 24 +++++++++--------- .../catalogue/tagged_object_list.html | 2 ++ src/catalogue/views.py | 23 +++++++++-------- src/wolnelektury/static/img/read-white.png | Bin 389 -> 350 bytes src/wolnelektury/static/img/read-white.svg | 8 +++--- src/wolnelektury/static/scss/main/base.scss | 16 +++++------- .../static/scss/main/book_box.scss | 3 +++ 7 files changed, 41 insertions(+), 35 deletions(-) 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 47f7e17f2a96fab97668b790d7139c0354cdf3e3..7db8916a013f4df3a3bd3d283fa820e994d0edc4 100644 GIT binary patch delta 263 zcmV+i0r>uf1Kt9V7YYdo1^@s6>3XJWks(Zf0NY7KK~xx(bVPR!sXC;X% z;0z!5#v_i=sd;nxTPsQKlPo4VOwvtqlB7v;n`G&iS=4>JVhcT7Vp`4~b}+#*(h6R3 zuu&RZ;2aIEFfRAoh1aCay;sdVMYq&L%qr{v4=pgkY5~T@ZHVjQ7Odk9!?wc!&sh8C zO`An9KssnM=_k2K@|5H*$!AG!Kgn*Aqa?FBz51U{@s6+JKEiy>`vJS#Hps_))OY{@ N002ovPDHLkV1g?Pcsl?9 delta 303 zcmV+~0nq;50)+#R7YY>!1^@s6oo-}`ks(Zf0Rl-xK~y-6<V5T~n*S4Yx!S8fR9C9S>Sp!5dR1M2 z_}PiDj<-0ERqW#1$g5bx!N^U41DqQJp5Q(fu#Kmqei3hQDePl&2;n16kNX-v&uF)? zA6D=hSBLNrJGh4Dcr@zQ$B$N~6P5?KfhBC=-N;M0F@R+>nc4C))wAK=%VGK1>Q=R0 z-L1aPx;H%&+`}FY@d9^#>-puSBgelQU)aA7{Qz+*7igyoE_DC^002ovPDHLkV1nHH Bk$(UH 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; } } -- 2.20.1