diff --git a/_config.yml b/_config.yml
index 20eadd5..1c4b09f 100644
--- a/_config.yml
+++ b/_config.yml
@@ -168,8 +168,12 @@ index_post_content:
length: 500 # if you set method to 2 or 3, the length need to config
# anchor
-# when you scroll in post, the URL will update according to header id.
-anchor: false
+anchor:
+ button:
+ enable: false
+ always_show: false
+ icon: # the unicode value of Font Awesome icon, such as '\3423'
+ auto_update: false # when you scroll in post, the URL will update according to header id.
# Post
# --------------------------------------
diff --git a/layout/includes/head/config.pug b/layout/includes/head/config.pug
index 61f62d0..4bcff8f 100644
--- a/layout/includes/head/config.pug
+++ b/layout/includes/head/config.pug
@@ -120,5 +120,5 @@ script.
},
isPhotoFigcaption: !{theme.photofigcaption},
islazyload: !{theme.lazyload.enable},
- isAnchor: !{theme.anchor}
+ isAnchor: !{theme.anchor.auto_update}
}
diff --git a/layout/includes/page/flink.pug b/layout/includes/page/flink.pug
index e63eb68..8ec4ed6 100644
--- a/layout/includes/page/flink.pug
+++ b/layout/includes/page/flink.pug
@@ -1,5 +1,6 @@
#article-container
.flink
+ - let pageContent = page.content
if page.flink_url
script.
(()=>{
@@ -63,6 +64,6 @@
- result += `${className}${classDesc}
${listResult}
`
- - page.content = result + page.content
- != page.content
+ - pageContent = result + pageContent
+ != pageContent
diff --git a/package.json b/package.json
index bbe96e7..b3f420c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-butterfly",
- "version": "4.4.0",
+ "version": "4.5.0-b1",
"description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json",
"scripts": {
diff --git a/plugins.yml b/plugins.yml
index 82892dd..d38dd76 100644
--- a/plugins.yml
+++ b/plugins.yml
@@ -5,7 +5,7 @@ algolia_search_v4:
instantsearch_v4:
name: instantsearch.js
file: dist/instantsearch.production.min.js
- version: 4.44.0
+ version: 4.45.0
pjax:
name: pjax
file: pjax.min.js
@@ -13,11 +13,11 @@ pjax:
gitalk:
name: gitalk
file: dist/gitalk.min.js
- version: 1.7.2
+ version: 1.8.0
gitalk_css:
name: gitalk
file: dist/gitalk.css
- version: 1.7.2
+ version: 1.8.0
blueimp_md5:
name: blueimp-md5
file: js/md5.min.js
@@ -29,15 +29,15 @@ valine:
disqusjs:
name: disqusjs
file: dist/browser/disqusjs.es2015.umd.min.js
- version: 3.0.1
+ version: 3.0.2
disqusjs_css:
name: disqusjs
file: dist/browser/styles/disqusjs.css
- version: 3.0.1
+ version: 3.0.2
twikoo:
name: twikoo
file: dist/twikoo.all.min.js
- version: 1.6.5
+ version: 1.6.7
waline_js:
name: '@waline/client'
file: dist/waline.js
@@ -64,16 +64,16 @@ katex:
name: katex
file: dist/katex.min.css
other_name: KaTeX
- version: 0.16.0
+ version: 0.16.2
katex_copytex:
name: katex
file: dist/contrib/copy-tex.min.js
other_name: KaTeX
- version: 0.16.0
+ version: 0.16.2
mermaid:
name: mermaid
file: dist/mermaid.min.js
- version: 9.1.5
+ version: 9.1.6
canvas_ribbon:
name: butterfly-extsrc
file: dist/canvas-ribbon.min.js
@@ -105,7 +105,7 @@ ClickShowText:
lazyload:
name: vanilla-lazyload
file: dist/lazyload.iife.min.js
- version: 17.3.1
+ version: 17.8.3
instantpage:
name: instant.page
file: instantpage.js
@@ -144,7 +144,7 @@ fontawesomeV6:
name: '@fortawesome/fontawesome-free'
file: css/all.min.css
other_name: font-awesome
- version: 6.1.2
+ version: 6.2.0
flickr_justified_gallery_js:
name: flickr-justified-gallery
file: dist/fjGallery.min.js
@@ -169,17 +169,17 @@ prismjs_js:
name: prismjs
file: prism.js
other_name: prism
- version: 1.28.0
+ version: 1.29.0
prismjs_lineNumber_js:
name: prismjs
file: plugins/line-numbers/prism-line-numbers.min.js
other_name: prism
- version: 1.28.0
+ version: 1.29.0
prismjs_autoloader:
name: prismjs
file: plugins/autoloader/prism-autoloader.min.js
other_name: prism
- version: 1.28.0
+ version: 1.29.0
artalk_js:
name: artalk
file: dist/Artalk.js
diff --git a/source/css/_layout/post.styl b/source/css/_layout/post.styl
index aebae8d..4915ee6 100644
--- a/source/css/_layout/post.styl
+++ b/source/css/_layout/post.styl
@@ -102,31 +102,35 @@ beautify()
font-family: Monaco, 'Ubuntu Mono', monospace
line-height: 1em
- if hexo-config('anchor')
+ if hexo-config('anchor.button.enable')
a.headerlink
&:after
@extend .fontawesomeIcon
float: right
color: var(--headline-presudo)
- content: '\f0c1'
+ content: $archor-button-icon
font-size: .95em
- opacity: 0
transition: all .3s
&:hover
&:after
color: var(--pseudo-hover)
- h1,
- h2,
- h3,
- h4,
- h5,
- h6
- &:hover
- a.headerlink
- &:after
- opacity: 1
+ if !hexo-config('anchor.button.always_show')
+ a.headerlink
+ &:after
+ opacity: 0
+
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6
+ &:hover
+ a.headerlink
+ &:after
+ opacity: 1
ol,
ul
diff --git a/source/css/var.styl b/source/css/var.styl
index 545b0a7..9675db0 100644
--- a/source/css/var.styl
+++ b/source/css/var.styl
@@ -71,7 +71,7 @@ $button-hover-color = $themeColorEnable && hexo-config('theme_color.button_hover
$button-bg = $theme-color
$pseudo-hover = $button-hover-color
// scrollbar
-$scrollbar-color= $themeColorEnable && hexo-config('theme_color.scrollbar_color') ? convert(hexo-config('theme_color.scrollbar_color')) : $theme-color
+$scrollbar-color = $themeColorEnable && hexo-config('theme_color.scrollbar_color') ? convert(hexo-config('theme_color.scrollbar_color')) : $theme-color
// table
$table-thead-bg = #99a9bf
// reward
@@ -180,4 +180,6 @@ $tab-active-border-color = $theme-color
$tab-button-active-bg = $card-bg
$tab-to-top-color = #99a9bf
// Tag Plugins - timeline
-$timeline-default-color = $theme-color
\ No newline at end of file
+$timeline-default-color = $theme-color
+// archor
+$archor-button-icon = hexo-config('anchor.button.icon') ? hexo-config('anchor.button.icon') : '\f0c1'
\ No newline at end of file