-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbfdd1f
commit 9988feb
Showing
12 changed files
with
92 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<> | ||
<Link to={garminUrl}> | ||
Garmin | ||
</Link> | ||
| ||
| ||
<Link to={mapyczUrl}> | ||
Mapy.cz | ||
</Link> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
}; |