Skip to content

Commit 99845f1

Browse files
author
Nicolas
committed
Merged palm-oil into devel
2 parents e12c6ce + bf916da commit 99845f1

File tree

9 files changed

+89
-2
lines changed

9 files changed

+89
-2
lines changed

app/pages/details/details.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
<ion-card-title>
2424
{{product.product_name || product.code}}
2525
</ion-card-title>
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>
2633
</ion-card-content>
2734
</ion-card>
2835
</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-

app/theme/app.core.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// These are the imports which make up the design of this app.
55
// By default each design mode includes these shared imports.
66
// App Shared Sass variables belong in app.variables.scss.
7+
8+
@import "janari-font";
9+
710
@import "../pages/home/home";
811
@import "../pages/details/details";
912
@import "../global/popover";

app/theme/janari-font.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@font-face {
2+
font-family: 'janari';
3+
src: url('../fonts/janari.eot?oyvmre');
4+
src: url('../fonts/janari.eot?oyvmre#iefix') format('embedded-opentype'),
5+
url('../fonts/janari.ttf?oyvmre') format('truetype'),
6+
url('../fonts/janari.woff?oyvmre') format('woff'),
7+
url('../fonts/janari.svg?oyvmre#janari') format('svg');
8+
font-weight: normal;
9+
font-style: normal;
10+
}
11+
12+
[class^="icon-"], [class*=" icon-"] {
13+
/* use !important to prevent issues with browser extensions that change fonts */
14+
font-family: 'janari' !important;
15+
speak: none;
16+
font-style: normal;
17+
font-weight: normal;
18+
font-variant: normal;
19+
text-transform: none;
20+
line-height: 1;
21+
22+
/* Better Font Rendering =========== */
23+
-webkit-font-smoothing: antialiased;
24+
-moz-osx-font-smoothing: grayscale;
25+
}
26+
27+
.icon-palm_oil:before {
28+
content: "\e900";
29+
}

gulpfile.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,16 @@ gulp.task('build', ['clean'], function(done){
6767
gulp.task('sass', buildSass);
6868
gulp.task('html', copyHTML);
6969
gulp.task('fonts', copyFonts);
70-
gulp.task('scripts', copyScripts);
70+
gulp.task('scripts', ['customFonts'], copyScripts);
7171
gulp.task('clean', function(){
7272
return del('www/build');
7373
});
7474
gulp.task('lint', tslint);
75+
76+
gulp.task('customFonts', function () {
77+
var src = 'www/fonts/**/*.+(ttf|woff|woff2)';
78+
var dest = 'www/build/fonts';
79+
80+
return gulp.src(src)
81+
.pipe(gulp.dest(dest));
82+
})

www/fonts/janari.eot

1.53 KB
Binary file not shown.

www/fonts/janari.svg

Lines changed: 28 additions & 0 deletions
Loading

www/fonts/janari.ttf

1.38 KB
Binary file not shown.

www/fonts/janari.woff

1.45 KB
Binary file not shown.

0 commit comments

Comments
 (0)