feat: add revisions in footer
advertise older sites
This commit is contained in:
parent
16eab9d7d8
commit
a7efd8b1f6
12
data/siteRevisions.ts
Normal file
12
data/siteRevisions.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
interface SiteRevision {
|
||||||
|
title: string;
|
||||||
|
url?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const revisions: SiteRevision[] = [
|
||||||
|
{
|
||||||
|
title: "Nuxt 3 (2022)",
|
||||||
|
},
|
||||||
|
{ title: "Eleventy (2021)", url: "https://2021.eggworld.tk" },
|
||||||
|
{ title: "Vanilla (2019-2020)", url: "https://2020.eggworld.tk" },
|
||||||
|
];
|
@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { revisions } from "@/data/siteRevisions";
|
||||||
useHead({ title: "Eggworld" });
|
useHead({ title: "Eggworld" });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -7,19 +8,39 @@ useHead({ title: "Eggworld" });
|
|||||||
<Navbar />
|
<Navbar />
|
||||||
<slot />
|
<slot />
|
||||||
<footer
|
<footer
|
||||||
class="flex flex-col items-center p-3 bg-gray-100 w-full text-sm dark:bg-gray-800"
|
class="flex items-center justify-between p-3 bg-gray-100 w-full text-sm dark:bg-gray-800 flex-col md:flex-row gap-2"
|
||||||
>
|
>
|
||||||
<p>Ⓒ 2022 Daniel Chen</p>
|
<div class="flex items-center gap-2">
|
||||||
<p>
|
<p>Revision:</p>
|
||||||
Licensed under the AGPL-3.0 on
|
<!--
|
||||||
<a class="underline" href="https://github.com/potatoeggy/public">
|
the onchange is so bad - i'd rather it be done through vue
|
||||||
GitHub</a
|
but nuxt is genuinely screwing me over here
|
||||||
|
|
||||||
|
ig r4 has to be in next.js
|
||||||
|
-->
|
||||||
|
<select
|
||||||
|
class="p-2 border rounded rounded-lg"
|
||||||
|
onchange="location = this.value"
|
||||||
>
|
>
|
||||||
and
|
<option v-for="(r, i) in revisions" :key="i" :value="r.url">
|
||||||
<a class="underline" href="https://git.eggworld.tk/eggy/public">
|
{{ r.title }}
|
||||||
Gitea
|
</option>
|
||||||
</a>
|
</select>
|
||||||
</p>
|
</div>
|
||||||
|
<div class="flex flex-col items-center">
|
||||||
|
<p>Ⓒ 2022 Daniel Chen</p>
|
||||||
|
<p>
|
||||||
|
Licensed under the AGPL-3.0 on
|
||||||
|
<a class="underline" href="https://github.com/potatoeggy/public">
|
||||||
|
GitHub</a
|
||||||
|
>
|
||||||
|
and
|
||||||
|
<a class="underline" href="https://git.eggworld.tk/eggy/public">
|
||||||
|
Gitea
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
<slot name="top-button" />
|
<slot name="top-button" />
|
||||||
|
Loading…
Reference in New Issue
Block a user