Skip to content

Commit 552b217

Browse files
break it out a bit more (#289)
* break it out a bit more * Fix typo in button label from 'Quick start' to 'Quickstart' --------- Co-authored-by: Dana Bauer <dana.bauer@gmail.com>
1 parent bf1baca commit 552b217

3 files changed

Lines changed: 92 additions & 66 deletions

File tree

docs/getting-data/explore.mdx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,12 @@ pagination_label: Explorer
66

77
---
88

9-
import styles from '@site/src/components/home.module.css';
9+
import { ExplorerEmbed } from '@site/src/components/home';
1010

1111

1212
[Overture Maps Explorer](https://explore.overturemaps.org) is a browser-based tool for browsing and inspecting Overture data. No installation, no account, no SQL — just open the link and start exploring.
1313

14-
<div className={styles.explorerSection}>
15-
<div className={styles.explorerFrame}>
16-
<iframe
17-
src="https://explore.overturemaps.org/#map=12/39.9526/-75.1652"
18-
title="Overture Maps Explorer"
19-
loading="lazy"
20-
allow="fullscreen"
21-
/>
22-
<a
23-
className={styles.explorerOpen}
24-
href="https://explore.overturemaps.org"
25-
target="_blank"
26-
rel="noopener noreferrer"
27-
>
28-
Open full screen ↗
29-
</a>
30-
</div>
31-
</div>
14+
<ExplorerEmbed src="https://explore.overturemaps.org/#map=12/39.9526/-75.1652" />
3215

3316
## Explore and Inspect modes
3417

docs/index.mdx

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
---
22
slug: /
3-
title: " "
3+
title: ' '
44
sidebar_class_name: hidden
55
hide_table_of_contents: true
66
className: landing-page
77
---
88

9-
import Home from '@site/src/components/home';
9+
import {
10+
Hero,
11+
HeroHeadline,
12+
HeroSubtext,
13+
HeroCTAs,
14+
PrimaryButton,
15+
SecondaryButton,
16+
ExplorerEmbed,
17+
} from '@site/src/components/home';
1018

11-
<Home />
19+
<Hero>
20+
<HeroHeadline />
21+
22+
<HeroSubtext>
23+
A platform for bringing together tech companies, mapping organizations, government agencies, open
24+
data communities, and researchers to build open, reliable, and interoperable map data
25+
infrastructure.
26+
</HeroSubtext>
27+
28+
<HeroCTAs>
29+
<PrimaryButton to="/getting-data/">Quickstart</PrimaryButton>
30+
<SecondaryButton href="https://explore.overturemaps.org">
31+
Explore the data and schema →
32+
</SecondaryButton>
33+
</HeroCTAs>
34+
</Hero>
35+
36+
<ExplorerEmbed />

src/components/home.jsx

Lines changed: 62 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,72 @@
11
import React from 'react';
22
import Link from '@docusaurus/Link';
3-
import RotatingWord from '@site/src/components/RotatingWord';
3+
import RotatingWord from './RotatingWord';
44
import styles from './home.module.css';
55

6-
export default function Home() {
6+
export function Hero({ children }) {
7+
return <section className={styles.hero}>{children}</section>;
8+
}
9+
10+
export function HeroHeadline() {
711
return (
8-
<>
9-
<section className={styles.hero}>
10-
<div className={styles.headline}>
11-
<div className={styles.headlineTop}>
12-
<span className={styles.headlineStatic}>Overture</span>
13-
<span className={styles.headlineIs}>is</span>
14-
</div>
15-
<RotatingWord />
16-
</div>
12+
<div className={styles.headline}>
13+
<div className={styles.headlineTop}>
14+
<span className={styles.headlineStatic}>Overture</span>
15+
<span className={styles.headlineIs}>is</span>
16+
</div>
17+
<RotatingWord />
18+
</div>
19+
);
20+
}
21+
22+
export function HeroSubtext({ children }) {
23+
return <p className={styles.subtext}>{children}</p>;
24+
}
25+
26+
export function HeroCTAs({ children }) {
27+
return <div className={styles.ctaRow}>{children}</div>;
28+
}
1729

18-
<p className={styles.subtext}>
19-
A platform for bringing together tech companies, mapping organizations,
20-
government agencies, open data communities, and researchers to build
21-
open, reliable, and interoperable map data infrastructure.
22-
</p>
30+
export function PrimaryButton({ to, children }) {
31+
return (
32+
<Link to={to} className={styles.btnPrimary}>
33+
{children}
34+
</Link>
35+
);
36+
}
2337

24-
<div className={styles.ctaRow}>
25-
<Link to="/getting-data/" className={styles.btnPrimary}>
26-
Quick start
27-
</Link>
28-
<a href="https://explore.overturemaps.org" className={styles.btnSecondary} target="_blank" rel="noopener noreferrer">
29-
Explore the data and schema {'\u2192'}
30-
</a>
31-
</div>
32-
</section>
38+
export function SecondaryButton({ href, children }) {
39+
return (
40+
<a
41+
href={href}
42+
className={styles.btnSecondary}
43+
target="_blank"
44+
rel="noopener noreferrer"
45+
>
46+
{children}
47+
</a>
48+
);
49+
}
3350

34-
<div className={styles.explorerSection}>
35-
<div className={styles.explorerFrame}>
36-
<iframe
37-
src="https://explore.overturemaps.org"
38-
title="Overture Maps Explorer"
39-
loading="lazy"
40-
allow="fullscreen"
41-
/>
42-
<a
43-
className={styles.explorerOpen}
44-
href="https://explore.overturemaps.org"
45-
target="_blank"
46-
rel="noopener noreferrer"
47-
>
48-
Open full screen {'\u2197'}
49-
</a>
50-
</div>
51+
export function ExplorerEmbed({ src = 'https://explore.overturemaps.org' }) {
52+
return (
53+
<div className={styles.explorerSection}>
54+
<div className={styles.explorerFrame}>
55+
<iframe
56+
src={src}
57+
title="Overture Maps Explorer"
58+
loading="lazy"
59+
allow="fullscreen"
60+
/>
61+
<a
62+
className={styles.explorerOpen}
63+
href="https://explore.overturemaps.org"
64+
target="_blank"
65+
rel="noopener noreferrer"
66+
>
67+
Open full screen {'\u2197'}
68+
</a>
5169
</div>
52-
</>
70+
</div>
5371
);
54-
}
72+
}

0 commit comments

Comments
 (0)