mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 08:42:31 +00:00
fix page title
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
import { _, isLoading } from 'svelte-i18n';
|
import { _, isLoading } from 'svelte-i18n';
|
||||||
|
|
||||||
let location: string;
|
let location: string;
|
||||||
|
let title: string;
|
||||||
|
|
||||||
$: if ($page.route.id) {
|
$: if ($page.route.id) {
|
||||||
location = $page.route.id;
|
location = $page.route.id;
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
location = location.replace(`[...${param}]`, $page.params[param]);
|
location = location.replace(`[...${param}]`, $page.params[param]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
title = location.replace('/[...language]', '').split('/')[1] ?? 'home';
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -35,11 +37,11 @@
|
|||||||
content="View, edit and create GPX files online with advanced route planning capabilities and file processing tools, beautiful maps and detailed data visualizations."
|
content="View, edit and create GPX files online with advanced route planning capabilities and file processing tools, beautiful maps and detailed data visualizations."
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<title>gpx.studio — {$_(`metadata.${location}_title`)}</title>
|
<title>gpx.studio — {$_(`metadata.${title}_title`)}</title>
|
||||||
<meta name="description" content={$_('metadata.description')} />
|
<meta name="description" content={$_('metadata.description')} />
|
||||||
<meta property="og:title" content="gpx.studio — {$_(`metadata.${location}_title`)}" />
|
<meta property="og:title" content="gpx.studio — {$_(`metadata.${title}_title`)}" />
|
||||||
<meta property="og:description" content={$_('metadata.description')} />
|
<meta property="og:description" content={$_('metadata.description')} />
|
||||||
<meta name="twitter:title" content="gpx.studio — {$_(`metadata.${location}_title`)}" />
|
<meta name="twitter:title" content="gpx.studio — {$_(`metadata.${title}_title`)}" />
|
||||||
<meta name="twitter:description" content={$_('metadata.description')} />
|
<meta name="twitter:description" content={$_('metadata.description')} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user