chore: remove unused code
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
|||||||
DEFAULT_TYPOGRAPHY_CONTROLS_DATA,
|
DEFAULT_TYPOGRAPHY_CONTROLS_DATA,
|
||||||
} from '$entities/Font';
|
} from '$entities/Font';
|
||||||
import {
|
import {
|
||||||
afterEach,
|
|
||||||
beforeEach,
|
beforeEach,
|
||||||
describe,
|
describe,
|
||||||
expect,
|
expect,
|
||||||
|
|||||||
@@ -6,22 +6,18 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { NavigationWrapper } from '$entities/Breadcrumb';
|
import { NavigationWrapper } from '$entities/Breadcrumb';
|
||||||
import type { ResponsiveManager } from '$shared/lib';
|
import type { ResponsiveManager } from '$shared/lib';
|
||||||
import {
|
import { SidebarContainer } from '$shared/ui';
|
||||||
ControlGroup,
|
|
||||||
SidebarContainer,
|
|
||||||
Slider,
|
|
||||||
} from '$shared/ui';
|
|
||||||
import {
|
import {
|
||||||
getContext,
|
getContext,
|
||||||
untrack,
|
untrack,
|
||||||
} from 'svelte';
|
} from 'svelte';
|
||||||
import FontList from '../FontList/FontList.svelte';
|
import FontList from '../FontList/FontList.svelte';
|
||||||
import Header from '../Header/Header.svelte';
|
import Header from '../Header/Header.svelte';
|
||||||
|
import Search from '../Search/Search.svelte';
|
||||||
import Sidebar from '../Sidebar/Sidebar.svelte';
|
import Sidebar from '../Sidebar/Sidebar.svelte';
|
||||||
import SliderArea from '../SliderArea/SliderArea.svelte';
|
import SliderArea from '../SliderArea/SliderArea.svelte';
|
||||||
|
|
||||||
const responsive = getContext<ResponsiveManager>('responsive');
|
const responsive = getContext<ResponsiveManager>('responsive');
|
||||||
// const typography = $derived(comparisonStore.typography);
|
|
||||||
const isMobileOrTabletPortrait = $derived(responsive.isMobile || responsive.isTabletPortrait);
|
const isMobileOrTabletPortrait = $derived(responsive.isMobile || responsive.isTabletPortrait);
|
||||||
let isSidebarOpen = $state(!isMobileOrTabletPortrait);
|
let isSidebarOpen = $state(!isMobileOrTabletPortrait);
|
||||||
|
|
||||||
@@ -42,53 +38,9 @@ $effect(() => {
|
|||||||
{#snippet sidebar()}
|
{#snippet sidebar()}
|
||||||
<Sidebar class="w-full h-full border-none">
|
<Sidebar class="w-full h-full border-none">
|
||||||
{#snippet main()}
|
{#snippet main()}
|
||||||
|
<Search />
|
||||||
<FontList />
|
<FontList />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
<!--
|
|
||||||
{#snippet controls()}
|
|
||||||
{#if typography.sizeControl && typography.weightControl && typography.heightControl && typography.spacingControl}
|
|
||||||
<ControlGroup label="Size">
|
|
||||||
<Slider
|
|
||||||
bind:value={typography.sizeControl.value}
|
|
||||||
min={typography.sizeControl.min}
|
|
||||||
max={typography.sizeControl.max}
|
|
||||||
step={typography.sizeControl.step}
|
|
||||||
/>
|
|
||||||
</ControlGroup>
|
|
||||||
|
|
||||||
<ControlGroup label="Weight">
|
|
||||||
<Slider
|
|
||||||
bind:value={typography.weightControl.value}
|
|
||||||
min={typography.weightControl.min}
|
|
||||||
max={typography.weightControl.max}
|
|
||||||
step={typography.weightControl.step}
|
|
||||||
/>
|
|
||||||
</ControlGroup>
|
|
||||||
|
|
||||||
<div class="grid grid-cols-2 gap-6 mt-4">
|
|
||||||
<ControlGroup label="Leading" class="border-0 py-0">
|
|
||||||
<Slider
|
|
||||||
bind:value={typography.heightControl.value}
|
|
||||||
min={typography.heightControl.min}
|
|
||||||
max={typography.heightControl.max}
|
|
||||||
step={typography.heightControl.step}
|
|
||||||
format={(v => v.toFixed(1))}
|
|
||||||
/>
|
|
||||||
</ControlGroup>
|
|
||||||
|
|
||||||
<ControlGroup label="Tracking" class="border-0 py-0">
|
|
||||||
<Slider
|
|
||||||
bind:value={typography.spacingControl.value}
|
|
||||||
min={typography.spacingControl.min}
|
|
||||||
max={typography.spacingControl.max}
|
|
||||||
step={typography.spacingControl.step}
|
|
||||||
format={(v => v.toFixed(2))}
|
|
||||||
/>
|
|
||||||
</ControlGroup>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{/snippet}
|
|
||||||
-->
|
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</SidebarContainer>
|
</SidebarContainer>
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ $effect(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex-1 min-h-0 h-full">
|
<div class="flex-1 min-h-0 h-full">
|
||||||
<div class="py-2 pl-4 relative flex flex-col min-h-0 h-full">
|
<div class="py-2 relative flex flex-col min-h-0 h-full">
|
||||||
<div class="px-2 py-4 mr-4 sticky border-b border-black/5 dark:border-white/10 mb-2">
|
<div class="py-2 mx-6 sticky border-b border-black/5 dark:border-white/10">
|
||||||
<Label class="font-primary text-neutral-400" bold variant="default" size="sm" uppercase>
|
<Label class="font-primary text-neutral-400" bold variant="default" size="sm" uppercase>
|
||||||
Typeface Selection
|
Typeface Selection
|
||||||
</Label>
|
</Label>
|
||||||
@@ -80,7 +80,7 @@ $effect(() => {
|
|||||||
data-font-list
|
data-font-list
|
||||||
weight={DEFAULT_FONT_WEIGHT}
|
weight={DEFAULT_FONT_WEIGHT}
|
||||||
itemHeight={45}
|
itemHeight={45}
|
||||||
class="bg-transparent min-h-0 h-full scroll-stable pr-4"
|
class="bg-transparent min-h-0 h-full scroll-stable py-2 pl-6 pr-4"
|
||||||
>
|
>
|
||||||
{#snippet children({ item: font, index })}
|
{#snippet children({ item: font, index })}
|
||||||
{@const isSelectedA = font.id === comparisonStore.fontA?.id}
|
{@const isSelectedA = font.id === comparisonStore.fontA?.id}
|
||||||
|
|||||||
Reference in New Issue
Block a user