breaking changes: anchor設置更改,可單獨設置按鈕和自動更新anchor是否開啟,可設置button圖標,可設置button 總是顯示 closed #1025

improvement: 本地預覽,友情鏈接頁面刷新,內容不會重複顯示
pull/1042/head
Jerry 2 years ago
parent c866315b87
commit 13cf15c369

@ -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
# --------------------------------------

@ -120,5 +120,5 @@ script.
},
isPhotoFigcaption: !{theme.photofigcaption},
islazyload: !{theme.lazyload.enable},
isAnchor: !{theme.anchor}
isAnchor: !{theme.anchor.auto_update}
}

@ -1,5 +1,6 @@
#article-container
.flink
- let pageContent = page.content
if page.flink_url
script.
(()=>{
@ -63,6 +64,6 @@
- result += `${className}${classDesc} <div class="flink-list">${listResult}</div>`
- page.content = result + page.content
!= page.content
- pageContent = result + pageContent
!= pageContent

@ -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": {

@ -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

@ -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

@ -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
$timeline-default-color = $theme-color
// archor
$archor-button-icon = hexo-config('anchor.button.icon') ? hexo-config('anchor.button.icon') : '\f0c1'
Loading…
Cancel
Save