mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
1. 更改手機頁面的menu和toc的顯示方式和顯示特效(ipad也能看TOC) 3. 可設置複製時,内容自動加上版權信息 4. 可修改tag的top_img 5. 可修改category的top_img 6. 可修改valine的背景 7. archives頁UI優化 8. ICP增加icon #37 9. 可設置主頁top_img的高度 10. 可設置主頁site-info的位置 11. category頁和tag頁的UI可以設置與主頁UI一樣 #31 12. 主頁subtitle可設置多個句子(不再限制2個) #37 13. 設置menu時,頭尾添加空格不受影響 14. 調整post頁的佈局 15. 书签添加icon 16. 公告icon效果 17. 首頁歸檔模塊,可設置數量限制,會顯示'查看更多'按鈕 18. 右下角按鈕調整。 19. 修复文章cover隨機图片生成,同一篇文章,不同地方的cover顯示不一样的bug 20. 修復gitalk語言設置無效的bug #35 21. 修復post頁面,當沒有設置word count時,閲讀量前有'|" 22. 修复sub-menu在safari的显示问题 23. 修复tags页评论居中问题 24. 修复header a hover 白色问题 25. 修復夜間模式下footer的顔色bug 26. 修復英文語言下,書簽英文顯示不完整的問題
81 lines
2.5 KiB
Plaintext
81 lines
2.5 KiB
Plaintext
-
|
|
var algolia = 'undefined';
|
|
var env = process.env;
|
|
if (theme.algolia_search.enable) {
|
|
algolia = JSON.stringify({
|
|
appId: env.ALGOLIA_APP_ID || config.algolia.appId || config.algolia.applicationID,
|
|
apiKey: env.ALGOLIA_API_KEY || config.algolia.apiKey,
|
|
indexName: env.ALGOLIA_INDEX_NAME || config.algolia.indexName,
|
|
hits: theme.algolia_search.hits,
|
|
// search languages
|
|
languages: {
|
|
input_placeholder: _p("algolia_search.input_placeholder"),
|
|
hits_empty: _p("algolia_search.hits_empty"),
|
|
hits_stats: _p("algolia_search.hits_stats")
|
|
}
|
|
})
|
|
}
|
|
|
|
var localSearch = 'undefined';
|
|
if (theme.local_search && theme.local_search.enable) {
|
|
localSearch = JSON.stringify({
|
|
path: config.search.path,
|
|
languages: {
|
|
// search languages
|
|
hits_empty: _p("local_search.hits_empty")
|
|
}
|
|
})
|
|
}
|
|
var translate = 'undefined';
|
|
if (theme.translate && theme.translate.enable){
|
|
translate = JSON.stringify({
|
|
defaultEncoding: theme.translate.defaultEncoding,
|
|
translateDelay: theme.translate.translateDelay,
|
|
cookieDomain: theme.translate.cookieDomain,
|
|
msgToTraditionalChinese: theme.translate.msgToTraditionalChinese,
|
|
msgToSimplifiedChinese: theme.translate.msgToSimplifiedChinese
|
|
})
|
|
}
|
|
|
|
var copyright = 'undefined' ;
|
|
if (theme.copy.enable && theme.copy.copyright){
|
|
copyright = JSON.stringify({
|
|
languages: {
|
|
author: _p("copy_copyright.author") + ': ' + config.author,
|
|
link: _p("copy_copyright.link") + ': ' + without_html,
|
|
source: _p("copy_copyright.source") + ': ' + config.title,
|
|
info: _p("copy_copyright.info")
|
|
}
|
|
})
|
|
}
|
|
|
|
var copy_copyright_js = theme.copy.enable && theme.copy.copyright
|
|
|
|
|
|
|
|
script.
|
|
var GLOBAL_CONFIG = {
|
|
root: '!{config.root}',
|
|
algolia: !{algolia},
|
|
localSearch: !{localSearch},
|
|
translate: !{translate},
|
|
highlight_copy: '!{theme.highlight_copy}',
|
|
highlight_lang: '!{theme.highlight_lang}',
|
|
highlight_shrink: '!{theme.highlight_shrink}',
|
|
copy: {
|
|
success: '!{_p("copy.success")}',
|
|
error: '!{_p("copy.error")}',
|
|
noSupport: '!{_p("copy.noSupport")}'
|
|
},
|
|
bookmark: {
|
|
title: '!{_p("bookmark.title")}',
|
|
message_prev: '!{_p("bookmark.message_prev")}',
|
|
message_next: '!{_p("bookmark.message_next")}'
|
|
},
|
|
runtime_unit: '!{_p("runtime_unit")}',
|
|
copyright: !{copyright},
|
|
copy_copyright_js: !{copy_copyright_js}
|
|
|
|
}
|
|
|