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

Move about content to dialog #45

Merged
merged 2 commits into from
Jun 6, 2024
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
68 changes: 65 additions & 3 deletions packages/web/src/app/components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,69 @@
export function Header(){
import { useRef } from "preact/hooks";
export function Header() {
const ref = useRef<HTMLDialogElement>();
return (
<div class="page-header">
<h1 class="page-header__headline">Gr&delta;dient</h1>
<dialog
ref={ref}
onCancel={(e) => e.preventDefault()}
class="dialog dialog--about"
>
<div class="dialog--header">
<h2>About OSM Gradient</h2>
<button
class="dialog__close-button"
type="button"
title="Close Modal"
onClick={() => ref.current.close()}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-x"
>
<line x1="18" y1="6" x2="6" y2="18" />
<line x1="6" y1="6" x2="18" y2="18" />
</svg>
</button>
</div>
<small>
Visualize OpenStreetMap features created, modified or deleted every hour
using change data prepared by OSMCha as a FlatGeobuf. This visualization
does not use a server.
</small>
</dialog>
<button
class="dialog__open-button"
type="button"
title="Open Modal"
onClick={() => ref.current.showModal()}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="feather feather-info"
>
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="16" x2="12" y2="12" />
<line x1="12" y1="8" x2="12.01" y2="8" />
</svg>
About
</button>
</div>
)
}
);
}
9 changes: 0 additions & 9 deletions packages/web/src/app/inputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ export function PanelInputs(props: PanelInputsProps) {

return (
<article>
<section>
<small>
<div>
Visualize OpenStreetMap features created, modified or deleted every
hour using change data prepared by OSMCha as a FlatGeobuf. This
visualization does not use a server.
</div>
</small>
</section>
<section>
<h3>Area of Interest (AOI)</h3>
<small>Zoom and pan the map to set the AOI for stats </small>
Expand Down
Loading
Loading