File size: 1,912 Bytes
96dd062 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ---
import fs from "node:fs";
import path from "node:path";
import { footerConfig, profileConfig } from "@/config";
import { url } from "@/utils/url-utils";
const currentYear = new Date().getFullYear();
let customFooterHtml = footerConfig.customHtml?.trim() || "";
if (!customFooterHtml && footerConfig.enable) {
try {
const footerConfigPath = path.join(
process.cwd(),
"src",
"config",
"FooterConfig.html",
);
customFooterHtml = fs.readFileSync(footerConfigPath, "utf-8");
customFooterHtml = customFooterHtml.replace(/<!--[\s\S]*?-->/g, "").trim();
} catch (error) {
console.warn("FooterConfig.html read failed:", error.message);
}
}
---
<div
class="transition border-t border-black/10 dark:border-white/15 my-10 border-dashed mx-32"
>
</div>
<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">
<div class="mb-2">
{customFooterHtml && <div set:html={customFooterHtml} />}
</div>
<div class="m-0.5">
© <span id="copyright-year">{currentYear}</span>
{profileConfig.name}. All Rights Reserved. /
<a
class="transition link text-(--primary) font-medium"
target="_blank"
href={url("rss.xml")}>RSS</a
> /
<a
class="transition link text-(--primary) font-medium"
target="_blank"
href={url("sitemap-index.xml")}>Sitemap</a
>
</div>
<div class="m-0.5">
Powered by
<a
class="transition link text-(--primary) font-medium"
target="_blank"
href="https://astro.build">Astro</a
> &
<a
class="transition link text-(--primary) font-medium"
target="_blank"
href="https://github.com/CuteLeaf/Firefly">Firefly</a
>
</div>
</div>
</div>
|