Skip to content

Commit e25dc32

Browse files
committed
Move about content to dialog
1 parent 1824b3f commit e25dc32

File tree

3 files changed

+163
-86
lines changed

3 files changed

+163
-86
lines changed
Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,67 @@
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+
Visualize OpenStreetMap features created, modified or deleted every hour
38+
using change data prepared by OSMCha as a FlatGeobuf. This visualization
39+
does not use a server.
40+
</dialog>
41+
<button
42+
class="dialog__open-button"
43+
type="button"
44+
title="Open Modal"
45+
onClick={() => ref.current.showModal()}
46+
>
47+
<svg
48+
xmlns="http://www.w3.org/2000/svg"
49+
width="24"
50+
height="24"
51+
viewBox="0 0 24 24"
52+
fill="none"
53+
stroke="currentColor"
54+
stroke-width="2"
55+
stroke-linecap="round"
56+
stroke-linejoin="round"
57+
class="feather feather-info"
58+
>
59+
<circle cx="12" cy="12" r="10" />
60+
<line x1="12" y1="16" x2="12" y2="12" />
61+
<line x1="12" y1="8" x2="12.01" y2="8" />
62+
</svg>
63+
About
64+
</button>
565
</div>
6-
)
7-
}
66+
);
67+
}

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)