mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 17:40:55 +08:00
fix: 修復當關閉代碼渲染后,標簽外挂裏的代碼塊會被壓縮到一行的bugs
improvements: 優化網站最後更新時間顯示,’0天前‘改爲’今天‘
This commit is contained in:
@@ -633,10 +633,12 @@ const addLastPushDate = () => {
|
||||
if ($lastPushDateItem.length) {
|
||||
const lastPushDate = $lastPushDateItem.attr('last-push-date')
|
||||
const diffDay = diffDate(lastPushDate)
|
||||
if (diffDay > 365) {
|
||||
if (diffDay < 1) {
|
||||
$lastPushDateItem.text(GLOBAL_CONFIG.last_push_date.zeroDay)
|
||||
} else if (diffDay > 365) {
|
||||
$lastPushDateItem.text(lastPushDate)
|
||||
} else {
|
||||
$lastPushDateItem.text(diffDay + ' ' + GLOBAL_CONFIG.last_push_date)
|
||||
$lastPushDateItem.text(diffDay + ' ' + GLOBAL_CONFIG.last_push_date.suffix)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -808,7 +810,7 @@ const refreshFn = function () {
|
||||
addLightBox()
|
||||
scrollFn()
|
||||
GLOBAL_CONFIG.runtime && addRuntime()
|
||||
GLOBAL_CONFIG.last_push_date && addLastPushDate()
|
||||
GLOBAL_CONFIG.last_push_date !== undefined && addLastPushDate()
|
||||
addTableWrap()
|
||||
clickFnOfTagHide()
|
||||
tabsFn.clickFnOfTabs()
|
||||
|
||||
Reference in New Issue
Block a user