From 8e36a302cec6df297c00be4555ea0a6d8bd20114 Mon Sep 17 00:00:00 2001 From: olOwOlo <26087907+olOwOlo@users.noreply.github.com> Date: Tue, 12 Sep 2017 20:23:37 +0800 Subject: refactor: store iconfont file locally --- src/css/_iconfont.scss | 110 ++++++++++++++++++++++++++++++++++++++++ src/css/_partial/_iconfont.scss | 102 ------------------------------------- src/css/style.scss | 2 +- 3 files changed, 111 insertions(+), 103 deletions(-) create mode 100644 src/css/_iconfont.scss delete mode 100644 src/css/_partial/_iconfont.scss (limited to 'src/css') diff --git a/src/css/_iconfont.scss b/src/css/_iconfont.scss new file mode 100644 index 0000000..03efae6 --- /dev/null +++ b/src/css/_iconfont.scss @@ -0,0 +1,110 @@ +// ============================== +// Iconfont +// ============================== + +@font-face { + font-family: 'iconfont'; /* project id 96542 */ + + 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 { + font-family: "iconfont" !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -webkit-text-stroke-width: 0.2px; + -moz-osx-font-smoothing: grayscale; + cursor: pointer; +} + +.icon-instagram:before { + font-size: .95em; + content: "\e611"; + position: relative; + top: -1px; +} +.icon-douban:before { + content: "\e610"; +} +.icon-tumblr:before { + content: "\e69f"; + font-size: .85em; + position: relative; + top: -4px; +} +.icon-linkedin:before { + content: "\e60d"; + position: relative; + top: -4px; +} +.icon-twitter:before { + content: "\e600"; +} +.icon-weibo:before { + content: "\e602"; +} +.icon-stack-overflow:before { + content: "\e603"; + font-size: .85em; + position: relative; + top: -4px; +} +.icon-email:before { + content: "\e605"; + position: relative; + top: -2px; +} +.icon-facebook:before { + content: "\e601"; + font-size: .95em; + position: relative; + top: -2px; +} +.icon-github:before { + content: "\e606"; + position: relative; + top: -3px; +} +.icon-rss:before { + content: "\e604"; +} +.icon-google:before { + content: "\e609"; +} +.icon-zhihu:before { + content: "\e607"; + font-size: .9em; + position: relative; + top: -2px; +} +.icon-pocket:before { + content: "\e856"; +} + +/* Generic Icon */ +.icon-heart:before { + content: "\e608"; +} +.icon-right:before { + content: "\e60a"; +} +.icon-left:before { + content: "\e60b"; +} +.icon-up:before { + content: "\e60c"; +} +.icon-close:before { + content: "\e60f"; +} diff --git a/src/css/_partial/_iconfont.scss b/src/css/_partial/_iconfont.scss deleted file mode 100644 index cf8c967..0000000 --- a/src/css/_partial/_iconfont.scss +++ /dev/null @@ -1,102 +0,0 @@ -// ============================== -// Iconfont -// ============================== - -@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'); -} - -.iconfont { - font-family: "iconfont" !important; - font-style: normal; - -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; - -moz-osx-font-smoothing: grayscale; - cursor: pointer; -} - -.icon-instagram:before { - font-size: .95em; - content: "\e611"; - position: relative; - top: -1px; -} -.icon-douban:before { - content: "\e610"; -} -.icon-tumblr:before { - content: "\e69f"; - font-size: .85em; - position: relative; - top: -4px; -} -.icon-linkedin:before { - content: "\e60d"; - position: relative; - top: -4px; -} -.icon-twitter:before { - content: "\e600"; -} -.icon-weibo:before { - content: "\e602"; -} -.icon-stack-overflow:before { - content: "\e603"; - font-size: .85em; - position: relative; - top: -4px; -} -.icon-email:before { - content: "\e605"; - position: relative; - top: -2px; -} -.icon-facebook:before { - content: "\e601"; - font-size: .95em; - position: relative; - top: -2px; -} -.icon-github:before { - content: "\e606"; - position: relative; - top: -3px; -} -.icon-rss:before { - content: "\e604"; -} -.icon-google:before { - content: "\e609"; -} -.icon-zhihu:before { - content: "\e607"; - font-size: .9em; - position: relative; - top: -2px; -} -.icon-pocket:before { - content: "\e856"; -} - -/* Generic Icon */ -.icon-heart:before { - content: "\e608"; -} -.icon-right:before { - content: "\e60a"; -} -.icon-left:before { - content: "\e60b"; -} -.icon-up:before { - content: "\e60c"; -} -.icon-close:before { - content: "\e60f"; -} 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"; -- cgit v1.2.3