mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
1. fix Traditional Chinese and Simplified Chinese Conversion
2. Add the option to hidden the aside items #2 3. Add the option to change subtitle 4. Add the option to change the font 5. fix read-mode and night-mode 6. fix the bugs of the cover #2
This commit is contained in:
@@ -24,8 +24,10 @@ hexo.extend.helper.register('related_posts', function(currentPost, allPosts){
|
||||
var result = '<div class="relatedPosts_headling"><i class="fa fa-thumbs-up" aria-hidden="true"></i><span> 相關文章</span></div><div class="relatedPosts_list">';
|
||||
relatedPosts = relatedPosts.sort(compare('weight'));
|
||||
for (var i = 0; i < Math.min(relatedPosts.length, 6); i++) {
|
||||
|
||||
var cover = relatedPosts[i].cover || hexo.theme.config.default_cover || data.melody.default_cover
|
||||
result += '<div class="relatedPosts_item"><a href="/' + relatedPosts[i].path + '">';
|
||||
result += '<img class="relatedPosts_cover lozad" data-src="' + relatedPosts[i].cover + '">';
|
||||
result += '<img class="relatedPosts_cover lozad" data-src="' + cover + '">';
|
||||
result += '<div class="relatedPosts_title">' + relatedPosts[i].title + '</div>';
|
||||
result += '</a></div>'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user