add font to global-css example

This commit is contained in:
Pooya Parsa 2017-08-30 18:29:09 +04:30
parent 696ada09c4
commit 5eeca5a41b
3 changed files with 17 additions and 1 deletions

Binary file not shown.

View File

@ -1,3 +1,11 @@
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(../assets/roboto.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
body { body {
background: #eee; background: #eee;
text-align: center; text-align: center;
@ -7,6 +15,7 @@ body {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
font-family: 'Roboto';
} }
.content { .content {
margin-top: 100px; margin-top: 100px;

View File

@ -9,5 +9,12 @@ module.exports = {
css: [ css: [
'bulma/css/bulma.css', 'bulma/css/bulma.css',
'~/css/main.css' '~/css/main.css'
] ],
render: {
bundleRenderer: {
shouldPreload: (file, type) => {
return ['script', 'style', 'font'].includes(type)
}
}
}
} }