feat: separate slug pages from tools

This commit is contained in:
2026-09-27 16:10:28 +05:00
parent 931ee27b05
commit 7a3498c173
35 changed files with 1436 additions and 993 deletions
+4 -4
View File
@@ -4,9 +4,9 @@
import Footer from "$lib/components/layout/Footer.svelte";
import TopBar from "$lib/components/layout/TopBar.svelte";
import { initLocale } from "$lib/i18n/locale.svelte";
import { toolTitle } from "$lib/i18n/schema-tool-strings";
import { pageTitle } from "$lib/i18n/schema-tool-strings";
import { t } from "$lib/i18n/t";
import { getTool } from "$lib/registry";
import { getPageBySlug } from "$lib/registry";
import { getTheme, initTheme, setTheme } from "$lib/theme.svelte";
import type { Snippet } from "svelte";
import { onMount } from "svelte";
@@ -37,8 +37,8 @@
if (path === "/kit") return "/ " + t("header.uiKit");
const match = /^\/tools\/([^/]+)$/.exec(path);
if (match) {
const tool = getTool(match[1]);
if (tool) return "/ " + toolTitle(tool);
const page = getPageBySlug(match[1]);
if (page) return "/ " + pageTitle(page);
}
return "/ " + t("header.home");
}