2024-04-24 16:12:50 +02:00
|
|
|
<script lang="ts">
|
2025-02-02 11:17:22 +01:00
|
|
|
import { Button } from '$lib/components/ui/button';
|
|
|
|
|
import DocsContainer from '$lib/components/docs/DocsContainer.svelte';
|
|
|
|
|
import Logo from '$lib/components/Logo.svelte';
|
2025-10-20 20:17:47 +02:00
|
|
|
import ElevationProfile from '$lib/components/elevation-profile/ElevationProfile.svelte';
|
2025-10-18 16:10:08 +02:00
|
|
|
import GPXStatistics from '$lib/components/GPXStatistics.svelte';
|
2025-10-20 19:53:42 +02:00
|
|
|
import Routing from '$lib/components/toolbar/tools/routing/Routing.svelte';
|
2025-02-02 11:17:22 +01:00
|
|
|
import {
|
|
|
|
|
BookOpenText,
|
|
|
|
|
Heart,
|
|
|
|
|
ChartArea,
|
|
|
|
|
Map,
|
|
|
|
|
PencilRuler,
|
|
|
|
|
PenLine,
|
|
|
|
|
Route,
|
|
|
|
|
Scale,
|
2025-06-21 21:07:36 +02:00
|
|
|
} from '@lucide/svelte';
|
|
|
|
|
import { i18n } from '$lib/i18n.svelte';
|
2025-02-02 11:17:22 +01:00
|
|
|
import { getURLForLanguage } from '$lib/utils';
|
|
|
|
|
import { exampleGPXFile } from '$lib/assets/example';
|
|
|
|
|
import { writable } from 'svelte/store';
|
2025-10-20 19:53:42 +02:00
|
|
|
import Toolbar from '$lib/components/toolbar/Toolbar.svelte';
|
2025-10-18 16:10:08 +02:00
|
|
|
import { currentTool, Tool } from '$lib/components/toolbar/tools';
|
2025-02-02 11:17:22 +01:00
|
|
|
import { onDestroy, onMount } from 'svelte';
|
2024-07-08 15:46:00 +02:00
|
|
|
|
2025-06-21 21:07:36 +02:00
|
|
|
let {
|
|
|
|
|
data,
|
|
|
|
|
}: {
|
|
|
|
|
data: {
|
|
|
|
|
fundingModule: Promise<any>;
|
|
|
|
|
translationModule: Promise<any>;
|
|
|
|
|
mapboxModule: Promise<any>;
|
|
|
|
|
};
|
|
|
|
|
} = $props();
|
2024-09-20 13:22:05 +02:00
|
|
|
|
2025-02-02 11:17:22 +01:00
|
|
|
let gpxStatistics = writable(exampleGPXFile.getStatistics());
|
|
|
|
|
let slicedGPXStatistics = writable(undefined);
|
|
|
|
|
let additionalDatasets = writable(['speed', 'atemp']);
|
2025-10-22 19:05:20 +02:00
|
|
|
let elevationFill = writable(undefined);
|
2024-07-08 15:46:00 +02:00
|
|
|
|
2025-10-18 16:10:08 +02:00
|
|
|
onMount(() => {
|
|
|
|
|
$currentTool = Tool.SCISSORS;
|
|
|
|
|
});
|
2024-07-08 15:46:00 +02:00
|
|
|
|
2025-10-18 16:10:08 +02:00
|
|
|
$effect(() => {
|
|
|
|
|
if ($currentTool !== Tool.SCISSORS) {
|
|
|
|
|
$currentTool = Tool.SCISSORS;
|
|
|
|
|
}
|
|
|
|
|
});
|
2024-07-18 15:24:56 +02:00
|
|
|
|
2025-10-18 16:10:08 +02:00
|
|
|
onDestroy(() => {
|
|
|
|
|
$currentTool = null;
|
|
|
|
|
});
|
2024-06-26 20:33:01 +02:00
|
|
|
</script>
|
2024-04-24 16:12:50 +02:00
|
|
|
|
2024-07-08 15:46:00 +02:00
|
|
|
<div class="space-y-24 my-24">
|
2025-02-02 11:17:22 +01:00
|
|
|
<div class="-mt-12 sm:mt-0">
|
|
|
|
|
<div class="px-12 w-full flex flex-col items-center">
|
|
|
|
|
<div class="flex flex-col gap-6 items-center max-w-3xl">
|
|
|
|
|
<h1 class="text-4xl sm:text-6xl font-black text-center">
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('metadata.home_title')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</h1>
|
|
|
|
|
<div class="text-lg sm:text-xl text-muted-foreground text-center">
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('metadata.description')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="w-full flex flex-row justify-center gap-3">
|
2025-06-21 21:07:36 +02:00
|
|
|
<Button href={getURLForLanguage(i18n.lang, '/app')} class="w-1/3 min-w-fit">
|
2025-11-10 11:51:16 +01:00
|
|
|
<Map size="18" />
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.app')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
variant="secondary"
|
2025-06-21 21:07:36 +02:00
|
|
|
href={getURLForLanguage(i18n.lang, '/help')}
|
2025-02-02 11:17:22 +01:00
|
|
|
class="w-1/3 min-w-fit"
|
|
|
|
|
>
|
2025-11-10 11:51:16 +01:00
|
|
|
<BookOpenText size="18" />
|
2025-06-21 21:07:36 +02:00
|
|
|
<span>{i18n._('menu.help')}</span>
|
2025-02-02 11:17:22 +01:00
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="relative overflow-hidden">
|
|
|
|
|
<enhanced:img
|
|
|
|
|
src="/src/lib/assets/img/home/routing.png"
|
|
|
|
|
alt="Screenshot of the gpx.studio map in 3D."
|
|
|
|
|
class="w-full min-w-[1200px] ml-[20%] -translate-x-[20%]"
|
|
|
|
|
/>
|
|
|
|
|
<div
|
|
|
|
|
class="absolute top-0 left-0 w-full h-full bg-gradient-to-b from-background via-transparent to-background"
|
2025-06-08 16:32:41 +02:00
|
|
|
></div>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="px-12 sm:px-24 w-full flex flex-col items-center">
|
|
|
|
|
<div
|
|
|
|
|
class="flex flex-col md:flex-row gap-x-12 gap-y-6 items-center justify-between max-w-5xl"
|
|
|
|
|
>
|
|
|
|
|
<div class="markdown text-center">
|
|
|
|
|
<h1>
|
2025-11-10 11:51:16 +01:00
|
|
|
<Route size="24" class="inline-block align-baseline" />
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.route_planning')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</h1>
|
2025-06-21 21:07:36 +02:00
|
|
|
<p class="text-muted-foreground">{i18n._('homepage.route_planning_description')}</p>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="p-3 w-fit rounded-md border shadow-xl md:shrink-0">
|
2025-10-20 19:53:42 +02:00
|
|
|
<Routing minimizable={false} />
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="px-12 sm:px-24 w-full flex flex-col items-center">
|
|
|
|
|
<div
|
|
|
|
|
class="flex flex-col md:flex-row gap-x-12 gap-y-6 items-center justify-between max-w-5xl"
|
|
|
|
|
>
|
|
|
|
|
<div class="markdown text-center md:hidden">
|
|
|
|
|
<h1>
|
2025-11-10 11:51:16 +01:00
|
|
|
<PencilRuler size="24" class="inline-block align-baseline" />
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.file_processing')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</h1>
|
2025-06-21 21:07:36 +02:00
|
|
|
<p class="text-muted-foreground">
|
|
|
|
|
{i18n._('homepage.file_processing_description')}
|
|
|
|
|
</p>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="relative md:shrink-0 max-w-[400px]">
|
2025-10-20 19:53:42 +02:00
|
|
|
<Toolbar />
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="markdown text-center hidden md:block">
|
|
|
|
|
<h1>
|
2025-11-10 11:51:16 +01:00
|
|
|
<PencilRuler size="24" class="inline-block align-baseline" />
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.file_processing')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</h1>
|
2025-06-21 21:07:36 +02:00
|
|
|
<p class="text-muted-foreground">
|
|
|
|
|
{i18n._('homepage.file_processing_description')}
|
|
|
|
|
</p>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="px-12 sm:px-24 w-full flex flex-col items-center">
|
|
|
|
|
<div
|
|
|
|
|
class="markdown flex flex-col md:flex-row gap-x-12 gap-y-6 items-center justify-between max-w-5xl"
|
|
|
|
|
>
|
|
|
|
|
<div class="markdown text-center">
|
|
|
|
|
<h1>
|
2025-11-10 11:51:16 +01:00
|
|
|
<Map size="24" class="inline-block align-baseline" />
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.maps')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</h1>
|
2025-06-21 21:07:36 +02:00
|
|
|
<p class="text-muted-foreground">{i18n._('homepage.maps_description')}</p>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
<div
|
2025-06-21 21:07:36 +02:00
|
|
|
class="relative w-full max-w-[320px] aspect-square rounded-2xl shadow-xl overflow-clip"
|
2025-02-02 11:17:22 +01:00
|
|
|
>
|
|
|
|
|
<enhanced:img
|
|
|
|
|
src="/src/lib/assets/img/home/mapbox-outdoors.png"
|
|
|
|
|
alt="Mapbox Outdoors map screenshot."
|
|
|
|
|
class="absolute"
|
|
|
|
|
style="clip-path: inset(0 50% 50% 0);"
|
|
|
|
|
/>
|
|
|
|
|
<enhanced:img
|
|
|
|
|
src="/src/lib/assets/img/home/mapbox-satellite.png"
|
|
|
|
|
alt="Mapbox Satellite map screenshot."
|
|
|
|
|
class="absolute"
|
|
|
|
|
style="clip-path: inset(0 0 50% 50%);"
|
|
|
|
|
/>
|
|
|
|
|
<enhanced:img
|
|
|
|
|
src="/src/lib/assets/img/home/ign.png"
|
|
|
|
|
alt="IGN map screenshot."
|
|
|
|
|
class="absolute"
|
|
|
|
|
style="clip-path: inset(50% 50% 0 0);"
|
|
|
|
|
/>
|
|
|
|
|
<enhanced:img
|
|
|
|
|
src="/src/lib/assets/img/home/cyclosm.png"
|
|
|
|
|
alt="CyclOSM map screenshot."
|
|
|
|
|
class="absolute"
|
|
|
|
|
style="clip-path: inset(50% 0 0 50%);"
|
|
|
|
|
/>
|
|
|
|
|
<enhanced:img
|
|
|
|
|
src="/src/lib/assets/img/home/waymarked.png"
|
|
|
|
|
alt="Waymarked Trails map screenshot."
|
|
|
|
|
class="absolute"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="px-8 md:px-12">
|
|
|
|
|
<div class="markdown text-center px-4 md:px-12">
|
|
|
|
|
<h1>
|
2025-11-10 11:51:16 +01:00
|
|
|
<ChartArea size="24" class="inline-block align-baseline" />
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.data_visualization')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</h1>
|
|
|
|
|
<p class="text-muted-foreground mb-6">
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.data_visualization_description')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="h-48 w-full">
|
2025-10-20 19:53:42 +02:00
|
|
|
<ElevationProfile
|
2025-02-02 11:17:22 +01:00
|
|
|
{gpxStatistics}
|
|
|
|
|
{slicedGPXStatistics}
|
2025-10-22 19:05:20 +02:00
|
|
|
{additionalDatasets}
|
|
|
|
|
{elevationFill}
|
2025-10-20 19:53:42 +02:00
|
|
|
/>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
<div class="flex flex-col items-center">
|
|
|
|
|
<div class="h-10 w-fit">
|
2025-10-18 16:10:08 +02:00
|
|
|
<GPXStatistics
|
2025-02-02 11:17:22 +01:00
|
|
|
{gpxStatistics}
|
|
|
|
|
{slicedGPXStatistics}
|
|
|
|
|
panelSize={192}
|
|
|
|
|
orientation={'horizontal'}
|
2025-10-18 16:10:08 +02:00
|
|
|
/>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="px-12 sm:px-24 w-full flex flex-col items-center">
|
|
|
|
|
<div
|
|
|
|
|
class="flex flex-col md:flex-row gap-x-12 gap-y-6 items-center justify-between max-w-5xl"
|
|
|
|
|
>
|
|
|
|
|
<div class="markdown text-center md:hidden">
|
|
|
|
|
<h1>
|
2025-11-10 11:51:16 +01:00
|
|
|
<Scale size="24" class="inline-block align-baseline" />
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.identity')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</h1>
|
2025-06-21 21:07:36 +02:00
|
|
|
<p class="text-muted-foreground">{i18n._('homepage.identity_description')}</p>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
<a href="https://github.com/gpxstudio/gpx.studio" target="_blank">
|
|
|
|
|
<Logo class="h-32" company="github" />
|
|
|
|
|
</a>
|
|
|
|
|
<div class="markdown text-center hidden md:block">
|
|
|
|
|
<h1>
|
2025-11-10 11:51:16 +01:00
|
|
|
<Scale size="24" class="inline-block align-baseline" />
|
2025-06-21 21:07:36 +02:00
|
|
|
{i18n._('homepage.identity')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</h1>
|
2025-06-21 21:07:36 +02:00
|
|
|
<p class="text-muted-foreground">{i18n._('homepage.identity_description')}</p>
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="px-12 w-full">
|
|
|
|
|
<div class="w-full max-w-7xl mx-auto rounded-2xl shadow-xl overflow-hidden overflow-clip">
|
|
|
|
|
<enhanced:img
|
|
|
|
|
src="/src/lib/assets/img/home/map.png"
|
|
|
|
|
alt="Screenshot of the gpx.studio map in 3D."
|
|
|
|
|
class="min-w-[800px] ml-[15%] -translate-x-[15%]"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="px-12 md:px-24 flex flex-row flex-wrap lg:flex-nowrap items-center justify-center -space-y-0.5 lg:-space-x-0.5"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="grow max-w-xl flex flex-col items-center gap-6 p-8 border rounded-2xl shadow-xl -rotate-1 lg:rotate-1"
|
|
|
|
|
>
|
|
|
|
|
{#await data.fundingModule then fundingModule}
|
|
|
|
|
<DocsContainer module={fundingModule.default} />
|
|
|
|
|
{/await}
|
|
|
|
|
<Button href="https://ko-fi.com/gpxstudio" target="_blank" class="text-base">
|
2025-11-10 11:51:16 +01:00
|
|
|
<Heart size="16" fill="var(--support)" color="var(--support)" />
|
2025-06-21 21:07:36 +02:00
|
|
|
<span>{i18n._('homepage.support_button')}</span>
|
2025-02-02 11:17:22 +01:00
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="grow max-w-lg mx-6 h-fit bg-background flex flex-col items-center gap-6 p-8 border rounded-2xl shadow-xl rotate-1 lg:-rotate-1"
|
|
|
|
|
>
|
|
|
|
|
{#await data.translationModule then translationModule}
|
|
|
|
|
<DocsContainer module={translationModule.default} />
|
|
|
|
|
{/await}
|
|
|
|
|
<Button href="https://crowdin.com/project/gpxstudio" target="_blank" class="text-base">
|
2025-11-10 11:51:16 +01:00
|
|
|
<PenLine size="16" />
|
2025-06-21 21:07:36 +02:00
|
|
|
<span>{i18n._('homepage.contribute')}</span>
|
2025-02-02 11:17:22 +01:00
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="px-12 md:px-24 flex flex-col items-center">
|
|
|
|
|
<div
|
|
|
|
|
class="max-w-4xl flex flex-col lg:flex-row items-center justify-center gap-x-12 gap-y-6 p-6 border rounded-2xl shadow-xl bg-secondary"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="shrink-0 flex flex-col sm:flex-row lg:flex-col items-center gap-x-4 gap-y-2"
|
|
|
|
|
>
|
|
|
|
|
<div class="text-lg font-semibold text-muted-foreground">
|
2025-06-21 21:07:36 +02:00
|
|
|
❤️ {i18n._('homepage.supported_by')}
|
2025-02-02 11:17:22 +01:00
|
|
|
</div>
|
|
|
|
|
<a href="https://www.mapbox.com/" target="_blank">
|
|
|
|
|
<Logo company="mapbox" class="w-60" />
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
{#await data.mapboxModule then mapboxModule}
|
|
|
|
|
<DocsContainer module={mapboxModule.default} />
|
|
|
|
|
{/await}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-07-08 15:46:00 +02:00
|
|
|
</div>
|