Skip to content

Commit

Permalink
Site updated: 2024-04-15 22:30:04
Browse files Browse the repository at this point in the history
  • Loading branch information
cowwow committed Apr 15, 2024
1 parent 322bef0 commit a3f1934
Show file tree
Hide file tree
Showing 75 changed files with 10,331 additions and 3,076 deletions.
169 changes: 128 additions & 41 deletions 13/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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>
Expand Down Expand Up @@ -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>
Loading

0 comments on commit a3f1934

Please sign in to comment.