-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
10,331 additions
and
3,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,11 +147,30 @@ | |
首页 | ||
</a> | ||
|
||
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a href="#" target=""> | ||
文章 | ||
</a> | ||
|
||
<ul> | ||
|
||
<li> | ||
<a href="/love" target=""> | ||
love | ||
<a href="/archives" target=""> | ||
隧道 | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a href="/categories" target=""> | ||
分类 | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a href="/tags" target=""> | ||
标签 | ||
</a> | ||
</li> | ||
|
||
|
@@ -160,59 +179,78 @@ | |
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a href="/archives" target=""> | ||
归档 | ||
</a> | ||
|
||
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a href="/categories" target=""> | ||
分类 | ||
<a href="#" target=""> | ||
碎碎念 | ||
</a> | ||
|
||
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a href="/tags" target=""> | ||
标签 | ||
</a> | ||
|
||
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a href="/links" target=""> | ||
链接 | ||
</a> | ||
|
||
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a href="/shouji" target=""> | ||
收集 | ||
</a> | ||
<ul> | ||
|
||
<li> | ||
<a href="/suisuinian" target=""> | ||
碎碎念 | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a href="/love" target=""> | ||
LOVE | ||
</a> | ||
</li> | ||
|
||
</ul> | ||
|
||
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a href="/time" target=""> | ||
时间 | ||
<a href="#" target=""> | ||
我的 | ||
</a> | ||
|
||
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a href="/update" target=""> | ||
更新 | ||
</a> | ||
<ul> | ||
|
||
<li> | ||
<a href="/links" target=""> | ||
链接 | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a href="/shouji" target=""> | ||
收集 | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a href="/time" target=""> | ||
时间 | ||
</a> | ||
</li> | ||
|
||
</ul> | ||
|
||
</li> | ||
|
||
<li class="menu-item-has-children "> | ||
<a data-no-swup href="/about" target=""> | ||
<a href="#" target=""> | ||
关于 | ||
</a> | ||
|
||
<ul> | ||
|
||
<li> | ||
<a href="/about" target=""> | ||
关于 | ||
</a> | ||
</li> | ||
|
||
<li> | ||
<a href="/update" target=""> | ||
更新 | ||
</a> | ||
</li> | ||
|
||
</ul> | ||
|
||
</li> | ||
|
||
</ul> | ||
|
@@ -715,6 +753,55 @@ <h6 class="trm-op-title">宋词收集🌼</h6> | |
|
||
|
||
|
||
</body> | ||
|
||
<div id="sakana" style="position:fixed;right:0;bottom:0px;"></div> | ||
<script async onload='initSakanaWidget({"character":"takina","enable":true,"enable_mobile":true,"size":130,"autoFit":false,"bottom":"0px","controls":false,"stroke":{"color":"#b4b4b4","width":10},"threshold":0.1,"rotate":0,"customCharacters":[]})' src="https://cdn.jsdelivr.net/npm/[email protected]/lib/sakana.min.js"></script> | ||
<script> | ||
function log(msg) { | ||
console.log("[hexo-sakana] " + msg); | ||
} | ||
|
||
function initSakanaWidget(config) { | ||
if ( | ||
!config.enable_mobile && | ||
window.navigator.userAgent.match( | ||
/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i | ||
) | ||
) { | ||
log( | ||
'检测为移动端,且配置中未开启在移动端启用组件,hexo-sakana 已禁用' | ||
); | ||
return; | ||
} | ||
for (character of config.customCharacters) { | ||
if (!["takina", "chisato"].includes(character.base)) { | ||
log(`无效基础角色 ${character.base},取消注册`); | ||
continue; | ||
} | ||
if (character.name === "") { | ||
log("名称为空,取消注册"); | ||
continue; | ||
} | ||
const originCharacter = SakanaWidget.getCharacter(character.base); | ||
originCharacter.initialState = { | ||
...originCharacter.initialState, | ||
...character, | ||
}; | ||
originCharacter.image = !character.image ? originCharacter.image : character.image | ||
SakanaWidget.registerCharacter(character.name, originCharacter); | ||
log(`注册自定义角色:${character.name}`) | ||
} | ||
new SakanaWidget({ | ||
character: config.character, | ||
size: config.size, | ||
autoFit: config.autoFit, | ||
controls: config.controls, | ||
stroke: config.stroke, | ||
threshold: config.threshold, | ||
rotate: config.rotate, | ||
}).mount("#sakana"); | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.