2024-08-15 00:43:18 +03:00
|
|
|
<script lang="ts">
|
2024-10-30 14:00:36 +03:00
|
|
|
export let title: string | undefined = undefined;
|
2024-08-15 00:43:18 +03:00
|
|
|
export let iconUri: string = '';
|
2024-09-26 04:07:42 +03:00
|
|
|
export let id: string = '';
|
2024-09-26 04:25:55 +03:00
|
|
|
export let sticky: boolean = false;
|
2024-09-26 04:40:21 +03:00
|
|
|
export let entry: boolean = false;
|
2024-10-30 14:00:36 +03:00
|
|
|
export let removePadding: boolean = false;
|
|
|
|
export let center: boolean = false;
|
2024-09-23 15:02:42 +03:00
|
|
|
|
2024-09-26 03:30:26 +03:00
|
|
|
const scaleKeyframes = [
|
|
|
|
"window-open",
|
|
|
|
"window-open-vertical",
|
|
|
|
"window-open-vertical",
|
|
|
|
"window-open-horizontal",
|
|
|
|
"window-open-horizontal",
|
|
|
|
"window-open-move-up",
|
|
|
|
"window-open-move-down",
|
|
|
|
"window-open-move-left",
|
|
|
|
"window-open-move-right",
|
|
|
|
];
|
|
|
|
$: chosenKeyframe = scaleKeyframes.at(Math.floor(Math.random() * scaleKeyframes.length))
|
2024-08-15 00:43:18 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<div
|
|
|
|
class="
|
2024-10-30 14:00:36 +03:00
|
|
|
flex flex-col {sticky ? 'md:sticky md:-top-9' : ''} {center ? "mx-auto" : ""}
|
2024-09-23 16:27:33 +03:00
|
|
|
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]
|
2024-10-30 14:00:36 +03:00
|
|
|
bg-ralsei-black border-ralsei-white border-ridge border-8 border-t-[12px]
|
2024-09-23 15:02:42 +03:00
|
|
|
animate-{chosenKeyframe}
|
2024-08-15 00:43:18 +03:00
|
|
|
"
|
2024-09-26 04:07:42 +03:00
|
|
|
{id}
|
2024-08-15 00:43:18 +03:00
|
|
|
>
|
2024-10-30 14:00:36 +03:00
|
|
|
{#if title !== undefined}
|
|
|
|
<div
|
|
|
|
class="
|
|
|
|
p-1 border-ralsei-white border-8
|
|
|
|
bg-gradient-to-l from-ralsei-pink-neon to-ralsei-black to-75%
|
|
|
|
"
|
|
|
|
style="border-style: hidden hidden ridge hidden;"
|
|
|
|
>
|
|
|
|
<div class="flex bg-opacity-100 pixelate-bg">
|
|
|
|
<h1
|
|
|
|
class="
|
|
|
|
font-monospace text-xl text-ralsei-pink-regular
|
|
|
|
grow justify-self-start self-center {entry ? 'p-name' : ''}
|
|
|
|
"
|
|
|
|
>
|
|
|
|
{title}
|
|
|
|
</h1>
|
|
|
|
{#if iconUri !== ''}
|
|
|
|
<img
|
|
|
|
class="justify-self-end self-center max-h-7"
|
|
|
|
style="image-rendering: pixelated;"
|
|
|
|
src={iconUri}
|
|
|
|
alt={iconUri}
|
|
|
|
/>
|
|
|
|
{/if}
|
|
|
|
</div>
|
2024-09-18 18:18:00 +03:00
|
|
|
</div>
|
2024-10-30 14:00:36 +03:00
|
|
|
{/if}
|
|
|
|
<div class="
|
|
|
|
{removePadding ? "" : "p-2"} bg-gradient-to-tl
|
|
|
|
to-ralsei-pink-neon/15 from-ralsei-pink-regular/20
|
|
|
|
">
|
2024-09-19 13:17:29 +03:00
|
|
|
<slot />
|
2024-08-15 00:43:18 +03:00
|
|
|
</div>
|
|
|
|
</div>
|