2026-02-27 12:44:57 +03:00
|
|
|
<!--
|
|
|
|
|
Component: SampleListSection
|
|
|
|
|
Wraps SampleList with a Section component
|
|
|
|
|
-->
|
|
|
|
|
<script lang="ts">
|
2026-03-02 22:20:48 +03:00
|
|
|
import { NavigationWrapper } from '$entities/Breadcrumb';
|
2026-04-08 10:00:30 +03:00
|
|
|
import { fontStore } from '$entities/Font';
|
2026-02-27 12:44:57 +03:00
|
|
|
import type { ResponsiveManager } from '$shared/lib';
|
|
|
|
|
import {
|
2026-03-02 22:20:48 +03:00
|
|
|
Label,
|
|
|
|
|
Section,
|
|
|
|
|
} from '$shared/ui';
|
2026-04-17 13:37:44 +03:00
|
|
|
import clsx from 'clsx';
|
2026-03-02 22:20:48 +03:00
|
|
|
import { getContext } from 'svelte';
|
|
|
|
|
import { layoutManager } from '../../model';
|
2026-02-27 19:08:34 +03:00
|
|
|
import LayoutSwitch from '../LayoutSwitch/LayoutSwitch.svelte';
|
2026-02-27 12:44:57 +03:00
|
|
|
import SampleList from '../SampleList/SampleList.svelte';
|
|
|
|
|
|
2026-03-02 22:20:48 +03:00
|
|
|
interface Props {
|
|
|
|
|
/**
|
|
|
|
|
* Section index
|
|
|
|
|
*/
|
|
|
|
|
index: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { index }: Props = $props();
|
|
|
|
|
|
2026-02-27 12:44:57 +03:00
|
|
|
const responsive = getContext<ResponsiveManager>('responsive');
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-03-02 22:20:48 +03:00
|
|
|
<NavigationWrapper index={2} title="Samples">
|
|
|
|
|
{#snippet content(registerAction)}
|
|
|
|
|
<Section
|
|
|
|
|
class="py-4 sm:py-10 md:py-12 gap-6 sm:gap-x-12 sm:gap-y-8"
|
|
|
|
|
{index}
|
|
|
|
|
id="sample_set"
|
|
|
|
|
title="Sample Set"
|
|
|
|
|
headerTitle="visual_output"
|
2026-04-08 10:00:30 +03:00
|
|
|
headerSubtitle="items_total: {fontStore.pagination.total ?? 0}"
|
2026-03-02 22:20:48 +03:00
|
|
|
headerAction={registerAction}
|
|
|
|
|
>
|
|
|
|
|
{#snippet headerContent()}
|
|
|
|
|
<div class="flex items-center gap-3 md:gap-4">
|
|
|
|
|
<div class="hidden md:flex items-center gap-2 mr-4">
|
|
|
|
|
<Label variant="muted" size="sm">view_mode: </Label>
|
|
|
|
|
<Label variant="default" size="sm" bold>{layoutManager.mode}</Label>
|
|
|
|
|
</div>
|
|
|
|
|
<LayoutSwitch />
|
|
|
|
|
</div>
|
|
|
|
|
{/snippet}
|
2026-02-27 19:08:34 +03:00
|
|
|
|
2026-03-02 22:20:48 +03:00
|
|
|
{#snippet content({ className })}
|
2026-04-17 13:37:44 +03:00
|
|
|
<div class={clsx(className, !responsive.isDesktopLarge && 'col-start-0 col-span-2')}>
|
2026-03-02 22:20:48 +03:00
|
|
|
<SampleList />
|
|
|
|
|
</div>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</Section>
|
2026-02-27 12:44:57 +03:00
|
|
|
{/snippet}
|
2026-03-02 22:20:48 +03:00
|
|
|
</NavigationWrapper>
|