From d4e40b5fc292e8e8d4587e807407c0e265f42715 Mon Sep 17 00:00:00 2001 From: Evan Luo Date: Thu, 5 Jan 2023 20:56:10 -0500 Subject: [PATCH 1/5] toc: fix number bug --- source/css/layout/_partial/toc.styl | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) 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) + } + } } } } From c77e2e1129738361666bfb6312ef1aad69da08cd Mon Sep 17 00:00:00 2001 From: Evan Luo Date: Thu, 5 Jan 2023 20:56:45 -0500 Subject: [PATCH 2/5] submenu: fix chinese break word bug --- source/css/layout/_partial/header.styl | 1 + 1 file changed, 1 insertion(+) 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 From 7171b2dad96954fb26fd7230bed090412ac5fbab Mon Sep 17 00:00:00 2001 From: Evan Luo Date: Thu, 5 Jan 2023 21:32:52 -0500 Subject: [PATCH 3/5] thumbnail: fix mobile --- source/css/layout/home-content.styl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 { From 431e967b19553d15fe9f9fae07cd3ccd256a866c Mon Sep 17 00:00:00 2001 From: Evan Luo Date: Thu, 5 Jan 2023 21:48:12 -0500 Subject: [PATCH 4/5] inject: add inject customizable html function --- _config.yml | 12 ++++++++++++ layout/_partial/footer.ejs | 5 +++++ layout/_partial/head.ejs | 6 ++++++ 3 files changed, 23 insertions(+) diff --git a/_config.yml b/_config.yml index c031aa6b..cd5f9837 100755 --- a/_config.yml +++ b/_config.yml @@ -260,6 +260,18 @@ 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
tag + - + - + # --------------------------------------------------------------------------------------- # Redefine Theme version (Please dont modify it) # Please go to github to update the latest version frequently diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 3177f39e..d81b4ac1 100755 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -58,6 +58,11 @@ <% if (theme.footer.hasOwnProperty('customize') && theme.footer.customize) { %>
<%- theme.footer.customize %>
<% } %> + + <% if (theme.inject.enable == true) { %> + <% for (let i in theme.inject.footer) { %> + <%- theme.inject.footer[i] %> + <% } }%>
\ 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() %> From 82424c874309040be0445d43f112962b8f5d1f48 Mon Sep 17 00:00:00 2001 From: Evan Luo Date: Thu, 5 Jan 2023 21:48:56 -0500 Subject: [PATCH 5/5] version: change to v0.5.1 --- _config.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index cd5f9837..34193a8f 100755 --- a/_config.yml +++ b/_config.yml @@ -276,4 +276,4 @@ inject: # Redefine Theme version (Please dont modify it) # Please go to github to update the latest version frequently # --------------------------------------------------------------------------------------- -version: 0.5.0 \ No newline at end of file +version: 0.5.1 \ No newline at end of file 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": {