mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
Compare commits
5 Commits
@@ -331,7 +331,6 @@ valine:
|
|||||||
waline:
|
waline:
|
||||||
serverURL: # Waline server address url
|
serverURL: # Waline server address url
|
||||||
avatar: monsterid # gravatar style https://zh-tw.gravatar.com/site/implement/images/#default-image
|
avatar: monsterid # gravatar style https://zh-tw.gravatar.com/site/implement/images/#default-image
|
||||||
emojiCDN: # emoji CDN
|
|
||||||
bg: # waline background
|
bg: # waline background
|
||||||
visitor: false
|
visitor: false
|
||||||
option:
|
option:
|
||||||
|
|||||||
@@ -6,11 +6,13 @@
|
|||||||
|
|
||||||
var pageToc = page.toc === true || page.toc === false ? page.toc : theme.toc.enable
|
var pageToc = page.toc === true || page.toc === false ? page.toc : theme.toc.enable
|
||||||
var showToc = is_post() && theme.aside.enable && pageToc && (toc(page.content) !== '' || page.encrypt == true )
|
var showToc = is_post() && theme.aside.enable && pageToc && (toc(page.content) !== '' || page.encrypt == true )
|
||||||
|
|
||||||
|
let titleVal = pageTitle.replace(/'/ig,"\\'")
|
||||||
-
|
-
|
||||||
|
|
||||||
script#config-diff.
|
script#config-diff.
|
||||||
var GLOBAL_CONFIG_SITE = {
|
var GLOBAL_CONFIG_SITE = {
|
||||||
title: '!{pageTitle}',
|
title: '!{titleVal}',
|
||||||
isPost: !{is_post()},
|
isPost: !{is_post()},
|
||||||
isHome: !{is_home()},
|
isHome: !{is_home()},
|
||||||
isHighlightShrink: !{isHighlightShrink},
|
isHighlightShrink: !{isHighlightShrink},
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ script.
|
|||||||
function loadWaline () {
|
function loadWaline () {
|
||||||
function initWaline () {
|
function initWaline () {
|
||||||
let initData = {
|
let initData = {
|
||||||
el: '#waline-wrap',
|
el: null,
|
||||||
serverURL: '!{theme.waline.serverURL}',
|
serverURL: '!{theme.waline.serverURL}',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
- let emojiMaps = '""'
|
|
||||||
if site.data.waline
|
|
||||||
- emojiMaps = JSON.stringify(site.data.waline)
|
|
||||||
|
|
||||||
script.
|
script.
|
||||||
function loadWaline () {
|
function loadWaline () {
|
||||||
function initWaline () {
|
function initWaline () {
|
||||||
@@ -10,9 +6,8 @@ script.
|
|||||||
serverURL: '!{theme.waline.serverURL}',
|
serverURL: '!{theme.waline.serverURL}',
|
||||||
avatar: '#{theme.waline.avatar}',
|
avatar: '#{theme.waline.avatar}',
|
||||||
path: location.pathname,
|
path: location.pathname,
|
||||||
emojiCDN: '#{theme.waline.emojiCDN}',
|
visitor: #{theme.waline.visitor},
|
||||||
emojiMaps: !{emojiMaps},
|
dark: '[data-theme="dark"]'
|
||||||
visitor: #{theme.waline.visitor}
|
|
||||||
}, !{JSON.stringify(theme.waline.option)}))
|
}, !{JSON.stringify(theme.waline.option)}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,11 +53,10 @@ script.
|
|||||||
const getComment = () => {
|
const getComment = () => {
|
||||||
const loadWaline = () => {
|
const loadWaline = () => {
|
||||||
Waline.Widget.RecentComments({
|
Waline.Widget.RecentComments({
|
||||||
el: '#card-newest-comments .aside-list',
|
|
||||||
serverURL: '!{theme.waline.serverURL}',
|
serverURL: '!{theme.waline.serverURL}',
|
||||||
count: !{theme.newest_comments.limit}
|
count: !{theme.newest_comments.limit}
|
||||||
}).then(comments => {
|
}).then(res => {
|
||||||
const walineArray = comments.map(function (e) {
|
const walineArray = res.comments.map(e => {
|
||||||
return {
|
return {
|
||||||
'content': changeContent(e.comment),
|
'content': changeContent(e.comment),
|
||||||
'avatar': getIcon(e.QQAvatar,e.mail),
|
'avatar': getIcon(e.QQAvatar,e.mail),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "3.7.5",
|
"version": "3.7.8",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -185,6 +185,9 @@ no-beautify()
|
|||||||
else
|
else
|
||||||
no-beautify()
|
no-beautify()
|
||||||
|
|
||||||
|
> :last-child
|
||||||
|
margin-bottom: 0 !important
|
||||||
|
|
||||||
#post
|
#post
|
||||||
.tag_share
|
.tag_share
|
||||||
.post-meta
|
.post-meta
|
||||||
|
|||||||
Reference in New Issue
Block a user