feat(Page): add appearance animation that is slightly delayed to ensure font loading and lack of FOIT

This commit is contained in:
Ilia Mashkov
2026-02-10 13:09:09 +03:00
parent bb8d2d685c
commit e90b2bede5

View File

@@ -4,7 +4,6 @@
--> -->
<script lang="ts"> <script lang="ts">
import { scrollBreadcrumbsStore } from '$entities/Breadcrumb'; import { scrollBreadcrumbsStore } from '$entities/Breadcrumb';
import { cn } from '$shared/shadcn/utils/shadcn-utils';
import { import {
Logo, Logo,
Section, Section,
@@ -17,6 +16,8 @@ import EyeIcon from '@lucide/svelte/icons/eye';
import LineSquiggleIcon from '@lucide/svelte/icons/line-squiggle'; import LineSquiggleIcon from '@lucide/svelte/icons/line-squiggle';
import ScanSearchIcon from '@lucide/svelte/icons/search'; import ScanSearchIcon from '@lucide/svelte/icons/search';
import type { Snippet } from 'svelte'; import type { Snippet } from 'svelte';
import { cubicIn } from 'svelte/easing';
import { fade } from 'svelte/transition';
let searchContainer: HTMLElement; let searchContainer: HTMLElement;
@@ -45,7 +46,10 @@ function handleTitleStatusChanged(index: number, isPast: boolean, title?: Snippe
</script> </script>
<!-- Font List --> <!-- Font List -->
<div class="p-2 sm:p-3 md:p-4 h-full flex flex-col gap-3 sm:gap-4"> <div
class="p-2 sm:p-3 md:p-4 h-full flex flex-col gap-3 sm:gap-4"
in:fade={{ duration: 500, delay: 150, easing: cubicIn }}
>
<Section class="my-4 sm:my-10 md:my-12 gap-6 sm:gap-8" onTitleStatusChange={handleTitleStatusChanged}> <Section class="my-4 sm:my-10 md:my-12 gap-6 sm:gap-8" onTitleStatusChange={handleTitleStatusChanged}>
{#snippet icon({ className })} {#snippet icon({ className })}
<CodeIcon class={className} /> <CodeIcon class={className} />