feat(Page): add Section wrappers to page widgets

This commit is contained in:
Ilia Mashkov
2026-01-30 17:46:21 +03:00
parent 818dfdb55e
commit ef48d9815c

View File

@@ -1,21 +1,18 @@
<!--
Component: Page
Description: The main page component of the application.
-->
<script lang="ts">
import { appliedFontsManager } from '$entities/Font';
import { displayedFontsStore } from '$features/DisplayFont';
import FontDisplay from '$features/DisplayFont/ui/FontDisplay/FontDisplay.svelte';
import { controlManager } from '$features/SetupFont';
import { cn } from '$shared/shadcn/utils/shadcn-utils';
import { Section } from '$shared/ui';
import ComparisonSlider from '$widgets/ComparisonSlider/ui/ComparisonSlider/ComparisonSlider.svelte';
import { FontSearch } from '$widgets/FontSearch';
import { cubicOut } from 'svelte/easing';
import { Spring } from 'svelte/motion';
import type {
SlideParams,
TransitionConfig,
} from 'svelte/transition';
/**
* Page Component
*/
import LineSquiggleIcon from '@lucide/svelte/icons/line-squiggle';
import ScanEyeIcon from '@lucide/svelte/icons/scan-eye';
let searchContainer: HTMLElement;
@@ -53,13 +50,33 @@ $effect(() => {
</div>
{/key}
<div class="my-6">
<ComparisonSlider />
</div>
{#if displayedFontsStore.fonts.length > 1}
<Section class="my-12 gap-8" index={1}>
{#snippet icon({ className })}
<ScanEyeIcon class={className} />
{/snippet}
{#snippet title({ className })}
<h1 class={className}>
Optical<br>Comparator
</h1>
{/snippet}
<ComparisonSlider />
</Section>
{/if}
<div class="will-change-tranform transition-transform content my-2">
<FontDisplay />
</div>
{#if displayedFontsStore.hasAnyFonts}
<Section class="my-12 gap-8" index={2}>
{#snippet icon({ className })}
<LineSquiggleIcon class={className} />
{/snippet}
{#snippet title({ className })}
<h2 class={className}>
Sample<br>Set
</h2>
{/snippet}
<FontDisplay />
</Section>
{/if}
</div>
<style>