mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
1. Fixed: display related posts headline when it is not related posts
2. Fixed: the bugs of image display
This commit is contained in:
@@ -3,7 +3,6 @@ if theme.disqus.enable
|
||||
#post-comment
|
||||
.comment_headling
|
||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||
=" "
|
||||
span= _p('comment')
|
||||
include ./disqus.pug
|
||||
else if theme.laibili && theme.laibili.enable
|
||||
@@ -11,7 +10,6 @@ else if theme.laibili && theme.laibili.enable
|
||||
#post-comment
|
||||
.comment_headling
|
||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||
=" "
|
||||
span= _p('comment')
|
||||
include ./laibili.pug
|
||||
else if theme.gitment && theme.gitment.enable
|
||||
@@ -19,7 +17,6 @@ else if theme.gitment && theme.gitment.enable
|
||||
#post-comment
|
||||
.comment_headling
|
||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||
=" "
|
||||
span= _p('comment')
|
||||
include ./gitment.pug
|
||||
else if theme.gitalk && theme.gitalk.enable
|
||||
@@ -27,7 +24,6 @@ else if theme.gitalk && theme.gitalk.enable
|
||||
#post-comment
|
||||
.comment_headling
|
||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||
=" "
|
||||
span= _p('comment')
|
||||
include ./gitalk.pug
|
||||
else if theme.valine && theme.valine.enable
|
||||
@@ -35,6 +31,5 @@ else if theme.valine && theme.valine.enable
|
||||
#post-comment
|
||||
.comment_headling
|
||||
i.fa.fa-comments.fa-fw(aria-hidden="true")
|
||||
=" "
|
||||
span= _p('comment')
|
||||
include ./valine.pug
|
||||
@@ -3,25 +3,25 @@ each article , index in page.posts.data
|
||||
- var link = article.link || article.path
|
||||
if index%2 == 0
|
||||
.post_cover.is_left
|
||||
a(href=url_for(link))
|
||||
a(href=url_for(link) title=article.title || _p('no_title'))
|
||||
- var post_cover = article.cover
|
||||
- var default_post_cover = random_cover()
|
||||
if (post_cover)
|
||||
img.post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
img.post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||
else
|
||||
img.post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
img.post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||
else
|
||||
.post_cover.is_right
|
||||
a(href=url_for(link))
|
||||
a(href=url_for(link) title=article.title || _p('no_title'))
|
||||
- var post_cover = article.cover
|
||||
- var default_post_cover = random_cover()
|
||||
if (post_cover)
|
||||
img.post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
img.post_bg.lozad(data-src=`${post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||
else
|
||||
img.post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'` title=article.title || _p('no_title'))
|
||||
img.post_bg.lozad(data-src=`${default_post_cover}` onerror=`onerror=null;src='${theme.lodding_bg.post_page}'`)
|
||||
|
||||
.recent-post-info
|
||||
a.article-title(href=url_for(link) title=article.title || _p('no_title'))= article.title || _p('no_title')
|
||||
a.article-title(href=url_for(link) title= article.title || _p('no_title'))= article.title || _p('no_title')
|
||||
if (article.top)
|
||||
span.article-meta
|
||||
i.fa.fa-thumb-tack.article-meta__icon.sticky
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
.relatedPosts
|
||||
.relatedPosts_headline
|
||||
i.fa.fa-thumbs-up(aria-hidden="true")
|
||||
span=' ' + _p('relatedPosts_headline')
|
||||
.relatedPosts_list!= related_posts(page,site.posts)
|
||||
.clear_both
|
||||
Reference in New Issue
Block a user