mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
代码优化
This commit is contained in:
parent
8199e25215
commit
0834720d32
@ -105,7 +105,7 @@ script.
|
|||||||
post: !{theme.post_meta.post.date_format === 'relative'}
|
post: !{theme.post_meta.post.date_format === 'relative'}
|
||||||
},
|
},
|
||||||
runtime: '!{theme.runtimeshow.enable ? _p("aside.card_webinfo.runtime.unit") : ""}',
|
runtime: '!{theme.runtimeshow.enable ? _p("aside.card_webinfo.runtime.unit") : ""}',
|
||||||
date_suffix: {
|
dateSuffix: {
|
||||||
just: '!{_p("date_suffix.just")}',
|
just: '!{_p("date_suffix.just")}',
|
||||||
min: '!{_p("date_suffix.min")}',
|
min: '!{_p("date_suffix.min")}',
|
||||||
hour: '!{_p("date_suffix.hour")}',
|
hour: '!{_p("date_suffix.hour")}',
|
||||||
|
|||||||
30
plugins.yml
30
plugins.yml
@ -1,11 +1,11 @@
|
|||||||
algolia_search:
|
algolia_search:
|
||||||
name: algoliasearch
|
name: algoliasearch
|
||||||
file: dist/algoliasearch-lite.umd.js
|
file: dist/algoliasearch-lite.umd.js
|
||||||
version: 4.15.0
|
version: 4.16.0
|
||||||
instantsearch:
|
instantsearch:
|
||||||
name: instantsearch.js
|
name: instantsearch.js
|
||||||
file: dist/instantsearch.production.min.js
|
file: dist/instantsearch.production.min.js
|
||||||
version: 4.52.0
|
version: 4.53.0
|
||||||
pjax:
|
pjax:
|
||||||
name: pjax
|
name: pjax
|
||||||
file: pjax.min.js
|
file: pjax.min.js
|
||||||
@ -37,17 +37,17 @@ disqusjs_css:
|
|||||||
twikoo:
|
twikoo:
|
||||||
name: twikoo
|
name: twikoo
|
||||||
file: dist/twikoo.all.min.js
|
file: dist/twikoo.all.min.js
|
||||||
version: 1.6.10
|
version: 1.6.11
|
||||||
waline_js:
|
waline_js:
|
||||||
name: '@waline/client'
|
name: '@waline/client'
|
||||||
file: dist/waline.js
|
file: dist/waline.js
|
||||||
other_name: waline
|
other_name: waline
|
||||||
version: 2.14.8
|
version: 2.14.9
|
||||||
waline_css:
|
waline_css:
|
||||||
name: '@waline/client'
|
name: '@waline/client'
|
||||||
file: dist/waline.css
|
file: dist/waline.css
|
||||||
other_name: waline
|
other_name: waline
|
||||||
version: 2.14.8
|
version: 2.14.9
|
||||||
sharejs:
|
sharejs:
|
||||||
name: butterfly-extsrc
|
name: butterfly-extsrc
|
||||||
file: sharejs/dist/js/social-share.min.js
|
file: sharejs/dist/js/social-share.min.js
|
||||||
@ -109,11 +109,11 @@ lazyload:
|
|||||||
instantpage:
|
instantpage:
|
||||||
name: instant.page
|
name: instant.page
|
||||||
file: instantpage.js
|
file: instantpage.js
|
||||||
version: 5.1.1
|
version: 5.2.0
|
||||||
typed:
|
typed:
|
||||||
name: typed.js
|
name: typed.js
|
||||||
file: lib/typed.min.js
|
file: dist/typed.umd.js
|
||||||
version: 2.0.12
|
version: 2.0.15
|
||||||
pangu:
|
pangu:
|
||||||
name: pangu
|
name: pangu
|
||||||
file: dist/browser/pangu.min.js
|
file: dist/browser/pangu.min.js
|
||||||
@ -121,12 +121,12 @@ pangu:
|
|||||||
fancybox_css:
|
fancybox_css:
|
||||||
name: '@fancyapps/ui'
|
name: '@fancyapps/ui'
|
||||||
file: dist/fancybox/fancybox.css
|
file: dist/fancybox/fancybox.css
|
||||||
version: 5.0.7
|
version: 5.0.14
|
||||||
other_name: fancyapps-ui
|
other_name: fancyapps-ui
|
||||||
fancybox:
|
fancybox:
|
||||||
name: '@fancyapps/ui'
|
name: '@fancyapps/ui'
|
||||||
file: dist/fancybox/fancybox.umd.js
|
file: dist/fancybox/fancybox.umd.js
|
||||||
version: 5.0.7
|
version: 5.0.14
|
||||||
other_name: fancyapps-ui
|
other_name: fancyapps-ui
|
||||||
medium_zoom:
|
medium_zoom:
|
||||||
name: medium-zoom
|
name: medium-zoom
|
||||||
@ -144,7 +144,7 @@ fontawesome:
|
|||||||
name: '@fortawesome/fontawesome-free'
|
name: '@fortawesome/fontawesome-free'
|
||||||
file: css/all.min.css
|
file: css/all.min.css
|
||||||
other_name: font-awesome
|
other_name: font-awesome
|
||||||
version: 6.3.0
|
version: 6.4.0
|
||||||
flickr_justified_gallery_js:
|
flickr_justified_gallery_js:
|
||||||
name: flickr-justified-gallery
|
name: flickr-justified-gallery
|
||||||
file: dist/fjGallery.min.js
|
file: dist/fjGallery.min.js
|
||||||
@ -183,11 +183,11 @@ prismjs_autoloader:
|
|||||||
artalk_js:
|
artalk_js:
|
||||||
name: artalk
|
name: artalk
|
||||||
file: dist/Artalk.js
|
file: dist/Artalk.js
|
||||||
version: 2.5.0
|
version: 2.5.2
|
||||||
artalk_css:
|
artalk_css:
|
||||||
name: artalk
|
name: artalk
|
||||||
file: dist/Artalk.css
|
file: dist/Artalk.css
|
||||||
version: 2.5.0
|
version: 2.5.2
|
||||||
pace_js:
|
pace_js:
|
||||||
name: pace-js
|
name: pace-js
|
||||||
other_name: pace
|
other_name: pace
|
||||||
@ -208,3 +208,7 @@ docsearch_css:
|
|||||||
other_name: docsearch-css
|
other_name: docsearch-css
|
||||||
file: dist/style.css
|
file: dist/style.css
|
||||||
version: 3.3.3
|
version: 3.3.3
|
||||||
|
abcjs_basic_js:
|
||||||
|
name: abcjs
|
||||||
|
file: dist/abcjs-basic-min.js
|
||||||
|
version: 6.2.0
|
||||||
|
|||||||
@ -79,6 +79,7 @@ const btf = {
|
|||||||
const hour = minute * 60
|
const hour = minute * 60
|
||||||
const day = hour * 24
|
const day = hour * 24
|
||||||
const month = day * 30
|
const month = day * 30
|
||||||
|
const { dateSuffix } = GLOBAL_CONFIG
|
||||||
|
|
||||||
if (!more) return parseInt(dateDiff / day)
|
if (!more) return parseInt(dateDiff / day)
|
||||||
|
|
||||||
@ -88,11 +89,11 @@ const btf = {
|
|||||||
const minuteCount = dateDiff / minute
|
const minuteCount = dateDiff / minute
|
||||||
|
|
||||||
if (monthCount > 12) return datePost.toISOString().slice(0, 10)
|
if (monthCount > 12) return datePost.toISOString().slice(0, 10)
|
||||||
if (monthCount >= 1) return parseInt(monthCount) + ' ' + GLOBAL_CONFIG.date_suffix.month
|
if (monthCount >= 1) return `${parseInt(monthCount)} ${dateSuffix.month}`
|
||||||
if (dayCount >= 1) return parseInt(dayCount) + ' ' + GLOBAL_CONFIG.date_suffix.day
|
if (dayCount >= 1) return `${parseInt(dayCount)} ${dateSuffix.day}`
|
||||||
if (hourCount >= 1) return parseInt(hourCount) + ' ' + GLOBAL_CONFIG.date_suffix.hour
|
if (hourCount >= 1) return `${parseInt(hourCount)} ${dateSuffix.hour}`
|
||||||
if (minuteCount >= 1) return parseInt(minuteCount) + ' ' + GLOBAL_CONFIG.date_suffix.min
|
if (minuteCount >= 1) return `${parseInt(minuteCount)} ${dateSuffix.min}`
|
||||||
return GLOBAL_CONFIG.date_suffix.just
|
return dateSuffix.just
|
||||||
},
|
},
|
||||||
|
|
||||||
loadComment: (dom, callback) => {
|
loadComment: (dom, callback) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user