Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add embedded course from Garmin Connect #20

Merged
merged 4 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 6 additions & 0 deletions docs/trails/prague/barre.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ title: "Barre"

## Map

### Garmin Connect

<GarminEmbeddedCourse id="211837509"></GarminEmbeddedCourse>

### Mapy.cz

<MapyCzEmbeddedPath id="jukovunejo"></MapyCzEmbeddedPath>

<br />
Expand Down
6 changes: 6 additions & 0 deletions docs/trails/prague/hokun.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ title: "Hokun"

## Map

### Garmin Connect

<GarminEmbeddedCourse id="224619876"></GarminEmbeddedCourse>

### Mapy.cz

<MapyCzEmbeddedPath id="jobadepoba"></MapyCzEmbeddedPath>

## Transportation
Expand Down
6 changes: 6 additions & 0 deletions docs/trails/prague/kokomo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ title: "Kokomo"

## Map

### Garmin Connect

<GarminEmbeddedCourse id="211777074"></GarminEmbeddedCourse>

### Mapy.cz

<MapyCzEmbeddedPath id="kebofepede"></MapyCzEmbeddedPath>

## Transportation
Expand Down
6 changes: 6 additions & 0 deletions docs/trails/prague/laadchee.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ title: "Laadchee"

## Map

### Garmin Connect

<GarminEmbeddedCourse id="211106575"></GarminEmbeddedCourse>

### Mapy.cz

<MapyCzEmbeddedPath id="kapuzaroca"></MapyCzEmbeddedPath>

## Transportation
Expand Down
6 changes: 6 additions & 0 deletions docs/trails/prague/rockyt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ title: "Rockyt"

## Map

### Garmin Connect

<GarminEmbeddedCourse id="215783112"></GarminEmbeddedCourse>

### Mapy.cz

<MapyCzEmbeddedPath id="jujaduhevo"></MapyCzEmbeddedPath>

## Transportation
Expand Down
6 changes: 6 additions & 0 deletions docs/trails/prague/semmering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ title: "Semmering"

## Map

### Garmin Connect

<GarminEmbeddedCourse id="211858322"></GarminEmbeddedCourse>

### Mapy.cz

<MapyCzEmbeddedPath id="jolovabuta"></MapyCzEmbeddedPath>

## Transportation
Expand Down
6 changes: 6 additions & 0 deletions docs/trails/prague/shark-a.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ title: "Shark-A"

## Map

### Garmin Connect

<GarminEmbeddedCourse id="211895409"></GarminEmbeddedCourse>

### Mapy.cz

<MapyCzEmbeddedPath id="bepopeseno"></MapyCzEmbeddedPath>

## Transportation
Expand Down
6 changes: 6 additions & 0 deletions docs/trails/prague/shuss.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ title: "Shuss"

## Map

### Garmin Connect

<GarminEmbeddedCourse id="211914796"></GarminEmbeddedCourse>

### Mapy.cz

<MapyCzEmbeddedPath id="besorozapu"></MapyCzEmbeddedPath>

## Transportation
Expand Down
19 changes: 19 additions & 0 deletions src/components/GarminEmbeddedCourse/index.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div>
<iframe src={url} width='60%' height='500' />
<div>
<i>Click on trail name to see detailed profile</i>
</div>
</div>
);
}
12 changes: 0 additions & 12 deletions src/components/MapyCzEmbeddedPath/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React, {type ReactNode} from 'react';

import clsx from 'clsx';

import Link from '@docusaurus/Link';
import styles from './styles.module.css';

export interface Props {
id: string;
}
Expand Down
2 changes: 2 additions & 0 deletions src/theme/MDXComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import MDXComponents from '@theme-original/MDXComponents';
import MapyCzEmbeddedPath from '@site/src/components/MapyCzEmbeddedPath';
import GarminEmbeddedCourse from '@site/src/components/GarminEmbeddedCourse';

export default {
...MDXComponents,
MapyCzEmbeddedPath,
GarminEmbeddedCourse,
};
Binary file added static/img/garmin-connect-course-detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/garmin-connect-embedded-course.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.