mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-27 10:37:17 +00:00
user guide structure draft
This commit is contained in:
1 parent
2bcfba0fa4
commit
ad7ff5ddba
36 files changed
+171
-46
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -44,10 +44,10 @@
|
||||
<Button
|
||||
variant="link"
|
||||
class="h-6 px-0 text-muted-foreground"
|
||||
href={getURLForLanguage('/[...language]/documentation', $locale)}
|
||||
href={getURLForLanguage('/[...language]/help', $locale)}
|
||||
>
|
||||
<BookOpenText size="16" class="mr-1" />
|
||||
{$_('homepage.documentation')}
|
||||
{$_('menu.help')}
|
||||
</Button>
|
||||
</div>
|
||||
<div class="flex flex-col items-start gap-1" id="contact">
|
||||
|
||||
@@ -417,7 +417,7 @@
|
||||
<div class="h-fit flex flex-row items-center ml-1 gap-1">
|
||||
<Button
|
||||
variant="ghost"
|
||||
href={getURLForLanguage('/[...language]/documentation', $locale)}
|
||||
href={getURLForLanguage('/[...language]/help', $locale)}
|
||||
target="_blank"
|
||||
class="cursor-default h-fit rounded-sm px-3 py-0.5"
|
||||
>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
<nav class="w-full sticky top-0 bg-background z-10">
|
||||
<div class="mx-6 py-2 flex flex-row items-center border-b gap-4 md:gap-8">
|
||||
<a href={getURLForLanguage('/[...language]', $locale)} class="shrink-0">
|
||||
<a href={getURLForLanguage('/[...language]', $locale)} class="shrink-0 translate-y-0.5">
|
||||
<Logo class="h-8 sm:hidden" iconOnly={true} />
|
||||
<Logo class="h-7 hidden sm:block" />
|
||||
<Logo class="h-8 hidden sm:block" />
|
||||
</a>
|
||||
<Button
|
||||
variant="link"
|
||||
@@ -32,10 +32,10 @@
|
||||
<Button
|
||||
variant="link"
|
||||
class="text-base px-0"
|
||||
href={getURLForLanguage('/[...language]/documentation', $locale)}
|
||||
href={getURLForLanguage('/[...language]/help', $locale)}
|
||||
>
|
||||
<BookOpenText size="18" class="mr-1.5" />
|
||||
{$_('homepage.documentation')}
|
||||
{$_('menu.help')}
|
||||
</Button>
|
||||
<ModeSwitch class="ml-auto" />
|
||||
</div>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<script>
|
||||
import Test, { metadata } from '$lib/docs/en/introduction/test.md';
|
||||
|
||||
const toc = {
|
||||
introduction: ['test']
|
||||
};
|
||||
</script>
|
||||
|
||||
{metadata.title}
|
||||
|
||||
<Test />
|
||||
@@ -2,22 +2,33 @@
|
||||
import { _, locale } from 'svelte-i18n';
|
||||
|
||||
export let path: string;
|
||||
export let titleOnly: boolean = false;
|
||||
|
||||
let module = undefined;
|
||||
let metadata: Record<string, any> = {};
|
||||
|
||||
const modules = import.meta.glob('/src/lib/docs/**/*.{md,svx}');
|
||||
|
||||
$: if ($locale) {
|
||||
modules[`/src/lib/docs/${$locale}/${path}`]().then((mod) => {
|
||||
function loadModule(path: string) {
|
||||
modules[path]().then((mod) => {
|
||||
module = mod.default;
|
||||
metadata = mod.metadata;
|
||||
});
|
||||
}
|
||||
|
||||
$: if ($locale) {
|
||||
loadModule(`/src/lib/docs/${$locale}/${path}`);
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if module !== undefined}
|
||||
<div class="markdown space-y-3">
|
||||
<svelte:component this={module} />
|
||||
</div>
|
||||
{#if titleOnly}
|
||||
{metadata.title}
|
||||
{:else}
|
||||
<div class="markdown space-y-3">
|
||||
<svelte:component this={module} />
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: Getting started
|
||||
---
|
||||
|
||||
# { title }
|
||||
|
||||
Welcome message.
|
||||
|
||||
- screenshot of the interface
|
||||
|
||||
explain main components of the interface and link to the corresponding sections
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
title: Test
|
||||
---
|
||||
|
||||
test
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Map controls
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: Menu
|
||||
---
|
||||
|
||||
# { title }
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Edit
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: File
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Settings
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: View
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: Toolbar
|
||||
---
|
||||
|
||||
# { title }
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Clean
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Extract
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Merge
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Points of interest
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Reduce
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Route planning and editing
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Scissors
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Time
|
||||
---
|
||||
|
||||
# { title }
|
||||
@@ -3,7 +3,7 @@ import { glob } from 'glob';
|
||||
import { languages } from '$lib/languages';
|
||||
|
||||
function generateSitemap() {
|
||||
const pages = glob.sync('*.html', { cwd: 'build' });
|
||||
const pages = glob.sync('**/*.html', { cwd: 'build' });
|
||||
|
||||
let sitemap = '<?xml version="1.0" encoding="UTF-8"?>\n';
|
||||
sitemap += '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">\n';
|
||||
@@ -11,7 +11,8 @@ function generateSitemap() {
|
||||
pages.forEach((page) => {
|
||||
const url = page.replace('.html', '').replace('index', '');
|
||||
|
||||
if (languages[url]) {
|
||||
const rootDir = url.split('/')[0];
|
||||
if (languages[url] || languages[rootDir]) {
|
||||
// Skip localized pages
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user