优化手机端侧边栏图标展示

This commit is contained in:
Han 2025-02-18 09:48:55 +08:00
parent 1afeec52d5
commit ebebb131df
3 changed files with 7 additions and 19 deletions

View File

@ -13,9 +13,6 @@ import "../styles/components/Comment.less";
updateRouter("afterMount", async () => {
if (!document.querySelector(".vh-comment>section")) return;
await LoadScript("https://registry.npmmirror.com/twikoo/1.6.41/files/dist/twikoo.all.min.js");
twikoo.init({
envId: SITE_INFO.Twikoo.envId,
el: ".vh-comment>section"
});
twikoo.init({ envId: SITE_INFO.Twikoo.envId, el: ".vh-comment>section" });
});
</script>

View File

@ -17,7 +17,7 @@ import "../styles/components/MobileSidebar.less";
{
Navs.map(i => (
<a class={i.link.includes(activeNav) ? "active" : ""} href={i.link} target={i.target ? "_blank" : "_self"}>
<span set:html={i.icon} />
<object data={i.icon} type="image/svg+xml" />
{i.text}
</a>
))

View File

@ -90,24 +90,15 @@
color: #fff;
background: #3366FF;
&>span {
&>svg {
fill: #fff;
}
&>object {
filter: brightness(0) invert(100%);
}
}
&>span {
display: flex;
align-items: center;
&>object {
width: 0.875rem;
height: 0.875rem;
&>svg {
width: 100%;
height: 100%;
}
transition: filter 0.16s ease-in-out;
}
}
}