mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 08:42:31 +00:00
add tool icons in docs welcome page
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
import { File, FilePen, View, type Icon, Settings, Pencil, MapPin, Scissors, CalendarClock, Group, Ungroup, Filter, SquareDashedMousePointer } from "lucide-svelte";
|
||||||
|
import type { ComponentType } from "svelte";
|
||||||
|
|
||||||
export const guides: Record<string, string[]> = {
|
export const guides: Record<string, string[]> = {
|
||||||
'getting-started': [],
|
'getting-started': [],
|
||||||
menu: ['file', 'edit', 'view', 'settings'],
|
menu: ['file', 'edit', 'view', 'settings'],
|
||||||
@@ -7,11 +10,23 @@ export const guides: Record<string, string[]> = {
|
|||||||
'gpx': [],
|
'gpx': [],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const guideIcons: Record<string, string> = {
|
export const guideIcons: Record<string, string | ComponentType<Icon>> = {
|
||||||
"getting-started": "🚀",
|
"getting-started": "🚀",
|
||||||
"menu": "📂 ⚙️",
|
"menu": "📂 ⚙️",
|
||||||
|
"file": File,
|
||||||
|
"edit": FilePen,
|
||||||
|
"view": View,
|
||||||
|
"settings": Settings,
|
||||||
"files-and-stats": "🗂 📈",
|
"files-and-stats": "🗂 📈",
|
||||||
"toolbar": "🧰",
|
"toolbar": "🧰",
|
||||||
|
"routing": Pencil,
|
||||||
|
"poi": MapPin,
|
||||||
|
"scissors": Scissors,
|
||||||
|
"time": CalendarClock,
|
||||||
|
"merge": Group,
|
||||||
|
"extract": Ungroup,
|
||||||
|
"minify": Filter,
|
||||||
|
"clean": SquareDashedMousePointer,
|
||||||
"map-controls": "🗺",
|
"map-controls": "🗺",
|
||||||
"gpx": "💾",
|
"gpx": "💾",
|
||||||
};
|
};
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
href={getURLForLanguage($locale, `/help/${guide}/${subGuide}`)}
|
href={getURLForLanguage($locale, `/help/${guide}/${subGuide}`)}
|
||||||
class="h-fit px-0 py-1 text-muted-foreground text-base text-center whitespace-normal"
|
class="h-fit px-0 py-1 text-muted-foreground text-base text-center whitespace-normal"
|
||||||
>
|
>
|
||||||
|
<svelte:component this={guideIcons[subGuide]} size="16" class="mr-1 shrink-0" />
|
||||||
<DocsLoader path={`${guide}/${subGuide}.mdx`} titleOnly={true} />
|
<DocsLoader path={`${guide}/${subGuide}.mdx`} titleOnly={true} />
|
||||||
</Button>
|
</Button>
|
||||||
{/each}
|
{/each}
|
||||||
|
Reference in New Issue
Block a user