File size: 4,649 Bytes
01fcadf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
---
import { ViewTransitions } from "astro:transitions";
import Header from "@components/Header.astro";
import MobileNavigation from "@components/MobileNavigation.astro";
import SettingsLoader from "@components/settings/Loader.astro";
interface Props {
title: string;
noHeader?: string;
description?: string;
}
const { title, noHeader, description } = Astro.props;
---
<!doctype html>
<html lang="en">
<head>
<SettingsLoader transition:persist />
<meta charset="UTF-8" />
<meta
name="description"
content={description ? description : "Astro description"}
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" id="favicon" />
<link
rel="stylesheet"
href="/nebula.css"
id="stylesheet"
transition:persist
/>
<link
rel="preload"
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
as="style"
crossorigin="anonymous"
/>
<link
rel="preload"
href="https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu4mxK.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
<ViewTransitions />
</head>
<body class="h-full bg-primary">
{!noHeader && <Header />}
<div class="h-full z-10 w-full fixed">
<slot />
</div>
<div
id="mobileNavMenu"
class="w-full fixed inset-0 h-[calc(100%-4rem)] z-20"
transition:persist
>
<MobileNavigation />
</div>
<video
autoplay
muted
loop
id="nebulaVideo"
class="absolute z-0 h-[calc(100%-4rem)] w-full object-cover"
transition:persist
>
<source type="video/mp4" id="videosource" transition:persist />
</video>
<img
src=""
class="absolute z-0 h-[calc(100%-4rem)] w-full object-cover hidden"
id="nebulaImage"
transition:persist
/>
<script>
import { isMobileNavOpen } from "../store.js";
const mobileNavMenu = document.getElementById("mobileNavMenu");
// Listen to changes in the store, and show/hide the mobile navigation accordingly
isMobileNavOpen.subscribe((open) => {
if (open) {
if (mobileNavMenu) {
mobileNavMenu.style.display = "block";
mobileNavMenu.style.transform = "translateX(0%)";
}
} else {
if (mobileNavMenu) {
mobileNavMenu.style.transform = "translateX(100%)";
}
}
});
</script>
<style>
#mobileNavMenu {
-webkit-transition-duration: 600ms;
transition-duration: 600ms;
transform: translateX(100%);
}
</style>
<style is:global>
.roboto {
font-family: var(--font-family), Roboto, sans-serif;
font-weight: 200;
font-style: normal;
}
/* Custom scrollbar because the default ones look like ASS */
::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-webkit-scrollbar-track {
background: var(--navbar-color);
}
::-webkit-scrollbar-thumb {
background: var(--navbar-text-color);
}
::-webkit-scrollbar-thumb:hover {
background: var(--navbar-link-color);
}
::-moz-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-moz-scrollbar-track {
background: var(--navbar-color);
}
::-moz-scrollbar-thumb {
background: var(--navbar-text-color);
}
::-moz-scrollbar-thumb:hover {
background: var(--navbar-link-color);
}
::-ms-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-ms-scrollbar-track {
background: var(--navbar-color);
}
::-ms-scrollbar-thumb {
background: var(--navbar-text-color);
}
::-ms-scrollbar-thumb:hover {
background: var(--navbar-link-color);
}
::-o-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-o-scrollbar-track {
background: var(--navbar-color);
}
::-o-scrollbar-thumb {
background: var(--navbar-text-color);
}
::-o-scrollbar-thumb:hover {
background: var(--navbar-link-color);
}
</style>
</body>
</html>
|