mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-17 04:40:53 +08:00
Compare commits
57 Commits
@@ -461,9 +461,9 @@ google_adsense:
|
||||
# --------------------------------------
|
||||
|
||||
site_verification:
|
||||
# - name: google_site_verification
|
||||
# - name: google-site-verification
|
||||
# content: xxxxxx
|
||||
# - name: baidu_site_verification
|
||||
# - name: baidu-site-verification
|
||||
# content: xxxxxxx
|
||||
|
||||
# Beautify/Effect (美化/效果)
|
||||
|
||||
11
layout/includes/third-party/comments/waline.pug
vendored
11
layout/includes/third-party/comments/waline.pug
vendored
@@ -1,14 +1,17 @@
|
||||
- const { serverURL, avatar, avatarCDN, visitor, option } = theme.waline
|
||||
|
||||
script.
|
||||
function loadWaline () {
|
||||
function initWaline () {
|
||||
const waline = new Waline(Object.assign({
|
||||
el: '#waline-wrap',
|
||||
serverURL: '!{theme.waline.serverURL}',
|
||||
avatar: '#{theme.waline.avatar}',
|
||||
serverURL: '!{serverURL}',
|
||||
avatar: '#{avatar}',
|
||||
avatarCDN: '!{avatarCDN || "https://sdn.geekzu.org/avatar/"}',
|
||||
path: location.pathname,
|
||||
visitor: #{theme.waline.visitor},
|
||||
visitor: !{visitor},
|
||||
dark: 'html[data-theme="dark"]'
|
||||
}, !{JSON.stringify(theme.waline.option)}))
|
||||
}, !{JSON.stringify(option)}))
|
||||
}
|
||||
|
||||
if (typeof Waline === 'function') initWaline()
|
||||
|
||||
12
layout/includes/third-party/math/mathjax.pug
vendored
12
layout/includes/third-party/math/mathjax.pug
vendored
@@ -21,7 +21,17 @@ script.
|
||||
math.end = {node: text, delim: '', n: 0}
|
||||
doc.math.push(math)
|
||||
}
|
||||
}, '']
|
||||
}, ''],
|
||||
insertScript: [200, () => {
|
||||
document.querySelectorAll('mjx-container:not\([display]\)').forEach(node => {
|
||||
const target = node.parentNode
|
||||
if (target.nodeName.toLowerCase() === 'li') {
|
||||
target.parentNode.classList.add('has-jax')
|
||||
} else {
|
||||
target.classList.add('has-jax')
|
||||
}
|
||||
});
|
||||
}, '', false]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hexo-theme-butterfly",
|
||||
"version": "3.8.0",
|
||||
"version": "3.8.3",
|
||||
"description": "A Simple and Card UI Design theme for Hexo",
|
||||
"main": "package.json",
|
||||
"scripts": {
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"hexo-renderer-stylus": "^2.0.1",
|
||||
"hexo-renderer-pug": "^1.0.0"
|
||||
"hexo-renderer-pug": "^2.0.0"
|
||||
},
|
||||
"homepage": "https://butterfly.js.org/",
|
||||
"author": "Jerry <i@immyw.com>",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// index
|
||||
&.full_page
|
||||
min-height: $index_top_img_height
|
||||
height: $index_top_img_height
|
||||
background-attachment: fixed
|
||||
|
||||
#site-info
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
// page
|
||||
&.not-home-page
|
||||
min-height: 20rem
|
||||
height: 20rem
|
||||
|
||||
+maxWidth768()
|
||||
height: 14rem
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
// post
|
||||
&.post-bg
|
||||
min-height: 20rem
|
||||
height: 20rem
|
||||
|
||||
+maxWidth768()
|
||||
height: 18rem
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
&.not-top-img
|
||||
margin-bottom: .5rem
|
||||
min-height: 60px
|
||||
height: 60px
|
||||
background: 0
|
||||
|
||||
#nav
|
||||
|
||||
@@ -90,14 +90,11 @@ if hexo-config('waline.bg')
|
||||
display: none
|
||||
|
||||
// mathjax
|
||||
mjx-container
|
||||
mjx-container[display],
|
||||
.has-jax
|
||||
overflow-x: auto
|
||||
overflow-y: hidden
|
||||
|
||||
&:not([display])
|
||||
display: inline-grid
|
||||
max-width: 100%
|
||||
|
||||
.aplayer
|
||||
color: $font-black
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#body-wrap
|
||||
display: flex
|
||||
flex-direction: column
|
||||
height: 100vh
|
||||
min-height: 100vh
|
||||
|
||||
.layout
|
||||
display: flex
|
||||
|
||||
@@ -33,7 +33,7 @@ $font-color = #1F2D3D
|
||||
$rem = 20px
|
||||
$text-line-height = 2
|
||||
$web-bg = hexo-config('background') && unquote(hexo-config('background'))
|
||||
$index_top_img_height = hexo-config('index_top_img_height') ? convert(hexo-config('index_top_img_height')) : 100%
|
||||
$index_top_img_height = hexo-config('index_top_img_height') ? convert(hexo-config('index_top_img_height')) : 100vh
|
||||
$index_site_info_top = hexo-config('index_site_info_top') ? convert(hexo-config('index_site_info_top')) : 43%
|
||||
// Global color & SVG
|
||||
$light-blue = $theme-color
|
||||
|
||||
@@ -294,7 +294,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
|
||||
const addMediumZoom = () => {
|
||||
const zoom = mediumZoom(document.querySelectorAll('#article-container :not(a)>img'))
|
||||
const zoom = mediumZoom(document.querySelectorAll('#article-container :not(a):not(.flink-item-icon) > img'))
|
||||
zoom.on('open', e => {
|
||||
const photoBg = document.documentElement.getAttribute('data-theme') === 'dark' ? '#121212' : '#fff'
|
||||
zoom.update({
|
||||
@@ -305,7 +305,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
const jqLoadAndRun = () => {
|
||||
const $fancyboxEle = GLOBAL_CONFIG.lightbox === 'fancybox'
|
||||
? document.querySelectorAll('#article-container :not(a):not(.gallery-group) > img, #article-container > img')
|
||||
? document.querySelectorAll('#article-container :not(a):not(.gallery-group):not(.flink-item-icon) > img, #article-container > img')
|
||||
: []
|
||||
const fbLengthNoZero = $fancyboxEle.length > 0
|
||||
const $jgEle = document.querySelectorAll('#article-container .justified-gallery')
|
||||
|
||||
Reference in New Issue
Block a user