mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
update
This commit is contained in:
@@ -60,47 +60,38 @@
|
|||||||
if block
|
if block
|
||||||
block
|
block
|
||||||
|
|
||||||
|
mixin otherPV()
|
||||||
|
if theme.umami_analytics.enable && theme.umami_analytics.UV_PV.page_pv
|
||||||
|
+pvBlock('', '', '')
|
||||||
|
span#umamiPV(data-path=url_for(page.path))
|
||||||
|
i.fa-solid.fa-spinner.fa-spin
|
||||||
|
else if theme.busuanzi.page_pv
|
||||||
|
+pvBlock('', 'post-meta-pv-cv', '')
|
||||||
|
span#busuanzi_value_page_pv
|
||||||
|
i.fa-solid.fa-spinner.fa-spin
|
||||||
|
|
||||||
- const commentUse = comments.use && comments.use[0]
|
- const commentUse = comments.use && comments.use[0]
|
||||||
if page.comments !== false && commentUse && !comments.lazyload
|
if page.comments !== false && commentUse && !comments.lazyload
|
||||||
case commentUse
|
if commentUse === 'Valine' && theme.valine.visitor
|
||||||
when 'Valine'
|
|
||||||
if theme.valine.visitor
|
|
||||||
+pvBlock(url_for(page.path), 'leancloud_visitors', page.title)
|
+pvBlock(url_for(page.path), 'leancloud_visitors', page.title)
|
||||||
span.leancloud-visitors-count
|
span.leancloud-visitors-count
|
||||||
i.fa-solid.fa-spinner.fa-spin
|
i.fa-solid.fa-spinner.fa-spin
|
||||||
when 'Waline'
|
else if commentUse === 'Waline' && theme.waline.pageview
|
||||||
if theme.waline.pageview
|
|
||||||
+pvBlock('', '', '')
|
+pvBlock('', '', '')
|
||||||
span.waline-pageview-count(data-path=url_for(page.path))
|
span.waline-pageview-count(data-path=url_for(page.path))
|
||||||
i.fa-solid.fa-spinner.fa-spin
|
i.fa-solid.fa-spinner.fa-spin
|
||||||
when 'Twikoo'
|
else if commentUse === 'Twikoo' && theme.twikoo.visitor
|
||||||
if theme.twikoo.visitor
|
|
||||||
+pvBlock('', '', '')
|
+pvBlock('', '', '')
|
||||||
span#twikoo_visitors
|
span#twikoo_visitors
|
||||||
i.fa-solid.fa-spinner.fa-spin
|
i.fa-solid.fa-spinner.fa-spin
|
||||||
when 'Artalk'
|
else if commentUse === 'Artalk' && theme.artalk.visitor
|
||||||
if theme.artalk.visitor
|
|
||||||
+pvBlock('', '', '')
|
+pvBlock('', '', '')
|
||||||
span#ArtalkPV
|
span#ArtalkPV
|
||||||
i.fa-solid.fa-spinner.fa-spin
|
i.fa-solid.fa-spinner.fa-spin
|
||||||
default
|
|
||||||
if theme.umami_analytics.enable && theme.umami_analytics.UV_PV.page_pv
|
|
||||||
+pvBlock('', '', '')
|
|
||||||
span#umamiPV(data-path=url_for(page.path))
|
|
||||||
i.fa-solid.fa-spinner.fa-spin
|
|
||||||
else if theme.busuanzi.page_pv
|
|
||||||
+pvBlock('', 'post-meta-pv-cv', '')
|
|
||||||
span#busuanzi_value_page_pv
|
|
||||||
i.fa-solid.fa-spinner.fa-spin
|
|
||||||
else
|
else
|
||||||
if theme.umami_analytics.enable && theme.umami_analytics.UV_PV.page_pv
|
+otherPV()
|
||||||
+pvBlock('', '', '')
|
else
|
||||||
span#umamiPV(data-path=url_for(page.path))
|
+otherPV()
|
||||||
i.fa-solid.fa-spinner.fa-spin
|
|
||||||
else if theme.busuanzi.page_pv
|
|
||||||
+pvBlock('', 'post-meta-pv-cv', '')
|
|
||||||
span#busuanzi_value_page_pv
|
|
||||||
i.fa-solid.fa-spinner.fa-spin
|
|
||||||
|
|
||||||
if comments.count && !comments.lazyload && page.comments !== false && comments.use
|
if comments.count && !comments.lazyload && page.comments !== false && comments.use
|
||||||
- var whichCount = comments.use[0]
|
- var whichCount = comments.use[0]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "5.0.0",
|
"version": "5.1.0-b1",
|
||||||
"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": {
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ hexo.extend.helper.register('getBgPath', path => {
|
|||||||
|
|
||||||
const absoluteUrlPattern = /^(?:[a-z][a-z\d+.-]*:)?\/\//i
|
const absoluteUrlPattern = /^(?:[a-z][a-z\d+.-]*:)?\/\//i
|
||||||
const relativeUrlPattern = /^(\.\/|\.\.\/|\/|[^/]+\/).*$/
|
const relativeUrlPattern = /^(\.\/|\.\.\/|\/|[^/]+\/).*$/
|
||||||
const colorPattern = /^(#|rgb|rgba|hsl|hsla|linear-gradient|radial-gradient)/i
|
const colorPattern = /^(#|rgb|rgba|hsl|hsla)/i
|
||||||
|
|
||||||
if (colorPattern.test(path)) {
|
if (colorPattern.test(path)) {
|
||||||
return `background-color: ${path};`
|
return `background-color: ${path};`
|
||||||
|
|||||||
Reference in New Issue
Block a user