Skip to content

Commit bf916da

Browse files
author
Nicolas
committed
Add icon to show if product contains (sure or probably) palm oil
1 parent 4f5481b commit bf916da

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

app/pages/details/details.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@
2323
<ion-card-title>
2424
{{product.product_name || product.code}}
2525
</ion-card-title>
26-
<ion-icon class="icon-palm_oil"></ion-icon>
26+
<ion-icon
27+
class="idcard-icon icon-palm_oil"
28+
[ngClass]="{
29+
probably: product.ingredients_that_may_be_from_palm_oil_n > 0,
30+
present: product.ingredients_from_palm_oil_n > 0
31+
}">
32+
</ion-icon>
2733
</ion-card-content>
2834
</ion-card>
2935
</ion-col>

app/pages/details/details.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,21 @@ ion-col {
5454
margin-bottom: -10px !important;
5555
}
5656

57+
.idcard-icon {
58+
font-size: 2.5rem;
59+
color: green;
60+
}
61+
62+
.idcard-icon.probably {
63+
color: orange;
64+
}
65+
66+
.idcard-icon.present {
67+
color: red;
68+
}
69+
5770
@media screen and (min-width: $grid-responsive-md-break) {
5871
.product-idcard {
5972
position: fixed;
6073
}
6174
}
62-

0 commit comments

Comments
 (0)