-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81167a6
commit 4e105fb
Showing
18 changed files
with
165 additions
and
25 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use client"; | ||
|
||
import { PropsWithChildren } from "react"; | ||
|
||
import { MapProvider } from "react-map-gl"; | ||
|
||
export default function LayoutProviders({ children }: PropsWithChildren) { | ||
return <MapProvider>{children}</MapProvider>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { PropsWithChildren } from "react"; | ||
|
||
import MapSettingsManagerPanel from "@/containers/map-settings"; | ||
import MapSettingsManager from "@/containers/map-settings/manager"; | ||
import Navigation from "@/containers/navigation"; | ||
import Sidebar from "@/containers/sidebar"; | ||
|
||
import Map from "@/components/map"; | ||
import Controls from "@/components/map/controls"; | ||
import SettingsControl from "@/components/map/controls/settings"; | ||
import ZoomControl from "@/components/map/controls/zoom"; | ||
|
||
import LayoutProviders from "./layout-providers"; | ||
|
||
export default async function AppLayout({ children }: PropsWithChildren) { | ||
return ( | ||
<LayoutProviders> | ||
<main className="flex h-[100svh] w-full justify-between"> | ||
<Navigation /> | ||
<Sidebar>{children}</Sidebar> | ||
<Map> | ||
<Controls className="absolute right-6 top-4"> | ||
<ZoomControl /> | ||
<SettingsControl> | ||
<MapSettingsManagerPanel /> | ||
</SettingsControl> | ||
</Controls> | ||
<MapSettingsManager /> | ||
</Map> | ||
</main> | ||
</LayoutProviders> | ||
); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Projects from "@/containers/projects"; | ||
|
||
export default function ProjectsPage() { | ||
return <Projects />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ners/home/map-settings/basemaps/index.tsx → ...ontainers/map-settings/basemaps/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import { BASEMAPS } from "@/components/map/constants"; | ||
|
||
import BasemapItem from "./item"; | ||
|
2 changes: 2 additions & 0 deletions
2
...home/map-settings/basemaps/item/index.tsx → ...ners/map-settings/basemaps/item/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import { useCallback } from "react"; | ||
|
||
import Image from "next/image"; | ||
|
2 changes: 2 additions & 0 deletions
2
...rs/home/map-settings/boundaries/index.tsx → ...tainers/map-settings/boundaries/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import { useCallback } from "react"; | ||
|
||
import { useSyncMapSettings } from "@/app/url-query-params"; | ||
|
2 changes: 2 additions & 0 deletions
2
...rc/containers/home/map-settings/index.tsx → client/src/containers/map-settings/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ainers/home/map-settings/labels/index.tsx → .../containers/map-settings/labels/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import { useCallback } from "react"; | ||
|
||
import { useSyncMapSettings } from "@/app/url-query-params"; | ||
|
2 changes: 2 additions & 0 deletions
2
...iners/home/map-settings/manager/index.tsx → ...containers/map-settings/manager/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import { useCallback, useEffect } from "react"; | ||
|
||
import { useMap } from "react-map-gl"; | ||
|
2 changes: 2 additions & 0 deletions
2
...tainers/home/map-settings/roads/index.tsx → ...c/containers/map-settings/roads/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import { useCallback } from "react"; | ||
|
||
import { useSyncMapSettings } from "@/app/url-query-params"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use client"; | ||
|
||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
import { LuList, LuMap } from "react-icons/lu"; | ||
|
||
const Navigation = (): JSX.Element => { | ||
return ( | ||
<nav className="relative z-20 block h-full w-20 shrink-0 border-r-2 border-gray-300/20 bg-white"> | ||
<ul className="w-full text-xs"> | ||
<li className="py-5 text-center"> | ||
<Link className="flex flex-col items-center justify-center gap-1" href="/"> | ||
<Image alt="CCSA Logo" width={72} height={59} src="/logo.svg" /> | ||
</Link> | ||
</li> | ||
<li className="py-5 text-center"> | ||
<Link className="flex flex-col items-center justify-center gap-1" href="/"> | ||
<LuMap className="h-6 w-6" /> | ||
Explore datasets | ||
</Link> | ||
</li> | ||
<li className="py-5 text-center"> | ||
<Link className="flex flex-col items-center justify-center gap-1" href="/projects"> | ||
<LuList className="h-6 w-6" /> | ||
Projects | ||
</Link> | ||
</li> | ||
</ul> | ||
</nav> | ||
); | ||
}; | ||
|
||
export default Navigation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"use client"; | ||
|
||
const Projects = (): JSX.Element => { | ||
return ( | ||
<div className="flex h-full overflow-auto"> | ||
<div className="p-5"> | ||
<h1 className="text-3xl">Projects</h1> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Projects; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"use client"; | ||
|
||
import { PropsWithChildren, useState } from "react"; | ||
|
||
import { LuChevronLeft } from "react-icons/lu"; | ||
|
||
import { cn } from "@/lib/classnames"; | ||
|
||
const Sidebar = ({ children }: PropsWithChildren): JSX.Element => { | ||
const [open, setOpen] = useState(true); | ||
|
||
const toggleOpen = () => setOpen((prev) => !prev); | ||
|
||
return ( | ||
<aside | ||
className={cn({ | ||
"absolute left-20 top-0 z-10 h-full w-full max-w-md bg-white transition-transform duration-300 ease-in-out": | ||
true, | ||
"-translate-x-full": !open, | ||
})} | ||
> | ||
{children} | ||
|
||
<button | ||
className="absolute left-full top-0 rounded-r-lg bg-white py-2.5" | ||
onClick={toggleOpen} | ||
> | ||
<LuChevronLeft | ||
className={cn({ | ||
"h-5 w-5 transition-transform delay-300 duration-300 ease-in-out": true, | ||
"rotate-180": !open, | ||
})} | ||
/> | ||
</button> | ||
</aside> | ||
); | ||
}; | ||
|
||
export default Sidebar; |