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'}
|
||||
},
|
||||
runtime: '!{theme.runtimeshow.enable ? _p("aside.card_webinfo.runtime.unit") : ""}',
|
||||
date_suffix: {
|
||||
dateSuffix: {
|
||||
just: '!{_p("date_suffix.just")}',
|
||||
min: '!{_p("date_suffix.min")}',
|
||||
hour: '!{_p("date_suffix.hour")}',
|
||||
|
||||
30
plugins.yml
30
plugins.yml
@ -1,11 +1,11 @@
|
||||
algolia_search:
|
||||
name: algoliasearch
|
||||
file: dist/algoliasearch-lite.umd.js
|
||||
version: 4.15.0
|
||||
version: 4.16.0
|
||||
instantsearch:
|
||||
name: instantsearch.js
|
||||
file: dist/instantsearch.production.min.js
|
||||
version: 4.52.0
|
||||
version: 4.53.0
|
||||
pjax:
|
||||
name: pjax
|
||||
file: pjax.min.js
|
||||
@ -37,17 +37,17 @@ disqusjs_css:
|
||||
twikoo:
|
||||
name: twikoo
|
||||
file: dist/twikoo.all.min.js
|
||||
version: 1.6.10
|
||||
version: 1.6.11
|
||||
waline_js:
|
||||
name: '@waline/client'
|
||||
file: dist/waline.js
|
||||
other_name: waline
|
||||
version: 2.14.8
|
||||
version: 2.14.9
|
||||
waline_css:
|
||||
name: '@waline/client'
|
||||
file: dist/waline.css
|
||||
other_name: waline
|
||||
version: 2.14.8
|
||||
version: 2.14.9
|
||||
sharejs:
|
||||
name: butterfly-extsrc
|
||||
file: sharejs/dist/js/social-share.min.js
|
||||
@ -109,11 +109,11 @@ lazyload:
|
||||
instantpage:
|
||||
name: instant.page
|
||||
file: instantpage.js
|
||||
version: 5.1.1
|
||||
version: 5.2.0
|
||||
typed:
|
||||
name: typed.js
|
||||
file: lib/typed.min.js
|
||||
version: 2.0.12
|
||||
file: dist/typed.umd.js
|
||||
version: 2.0.15
|
||||
pangu:
|
||||
name: pangu
|
||||
file: dist/browser/pangu.min.js
|
||||
@ -121,12 +121,12 @@ pangu:
|
||||
fancybox_css:
|
||||
name: '@fancyapps/ui'
|
||||
file: dist/fancybox/fancybox.css
|
||||
version: 5.0.7
|
||||
version: 5.0.14
|
||||
other_name: fancyapps-ui
|
||||
fancybox:
|
||||
name: '@fancyapps/ui'
|
||||
file: dist/fancybox/fancybox.umd.js
|
||||
version: 5.0.7
|
||||
version: 5.0.14
|
||||
other_name: fancyapps-ui
|
||||
medium_zoom:
|
||||
name: medium-zoom
|
||||
@ -144,7 +144,7 @@ fontawesome:
|
||||
name: '@fortawesome/fontawesome-free'
|
||||
file: css/all.min.css
|
||||
other_name: font-awesome
|
||||
version: 6.3.0
|
||||
version: 6.4.0
|
||||
flickr_justified_gallery_js:
|
||||
name: flickr-justified-gallery
|
||||
file: dist/fjGallery.min.js
|
||||
@ -183,11 +183,11 @@ prismjs_autoloader:
|
||||
artalk_js:
|
||||
name: artalk
|
||||
file: dist/Artalk.js
|
||||
version: 2.5.0
|
||||
version: 2.5.2
|
||||
artalk_css:
|
||||
name: artalk
|
||||
file: dist/Artalk.css
|
||||
version: 2.5.0
|
||||
version: 2.5.2
|
||||
pace_js:
|
||||
name: pace-js
|
||||
other_name: pace
|
||||
@ -208,3 +208,7 @@ docsearch_css:
|
||||
other_name: docsearch-css
|
||||
file: dist/style.css
|
||||
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 day = hour * 24
|
||||
const month = day * 30
|
||||
const { dateSuffix } = GLOBAL_CONFIG
|
||||
|
||||
if (!more) return parseInt(dateDiff / day)
|
||||
|
||||
@ -88,11 +89,11 @@ const btf = {
|
||||
const minuteCount = dateDiff / minute
|
||||
|
||||
if (monthCount > 12) return datePost.toISOString().slice(0, 10)
|
||||
if (monthCount >= 1) return parseInt(monthCount) + ' ' + GLOBAL_CONFIG.date_suffix.month
|
||||
if (dayCount >= 1) return parseInt(dayCount) + ' ' + GLOBAL_CONFIG.date_suffix.day
|
||||
if (hourCount >= 1) return parseInt(hourCount) + ' ' + GLOBAL_CONFIG.date_suffix.hour
|
||||
if (minuteCount >= 1) return parseInt(minuteCount) + ' ' + GLOBAL_CONFIG.date_suffix.min
|
||||
return GLOBAL_CONFIG.date_suffix.just
|
||||
if (monthCount >= 1) return `${parseInt(monthCount)} ${dateSuffix.month}`
|
||||
if (dayCount >= 1) return `${parseInt(dayCount)} ${dateSuffix.day}`
|
||||
if (hourCount >= 1) return `${parseInt(hourCount)} ${dateSuffix.hour}`
|
||||
if (minuteCount >= 1) return `${parseInt(minuteCount)} ${dateSuffix.min}`
|
||||
return dateSuffix.just
|
||||
},
|
||||
|
||||
loadComment: (dom, callback) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user