Browse Source

added styles for the category listing on browse.html

master
Jon Price 13 years ago
parent
commit
98bce4111d

+ 0
- 2
sites/demo/static/demo/less/bootstrap/navs.less View File

@@ -41,7 +41,6 @@
41 41
   font-weight: bold;
42 42
   line-height: @baseLineHeight;
43 43
   color: @grayLight;
44
-  text-shadow: 0 1px 0 rgba(255,255,255,.5);
45 44
   text-transform: uppercase;
46 45
 }
47 46
 // Space them out when they follow another list item (link)
@@ -63,7 +62,6 @@
63 62
 .nav-list .nav-header {
64 63
   margin-left:  -15px;
65 64
   margin-right: -15px;
66
-  text-shadow: 0 1px 0 rgba(255,255,255,.5);
67 65
 }
68 66
 .nav-list > li > a {
69 67
   padding: 3px 15px;

+ 55
- 0
sites/demo/static/demo/less/page/product_lists.less View File

@@ -172,4 +172,59 @@
172 172
     right:0;
173 173
     top:0;
174 174
   }
175
+}
176
+//Categories
177
+.side_categories {
178
+  background:#F2F2F2;
179
+  li {
180
+    list-style: none;
181
+  }
182
+  i {
183
+    display:none;
184
+    position:absolute;
185
+    right:10px;
186
+    top:18px;
187
+  }
188
+  .nav-header {
189
+    background:@navbarInverseBackground;
190
+    color:@white;
191
+    text-transform: none;
192
+    font-size: @headingFourSize;
193
+  }
194
+  .nav-list > li > a,
195
+  .nav-header {
196
+    margin-left: 0;
197
+    margin-right: 0;
198
+  }
199
+  .nav-list {
200
+    padding-left: 0;
201
+    padding-right: 0;
202
+    > li {
203
+      border:1px solid #D8D8D8;
204
+      border-top-width:0;
205
+      &.nav-header {
206
+        border-color:@navbarInverseBackground;
207
+      }
208
+      ul {
209
+        margin-left:0;
210
+        a {
211
+          padding-left:30px;
212
+        }
213
+      }
214
+    }
215
+  }
216
+  .nav > li > a:hover, a:hover {
217
+    background:@blue;
218
+    color:@white;
219
+    i {
220
+      display: inline-block;
221
+    }
222
+  }
223
+  a,
224
+  .nav-list > li > a,
225
+  .nav-header {
226
+    position: relative;
227
+    padding:15px;
228
+    display:block;
229
+  }
175 230
 }

+ 21
- 0
sites/demo/templates/catalogue/browse.html View File

@@ -20,6 +20,27 @@
20 20
 </div>
21 21
 {% endblock  %}
22 22
 
23
+{% block column_left %}
24
+    <div class="side_categories">
25
+        {% if categories %}
26
+        <ul class="nav nav-list">
27
+            <li class="nav-header">{% trans "Browse" %}</li>
28
+            {% for category in categories %}
29
+            <li><a href="{{ category.0.get_absolute_url }}">{{ category.0.name }} <i class="icon-arrow-right"></i></a>
30
+                {% if category.1 %}
31
+                <ul>
32
+                    {% for subcategory in category.1 %}
33
+                        <li><a href="{{ subcategory.0.get_absolute_url }}">{{ subcategory.0.name }} <i class="icon-arrow-right"></i></a>
34
+                    {% endfor %}
35
+                </ul>
36
+                {% endif %}
37
+            </li>
38
+            {% endfor %}
39
+        </ul>
40
+        {% endif %}
41
+    </div>
42
+{% endblock %}
43
+
23 44
 {% block content %}
24 45
 
25 46
 {% if products.count %}

Loading…
Cancel
Save