1
- export function Header ( ) {
1
+ import { useRef } from "preact/hooks" ;
2
+ export function Header ( ) {
3
+ const ref = useRef < HTMLDialogElement > ( ) ;
2
4
return (
3
5
< div class = "page-header" >
4
6
< h1 class = "page-header__headline" > Grδ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 >
5
65
</ div >
6
- )
7
- }
66
+ ) ;
67
+ }
0 commit comments