diff --git a/_config.yml b/_config.yml
index 44dac86..0b74d3d 100755
--- a/_config.yml
+++ b/_config.yml
@@ -57,7 +57,7 @@ article:
# 文章许可协议
license: '本文采用 [署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) 许可协议,转载请注明出处。'
# 分享
- share: [wechat, weibo, email, link]
+ share: # [weibo, email, link] # wechat 需要安装二维码插件: npm i hexo-helper-qrcode
# 相关文章,需要安装插件 (for layout: post)
# npm i hexo-related-popular-posts
related_posts:
diff --git a/layout/_partial/main/article/references.ejs b/layout/_partial/main/article/references.ejs
index a920f8d..eae46b2 100644
--- a/layout/_partial/main/article/references.ejs
+++ b/layout/_partial/main/article/references.ejs
@@ -1,5 +1,8 @@
<%
function layoutDiv() {
+ if (page.layout == 'wiki' && !page.references) {
+ return '';
+ }
let el = '';
el += '
>
<%- __('btn.home') %>
- <% if (page.menu_id && theme.sidebar.menu[page.menu_id] && theme.sidebar.menu[page.menu_id].url) { %>
-
<%- __(theme.sidebar.menu[page.menu_id].title) %>
+ <% if (page.menu_id && theme.sidebar.menu[page.menu_id] && md_link(theme.sidebar.menu[page.menu_id])) { %>
+
<%- __(md_text(theme.sidebar.menu[page.menu_id])) %>
<% } else { %>
<%- __('btn.wiki') %>
<% } %>
diff --git a/source/css/_layout/base.styl b/source/css/_layout/base.styl
index 67135ce..cb0ca95 100644
--- a/source/css/_layout/base.styl
+++ b/source/css/_layout/base.styl
@@ -109,6 +109,7 @@ ol ul, ol ol
table:not([class])
border-collapse: collapse
overflow: auto
+ display: block
margin: 1rem 0
max-width: 100%
vertical-align: text-top
@@ -125,3 +126,13 @@ table:not([class])
trans()
&:hover
background: var(--block)
+
+input
+ display: block
+
+a[onclick]:hover
+ cursor: pointer
+
+input
+ background: none
+ border: none
diff --git a/source/css/_layout/navbar.styl b/source/css/_layout/navbar.styl
index 78cbe92..6c9aa6d 100644
--- a/source/css/_layout/navbar.styl
+++ b/source/css/_layout/navbar.styl
@@ -4,8 +4,9 @@
margin-top: 1.75rem
top: -2px
background: var(--site-bg)
- padding: 0.5rem 1.25rem 0.38rem
+ padding: 0.5rem 1rem 0.38rem
z-index: 1
+
nav.cap
display: flex
overflow: scroll
@@ -14,17 +15,15 @@ nav.cap
margin: 0
a
padding: 0.5rem 0.75rem
+ margin-left: 0.25rem
color: var(--text-p3)
border-radius: 4px
font-weight: 600
white-space: nowrap
trans1 background
- &.active,&:hover
+ &.active, &:hover
background: var(--hover-block)
color: var(--text-p1)
- a+a
- margin-left: 4px
-
// 面包屑导航
.breadcrumb-navigation
diff --git a/source/css/_layout/partial/read_next.styl b/source/css/_layout/partial/read_next.styl
index 73c1ce3..1bd64cb 100644
--- a/source/css/_layout/partial/read_next.styl
+++ b/source/css/_layout/partial/read_next.styl
@@ -16,3 +16,5 @@
color: var(--text-p1)
font-size: 2rem
font-weight: 400
+ @media screen and (max-width: $device-mobile)
+ font-size: 1.5rem
diff --git a/source/css/_layout/partial/references.styl b/source/css/_layout/partial/references.styl
index 3be9f1c..185777c 100644
--- a/source/css/_layout/partial/references.styl
+++ b/source/css/_layout/partial/references.styl
@@ -3,12 +3,18 @@
padding: 1rem
background: var(--block)
border-radius: $border-block
+ border: 1px solid var(--block-border)
.header
font-weight: 500
color: var(--text-p3)
margin-bottom: 0.75rem
font-size: 1.25rem
.body
+ input.copy-area
+ margin-bottom: 0.5rem
+ width: 100%
+ font-family: $ff-code
+ font-size: $fs12
p
font-size: $fs14
color: var(--text-p2)
@@ -22,12 +28,23 @@
.post-title
margin: 0.5rem 0
line-height: 1.2
- font-size: $fs13
+ font-size: $fs14
section+section
- margin-top: 2rem
+ margin-top: 1rem
+ padding-top: 1rem
+ border-top: 1px solid var(--block-border)
.references-wrap .social-wrap
grid-gap: $gap * 0.25 $gap * 0.5
grid-template-columns: repeat(auto-fill, 40px)
a.social
padding: 8px
+
+.references-wrap .qrcode
+ margin: 2rem auto 1rem
+ width: 128px
+ img
+ object-fit: contain
+
+.references-wrap .qrcode.display
+ display: block !important
diff --git a/source/css/_layout/partial/related_posts.styl b/source/css/_layout/partial/related_posts.styl
index 25d8abe..666d092 100644
--- a/source/css/_layout/partial/related_posts.styl
+++ b/source/css/_layout/partial/related_posts.styl
@@ -11,11 +11,12 @@ div.related-posts-wrap
align-items: flex-start
scrollbar(8px, 4px)
padding-bottom: 8px
+ border-radius: $border-block
a
flex-grow: 0
flex-shrink: 0
background: var(--card)
- border-radius: 0.5rem
+ border-radius: $border-block
padding-bottom: 1rem
line-height: 1.2
display: flex
diff --git a/source/css/_layout/sidebar.styl b/source/css/_layout/sidebar.styl
index cbbdbe7..8d01f39 100644
--- a/source/css/_layout/sidebar.styl
+++ b/source/css/_layout/sidebar.styl
@@ -123,9 +123,10 @@ nav.menu
margin-top: 0
margin-bottom: 1rem
line-height: 0
-
+
.social-wrap
+ disable-select()
display: grid
grid-gap: $gap * 0.25 $gap * 0.25
grid-template-columns: repeat(auto-fill, 32px)
diff --git a/source/css/_layout/tag-plugins/ghcard.styl b/source/css/_layout/tag-plugins/ghcard.styl
index 4b2ba63..89d947c 100644
--- a/source/css/_layout/tag-plugins/ghcard.styl
+++ b/source/css/_layout/tag-plugins/ghcard.styl
@@ -2,8 +2,3 @@
line-height: 0
a.ghcard
display: inline-block
- img
- border-radius: 5px
- transition: box-shadow
- &:hover img
- box-shadow: $boxshadow-float, $boxshadow-card-float
diff --git a/source/css/_layout/tag-plugins/timeline.styl b/source/css/_layout/tag-plugins/timeline.styl
index bb6aa11..02baaec 100644
--- a/source/css/_layout/tag-plugins/timeline.styl
+++ b/source/css/_layout/tag-plugins/timeline.styl
@@ -29,15 +29,15 @@ div.timenode
position: relative
background: var(--card)
border: 1px solid var(--block-border)
- border-radius: 6px
+ border-radius: $border-block
margin-top: 1rem
margin-bottom: 1rem
font-size: $fs14
.header
line-height: 1.2
background: var(--block)
- border-top-left-radius: 5px
- border-top-right-radius: 5px
+ border-top-left-radius: "calc(%s - 1px)" % $border-block
+ border-top-right-radius: "calc(%s - 1px)" % $border-block
border-bottom: 1px solid var(--block-border)
display: flex
justify-content: space-between
diff --git a/source/js/main.js b/source/js/main.js
index fdd7082..a44f094 100644
--- a/source/js/main.js
+++ b/source/js/main.js
@@ -127,6 +127,20 @@ const util = {
}
},
+ copy_link: () => {
+ const el = document.getElementById("copy-link");
+ if (el) {
+ el.select();
+ document.execCommand("Copy");
+ }
+ },
+
+ toggle_qrcode: () => {
+ const el = document.getElementById("qrcode-wechat");
+ if (el) {
+ el.classList.toggle("display");
+ }
+ },
}