vh-Theme-Mc
vh-Theme 魔改 自 vhAstro-Theme,
Mc -> Magic change,
魔改内容
step 1:修改侧边栏 流量卡 为 随机小姐姐
在 src\components\Aside\Aside.astro 中,找到流量卡部分代码,替换为随机小姐姐代码:
<!-- 随机小姐姐 -->
{
(
<section class="vh-aside-item adcard">
<h3>嘿嘿😍</h3>
<video src="http://api.mmp.cc/api/ksvideo?type=mp4&id=GaoZhiLiangXiaoJieJie" autoplay loop muted width="640" height="360"></video>
</section>
)
}step 2:修改页脚,说说
在 src\components\Footer\Footer.astro 中,找到页脚代码,选择性修改<p>标签内的内容:
<p><span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"> <path fill="#fff" d="M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM144 221.3c0-33.8 27.4-61.3 61.3-61.3c16.2 0 31.8 6.5 43.3 17.9l7.4 7.4 7.4-7.4c11.5-11.5 27.1-17.9 43.3-17.9c33.8 0 61.3 27.4 61.3 61.3c0 16.2-6.5 31.8-17.9 43.3l-82.7 82.7c-6.2 6.2-16.4 6.2-22.6 0l-82.7-82.7c-11.5-11.5-17.9-27.1-17.9-43.3z"></path></svg><cite>稳定运行</cite><em class="web_time"></em></span></p>
<p><a href="https://astro.build/" target="_blank" rel="noopener noreferrer"><img alt="Astro" src="/assets/images/footer/astro.svg" /></a><a href="/sitemap-index.xml" target="_blank"><img alt="sitemap" src="/assets/images/footer/sitemap.svg" /></a><a href="/rss.xml" target="_blank"><img alt="rss" src="/assets/images/footer/rss.svg" /></a></p>在 src\scripts\Talking.ts 中,找到说说初始化代码,修改说说的头像和名字为自己的:
const TalkingInit = async (data: any) => {
const talkingDOM = document.querySelector('.main-inner-content>.vh-tools-main>main.talking-main')
if (!talkingDOM) return;
try {
let res = data;
if (typeof data === 'string') {
res = await $GET(data);
}
// 修改说说头像url和名字为自己的
talkingDOM.innerHTML = res.map((i: any) => `<article><header><img data-vh-lz-src="头像url" /><p class="info"><span>名字</span><time>${fmtDate(i.date)}前</time></p></header><section class="main">${i.content}</section><footer>${i.tags.map((tag: any) => `<span>${tag}</span>`).join('')}</footer></article>`).join('');
// 修改时只改这里↑
vhLzImgInit();
} catch {
vh.Toast('获取数据失败')
}
}