feat: make metadata window sticky

This commit is contained in:
dusk 2024-09-26 04:25:55 +03:00
parent e76d8fba3c
commit ea9bdc15ef
Signed by: dusk
SSH Key Fingerprint: SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
export let title: string;
export let iconUri: string = '';
export let id: string = '';
export let sticky: boolean = false;
const scaleKeyframes = [
"window-open",
@ -19,7 +20,7 @@
<div
class="
flex flex-col
flex flex-col {sticky ? 'md:sticky md:-top-9' : ''}
max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl min-w-[30ch] lg:min-w-[40ch] w-full md:w-fit [height:fit-content]
border-ralsei-white border-ridge border-8 border-t-[12px]
bg-ralsei-black

View File

@ -17,14 +17,14 @@
<meta property="og:title" content={title} />
</svelte:head>
<article class="flex flex-wrap gap-4 h-entry">
<article class="flex flex-wrap md:flex-nowrap gap-4 h-entry">
<Window {title} iconUri="/icons/entry.png">
<div class="prose prose-ralsei max-w-[80ch] e-content">
<slot />
</div>
</Window>
{#if showMetadata}
<Window title="metadata">
<Window title="metadata" sticky>
<div class="prose prose-ralsei">
<ul>
<link class="u-url" href="{PUBLIC_BASE_URL}{$page.url.pathname}" />