embedding progress

This commit is contained in:
vcoppe
2024-07-11 18:42:49 +02:00
parent 24cf98d68f
commit 030f08abfd
21 changed files with 760 additions and 251 deletions

View File

@@ -80,6 +80,11 @@
@apply pl-4;
}
:global(.markdown ol) {
@apply list-decimal;
@apply pl-4;
}
:global(.markdown li) {
@apply mt-1;
@apply first:mt-0;

View File

@@ -8,6 +8,7 @@ export const guides: Record<string, string[]> = {
toolbar: ['routing', 'poi', 'scissors', 'time', 'merge', 'extract', 'minify', 'clean'],
'map-controls': [],
'gpx': [],
'integration': [],
};
export const guideIcons: Record<string, string | ComponentType<Icon>> = {
@@ -29,6 +30,7 @@ export const guideIcons: Record<string, string | ComponentType<Icon>> = {
"clean": SquareDashedMousePointer,
"map-controls": "🗺",
"gpx": "💾",
"integration": "{ 👩‍💻 }",
};
export function getPreviousGuide(currentGuide: string): string | undefined {
@@ -40,7 +42,7 @@ export function getPreviousGuide(currentGuide: string): string | undefined {
if (index === 0) {
return undefined;
}
let previousGuide = keys.at(index - 1);
let previousGuide = keys[index - 1];
if (previousGuide === undefined) {
return undefined;
} else if (guides[previousGuide].length === 0) {
@@ -65,7 +67,7 @@ export function getNextGuide(currentGuide: string): string | undefined {
if (guides[currentGuide].length === 0) {
let keys = Object.keys(guides);
let index = keys.indexOf(currentGuide);
return keys.at(index + 1);
return keys[index + 1];
} else {
return `${currentGuide}/${guides[currentGuide][0]}`;
}
@@ -76,7 +78,7 @@ export function getNextGuide(currentGuide: string): string | undefined {
} else {
let keys = Object.keys(guides);
let index = keys.indexOf(subguides[0]);
return keys.at(index + 1);
return keys[index + 1];
}
}
}