Skip to content

Commit 64c1afd

Browse files
authored
Merge pull request #45 from developmentseed/about-dialog
Move about content to dialog
2 parents 3983b9d + bef99a5 commit 64c1afd

File tree

3 files changed

+165
-86
lines changed

3 files changed

+165
-86
lines changed
Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,69 @@
1-
export function Header(){
1+
import { useRef } from "preact/hooks";
2+
export function Header() {
3+
const ref = useRef<HTMLDialogElement>();
24
return (
35
<div class="page-header">
46
<h1 class="page-header__headline">Gr&delta;dient</h1>
7+
<dialog
8+
ref={ref}
9+
onCancel={(e) => e.preventDefault()}
10+
class="dialog dialog--about"
11+
>
12+
<div class="dialog--header">
13+
<h2>About OSM Gradient</h2>
14+
<button
15+
class="dialog__close-button"
16+
type="button"
17+
title="Close Modal"
18+
onClick={() => ref.current.close()}
19+
>
20+
<svg
21+
xmlns="http://www.w3.org/2000/svg"
22+
width="24"
23+
height="24"
24+
viewBox="0 0 24 24"
25+
fill="none"
26+
stroke="currentColor"
27+
stroke-width="2"
28+
stroke-linecap="round"
29+
stroke-linejoin="round"
30+
class="feather feather-x"
31+
>
32+
<line x1="18" y1="6" x2="6" y2="18" />
33+
<line x1="6" y1="6" x2="18" y2="18" />
34+
</svg>
35+
</button>
36+
</div>
37+
<small>
38+
Visualize OpenStreetMap features created, modified or deleted every hour
39+
using change data prepared by OSMCha as a FlatGeobuf. This visualization
40+
does not use a server.
41+
</small>
42+
</dialog>
43+
<button
44+
class="dialog__open-button"
45+
type="button"
46+
title="Open Modal"
47+
onClick={() => ref.current.showModal()}
48+
>
49+
<svg
50+
xmlns="http://www.w3.org/2000/svg"
51+
width="24"
52+
height="24"
53+
viewBox="0 0 24 24"
54+
fill="none"
55+
stroke="currentColor"
56+
stroke-width="2"
57+
stroke-linecap="round"
58+
stroke-linejoin="round"
59+
class="feather feather-info"
60+
>
61+
<circle cx="12" cy="12" r="10" />
62+
<line x1="12" y1="16" x2="12" y2="12" />
63+
<line x1="12" y1="8" x2="12.01" y2="8" />
64+
</svg>
65+
About
66+
</button>
567
</div>
6-
)
7-
}
68+
);
69+
}

packages/web/src/app/inputs.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@ export function PanelInputs(props: PanelInputsProps) {
77

88
return (
99
<article>
10-
<section>
11-
<small>
12-
<div>
13-
Visualize OpenStreetMap features created, modified or deleted every
14-
hour using change data prepared by OSMCha as a FlatGeobuf. This
15-
visualization does not use a server.
16-
</div>
17-
</small>
18-
</section>
1910
<section>
2011
<h3>Area of Interest (AOI)</h3>
2112
<small>Zoom and pan the map to set the AOI for stats </small>

0 commit comments

Comments
 (0)