mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-10-04 06:22:00 +08:00
fix: 當設置 comments 為 false 時,如果設置了顯示評論提供的閲讀數,閲讀數無法顯示的 bug
fix: findArchivesTitle bug
This commit is contained in:
1 parent
fba180afaf
commit
dbb31dec99
5 files changed
+6
-8
No files matched your search
@@ -1,9 +1,7 @@
|
|||||||
- var pageTitle
|
- var pageTitle
|
||||||
- if (is_archive()) pageTitle = fragment_cache('findArchivesTitle', function(){return findArchivesTitle(theme.menu);})
|
- is_archive() ? page.title = findArchivesTitle(page, theme.menu, date) : ''
|
||||||
- else if (is_tag()) pageTitle = _p('page.tag') + ': ' + page.tag
|
- if (is_tag()) pageTitle = _p('page.tag') + ': ' + page.tag
|
||||||
- else if (is_category()) pageTitle = _p('page.category') + ': ' + page.category
|
- else if (is_category()) pageTitle = _p('page.category') + ': ' + page.category
|
||||||
- else if (is_month()) pageTitle += ': ' + page.month + '/' + page.year
|
|
||||||
- else if (is_year()) pageTitle += ': ' + page.year
|
|
||||||
- else if (is_current('/404.html', [strict])) pageTitle = _p('error404')
|
- else if (is_current('/404.html', [strict])) pageTitle = _p('error404')
|
||||||
- else pageTitle = page.title || config.title || ''
|
- else pageTitle = page.title || config.title || ''
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ if !theme.disable_top_img && page.top_img !== false
|
|||||||
if top_img !== false
|
if top_img !== false
|
||||||
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url('${url_for(top_img)}')` : `background: ${top_img}`
|
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url('${url_for(top_img)}')` : `background: ${top_img}`
|
||||||
- var bg_img = top_img ? imgSource : ''
|
- var bg_img = top_img ? imgSource : ''
|
||||||
- var site_title = is_archive() ? findArchivesTitle(page, theme.menu, date) : page.title || page.tag || page.category || config.title
|
- var site_title = page.title || page.tag || page.category || config.title
|
||||||
- var isHomeClass = is_home() ? 'full_page' : 'not-home-page'
|
- var isHomeClass = is_home() ? 'full_page' : 'not-home-page'
|
||||||
- is_post() ? isHomeClass = 'post-bg' : isHomeClass
|
- is_post() ? isHomeClass = 'post-bg' : isHomeClass
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
block
|
block
|
||||||
|
|
||||||
- const commentUse = comments.use
|
- const commentUse = comments.use
|
||||||
if commentUse && !comments.lazyload
|
if page.comments !== false && commentUse && !comments.lazyload
|
||||||
if commentUse[0] === 'Valine' && theme.valine.visitor
|
if commentUse[0] === 'Valine' && 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
|
||||||
|
|||||||
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user