diff --git a/layout/_partial/first-screen.ejs b/layout/_partial/first-screen.ejs index e817c138..1f6f4343 100644 --- a/layout/_partial/first-screen.ejs +++ b/layout/_partial/first-screen.ejs @@ -34,7 +34,8 @@ const { enable: sc_enable, links: sc_links } = theme?.social_contact || {}
<% if (sc_enable === true) { %> -
+ <% } %>
diff --git a/scripts/use-source-data.js b/scripts/use-source-data.js index 9e95b58d..98d22341 100644 --- a/scripts/use-source-data.js +++ b/scripts/use-source-data.js @@ -1,3 +1,5 @@ +/* global hexo */ + hexo.on('generateBefore', function () { if (hexo.locals.get) { const data = hexo.locals.get('data') @@ -8,13 +10,16 @@ hexo.on('generateBefore', function () { hexo.theme.config = data._config } else if (data.keep) { hexo.theme.config = data.keep - } else if (data._keep) { - hexo.theme.config = data._keep } // friends link file handle - if (data.links || data.link) { - hexo.theme.config.links = data.links || data.link + if (data.links) { + hexo.theme.config.links = data.links + } + + // custom social contact icon handle + if (data.icons) { + hexo.theme.config.icons = data.icons } } } diff --git a/source/css/layout/_partial/first-screen.styl b/source/css/layout/_partial/first-screen.styl index 8e8882df..20aaea96 100644 --- a/source/css/layout/_partial/first-screen.styl +++ b/source/css/layout/_partial/first-screen.styl @@ -74,20 +74,42 @@ $first-screen-img = $temp-img ? $temp-img : '/images/bg.svg' .sc-icon-list { display flex justify-content center - box-sizing border-box - font-size var(--first-screen-icon-size) - - - +keep-tablet() { - font-size calc(var(--first-screen-icon-size) * 0.9) - } .sc-icon-item { + display flex + align-items center margin 0 1rem cursor pointer i { color var(--text-color-3) + font-size var(--first-screen-icon-size) + } + + svg { + width var(--first-screen-icon-size) + height var(--first-screen-icon-size) + + path { + fill var(--text-color-3) + } + } + + + +keep-tablet() { + i { + font-size calc(var(--first-screen-icon-size) * 0.9) + } + + svg { + width calc(var(--first-screen-icon-size) * 0.9) + height calc(var(--first-screen-icon-size) * 0.9) + } + } + + a { + display flex !important + align-items center !important } } }