diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-12 20:23:37 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-12 20:23:37 +0800 |
commit | 8e36a302cec6df297c00be4555ea0a6d8bd20114 (patch) | |
tree | 6772eb274f6cedb5976dfc7d6211adb1c08da003 /src/css | |
parent | 6879d8e3d3144086737542049d282a832240ebc8 (diff) |
refactor: store iconfont file locally
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/_iconfont.scss (renamed from src/css/_partial/_iconfont.scss) | 18 | ||||
-rw-r--r-- | src/css/style.scss | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/css/_partial/_iconfont.scss b/src/css/_iconfont.scss index cf8c967..03efae6 100644 --- a/src/css/_partial/_iconfont.scss +++ b/src/css/_iconfont.scss @@ -4,11 +4,19 @@ @font-face { font-family: 'iconfont'; /* project id 96542 */ - src: url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.eot'); - src: url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.eot?#iefix') format('embedded-opentype'), - url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.woff') format('woff'), - url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.ttf') format('truetype'), - url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.svg#iconfont') format('svg'); + + src: url('../fonts/iconfont/iconfont.eot'); + src: url('../fonts/iconfont/iconfont.eot#iefix') format('embedded-opentype'), // not '?#iefix', because webpack will add '?hash=[hash]' + url('../fonts/iconfont/iconfont.woff') format('woff'), + url('../fonts/iconfont/iconfont.ttf') format('truetype'), + url('../fonts/iconfont/iconfont.svg#iconfont') format('svg'); + + // Uncomment these code and comment upper code if you want to use alicdn + // src: url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.eot'); + // src: url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.eot?#iefix') format('embedded-opentype'), + // url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.woff') format('woff'), + // url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.ttf') format('truetype'), + // url('//at.alicdn.com/t/font_96542_ixz9jngnf1sb57b9.svg#iconfont') format('svg'); } .iconfont { diff --git a/src/css/style.scss b/src/css/style.scss index ac08217..50fcf7a 100644 --- a/src/css/style.scss +++ b/src/css/style.scss @@ -5,6 +5,7 @@ @import "_common/animation"; @import "_base"; +@import "_iconfont"; @import "_partial/header"; @import "_partial/post"; @import "_partial/pagination"; @@ -12,7 +13,6 @@ @import "_partial/archive"; @import "_partial/tags"; @import "_partial/categories"; -@import "_partial/iconfont"; @import "_partial/slideout"; @import "_partial/mobile"; @import "_partial/back-to-top"; |