diff --git a/_config.yml b/_config.yml index c031aa6b..34193a8f 100755 --- a/_config.yml +++ b/_config.yml @@ -260,8 +260,20 @@ footer: customize: # customize footer message, can be html code icp: # ICP record number of your website, Can be null +# --------------------------------------------------------------------------------------- +# Custom html code +# --------------------------------------------------------------------------------------- +inject: + enable: false + head: # inject code into
tag + - + - + footer: # inject code into \ No newline at end of file diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index ff7f2e1b..214a623d 100755 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -46,6 +46,12 @@ <%- __css('css/duotone.min.css') %> <% } %> <%- __css('css/css2.css') %> + + <% if (theme.inject.enable == true) { %> + <% for (let i in theme.inject.head) { %> + <%- theme.inject.head[i] %> + <% } }%> + <%- export_config() %> diff --git a/package.json b/package.json index 0a56d53f..eaa68c37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-redefine", - "version": "0.5.0", + "version": "0.5.1", "private": false, "description": "\"Redefine\" hexo theme is a simple & fast & pure theme, but with no compromise.", "scripts": { diff --git a/source/css/layout/_partial/header.styl b/source/css/layout/_partial/header.styl index 3d761823..94f5055e 100755 --- a/source/css/layout/_partial/header.styl +++ b/source/css/layout/_partial/header.styl @@ -190,6 +190,7 @@ $logo-image-box-width = 46px transition-t("all", "0", "0.2", "linear") li a { + white-space nowrap color var(--default-text-color) font-size 1rem padding 3px 15px diff --git a/source/css/layout/_partial/toc.styl b/source/css/layout/_partial/toc.styl index 937c1b8a..b685c4b4 100755 --- a/source/css/layout/_partial/toc.styl +++ b/source/css/layout/_partial/toc.styl @@ -73,26 +73,25 @@ .active-current { .nav-number, .nav-text { - &::before { - content " " - width 10px - height 1.7rem - margin auto 0 - transform translate(-12px,0) - border-left 2px solid var(--primary-color) - position absolute - margin-right 4px - color var(--primary-color) - } - color var(--primary-color) !important font-weight bold - display block transition none } } - + .active-current > span { + &:first-child::before { + content " " + width 10px + height 1.7rem + margin auto 0 + transform translate(-12px,0) + border-left 2px solid var(--primary-color) + position absolute + margin-right 4px + color var(--primary-color) + } + } } } } diff --git a/source/css/layout/home-content.styl b/source/css/layout/home-content.styl index 1c56a4c7..5c074bd9 100755 --- a/source/css/layout/home-content.styl +++ b/source/css/layout/home-content.styl @@ -32,11 +32,15 @@ margin -28px -28px 20px -28px +redefine-tablet() { - border-radius 7px + border-radius 14.4px + margin -22.4px -22.4px 16px -22.4px + padding-bottom 22.4px } +redefine-mobile() { - border-radius 5px + border-radius 10.8px + margin -16.8px -16.8px 12px -16.8px + padding-bottom 16.8px } img {