🏷️ 更新2.3.5 更新內容查看 https://github.com/jerryc127/hexo-theme-butterfly/releases/tag/2.3.5
@@ -1,147 +1,157 @@
|
||||
#article-container
|
||||
if hexo-config('beautify.enable')
|
||||
headStyle(fontsize)
|
||||
padding-left: unit(fontsize + .4, 'rem')
|
||||
beautify()
|
||||
headStyle(fontsize)
|
||||
padding-left: unit(fontsize + .4, 'rem')
|
||||
|
||||
code
|
||||
font-size: unit(fontsize, 'rem')
|
||||
code
|
||||
font-size: unit(fontsize, 'rem')
|
||||
|
||||
&:before
|
||||
margin-left: unit((-(fontsize + .2)), 'rem')
|
||||
font-size: unit(fontsize, 'rem')
|
||||
|
||||
&:hover
|
||||
padding-left: unit(fontsize + .6, 'rem')
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6
|
||||
cursor: pointer
|
||||
transition: all .2s ease-out
|
||||
|
||||
&:before
|
||||
position: absolute
|
||||
top: calc(50% - .35rem)
|
||||
color: $title-prefix-icon-color
|
||||
content: $title-prefix-icon
|
||||
font-style: normal
|
||||
font-variant: normal
|
||||
line-height: 1
|
||||
transition: all .2s ease-out
|
||||
text-rendering: auto
|
||||
-webkit-font-smoothing: antialiased
|
||||
|
||||
if hexo-config('fontawesome_v5') && hexo-config('fontawesome_v5.enable')
|
||||
font-weight: 600
|
||||
font-family: 'Font Awesome 5 Free'
|
||||
else
|
||||
font-weight: normal
|
||||
font-family: FontAwesome
|
||||
|
||||
&:hover
|
||||
&:before
|
||||
margin-left: unit((-(fontsize + .2)), 'rem')
|
||||
font-size: unit(fontsize, 'rem')
|
||||
color: $light-blue
|
||||
|
||||
h1
|
||||
headStyle(1)
|
||||
|
||||
h2
|
||||
headStyle(.9)
|
||||
|
||||
h3
|
||||
headStyle(.8)
|
||||
|
||||
h4
|
||||
headStyle(.7)
|
||||
|
||||
h5
|
||||
headStyle(.6)
|
||||
|
||||
h6
|
||||
headStyle(.6)
|
||||
|
||||
ol,
|
||||
ul
|
||||
margin-top: .4rem
|
||||
padding: 0 0 0 .8rem
|
||||
list-style: none
|
||||
counter-reset: li
|
||||
|
||||
p
|
||||
margin: 0 0 .5rem
|
||||
|
||||
ol,
|
||||
ul
|
||||
padding-left: .5rem
|
||||
|
||||
li
|
||||
position: relative
|
||||
margin: .2rem 0
|
||||
padding: .1rem .5rem .1rem 1.5rem
|
||||
|
||||
&:hover
|
||||
padding-left: unit(fontsize + .6, 'rem')
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6
|
||||
cursor: pointer
|
||||
transition: all .2s ease-out
|
||||
&:before
|
||||
transform: rotate(360deg)
|
||||
|
||||
&:before
|
||||
position: absolute
|
||||
top: calc(50% - .35rem)
|
||||
color: $title-prefix-icon-color
|
||||
content: $title-prefix-icon
|
||||
font-style: normal
|
||||
font-variant: normal
|
||||
line-height: 1
|
||||
transition: all .2s ease-out
|
||||
text-rendering: auto
|
||||
-webkit-font-smoothing: antialiased
|
||||
top: 0
|
||||
left: 0
|
||||
background: $light-blue
|
||||
color: $card-bg
|
||||
cursor: pointer
|
||||
transition: all .3s ease-out
|
||||
|
||||
if hexo-config('fontawesome_v5') && hexo-config('fontawesome_v5.enable')
|
||||
font-weight: 600
|
||||
font-family: 'Font Awesome 5 Free'
|
||||
else
|
||||
font-weight: normal
|
||||
font-family: FontAwesome
|
||||
ol
|
||||
> li
|
||||
&:before
|
||||
margin-top: .2rem
|
||||
width: w = 1.2rem
|
||||
height: h = w
|
||||
border-radius: .5 * w
|
||||
content: counter(li)
|
||||
counter-increment: li
|
||||
text-align: center
|
||||
font-size: .6rem
|
||||
line-height: h
|
||||
|
||||
ul
|
||||
> li
|
||||
&:hover
|
||||
&:before
|
||||
color: $light-blue
|
||||
border-color: $theme-button-hover-color
|
||||
|
||||
h1
|
||||
headStyle(1)
|
||||
&:before
|
||||
$w = .3rem
|
||||
top: 10px
|
||||
margin-left: .45rem
|
||||
width: w = $w
|
||||
height: h = w
|
||||
border: .5 * w solid $light-blue
|
||||
border-radius: w
|
||||
background: transparent
|
||||
content: ''
|
||||
line-height: h
|
||||
|
||||
h2
|
||||
headStyle(.9)
|
||||
no-beautify()
|
||||
ol,
|
||||
ul
|
||||
margin-top: .4rem
|
||||
|
||||
h3
|
||||
headStyle(.8)
|
||||
|
||||
h4
|
||||
headStyle(.7)
|
||||
|
||||
h5
|
||||
headStyle(.6)
|
||||
|
||||
h6
|
||||
headStyle(.6)
|
||||
p
|
||||
margin: 0 0 .5rem
|
||||
|
||||
ol,
|
||||
ul
|
||||
margin-top: .4rem
|
||||
padding: 0 0 0 .8rem
|
||||
list-style: none
|
||||
counter-reset: li
|
||||
padding-left: .5rem
|
||||
|
||||
p
|
||||
margin: 0 0 .5rem
|
||||
li
|
||||
position: relative
|
||||
margin: .3rem 0
|
||||
padding-left: .3rem
|
||||
|
||||
ol,
|
||||
ul
|
||||
padding-left: .5rem
|
||||
#article-container
|
||||
if hexo-config('beautify.enable') && hexo-config('beautify.field') == 'site'
|
||||
beautify()
|
||||
else if hexo-config('beautify.enable') && hexo-config('beautify.field') == 'post'
|
||||
no-beautify()
|
||||
|
||||
li
|
||||
position: relative
|
||||
margin: .2rem 0
|
||||
padding: .1rem .5rem .1rem 1.5rem
|
||||
|
||||
&:hover
|
||||
&:before
|
||||
transform: rotate(360deg)
|
||||
|
||||
&:before
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
background: $light-blue
|
||||
color: $card-bg
|
||||
cursor: pointer
|
||||
transition: all .3s ease-out
|
||||
|
||||
ol
|
||||
> li
|
||||
&:before
|
||||
margin-top: .2rem
|
||||
width: w = 1.2rem
|
||||
height: h = w
|
||||
border-radius: .5 * w
|
||||
content: counter(li)
|
||||
counter-increment: li
|
||||
text-align: center
|
||||
font-size: .6rem
|
||||
line-height: h
|
||||
|
||||
ul
|
||||
> li
|
||||
&:hover
|
||||
&:before
|
||||
border-color: $theme-button-hover-color
|
||||
|
||||
&:before
|
||||
$w = .3rem
|
||||
top: 10px
|
||||
margin-left: .45rem
|
||||
width: w = $w
|
||||
height: h = w
|
||||
border: .5 * w solid $light-blue
|
||||
border-radius: w
|
||||
background: transparent
|
||||
content: ''
|
||||
line-height: h
|
||||
&.post-content
|
||||
beautify()
|
||||
else
|
||||
ol,
|
||||
ul
|
||||
margin-top: .4rem
|
||||
counter-reset: li
|
||||
|
||||
p
|
||||
margin: 0 0 .5rem
|
||||
|
||||
ol,
|
||||
ul
|
||||
padding-left: .5rem
|
||||
|
||||
li
|
||||
position: relative
|
||||
margin: .3rem 0
|
||||
padding-left: .3rem
|
||||
no-beautify()
|
||||
|
||||
a
|
||||
color: $a-link-color
|
||||
|
||||
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 247 KiB |
|
Before Width: | Height: | Size: 52 KiB |
@@ -1 +0,0 @@
|
||||
<svg width="200px" height="200px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-pacman" style="background: none;"><g ng-attr-style="display:{{config.showBean}}" style="display:block"><circle cx="74.5405" cy="50" r="4" ng-attr-fill="{{config.c2}}" fill="#a3d9ef"><animate attributeName="cx" calcMode="linear" values="95;35" keyTimes="0;1" dur="0.8" begin="-0.536s" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" calcMode="linear" values="0;1;1" keyTimes="0;0.2;1" dur="0.8" begin="-0.536s" repeatCount="indefinite"></animate></circle><circle cx="94.9405" cy="50" r="4" ng-attr-fill="{{config.c2}}" fill="#a3d9ef"><animate attributeName="cx" calcMode="linear" values="95;35" keyTimes="0;1" dur="0.8" begin="-0.264s" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" calcMode="linear" values="0;1;1" keyTimes="0;0.2;1" dur="0.8" begin="-0.264s" repeatCount="indefinite"></animate></circle><circle cx="54.7405" cy="50" r="4" ng-attr-fill="{{config.c2}}" fill="#a3d9ef"><animate attributeName="cx" calcMode="linear" values="95;35" keyTimes="0;1" dur="0.8" begin="0s" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" calcMode="linear" values="0;1;1" keyTimes="0;0.2;1" dur="0.8" begin="0s" repeatCount="indefinite"></animate></circle></g><g ng-attr-transform="translate({{config.showBeanOffset}} 0)" transform="translate(-15 0)"><path d="M50 50L20 50A30 30 0 0 0 80 50Z" ng-attr-fill="{{config.c1}}" fill="#82bbe4" transform="rotate(29.6108 50 50)"><animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;45 50 50;0 50 50" keyTimes="0;0.5;1" dur="0.8s" begin="0s" repeatCount="indefinite"></animateTransform></path><path d="M50 50L20 50A30 30 0 0 1 80 50Z" ng-attr-fill="{{config.c1}}" fill="#82bbe4" transform="rotate(-29.6108 50 50)"><animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;-45 50 50;0 50 50" keyTimes="0;0.5;1" dur="0.8s" begin="0s" repeatCount="indefinite"></animateTransform></path></g></svg>
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -445,6 +445,13 @@ $(function () {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* lazyload
|
||||
*/
|
||||
if (GLOBAL_CONFIG.islazyload) {
|
||||
window.lozad('img').observe()
|
||||
}
|
||||
|
||||
/**
|
||||
* 滾動處理
|
||||
*/
|
||||
@@ -532,11 +539,13 @@ $(function () {
|
||||
}, 100)
|
||||
}
|
||||
|
||||
// function updateAnchor (anchor) {
|
||||
// if (window.history.replaceState && anchor !== window.location.hash) {
|
||||
// window.history.replaceState(null, null, anchor)
|
||||
// }
|
||||
// }
|
||||
// anchor
|
||||
var isanchor = GLOBAL_CONFIG.isanchor
|
||||
var updateAnchor = function (anchor) {
|
||||
if (window.history.replaceState && anchor !== window.location.hash) {
|
||||
window.history.replaceState(undefined, undefined, anchor)
|
||||
}
|
||||
}
|
||||
|
||||
// find head position & add active class
|
||||
// DOM Hierarchy:
|
||||
@@ -565,7 +574,7 @@ $(function () {
|
||||
|
||||
var currentActive = $('.toc-link.active')
|
||||
if (currentId && currentActive.attr('href') !== currentId) {
|
||||
// updateAnchor(currentId)
|
||||
if (isanchor) updateAnchor(currentId)
|
||||
|
||||
$('.toc-link').removeClass('active')
|
||||
|
||||
@@ -711,11 +720,7 @@ $(function () {
|
||||
|
||||
$darkModeButtom.click(function () {
|
||||
switchReadMode()
|
||||
try {
|
||||
utterancesTheme()
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
if (typeof utterancesTheme === 'function') utterancesTheme()
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||