Butterfly主题增加动态背景效果
推荐效果
樱花飘落:
1
https://npm.elemecdn.com/tzy-blog/lib/js/other/sakura.js
上升气泡:
1
https://cdn.jsdelivr.net/combine/npm/jquery@latest/dist/jquery.min.js,gh/weilining/jsdelivr/jquery/circlemagic/circlemagic.min.js,gh/weilining/jsdelivr@latest/jquery/circlemagic/butterflycirclemagic.js
全部页面显示动态背景效果
仅需修改主题配置文件 _config.yml,将 xxx 替换为推荐效果链接或者你喜欢的效果链接
1
2
3
4
5
6
7
8# Inject
# Insert the code to head (before '</head>' tag) and the bottom (before '</body>' tag)
inject:
head:
# - <link rel="stylesheet" href="/xxx.css">
bottom:
# - <script src="xxxx"></script>
- <script async src="xxx"></script>
仅主页显示动态背景效果
在主题配置文件 \layout\index.pug 添加 效果链接,将 xxx 替换为推荐效果链接或者你喜欢的效果链接,如下:
1
2
3
4
5
6
7
8
9
10extends includes/layout.pug
block content
include ./includes/mixins/indexPostUI.pug
+indexPostUI
//- 仅主页显示效果
block scripts
if page.path === 'index.html'
script(async src="xxx")在主题配置文件 \layout\includes\layout.pug 添加 block scripts,如下:
1
2
3
4
5include ./rightside.pug
include ./additional-js.pug
//- 添加 block scripts
block scripts
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 xgclevo的博客!
评论