diff --git a/src/components/en/Navbar.tsx b/src/components/en/Navbar.tsx
index 96c4916..1528492 100644
--- a/src/components/en/Navbar.tsx
+++ b/src/components/en/Navbar.tsx
@@ -6,7 +6,7 @@ import {
faGlobe,
faXmark,
} from "@fortawesome/pro-regular-svg-icons";
-import { createEffect, createSignal } from "solid-js";
+import { createEffect, createSignal, onCleanup } from "solid-js";
import { A, useIsRouting, useLocation, useNavigate } from "solid-start";
import { FontAwesomeIcon } from "../FontAwesomeIcon";
@@ -23,6 +23,19 @@ function Navbar() {
setMenu(false);
});
+ const handleKeyDown = (event: KeyboardEvent) => {
+ if (!menu() || "Escape" != event.key) return;
+ event.preventDefault();
+ setMenu(false);
+ };
+
+ createEffect(() => {
+ window.addEventListener("keydown", handleKeyDown);
+ onCleanup(() => {
+ window.removeEventListener("keydown", handleKeyDown);
+ });
+ });
+
return (
<>
diff --git a/src/styles/global.scss b/src/styles/global.scss
index f4c039c..58bc979 100644
--- a/src/styles/global.scss
+++ b/src/styles/global.scss
@@ -48,10 +48,16 @@ body {
button {
padding: 0.5rem 0.6rem;
+ border-radius: 10%;
svg {
height: 2rem;
width: 2rem;
+
+ @media (max-width: 1200px) {
+ height: 5vw;
+ width: 5vw;
+ }
}
}
}
@@ -62,11 +68,24 @@ body {
top: 2rem;
left: 2rem;
padding: 0.5rem 0.6rem;
+ border-radius: 10%;
svg {
height: 2rem;
width: 2rem;
}
+
+ @media (max-width: 1200px) {
+ position: fixed;
+ top: 5vw;
+ left: 5vw;
+ padding: 2vw;
+
+ svg {
+ height: 5vw;
+ width: 5vw;
+ }
+ }
}
article > div {
@@ -186,9 +205,7 @@ body.light-mode {
}
}
-@media (min-width: 960px) {
- article {
- max-width: 80vw;
- margin: auto;
- }
+article {
+ max-width: 80vw;
+ margin: auto;
}
diff --git a/src/styles/overview.scss b/src/styles/overview.scss
index 7093cc9..43227fc 100644
--- a/src/styles/overview.scss
+++ b/src/styles/overview.scss
@@ -178,26 +178,6 @@ body.overview {
}
@media (max-width: 767px) /*unter handy größe*/ {
- header,
- article,
- img,
- p,
- h1,
- h2,
- h3 {
- margin-left: 0%;
- padding-left: 0;
- }
- // [class*="col-"] {
- // width: 100%;
- // }
- #navbar {
- visibility: hidden;
- }
- // #sidenavbar {
- // visibility: visible;
- // }
- /*.raster {width: calc(100%/2);}*/
.righties {
width: 100%;
@@ -207,16 +187,6 @@ body.overview {
}
}
- @media only screen and (min-width: 767px) /*über handy größe*/ {
- #navbar {
- visibility: visible;
- }
- // #sidenavbar {
- // visibility: hidden;
- // }
- /*.raster {width: calc(100%/5);}*/
- }
-
/*@media screen and (min-width:1200px) {.raster {width: calc(100%/6);}}
@media screen and (min-width:1500px) {.raster {width: calc(100%/8);}}*/