mirror of
https://github.com/mikkelsvartveit/astro-personal-website.git
synced 2025-12-22 19:22:37 +00:00
Hide scrollbars on fullscreen photo page
This commit is contained in:
parent
c53b4efd60
commit
afda029364
2 changed files with 4 additions and 3 deletions
|
|
@ -3,9 +3,10 @@ import { ViewTransitions } from "astro:transitions";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title?: string;
|
title?: string;
|
||||||
|
hideScrollbar?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title } = Astro.props;
|
const { title, hideScrollbar } = Astro.props;
|
||||||
|
|
||||||
const fullTitle = `${title && title + " – "}Mikkel Svartveit`;
|
const fullTitle = `${title && title + " – "}Mikkel Svartveit`;
|
||||||
---
|
---
|
||||||
|
|
@ -24,7 +25,7 @@ const fullTitle = `${title && title + " – "}Mikkel Svartveit`;
|
||||||
<ViewTransitions fallback="swap" />
|
<ViewTransitions fallback="swap" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="bg-gray-50 overflow-y-scroll">
|
<body class={`bg-gray-50 ${hideScrollbar ? "" : "overflow-y-scroll"}`}>
|
||||||
<slot />
|
<slot />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export const getStaticPaths = (async () => {
|
||||||
const { photo } = Astro.props;
|
const { photo } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<RootLayout title="Photo">
|
<RootLayout title="Photo" hideScrollbar>
|
||||||
<div class="bg-gray-900 m-screen h-screen" onclick="
|
<div class="bg-gray-900 m-screen h-screen" onclick="
|
||||||
history.back()
|
history.back()
|
||||||
">
|
">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue