From 556898c57f6d2cb80dc39dd6515e3f70e259cea0 Mon Sep 17 00:00:00 2001 From: XPoet Date: Tue, 24 Nov 2020 10:55:24 +0800 Subject: [PATCH] style: upgrade fontawesome && optimize style file --- layout/_partial/article-meta-info.ejs | 12 +- layout/_partial/first-screen.ejs | 4 +- layout/_partial/footer.ejs | 2 +- layout/_partial/head.ejs | 7 +- layout/_partial/home-article-meta-info.ejs | 8 +- layout/_partial/local-search.ejs | 8 +- layout/_partial/scripts.ejs | 14 +- layout/_partial/tools.ejs | 6 +- layout/_partial/tools2.ejs | 10 +- layout/article-content.ejs | 8 +- layout/category-content.ejs | 2 +- layout/home-content.ejs | 2 +- layout/tag-content.ejs | 2 +- scripts/filters/link-handle.js | 2 +- scripts/helpers/helper.js | 53 +- source/css/font-awesome.min.css | 5 + source/css/layout/_partial/archive-list.styl | 2 - .../_partial/article-copyright-info.styl | 2 - .../layout/_partial/article-meta-info.styl | 2 - .../css/layout/_partial/comment/valine.styl | 3 - source/css/layout/_partial/empty-page.styl | 3 - source/css/layout/_partial/footer.styl | 2 +- source/css/layout/_partial/header.styl | 4 - source/css/layout/_partial/local-search.styl | 4 +- source/css/layout/_partial/tagcloud.styl | 2 - source/css/layout/_partial/toc.styl | 8 +- source/css/layout/_partial/tools.styl | 3 - source/css/layout/_partial/tools2.styl | 3 - source/css/layout/archive-content.styl | 3 - source/css/layout/article-content.styl | 3 - source/css/layout/category-content.styl | 2 - source/css/layout/category-list.styl | 3 - source/css/layout/common/basic.styl | 2 +- .../layout/common/codeblock/code-theme.styl | 2 - .../{magic-theme.styl => keep-theme.styl} | 7 - source/css/layout/common/markdown.styl | 7 +- source/css/layout/home-content.styl | 3 - source/css/layout/page.styl | 3 - source/css/layout/tag-content.styl | 3 - source/css/libs/font-awesome.min.css | 1591 ------ source/css/style.styl | 2 - source/fonts/fontawesome-webfont.eot | Bin 56006 -> 0 bytes source/fonts/fontawesome-webfont.svg | 520 -- source/fonts/fontawesome-webfont.ttf | Bin 112160 -> 0 bytes source/fonts/fontawesome-webfont.woff | Bin 65452 -> 0 bytes source/js/code-copy.js | 6 +- source/js/dark-light-toggle.js | 12 +- source/js/local-search.js | 6 +- source/webfonts/fa-brands-400.eot | Bin 0 -> 136822 bytes source/webfonts/fa-brands-400.svg | 3717 ++++++++++++ source/webfonts/fa-brands-400.ttf | Bin 0 -> 136516 bytes source/webfonts/fa-brands-400.woff | Bin 0 -> 92136 bytes source/webfonts/fa-brands-400.woff2 | Bin 0 -> 78460 bytes source/webfonts/fa-regular-400.eot | Bin 0 -> 34350 bytes source/webfonts/fa-regular-400.svg | 801 +++ source/webfonts/fa-regular-400.ttf | Bin 0 -> 34052 bytes source/webfonts/fa-regular-400.woff | Bin 0 -> 16772 bytes source/webfonts/fa-regular-400.woff2 | Bin 0 -> 13548 bytes source/webfonts/fa-solid-900.eot | Bin 0 -> 204814 bytes source/webfonts/fa-solid-900.svg | 5028 +++++++++++++++++ source/webfonts/fa-solid-900.ttf | Bin 0 -> 204528 bytes source/webfonts/fa-solid-900.woff | Bin 0 -> 104280 bytes source/webfonts/fa-solid-900.woff2 | Bin 0 -> 80300 bytes 63 files changed, 9667 insertions(+), 2237 deletions(-) create mode 100644 source/css/font-awesome.min.css rename source/css/layout/common/{magic-theme.styl => keep-theme.styl} (89%) delete mode 100644 source/css/libs/font-awesome.min.css delete mode 100644 source/fonts/fontawesome-webfont.eot delete mode 100644 source/fonts/fontawesome-webfont.svg delete mode 100644 source/fonts/fontawesome-webfont.ttf delete mode 100644 source/fonts/fontawesome-webfont.woff create mode 100644 source/webfonts/fa-brands-400.eot create mode 100644 source/webfonts/fa-brands-400.svg create mode 100644 source/webfonts/fa-brands-400.ttf create mode 100644 source/webfonts/fa-brands-400.woff create mode 100644 source/webfonts/fa-brands-400.woff2 create mode 100644 source/webfonts/fa-regular-400.eot create mode 100644 source/webfonts/fa-regular-400.svg create mode 100644 source/webfonts/fa-regular-400.ttf create mode 100644 source/webfonts/fa-regular-400.woff create mode 100644 source/webfonts/fa-regular-400.woff2 create mode 100644 source/webfonts/fa-solid-900.eot create mode 100644 source/webfonts/fa-solid-900.svg create mode 100644 source/webfonts/fa-solid-900.ttf create mode 100644 source/webfonts/fa-solid-900.woff create mode 100644 source/webfonts/fa-solid-900.woff2 diff --git a/layout/_partial/article-meta-info.ejs b/layout/_partial/article-meta-info.ejs index 88df737..6962b35 100644 --- a/layout/_partial/article-meta-info.ejs +++ b/layout/_partial/article-meta-info.ejs @@ -1,10 +1,10 @@
<% if (articleObject.categories.length) { %>
diff --git a/layout/_partial/first-screen.ejs b/layout/_partial/first-screen.ejs index 84d468c..587d683 100644 --- a/layout/_partial/first-screen.ejs +++ b/layout/_partial/first-screen.ejs @@ -10,13 +10,13 @@ <% if(key === 'email') { %>
  • - +
  • <% } else { %>
  • - +
  • <% } %> diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 6169f0a..e8ce6fd 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -5,7 +5,7 @@ <% if (theme.footer.since) { %> <%= theme.footer.since %> ~ <% } %> - <%= date(new Date(), 'YYYY') %> <%= theme.base_info.author || config.author %> + <%= date(new Date(), 'YYYY') %> <%= theme.base_info.author || config.author %> <% if (theme.website_count.busuanzi_count.enable) { %> diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 37ab53f..2f2c844 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -1,5 +1,6 @@ + <% let title = page.title; if (is_archive()) { @@ -20,11 +21,11 @@ <% if (title){ %><%= title %> | <% } %> - <%= theme.base_info.title || config.title || 'KEEP' %> + <%= theme.base_info.title || config.title || 'Keep' %> - - <%- favicon_tag('images/logo.svg') %> + <%- __favicon_tag('images/logo.svg') %> <%- css('css/style') %> + <%- __font('css/font-awesome.min.css') %> <%- export_config() %> diff --git a/layout/_partial/home-article-meta-info.ejs b/layout/_partial/home-article-meta-info.ejs index a9bf9b2..18d072d 100644 --- a/layout/_partial/home-article-meta-info.ejs +++ b/layout/_partial/home-article-meta-info.ejs @@ -1,8 +1,8 @@
    - <%- __('read_more') %> + <%- __('read_more') %>
    diff --git a/layout/_partial/local-search.ejs b/layout/_partial/local-search.ejs index 085d5a1..f326a2e 100644 --- a/layout/_partial/local-search.ejs +++ b/layout/_partial/local-search.ejs @@ -2,7 +2,7 @@ - \ No newline at end of file + diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index 9b6a4c5..7e9a2f0 100644 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -1,30 +1,30 @@ -<%- js([ +<%- __js([ 'js/utils.js', 'js/header-shrink.js', 'js/main.js' ]) %> <% if (theme.side_tools.enable) { %> - <%- js('js/dark-light-toggle.js') %> + <%- __js('js/dark-light-toggle.js') %> <% if (theme.back2top.enable) { %> - <%- js('js/back2top.js') %> + <%- __js('js/back2top.js') %> <% } %> <% } %> <% if (theme.local_search.enable) { %> - <%- js('js/local-search.js') %> + <%- __js('js/local-search.js') %> <% } %> <% if (is_post()) { %> - <%- js('js/left-side-toggle.js') %> + <%- __js('js/left-side-toggle.js') %> <% if (theme.code_copy.enable ) { %> - <%- js('js/code-copy.js') %> + <%- __js('js/code-copy.js') %> <% } %> <% if (theme.toc.enable) { %> - <%- js(['js/libs/anime.min.js', 'js/toc.js']) %> + <%- __js(['js/libs/anime.min.js', 'js/toc.js']) %> <% } %> <% } %> diff --git a/layout/_partial/tools.ejs b/layout/_partial/tools.ejs index c714b07..3ae5fb1 100644 --- a/layout/_partial/tools.ejs +++ b/layout/_partial/tools.ejs @@ -2,20 +2,20 @@