fix: bad overflow attribute

This commit is contained in:
Alexander Daichendt 2025-02-13 22:04:24 +01:00
parent c7e3b2c2d6
commit c1a2c6bbef
4 changed files with 794 additions and 609 deletions

View file

@ -17,17 +17,17 @@
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/cloudflare": "^12.1.0",
"@astrojs/mdx": "^4.0.1",
"@astrojs/rss": "^4.0.10",
"@astrojs/cloudflare": "^12.2.1",
"@astrojs/mdx": "^4.0.8",
"@astrojs/rss": "^4.0.11",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "^5.1.3",
"@astrojs/tailwind": "^6.0.0",
"@cloudflare/workers-types": "^4.20241230.0",
"@fontsource/fira-sans": "^5.1.1",
"@fontsource/ubuntu": "^5.1.0",
"@iconify-json/mdi": "^1.2.1",
"@iconify-json/simple-icons": "^1.2.14",
"astro": "^5.0.3",
"astro": "^5.3.0",
"astro-icon": "^1.1.4",
"drizzle-orm": "^0.38.3",
"mdast-util-to-string": "^4.0.0",

1371
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@ import HeaderLink from "./HeaderLink.astro";
---
<header
class="mb-8 w-full lg:w-[768px] max-w-[calc(100%-2em)] lg:mx-auto overflow-scroll hidden lg:block"
class="mb-8 w-full lg:w-[768px] max-w-[calc(100%-2em)] lg:mx-auto hidden lg:block"
>
<nav>
<div class="flex gap-4">
@ -45,8 +45,10 @@ import HeaderLink from "./HeaderLink.astro";
</header>
<script>
const menu = document.getElementById("nav-menu");
const drawer = document.getElementById("drawer");
const menu = document.getElementById("nav-menu")!;
const drawer = document.getElementById("drawer")!;
const iconMenu = document.getElementById("iconMenu")!;
const iconClose = document.getElementById("iconClose")!;
function toggle() {
drawer.classList.toggle("translate-x-full");
@ -65,17 +67,17 @@ import HeaderLink from "./HeaderLink.astro";
});
// click-away listener
document.addEventListener("click", (event) => {
console.log("click outside");
document.addEventListener("click", (event: MouseEvent) => {
const target = event.target as Node;
if (
!drawer.classList.contains("translate-x-full") &&
!drawer.contains(event.target) &&
!menu.contains(event.target)
!drawer.contains(target) &&
!menu.contains(target)
) {
console.log(
!drawer.classList.contains("translate-x-full"),
!drawer.contains(event.target),
!menu.contains(event.target),
!drawer.contains(target),
!menu.contains(target),
);
toggle();
}

View file

@ -1,5 +1,5 @@
<div class="text-center p-8 bg-red-50 dark:bg-red-950 rounded-lg shadow-sm">
<p class="text-red-600 dark:text-red-400 text-lg font-medium">
<p class="text-red-600 dark:text-red-400 text-lg font-medium mb-0">
No CV found with this UUID.
</p>
</div>