mirror of
https://github.com/afoim/fuwari.git
synced 2026-01-31 09:03:18 +08:00
70 lines
3.8 KiB
Plaintext
70 lines
3.8 KiB
Plaintext
---
|
|
|
|
import { profileConfig } from "../config";
|
|
import { url } from "../utils/url-utils";
|
|
import { execSync } from "child_process";
|
|
|
|
const currentYear = new Date().getFullYear();
|
|
|
|
let commitHash = "unknown";
|
|
let buildDate = "unknown";
|
|
|
|
try {
|
|
commitHash = execSync('git rev-parse --short=7 HEAD').toString().trim();
|
|
|
|
const date = new Date();
|
|
const year = date.getFullYear();
|
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
const day = date.getDate().toString().padStart(2, '0');
|
|
const hours = date.getHours().toString().padStart(2, '0');
|
|
const minutes = date.getMinutes().toString().padStart(2, '0');
|
|
const seconds = date.getSeconds().toString().padStart(2, '0');
|
|
buildDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
} catch (e) {
|
|
console.warn("Failed to get git info", e);
|
|
}
|
|
---
|
|
|
|
|
|
<!--<div class="border-t border-[var(--primary)] mx-16 border-dashed py-8 max-w-[var(--page-width)] flex flex-col items-center justify-center px-6">-->
|
|
<div class="transition border-t border-black/10 dark:border-white/15 my-10 border-dashed mx-32"></div>
|
|
<!--<div class="transition bg-[oklch(92%_0.01_var(--hue))] dark:bg-black rounded-2xl py-8 mt-4 mb-8 flex flex-col items-center justify-center px-6">-->
|
|
<div class="transition border-dashed border-[oklch(85%_0.01_var(--hue))] dark:border-white/15 rounded-2xl mb-12 flex flex-col items-center justify-center px-6">
|
|
<div class="transition text-50 text-sm text-center">
|
|
© <span id="copyright-year">2024 - {currentYear}</span> <a class="transition link text-[var(--primary)] font-medium" target="_blank" href="https://space.bilibili.com/325903362"> {profileConfig.name} </a>,采用
|
|
<a class="transition link text-[var(--primary)] font-medium" target="_blank" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可
|
|
<br>
|
|
<a class="transition link text-[var(--primary)] font-medium" target="_blank" href={url('rss.xml')}>RSS</a> /
|
|
<a class="transition link text-[var(--primary)] font-medium" target="_blank" href={url('sitemap-index.xml')}>网站地图</a>
|
|
<br>
|
|
由
|
|
<a class="transition link text-[var(--primary)] font-medium" target="_blank" href="https://astro.build">Astro</a> 和
|
|
<a class="transition link text-[var(--primary)] font-medium" target="_blank" href="https://github.com/saicaca/fuwari">Fuwari</a> 强力驱动
|
|
<br>
|
|
本网站代码
|
|
<a class="transition link text-[var(--primary)] font-medium" target="_blank" href="https://github.com/afoim/fuwari">已开源</a>
|
|
<a class="transition link text-black/30 dark:text-white/30 hover:text-[var(--primary)] text-xs ml-1" target="_blank" href={`https://github.com/afoim/fuwari/commit/${commitHash}`}>({commitHash} @ {buildDate})</a>
|
|
<br>
|
|
|
|
<a class="transition link text-[var(--primary)] font-medium inline-flex items-center" href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank"><img alt="" src="/favicon/foot-icp.png" class="h-4 mr-1">皖ICP备2025099787号-2</a>
|
|
<br>
|
|
<span id="server-info" class="text-black/30 dark:text-white/30 text-xs"></span>
|
|
<!-- <a class="transition link text-[var(--primary)] font-medium inline-flex items-center" href="https://beian.mps.gov.cn/#/query/webSearch?code=34010302002608" target="_blank"><img alt="" src="/favicon/foot-ga.png" class="h-4 mr-1">皖公网安备34010302002608号</a>
|
|
<br> -->
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
fetch(window.location.href, { method: "HEAD" }).then(response => {
|
|
const server = response.headers.get('server');
|
|
const serverInfo = document.getElementById('server-info');
|
|
if (serverInfo) {
|
|
if (server) {
|
|
serverInfo.innerText = `访问节点: ${server}`;
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
});
|
|
</script>
|