mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-10-04 14:22:01 +08:00
feat: 增加 aside 最新評論部件
style: 部分css調整和html優化 improvements: 刪除pwa中的theme-color配置,默認生成meta theme-color close #340 improvements: 優化最後更新時間顯示(1小時內顯示 剛剛,1小時到24小時 顯示 xx小時前,1天到365天 顯示 xx天前,365天后直接顯示日期)
This commit is contained in:
1 parent
ee6f62f4bc
commit
fe97d2e63f
23 files changed
+420
-86
No files matched your search
@@ -44,10 +44,16 @@ div
|
||||
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
|
||||
script(async src=url_for(theme.CDN.busuanzi))
|
||||
|
||||
!=fragment_cache('injectBottom', function(){return injectHtml(theme.inject.bottom)})
|
||||
|
||||
!=partial('includes/third-party/prismjs', {}, {cache:theme.fragment_cache})
|
||||
|
||||
if theme.aside.enable && theme.newest_comments.enable
|
||||
if theme.pjax.enable
|
||||
!=partial('includes/third-party/newest-comments/index', {}, {cache:theme.fragment_cache})
|
||||
else if (!is_post() && page.aside !== false)
|
||||
!=partial('includes/third-party/newest-comments/index', {}, {cache:theme.fragment_cache})
|
||||
|
||||
!=fragment_cache('injectBottom', function(){return injectHtml(theme.inject.bottom)})
|
||||
|
||||
!=partial('includes/third-party/effect', {}, {cache:theme.fragment_cache})
|
||||
|
||||
!=partial('includes/third-party/chat/index', {}, {cache:theme.fragment_cache})
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
- else pageKeywords = Array.isArray(config.keywords) ? (config.keywords).join(','): ([]).join(',') || config.keywords
|
||||
- var pageAuthor = config.email ? config.author + ',' + config.email : config.author
|
||||
- var pageCopyright = config.copyright || config.author
|
||||
- var themeColor = theme.display_mode === 'dark' ? '#0d0d0d' : '#ffffff'
|
||||
|
||||
meta(charset='UTF-8')
|
||||
meta(http-equiv="X-UA-Compatible" content="IE=edge")
|
||||
@@ -28,13 +29,15 @@ if pageKeywords
|
||||
meta(name="author" content=pageAuthor)
|
||||
meta(name="copyright" content=pageCopyright)
|
||||
meta(name ="format-detection" content="telephone=no")
|
||||
!=favicon_tag(theme.favicon || config.favicon)
|
||||
link(rel="canonical" href=urlNoIndex())
|
||||
meta(name="theme-color" content=themeColor)
|
||||
|
||||
if theme.disable_baidu_transformation
|
||||
meta(http-equiv="Cache-Control" content="no-transform")
|
||||
meta(http-equiv="Cache-Control" content="no-siteapp")
|
||||
|
||||
!=favicon_tag(theme.favicon || config.favicon)
|
||||
link(rel="canonical" href=urlNoIndex())
|
||||
|
||||
//- 預解析
|
||||
!=partial('includes/head/preconnect', {}, {cache:theme.fragment_cache})
|
||||
|
||||
|
||||
@@ -95,11 +95,13 @@
|
||||
})
|
||||
}
|
||||
|
||||
let last_push_date = 'undefined';
|
||||
let date_suffix = 'undefined';
|
||||
if (theme.aside.card_webinfo.last_push_date) {
|
||||
last_push_date = JSON.stringify({
|
||||
zeroDay: _p("aside.card_webinfo.last_push_date.zero_day"),
|
||||
suffix: _p("aside.card_webinfo.last_push_date.suffix")
|
||||
date_suffix = JSON.stringify({
|
||||
one_hour: _p("date_suffix.one_hour"),
|
||||
hours: _p("date_suffix.hours"),
|
||||
day: _p('date_suffix.day')
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -122,7 +124,7 @@ script.
|
||||
message_next: '!{_p("Snackbar.bookmark.message_next")}'
|
||||
},
|
||||
runtime: '!{theme.runtimeshow.enable ? _p("aside.card_webinfo.runtime.unit") : ""}',
|
||||
last_push_date: !{last_push_date},
|
||||
date_suffix: !{date_suffix},
|
||||
copyright: !{copyright},
|
||||
ClickShowText: !{ClickShowText},
|
||||
medium_zoom: !{theme.medium_zoom},
|
||||
|
||||
Loaded 3 of 23 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user