mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-14 21:46:35 +00:00
feat: move preview pages to root
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<script lang="ts">
|
||||
import { getTool } from "$lib/registry-new";
|
||||
import SchemaToolView from "$lib/components/kit/SchemaToolView.svelte";
|
||||
import EmptyState from "$lib/components/kit/EmptyState.svelte";
|
||||
import { SlidersHorizontal as ToolIcon } from "@lucide/svelte";
|
||||
|
||||
interface Props {
|
||||
data: { id: string };
|
||||
}
|
||||
let { data }: Props = $props();
|
||||
|
||||
const tool = $derived(getTool(data.id));
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>easy-png-tools / {tool?.title ?? "Tool"}</title>
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
</svelte:head>
|
||||
|
||||
{#if !tool}
|
||||
<div class="notfound">
|
||||
<EmptyState
|
||||
title="Tool not found"
|
||||
description="No tool is registered under “{data.id}”."
|
||||
icon={ToolIcon}
|
||||
/>
|
||||
</div>
|
||||
{:else}
|
||||
<SchemaToolView {tool} />
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.notfound {
|
||||
max-width: var(--size-content-max-wide);
|
||||
margin: 0 auto;
|
||||
padding: var(--space-page-top)
|
||||
clamp(var(--space-xxl), 4vw, var(--space-page-bottom))
|
||||
var(--space-page-bottom);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user