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">
|
||||
import { revisions } from "@/data/siteRevisions";
|
||||
useHead({ title: "Eggworld" });
|
||||
</script>
|
||||
|
||||
@ -7,8 +8,26 @@ useHead({ title: "Eggworld" });
|
||||
<Navbar />
|
||||
<slot />
|
||||
<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"
|
||||
>
|
||||
<div class="flex items-center gap-2">
|
||||
<p>Revision:</p>
|
||||
<!--
|
||||
the onchange is so bad - i'd rather it be done through vue
|
||||
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"
|
||||
>
|
||||
<option v-for="(r, i) in revisions" :key="i" :value="r.url">
|
||||
{{ r.title }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-col items-center">
|
||||
<p>Ⓒ 2022 Daniel Chen</p>
|
||||
<p>
|
||||
Licensed under the AGPL-3.0 on
|
||||
@ -20,6 +39,8 @@ useHead({ title: "Eggworld" });
|
||||
Gitea
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div></div>
|
||||
</footer>
|
||||
</div>
|
||||
<slot name="top-button" />
|
||||
|
Loading…
Reference in New Issue
Block a user