Browse Source

Categories list shows count in superscript

Talha Mansoor 11 years ago
parent
commit
a19efc50ad
2 changed files with 12 additions and 8 deletions
  1. 10 0
      static/css/style.css
  2. 2 8
      templates/categories.html

+ 10 - 0
static/css/style.css

@@ -28,3 +28,13 @@
     text-align:justify;
     max-width:35em;
 }
+
+.list-of-categories span {
+    vertical-align: super;
+    font-size: 0.8em;
+}
+
+a.list-of-categories  {
+    text-decoration:none;
+}
+

+ 2 - 8
templates/categories.html

@@ -25,15 +25,9 @@ All Categories - {{ super() }}
             {% for category, articles in categories %}
             <div class="accordion-group">
                 <div class="accordion-heading">
-                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#{{ category|replace(' ', '-')|e }}-ref">
+                    <a class="accordion-toggle list-of-categories" data-toggle="collapse" data-parent="#accordion2" href="#{{ category|replace(' ', '-')|e }}-ref">
                         {% set num = articles|count %}
-                        {{ num }} 
-                        {% if num > 1 %}
-                        articles 
-                        {% else %}
-                        article
-                        {% endif %}
-                        filed in {{ category }}
+                        {{ category }}<span>{{ num }}</span>
                     </a>
                 </div>
                 <div id="{{ category|replace(' ', '-')|e }}-ref" class="accordion-body collapse">