mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
🏷️ 2.3.0發佈
This commit is contained in:
@@ -5,11 +5,17 @@ if site.data.valine
|
||||
#vcomment.vcomment
|
||||
script(src=url_for(theme.CDN.valine))
|
||||
script.
|
||||
var GUEST_INFO = ['nick','mail','link'];
|
||||
var guest_info = '#{ theme.valine.guest_info }'.split(',').filter(function(item){
|
||||
return GUEST_INFO.indexOf(item) > -1
|
||||
});
|
||||
guest_info = guest_info.length == 0 ? GUEST_INFO :guest_info;
|
||||
var requestSetting = function (from,set) {
|
||||
var from = from
|
||||
var setting = set.split(',').filter(function(item){
|
||||
return from.indexOf(item) > -1
|
||||
});
|
||||
setting = setting.length == 0 ? from :setting;
|
||||
return setting
|
||||
}
|
||||
|
||||
var guestInfo = requestSetting(['nick','mail','link'],'#{ theme.valine.guest_info }')
|
||||
var requiredFields = requestSetting(['nick','mail','link'],'#{ theme.valine.requiredFields }')
|
||||
|
||||
window.valine = new Valine({
|
||||
el:'#vcomment',
|
||||
@@ -19,11 +25,13 @@ script.
|
||||
verify: #{theme.valine.verify},
|
||||
placeholder: '#{theme.valine.placeholder}',
|
||||
avatar: '#{theme.valine.avatar}',
|
||||
meta: guest_info,
|
||||
meta: guestInfo,
|
||||
pageSize: '#{theme.valine.pageSize}',
|
||||
lang: '#{theme.valine.lang}',
|
||||
recordIP: #{theme.valine.recordIP},
|
||||
serverURLs: '#{theme.valine.serverURLs}',
|
||||
emojiCDN: '#{theme.valine.emojiCDN}',
|
||||
emojiMaps: !{emojiMaps}
|
||||
emojiMaps: !{emojiMaps},
|
||||
enableQQ: #{theme.valine.enableQQ},
|
||||
requiredFields: requiredFields
|
||||
});
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
link(rel="preconnect" href="//cdn.jsdelivr.net")
|
||||
link(rel="dns-prefetch" href="//cdn.jsdelivr.net")
|
||||
|
||||
if theme.google_analytics
|
||||
link(rel="preconnect" href="https://www.google-analytics.com" crossorigin)
|
||||
link(rel="dns-prefetch" href="https://www.google-analytics.com")
|
||||
|
||||
if theme.baidu_analytics
|
||||
link(rel="preconnect" href="https://hm.baidu.com")
|
||||
link(rel="dns-prefetch" href="https://hm.baidu.com")
|
||||
|
||||
if theme.tencent_analytics
|
||||
link(rel="preconnect" href="http://ta.qq.com")
|
||||
link(rel="dns-prefetch" href="http://ta.qq.com")
|
||||
|
||||
if theme.blog_title_font.font_link
|
||||
link(rel="preconnect" href="https://fonts.googleapis.com" crossorigin)
|
||||
link(rel="dns-prefetch" href="https://fonts.googleapis.com")
|
||||
|
||||
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
|
||||
link(rel="preconnect" href="//busuanzi.ibruce.info")
|
||||
link(rel="dns-prefetch" href="//busuanzi.ibruce.info")
|
||||
|
||||
@@ -11,7 +11,7 @@ mixin articleSort(posts)
|
||||
if article.cover && theme.cover.archives_enable
|
||||
.article-sort-img
|
||||
a.article-sort-item__img(href=url_for(article.path))
|
||||
img(src=article.cover alt=article.title || 'No Title' onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'`)
|
||||
img(src=`${article.cover}` alt=article.title || 'No Title' onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'`)
|
||||
.article-sort-post
|
||||
a.article-sort-item__post(href=url_for(article.path))
|
||||
i.fa.fa-clock-o(aria-hidden="true")
|
||||
|
||||
@@ -7,6 +7,6 @@ if site.tags.length
|
||||
|
||||
- let tagLimit = theme.aside.card_tags.limit === 0 ? 0 : theme.aside.card_tags.limit || 40
|
||||
if theme.aside.card_tags.color
|
||||
.card-tag-cloud!=cloudTags(site.tags,16,22,tagLimit)
|
||||
.card-tag-cloud!=cloudTags({source: site.tags, minfontsize: 16, maxfontsize: 22, limit: tagLimit})
|
||||
else
|
||||
.card-tag-cloud!= tagcloud({min_font: 16, max_font: 24, amount: tagLimit , color: true, start_color: '#999', end_color: '#99a9bf'})
|
||||
.card-tag-cloud!= tagcloud({min_font: 16, max_font: 22, amount: tagLimit , color: true, start_color: '#999', end_color: '#99a9bf'})
|
||||
|
||||
Reference in New Issue
Block a user