Columnized tag lists in templates.
authorMarek Stępniowski <marek@stepniowski.com>
Wed, 10 Sep 2008 13:03:43 +0000 (15:03 +0200)
committerMarek Stępniowski <marek@stepniowski.com>
Wed, 10 Sep 2008 13:03:43 +0000 (15:03 +0200)
wolnelektury/media/css/master.css
wolnelektury/templates/catalogue/book_detail.html
wolnelektury/templates/catalogue/tagged_object_list.html

index b86875a..4470b6c 100644 (file)
@@ -174,7 +174,7 @@ em {
     margin-right: 29em;
 }
 
-#main-page #themes-list ul, #main-page #categories-list ul {
+#categories-list ul, #themes-list ul {
     -moz-column-width: 12em;
     -webkit-column-width: 12em;
     column-width: 12em;
@@ -191,10 +191,27 @@ em {
     border-right: 0.15em solid #E3D888;
 }
 
-#books #tags-list, #book-detail #tags-list {
+#tagged-object-list #tags-list, #book-detail #tags-list {
     margin-left: 39em;
 }
 
+#book-info, #categories-list {
+    float: left;
+    width: 47.5%;
+}
+
+#themes-list {
+    margin-left: 52.5%;
+}
+
+#tagged-object-list #categories-list, #book-detail #book-info {
+    width: 12em;
+}
+
+#tagged-object-list #themes-list, #book-detail #themes-list {
+    margin-left: 14em;
+}
+
 #tags-list ol, #tags-list ul {
     padding: 0;
     margin: 0.3em 0 1.2em 0;
@@ -206,15 +223,6 @@ em {
     margin: 0;
 }
 
-#main-page #categories-list {
-    float: left;
-    width: 47.5%;
-}
-
-#main-page #themes-list {
-    margin-left: 52.5%;
-}
-
 #books-list {
     width: 38em;
     float: left;
@@ -243,7 +251,7 @@ em {
     text-align: justify;
 }
 
-#toggle-description, #books .pagination {
+#toggle-description, #tagged-object-list .pagination {
     width: 100%;
     height: 1.5em;
     background-color: #EEE;
index ff92780..332dd33 100644 (file)
     </div>
         
     <div id="tags-list">
-        <h2>O utworze</h2>
-        <ul>
-            <li>
-                Autor: 
-                {% for tag in categories.author %}
-                <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
-                {% endfor %}
-            </li>
-            <li>
-                Epoka:
-                {% for tag in categories.epoch %}
-                <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
-                {% endfor %}
-            </li>
-            <li>
-                Rodzaj:
-                {% for tag in categories.kind %}
-                <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
-                {% endfor %}
-            </li>
-            <li>
-                Gatunek:
-                {% for tag in categories.genre %}
-                <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
-                {% endfor %}
-            </li>
-        </ul>
-        {% if categories.theme %}
-            <h2>Motywy w utworze</h2>
+        <div id="book-info">
+            <h2>O utworze</h2>
             <ul>
-            {% for theme in categories.theme %}
-                <li>{{ theme }}</li>
-            {% endfor %}
+                <li>
+                    Autor: 
+                    {% for tag in categories.author %}
+                    <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
+                    {% endfor %}
+                </li>
+                <li>
+                    Epoka:
+                    {% for tag in categories.epoch %}
+                    <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
+                    {% endfor %}
+                </li>
+                <li>
+                    Rodzaj:
+                    {% for tag in categories.kind %}
+                    <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
+                    {% endfor %}
+                </li>
+                <li>
+                    Gatunek:
+                    {% for tag in categories.genre %}
+                    <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
+                    {% endfor %}
+                </li>
             </ul>
-        {% endif %}
+        </div>
+        <div id="themes-list">
+            {% if categories.theme %}
+                <h2>Motywy w utworze</h2>
+                <ul>
+                {% for theme in categories.theme %}
+                    <li>{{ theme }}</li>
+                {% endfor %}
+                </ul>
+            {% endif %}
+        </div>
     </div>
 {% endblock %}
\ No newline at end of file
index cc902c7..b842cb4 100644 (file)
@@ -3,7 +3,7 @@
 
 {% block title %}{% title_from_tags tags %} w WolneLektury.pl{% endblock %}
 
-{% block bodyid %}books{% endblock %}
+{% block bodyid %}tagged-object-list{% endblock %}
 
 {% block extrahead %}
     <script type="text/javascript">
@@ -73,7 +73,7 @@
         {% paginate %}
     </div>
     <div id="tags-list">
-        <div class="dontsplit">
+        <div id="categories-list">
             {% if categories.set %}
                 <h2>Półki</h2>
                 <ul>
@@ -82,8 +82,6 @@
                 {% endfor %}
                 </ul>
             {% endif %}
-        </div>
-        <div class="dontsplit">
             {% if categories.author %}
                 <h2>Autorzy</h2>
                 <ul>
@@ -92,8 +90,6 @@
                 {% endfor %}
                 </ul>
             {% endif %}
-        </div>
-        <div class="dontsplit">
             {% if categories.epoch %}
                 <h2>Epoki</h2>
                 <ul>
                 {% endfor %}
                 </ul>
             {% endif %}
-        </div>
-        <div class="dontsplit">
             {% if categories.kind %}
                 <h2>Rodzaje</h2>
                 <ul>
                 {% endfor %}
                 </ul>
             {% endif %}
-        </div>
-        <div class="dontsplit">
             {% if categories.genre %}
                 <h2>Gatunki literackie</h2>
                 <ul>
                     <li><a href="{% catalogue_url tags genre %}">{{ genre }}&nbsp;({{ genre.count }})</a></li>
                 {% endfor %}
                 </ul>
-            {% endif %}
+            {% endif %}            
         </div>
-        <div class="dontsplit">
+        <div id="themes-list">
             {% if categories.theme %}
                 <h2>Motywy</h2>
                 <ul>
                 </ul>
             {% endif %}
         </div>
+        <div class="clearboth"></div>
     </div>
     <div id="set-window">
         <div class="header"><a href="#" class="jqmClose">Zamknij</a></div>