public/layouts/default.vue

111 lines
2.3 KiB
Vue
Raw Normal View History

2022-07-21 22:03:35 -04:00
<script setup lang="ts">
import { revisions } from "@/data/siteRevisions";
2024-03-01 00:09:18 -05:00
useHead({ title: "Oeufs?" });
2022-07-21 22:03:35 -04:00
</script>
2022-07-21 16:50:03 -04:00
<template>
2022-07-22 17:16:27 -04:00
<div class="flex flex-col items-center w-full h-full justify-between">
2022-07-21 22:03:35 -04:00
<Navbar />
2022-07-22 15:36:37 -04:00
<slot />
2022-07-22 17:10:03 -04:00
<footer
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"
2022-07-22 17:10:03 -04:00
>
<label 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
2023-03-09 12:14:05 -05:00
class="p-2 border rounded-lg dark:bg-[#222]"
onchange="location = this.value"
2022-07-22 17:03:59 -04:00
>
<option v-for="(r, i) in revisions" :key="i" :value="r.url">
{{ r.title }}
</option>
</select>
</label>
<div class="flex flex-col items-center">
<p>
Licensed under the AGPL-3.0 on
<a class="underline" href="https://github.com/potatoeggy/public">
GitHub</a
>
and
2022-11-01 00:07:14 -04:00
<a class="underline" href="https://git.eggworld.me/eggy/public">
Gitea
</a>
</p>
</div>
<div class="w-36"></div>
2022-07-22 17:03:59 -04:00
</footer>
2022-07-21 16:50:03 -04:00
</div>
2022-08-10 11:40:02 -04:00
<slot name="top-button" />
2022-07-21 16:50:03 -04:00
</template>
2022-07-21 22:03:35 -04:00
<style>
html {
background: white;
color: black;
2024-03-01 00:09:18 -05:00
transition:
color 0.2s ease,
background 0.2s ease;
2022-07-22 16:56:33 -04:00
overflow-x: hidden;
overflow-y: scroll;
2022-08-09 19:13:22 -04:00
scroll-behavior: smooth;
2022-07-21 22:03:35 -04:00
}
html.dark {
background: #222;
color: white;
}
html::before {
content: "";
position: fixed;
height: 100%;
width: 100%;
background: #222;
transform: translateX(-100%);
transition: transform 0.2s ease;
z-index: 0;
}
/* div#__nuxt {
min-height: 100vh;
}
it's better if everything is sort of long but that is not the case
*/
2022-07-21 22:03:35 -04:00
html.dark::before {
transform: translateX(0);
}
2022-07-22 15:36:37 -04:00
2022-07-22 16:08:55 -04:00
main {
width: 80%;
2023-01-28 16:49:20 -05:00
max-width: 90ch;
2022-07-22 16:40:52 -04:00
margin: auto;
2022-07-22 16:08:55 -04:00
padding-top: 2rem;
2022-07-22 15:36:37 -04:00
}
2022-07-22 17:10:03 -04:00
footer {
2022-08-07 20:25:25 -04:00
--footer-drop-color: lightgray;
2022-07-22 17:10:03 -04:00
transition: background 0.2s ease;
2022-08-07 20:25:25 -04:00
box-shadow: 0 -0.05rem 0.75rem 0 var(--footer-drop-color);
2022-08-07 21:25:30 -04:00
margin-top: 2rem;
2022-08-07 20:25:25 -04:00
}
html.dark footer {
--footer-drop-color: black;
2022-07-22 17:10:03 -04:00
}
@media screen and (max-width: 600px) {
main {
width: 90%;
}
}
2022-07-21 22:03:35 -04:00
</style>