Browse Source

unavailable badge less prominant

master
Jon Price 12 years ago
parent
commit
f40befcc3b

BIN
sites/demo/static/demo/img/ui/unavailable.png View File


+ 22
- 8
sites/demo/static/demo/less/page/product_lists.less View File

@@ -5,6 +5,28 @@
5 5
   font-weight:bold;
6 6
 }
7 7
 
8
+//Product badges default
9
+.product-badge {
10
+  position:absolute;
11
+  right:0;
12
+  top:0;
13
+  //Default display none
14
+  display:none;
15
+}
16
+
17
+//Unavailable badge
18
+.product-unavailable {
19
+  .product-badge {
20
+    display:block;
21
+    width:113px;
22
+    height:86px;
23
+    background:url(/static/demo/img/ui/unavailable.png) 0 0;
24
+  }
25
+  img {
26
+    .opacity(35);
27
+  }
28
+}
29
+
8 30
 .product_pod {
9 31
   position:relative;
10 32
   height:430px;
@@ -13,14 +35,6 @@
13 35
   & p {
14 36
     margin-bottom:0;
15 37
   }
16
-  .unavailable {
17
-    width:113px;
18
-    height:86px;
19
-    position:absolute;
20
-    right:0;
21
-    top:0;
22
-    background:url(/static/demo/img/ui/unavailable.png) 0 0;
23
-  }
24 38
   h3 {
25 39
     font-size:@headingFourSize;
26 40
     margin-bottom:0;

+ 2
- 2
sites/demo/templates/catalogue/partials/product.html View File

@@ -6,12 +6,12 @@
6 6
 
7 7
 <article class="product_pod">
8 8
     {% block product_image %}
9
-    <div class="image_container">
9
+    <div class="image_container {% if not product.is_available_to_buy %}product-unavailable{% endif %}">
10 10
         {% with image=product.primary_image %}
11 11
             {% thumbnail image.original "150x150" upscale=False as thumb %}
12 12
                 <a href="{{ product.get_absolute_url }}">
13 13
                     <img src="{{ thumb.url }}" alt="{{ product.get_title }}">
14
-                    {% if not product.is_available_to_buy %}<i class="unavailable"></i>{% endif %}
14
+                    <i class="product-badge"></i>
15 15
                 </a>
16 16
             {% endthumbnail %}
17 17
         {% endwith %}  

Loading…
Cancel
Save