2023-09-25 19:37:33 -04:00
|
|
|
<script lang="ts" setup>
|
2023-10-05 20:02:43 -04:00
|
|
|
import { theme } from "ant-design-vue";
|
2023-09-25 19:37:33 -04:00
|
|
|
|
2023-10-10 22:02:42 -04:00
|
|
|
const { getSession, signIn } = useAuth();
|
|
|
|
|
|
|
|
await getSession({ force: true });
|
|
|
|
|
|
|
|
const { data } = await useAuth();
|
|
|
|
|
|
|
|
const dop = data?.value as any;
|
2023-12-28 19:29:21 -05:00
|
|
|
let darkBool = ref(dop?.user?.profile?.nightMode || false);
|
2023-10-10 22:02:42 -04:00
|
|
|
// provide("user", ref(dop?.user || null));
|
2023-10-05 20:02:43 -04:00
|
|
|
provide("dark", darkBool);
|
|
|
|
useHead({
|
|
|
|
bodyAttrs: {
|
|
|
|
"data-theme": computed(() => {
|
2023-12-28 19:29:21 -05:00
|
|
|
return darkBool.value ? "dark" : undefined;
|
2023-10-05 20:02:43 -04:00
|
|
|
}).value,
|
|
|
|
},
|
2023-12-06 21:43:25 -05:00
|
|
|
titleTemplate: (title) =>
|
|
|
|
title ? `Rockfic | ${title}` : "Rockfic | Band fiction that rocks",
|
2023-10-05 20:02:43 -04:00
|
|
|
});
|
2023-12-06 21:43:25 -05:00
|
|
|
// provide("loaded", useNuxtApp().$loaded);
|
2023-10-05 20:02:43 -04:00
|
|
|
// let loaded = ref<boolean[]>([]);
|
|
|
|
// provide("loaded", {
|
|
|
|
// loaded,
|
|
|
|
// pushState() {
|
|
|
|
// loaded.value.push(false)
|
|
|
|
// },
|
|
|
|
// flipLast() {
|
|
|
|
// loaded.value[ loaded.value.length ] = true
|
|
|
|
// }
|
|
|
|
// });
|
2023-09-25 19:37:33 -04:00
|
|
|
</script>
|
2023-09-23 15:58:51 -04:00
|
|
|
<template>
|
2023-12-09 17:02:56 -05:00
|
|
|
<NuxtLayout>
|
|
|
|
<NuxtPage />
|
|
|
|
<!-- <NuxtWelcome /> -->
|
|
|
|
</NuxtLayout>
|
|
|
|
<nuxt-error-boundary>
|
|
|
|
<template #error="{ error, clearError }">
|
|
|
|
<error-bound :error="error" />
|
2023-10-11 14:21:57 -04:00
|
|
|
</template>
|
2023-12-09 17:02:56 -05:00
|
|
|
</nuxt-error-boundary>
|
2023-09-23 15:58:51 -04:00
|
|
|
</template>
|
2023-10-05 20:02:43 -04:00
|
|
|
<style>
|
|
|
|
body[data-theme="dark"],
|
|
|
|
body[data-theme="dark"] .alayhead {
|
|
|
|
background-color: #141414;
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
html {
|
|
|
|
background: #f5f5f5;
|
|
|
|
}
|
|
|
|
|
|
|
|
html,
|
|
|
|
body {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
html:has(body[data-theme="dark"]) {
|
|
|
|
background-color: #141414 !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
|
|
|
margin: 0px !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
body:not([data-theme="dark"]) .alayhead {
|
|
|
|
background-color: #f5f5f5 !important;
|
|
|
|
}
|
|
|
|
</style>
|