hexo-theme-butterfly/layout/includes/additional-js.pug
Jerry 2eb15123f9 1. 更改手機頁面的menu和toc的顯示方式和顯示特效(ipad也能看TOC)
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. 修復英文語言下,書簽英文顯示不完整的問題
2019-09-24 02:09:51 +08:00

84 lines
2.7 KiB
Plaintext

if (theme.algolia_search.enable)
script(async src=url_for('/js/search/algolia.js'))
if (theme.mathjax && theme.mathjax.enable)
if(!is_tag() && !is_category() && !is_archive())
include ./third-party/mathjax.pug
if (theme.katex && theme.katex.enable)
if(!is_tag() && !is_category() && !is_archive())
include ./third-party/katex.pug
if (theme.local_search && theme.local_search.enable)
script(async src=url_for('/js/search/local-search.js'))
if theme.fireworks && theme.fireworks.enable
script(src='https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js')
script(src=url_for('/js/third-party/fireworks.js'))
if theme.nightshift.enable
script(src=url_for('js/nightshift.js'))
if (theme.canvas_ribbon && theme.canvas_ribbon.enable)
include ./third-party/canvas-ribbon.pug
if (theme.canvas_ribbon_piao && theme.canvas_ribbon_piao.enable)
include ./third-party/canvas-ribbon-piao.pug
if (theme.canvas_nest && theme.canvas_nest.enable)
include ./third-party/canvas-nest.pug
if theme.baidu_push && theme.baidu_push.enable
script(src=url_for('js/baidupush.js'))
if theme.activate_power_mode.enable
script(src=url_for('js/activate-power-mode.js'))
script.
POWERMODE.colorful = true; // make power mode colorful
POWERMODE.shake = true; // turn off shake
document.body.addEventListener('input', POWERMODE);
if theme.translate && theme.translate.enable
script(src=url_for('/js/tw_cn.js'))
script.
translateInitilization()
if is_home() && theme.subtitle.enable
script(src="https://cdn.jsdelivr.net/npm/typed.js@2.0.9")
script.
var typed = new Typed(".subtitle", {
strings: '!{theme.subtitle.sub}'.split(","),
startDelay: 300,
typeSpeed: 100,
loop: true,
backSpeed: 50
});
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
script(async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js")
if theme.instantpage.enable
script(src="https://cdn.jsdelivr.net/npm/instant.page@1.2.2/instantpage.min.js" type="module")
if theme.lazyload.enable
script(src=url_for(theme.lazyload.script))
script.
const observer = lozad(); // lazy loads elements with default selector as '.lozad'
observer.observe();
if is_home() && !theme.index_top_img_height && !theme.index_site_info_top
script.
//首頁fullpage
function alignContent() {
for (var n = $(window).height(), e = document.querySelectorAll(".full_page"), i = 0; i < e.length; i++)
e[i].style.height = n + "px";
$("#site-info").each(function () {
var x = $(this).height();
$(this).css("top", (n-x)/2)
})
}
alignContent();
$(window).bind("resize", function () {
alignContent()
})