Hide scrollbars on fullscreen photo page

This commit is contained in:
Mikkel Svartveit 2023-10-17 23:28:34 -07:00
parent c53b4efd60
commit afda029364
2 changed files with 4 additions and 3 deletions

View file

@ -3,9 +3,10 @@ import { ViewTransitions } from "astro:transitions";
interface Props {
title?: string;
hideScrollbar?: boolean;
}
const { title } = Astro.props;
const { title, hideScrollbar } = Astro.props;
const fullTitle = `${title && title + " "}Mikkel Svartveit`;
---
@ -24,7 +25,7 @@ const fullTitle = `${title && title + " "}Mikkel Svartveit`;
<ViewTransitions fallback="swap" />
</head>
<body class="bg-gray-50 overflow-y-scroll">
<body class={`bg-gray-50 ${hideScrollbar ? "" : "overflow-y-scroll"}`}>
<slot />
</body>
</html>

View file

@ -20,7 +20,7 @@ export const getStaticPaths = (async () => {
const { photo } = Astro.props;
---
<RootLayout title="Photo">
<RootLayout title="Photo" hideScrollbar>
<div class="bg-gray-900 m-screen h-screen" onclick="
history.back()
">