diff --git a/docs/trails/prague.mdx b/docs/trails/prague.mdx index 6a8bfd5..a191bc9 100644 --- a/docs/trails/prague.mdx +++ b/docs/trails/prague.mdx @@ -9,14 +9,14 @@ sidebar_label: "Prague Trails" | Name | Route | Distance | Start | End | | --- | --- | --- | --- | --- | -| [Barre](prague/barre) | [GPX](/gpx/prague-trails-barre.gpx) | 24 km | Velká Chuchle | Velká Chuchle | -| [Hokun](prague/hokun) | [GPX](/gpx/prague-trails-hokun.gpx) | 25 km | Uhříněves | Braník | -| [Kokomo](prague/kokomo) | [GPX](/gpx/prague-trails-kokomo.gpx) | 24 km | Zbraslav | Braník | -| [Laadchee](prague/laadchee) | [GPX](/gpx/prague-trails-laadchee.gpx) | 28 km | Satalice | Podbaba | -| [Rockyt](prague/rockyt) | [GPX](/gpx/prague-trails-rockyt.gpx) | 23 km | Klánovice | Bulhar | -| [Semmering](prague/semmering) | [GPX](/gpx/prague-trails-semmering.gpx) | 25 km | Ruzyně | Braník | -| [Shark-A](prague/shark-a) | [GPX](/gpx/prague-trails-shark-a.gpx) | 21 km | Ruzyně | Podbaba | -| [Shuss](prague/shuss) | [GPX](/gpx/prague-trails-shuss.gpx) | 26 km | Ruzyně | Sedlec | +| [Barre](prague/barre) | [GPX](/gpx/prague-trails-barre.gpx)   | 24 km | Velká Chuchle | Velká Chuchle | +| [Hokun](prague/hokun) | [GPX](/gpx/prague-trails-hokun.gpx)   | 25 km | Uhříněves | Braník | +| [Kokomo](prague/kokomo) | [GPX](/gpx/prague-trails-kokomo.gpx)   | 24 km | Zbraslav | Braník | +| [Laadchee](prague/laadchee) | [GPX](/gpx/prague-trails-laadchee.gpx)   | 28 km | Satalice | Podbaba | +| [Rockyt](prague/rockyt) | [GPX](/gpx/prague-trails-rockyt.gpx)   | 23 km | Klánovice | Bulhar | +| [Semmering](prague/semmering) | [GPX](/gpx/prague-trails-semmering.gpx)   | 25 km | Ruzyně | Braník | +| [Shark-A](prague/shark-a) | [GPX](/gpx/prague-trails-shark-a.gpx)   | 21 km | Ruzyně | Podbaba | +| [Shuss](prague/shuss) | [GPX](/gpx/prague-trails-shuss.gpx)   | 26 km | Ruzyně | Sedlec | ## Map diff --git a/docs/trails/prague/barre.mdx b/docs/trails/prague/barre.mdx index c370a0b..a093cea 100644 --- a/docs/trails/prague/barre.mdx +++ b/docs/trails/prague/barre.mdx @@ -9,7 +9,7 @@ title: "Barre" | Property | Value | | --- | --- | -| Route | [GPX](/gpx/prague-trails-barre.gpx) | +| Route | [GPX](/gpx/prague-trails-barre.gpx)   | | Distance | 24 km | | Start | Velká Chuchle train station
Poliklinika Barrandov tram stop | | End | Velká Chuchle train station | diff --git a/docs/trails/prague/hokun.mdx b/docs/trails/prague/hokun.mdx index 87a370a..1ceb9ef 100644 --- a/docs/trails/prague/hokun.mdx +++ b/docs/trails/prague/hokun.mdx @@ -9,7 +9,7 @@ title: "Hokun" | Property | Value | | --- | --- | -| Route | [GPX](/gpx/prague-trails-hokun.gpx) | +| Route | [GPX](/gpx/prague-trails-hokun.gpx)   | | Distance | 25 km | | Start | Uhříněves train station | | End | Braník | diff --git a/docs/trails/prague/kokomo.mdx b/docs/trails/prague/kokomo.mdx index 20e4a88..4f7de56 100644 --- a/docs/trails/prague/kokomo.mdx +++ b/docs/trails/prague/kokomo.mdx @@ -9,7 +9,7 @@ title: "Kokomo" | Property | Value | | --- | --- | -| Route | [GPX](/gpx/prague-trails-kokomo.gpx) | +| Route | [GPX](/gpx/prague-trails-kokomo.gpx)   | | Distance | 24 km | | Start | Zbraslav train station | | End | Braník | diff --git a/docs/trails/prague/laadchee.mdx b/docs/trails/prague/laadchee.mdx index fb99cd6..556d57c 100644 --- a/docs/trails/prague/laadchee.mdx +++ b/docs/trails/prague/laadchee.mdx @@ -9,7 +9,7 @@ title: "Laadchee" | Property | Value | | --- | --- | -| Route | [GPX](/gpx/prague-trails-laadchee.gpx) | +| Route | [GPX](/gpx/prague-trails-laadchee.gpx)   | | Distance | 28 km | | Start | Satalice train station | | End | Podbaba | diff --git a/docs/trails/prague/rockyt.mdx b/docs/trails/prague/rockyt.mdx index 9f74a41..ec1141d 100644 --- a/docs/trails/prague/rockyt.mdx +++ b/docs/trails/prague/rockyt.mdx @@ -9,7 +9,7 @@ title: "Rockyt" | Property | Value | | --- | --- | -| Route | [GPX](/gpx/prague-trails-rockyt.gpx) | +| Route | [GPX](/gpx/prague-trails-rockyt.gpx)   | | Distance | 23 km | | Start | Klánovice train station | | End | Bulhar junction (near Masaryk/Central train station) | diff --git a/docs/trails/prague/semmering.mdx b/docs/trails/prague/semmering.mdx index 277a70b..6596a36 100644 --- a/docs/trails/prague/semmering.mdx +++ b/docs/trails/prague/semmering.mdx @@ -9,7 +9,7 @@ title: "Semmering" | Property | Value | | --- | --- | -| Route | [GPX](/gpx/prague-trails-semmering.gpx) | +| Route | [GPX](/gpx/prague-trails-semmering.gpx)   | | Distance | 25 km | | Start | Ruzyně train station
Bílá hora tram station | | End | Braník | diff --git a/docs/trails/prague/shark-a.mdx b/docs/trails/prague/shark-a.mdx index fefe607..26dc696 100644 --- a/docs/trails/prague/shark-a.mdx +++ b/docs/trails/prague/shark-a.mdx @@ -9,7 +9,7 @@ title: "Shark-A" | Property | Value | | --- | --- | -| Route | [GPX](/gpx/prague-trails-shark-a.gpx) | +| Route | [GPX](/gpx/prague-trails-shark-a.gpx)   | | Distance | 21 km | | Start | Ruzyně train station | | End | Podbaba | diff --git a/docs/trails/prague/shuss.mdx b/docs/trails/prague/shuss.mdx index e85da10..dfd3a98 100644 --- a/docs/trails/prague/shuss.mdx +++ b/docs/trails/prague/shuss.mdx @@ -9,7 +9,7 @@ title: "Shuss" | Property | Value | | --- | --- | -| Route | [GPX](/gpx/prague-trails-shuss.gpx) | +| Route | [GPX](/gpx/prague-trails-shuss.gpx)   | | Distance | 26 km | | Start | Ruzyně train station | | End | Sedlec train station | diff --git a/src/components/MapyCzPathLink/index.tsx b/src/components/MapyCzPathLink/index.tsx deleted file mode 100644 index bba8549..0000000 --- a/src/components/MapyCzPathLink/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React, {type ReactNode} from 'react'; -import Link from '@docusaurus/Link'; - -export interface Props { - id: string; -} - -export default function MapyCzPathLink({ - id, -}: Props): JSX.Element { - const url = `https://en.mapy.cz/turisticka?dim=${id}&z=13`; - return ( - <> - Mapy.cz - - ); -} diff --git a/src/components/TrailRouteLink/index.tsx b/src/components/TrailRouteLink/index.tsx new file mode 100644 index 0000000..6f226a2 --- /dev/null +++ b/src/components/TrailRouteLink/index.tsx @@ -0,0 +1,74 @@ +import React, {type ReactNode} from 'react'; +import Link from '@docusaurus/Link'; + +export interface Props { + id: string; +} + +function GetGarminId(id: string) { + switch (id) + { + case "barre": + return "211837509"; + case "hokun": + return "224619876"; + case "kokomo": + return "211777074"; + case "laadchee": + return "211106575"; + case "rockyt": + return "215783112"; + case "semmering": + return "211858322"; + case "shark-a": + return "211895409"; + case "shuss": + return "211914796"; + default: + throw new Error(); + } +} + +function GetMapyCzId(id: string) { + switch (id) + { + case "barre": + return "652fd038acaa705928cd5a80"; + case "hokun": + return "651f065a36a6efcb000cbf3b"; + case "kokomo": + return "6515f72525e33d94be29277f"; + case "laadchee": + return "6515f72525e33d94be29277e"; + case "rockyt": + return "651877615a91d7ce7e1692f6"; + case "semmering": + return "652d80293a4984d1a065acef"; + case "shark-a": + return "6515f72525e33d94be29277b"; + case "shuss": + return "6515f72525e33d94be29277a"; + default: + throw new Error(); + } +} + +export default function TrailRouteLink({ + id, +}: Props): JSX.Element { + const gpxUrl = `/gpx/prague-trails-${id}.gpx`; + const garminUrl = `https://connect.garmin.com/modern/course/${GetGarminId(id)}`; + const mapyczUrl = `https://en.mapy.cz/turisticka?dim=${GetMapyCzId(id)}&z=13`; + return ( + <> + + Garmin + +   +   + + Mapy.cz + + + ); +} diff --git a/src/theme/MDXComponents.tsx b/src/theme/MDXComponents.tsx index 7422c4c..9e9ce5a 100644 --- a/src/theme/MDXComponents.tsx +++ b/src/theme/MDXComponents.tsx @@ -1,11 +1,11 @@ import MDXComponents from '@theme-original/MDXComponents'; import MapyCzEmbeddedPath from '@site/src/components/MapyCzEmbeddedPath'; -import MapyCzPathLink from '@site/src/components/MapyCzPathLink'; import GarminEmbeddedCourse from '@site/src/components/GarminEmbeddedCourse'; +import TrailRouteLink from '@site/src/components/TrailRouteLink'; export default { ...MDXComponents, MapyCzEmbeddedPath, - MapyCzPathLink, GarminEmbeddedCourse, + TrailRouteLink, };