Skip to content

Commit

Permalink
Merged palm-oil into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas committed Aug 30, 2016
2 parents e12c6ce + bf916da commit 99845f1
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 2 deletions.
7 changes: 7 additions & 0 deletions app/pages/details/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
<ion-card-title>
{{product.product_name || product.code}}
</ion-card-title>
<ion-icon
class="idcard-icon icon-palm_oil"
[ngClass]="{
probably: product.ingredients_that_may_be_from_palm_oil_n > 0,
present: product.ingredients_from_palm_oil_n > 0
}">
</ion-icon>
</ion-card-content>
</ion-card>
</ion-col>
Expand Down
14 changes: 13 additions & 1 deletion app/pages/details/details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,21 @@ ion-col {
margin-bottom: -10px !important;
}

.idcard-icon {
font-size: 2.5rem;
color: green;
}

.idcard-icon.probably {
color: orange;
}

.idcard-icon.present {
color: red;
}

@media screen and (min-width: $grid-responsive-md-break) {
.product-idcard {
position: fixed;
}
}

3 changes: 3 additions & 0 deletions app/theme/app.core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// These are the imports which make up the design of this app.
// By default each design mode includes these shared imports.
// App Shared Sass variables belong in app.variables.scss.

@import "janari-font";

@import "../pages/home/home";
@import "../pages/details/details";
@import "../global/popover";
Expand Down
29 changes: 29 additions & 0 deletions app/theme/janari-font.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@font-face {
font-family: 'janari';
src: url('../fonts/janari.eot?oyvmre');
src: url('../fonts/janari.eot?oyvmre#iefix') format('embedded-opentype'),
url('../fonts/janari.ttf?oyvmre') format('truetype'),
url('../fonts/janari.woff?oyvmre') format('woff'),
url('../fonts/janari.svg?oyvmre#janari') format('svg');
font-weight: normal;
font-style: normal;
}

[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'janari' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;

/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.icon-palm_oil:before {
content: "\e900";
}
10 changes: 9 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,16 @@ gulp.task('build', ['clean'], function(done){
gulp.task('sass', buildSass);
gulp.task('html', copyHTML);
gulp.task('fonts', copyFonts);
gulp.task('scripts', copyScripts);
gulp.task('scripts', ['customFonts'], copyScripts);
gulp.task('clean', function(){
return del('www/build');
});
gulp.task('lint', tslint);

gulp.task('customFonts', function () {
var src = 'www/fonts/**/*.+(ttf|woff|woff2)';
var dest = 'www/build/fonts';

return gulp.src(src)
.pipe(gulp.dest(dest));
})
Binary file added www/fonts/janari.eot
Binary file not shown.
28 changes: 28 additions & 0 deletions www/fonts/janari.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/fonts/janari.ttf
Binary file not shown.
Binary file added www/fonts/janari.woff
Binary file not shown.

0 comments on commit 99845f1

Please sign in to comment.