From 2ebf3e4a1b4411079ca196fedcaba3eaedfb6d30 Mon Sep 17 00:00:00 2001 From: Josef Pihrt Date: Wed, 18 Oct 2023 14:20:44 +0200 Subject: [PATCH 1/3] Add embedded course from Garmin Connect --- docs/faq.mdx | 12 ++++++++++- docs/trails/prague/barre.mdx | 6 ++++++ docs/trails/prague/semmering.mdx | 6 ++++++ src/components/GarminEmbeddedCourse/index.tsx | 19 ++++++++++++++++++ src/components/MapyCzEmbeddedPath/index.tsx | 12 ----------- src/theme/MDXComponents.tsx | 2 ++ static/img/garmin-connect-course-detail.png | Bin 0 -> 903086 bytes static/img/garmin-connect-embedded-course.png | Bin 0 -> 282147 bytes 8 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 src/components/GarminEmbeddedCourse/index.tsx create mode 100644 static/img/garmin-connect-course-detail.png create mode 100644 static/img/garmin-connect-embedded-course.png diff --git a/docs/faq.mdx b/docs/faq.mdx index 406b427..801b352 100644 --- a/docs/faq.mdx +++ b/docs/faq.mdx @@ -4,7 +4,17 @@ sidebar_position: 1 # Frequently Asked Question -## How to Download Trail GPX +## How to Download GPX from Garmin Connect + +1) Click trail name at the top left corner of trail map preview. + +![Garmin Connect embedded course](/img/garmin-connect-embedded-course.png) + +2) On course detail click on three dots to show context menu and then click "Download GPX file". + +![Garmin connect course detail](/img/garmin-connect-course-detail.png) + +## How to Download GPX from Mapy.cz 1) Click "Show on map" button at the bottom left corner of trail map preview. diff --git a/docs/trails/prague/barre.mdx b/docs/trails/prague/barre.mdx index 1167f43..b682254 100644 --- a/docs/trails/prague/barre.mdx +++ b/docs/trails/prague/barre.mdx @@ -15,6 +15,12 @@ title: "Barre" ## Map +### Garmin Connect + + + +### Mapy.cz +
diff --git a/docs/trails/prague/semmering.mdx b/docs/trails/prague/semmering.mdx index 1a055b4..74e8317 100644 --- a/docs/trails/prague/semmering.mdx +++ b/docs/trails/prague/semmering.mdx @@ -15,6 +15,12 @@ title: "Semmering" ## Map +### Garmin Connect + + + +### Mapy.cz + ## Transportation diff --git a/src/components/GarminEmbeddedCourse/index.tsx b/src/components/GarminEmbeddedCourse/index.tsx new file mode 100644 index 0000000..7f6fd6e --- /dev/null +++ b/src/components/GarminEmbeddedCourse/index.tsx @@ -0,0 +1,19 @@ +import React, {type ReactNode} from 'react'; + +export interface Props { + id: string; +} + +export default function GarminEmbeddedCourse({ + id, +}: Props): JSX.Element { + const url = `https://connect.garmin.com/modern/course/embed/${id}`; + return ( +
+