基于安知鱼的hexo魔改:侧边栏的小人
灵感来源:code-gray
- 效果展示
在[BlogRoot]/themes/anzhiyu/layout/includes/widget/card_announcement.pug 下添加如下部分代码。
.xpand(style='height:200px;')
canvas.illo(width='800' height='800' style='max-width: 200px; max-height: 200px; touch-action: none; width: 640px; height: 640px;')
script(src='https://npm.elemecdn.com/ethan4116-blog/lib/js/other/two-people/twopeople1.js')
script(src='https://npm.elemecdn.com/ethan4116-blog/lib/js/other/two-people/zdog.dist.js')
script#rendered-js(src='https://npm.elemecdn.com/ethan4116-blog/lib/js/other/two-people/twopeople.js')
style.
.card-widget.card-announcement {
margin: 0;
align-items: center;
justify-content: center;
text-align: center;
}
canvas {
display: block;
margin: 0 auto;
cursor: move;
}
- tips:如果有重复代码,你要做的一步操作是,删除本文中与原代码重复的代码(优先保留你主题版本原有的代码)
这样子就好了,怎么样很简单吧,快hexo三连试一下下过吧