mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e83095920 | ||
|
|
dbb31dec99 |
@@ -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
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ script.
|
|||||||
|
|
||||||
const newestCommentInit = () => {
|
const newestCommentInit = () => {
|
||||||
if (document.querySelector('#card-newest-comments .aside-list')) {
|
if (document.querySelector('#card-newest-comments .aside-list')) {
|
||||||
const data = saveToLocal.get('valine-newest-comments')
|
const data = saveToLocal.get('remark42-newest-comments')
|
||||||
if (data) {
|
if (data) {
|
||||||
generateHtml(JSON.parse(data))
|
generateHtml(JSON.parse(data))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "4.3.0",
|
"version": "4.3.1",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user