diff --git a/app/components/main/footer.vue b/app/components/main/footer.vue index e67133a..a56502e 100644 --- a/app/components/main/footer.vue +++ b/app/components/main/footer.vue @@ -1,3 +1,5 @@ + +
Powered by { const type = siteConfig.footer?.hitokoto?.type; const url = new URL("https://v1.hitokoto.cn/"); @@ -148,6 +166,17 @@ const fetchStats = async () => { } }; +const buildAdHtml = (ad) => { + if (!ad || !ad.text) return ""; + const imgHtml = ad.img ? `` : ""; + const content = ad.text.replace(/\{\{img\}\}/g, imgHtml); + return `${content}`; +}; + +const isExternal = (url) => { + return typeof url === "string" && /^https?:\/\//.test(url); +}; + onMounted(() => { if (showHitokoto) fetchHitokoto(); if (showStats.value) fetchStats();