diff --git a/client/src/components/layout/Canvas/Canvas.jsx b/client/src/components/layout/Canvas/Canvas.jsx index d059e1c..7c02fd1 100644 --- a/client/src/components/layout/Canvas/Canvas.jsx +++ b/client/src/components/layout/Canvas/Canvas.jsx @@ -12,7 +12,7 @@ import SettingsCanvas from "./views/SettingsCanvas" import { DashboardCanvas } from "./views/DashboardCanvas"; import { DASHBOARD_VIEWS } from "@/constants/viewKeys"; -export default function Canvas({ view, setView, layout, setLayout, onLayoutChange }) { +export default function Canvas({ view, setView, layout, setLayout, onLayoutChange, darkMode }) { const recipe = useRecipe({ key: "canvas" }); const styles = recipe(); diff --git a/client/src/components/layout/Canvas/views/GlobalMapCanvas.jsx b/client/src/components/layout/Canvas/views/GlobalMapCanvas.jsx index 29b9a1a..8cdaf5c 100644 --- a/client/src/components/layout/Canvas/views/GlobalMapCanvas.jsx +++ b/client/src/components/layout/Canvas/views/GlobalMapCanvas.jsx @@ -1,21 +1,21 @@ import React from "react"; import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet"; import 'leaflet/dist/leaflet.css'; - -const position = [51.505, -0.09]; // [latitude, longitude] +import 'src/css/leaflet-darkmode.css'; export default function GlobalMapCanvas() { + const position = [45.61142478054226, -122.49630033167544]; // [latitude, longitude] return ( - - - - - A sample popup! - - - + + + + + CVO — Home of the volcanoligists + + + ); } \ No newline at end of file diff --git a/client/src/components/layout/Dashboard.jsx b/client/src/components/layout/Dashboard.jsx index 05cde64..245c335 100644 --- a/client/src/components/layout/Dashboard.jsx +++ b/client/src/components/layout/Dashboard.jsx @@ -9,6 +9,7 @@ export default function Dashboard() { const recipe = useRecipe({ key: "dashboard" }); const styles = recipe(); + const [darkMode, setDarkMode] = useState(false); // Lifted State - defaults to widget dashboard const [view, setView] = useState("widget"); const [layout, setLayout] = useState([ @@ -19,41 +20,17 @@ export default function Dashboard() { return ( <> - + .leaflet-container { + background-color: #1e1e1e; + */} ) })} - + { + setDarkMode(!darkMode); + toggleColorMode(); + }} + position="absolute" + bottom="2"/> ); } \ No newline at end of file diff --git a/client/src/css/header.css b/client/src/css/header.css deleted file mode 100644 index 96d3cf9..0000000 --- a/client/src/css/header.css +++ /dev/null @@ -1,42 +0,0 @@ -header { - /* display */ - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - - /* color */ - background-color: white; - color: #19332d; - - /* size */ - height: 100%; - font-weight: bolder; - - /* border */ - border-bottom: solid 1px black; - padding-left: 1.5rem; - padding-right: 1.5rem; -} - -header .logo { - /* size */ - font-size: xx-large; -} - -header .logo:hover { - cursor: pointer; -} - -header .user { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - gap: 1rem; - font-size: large; -} - -header .user:hover { - cursor: pointer; -} \ No newline at end of file diff --git a/client/src/css/leaflet-darkmode.css b/client/src/css/leaflet-darkmode.css new file mode 100644 index 0000000..370d56f --- /dev/null +++ b/client/src/css/leaflet-darkmode.css @@ -0,0 +1,11 @@ +/* map dark mode */ +.dark-mode-leaflet .leaflet-tile, +.dark-mode-leaflet .leaflet-control-zoom-in, +.dark-mode-leaflet .leaflet-control-zoom-out, +.dark-mode-leaflet .leaflet-control-attribution { + filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%); +} + +.dark-mode-leaflet .leaflet-container { + background-color: #1e1e1e; /* dark background for seamless look */ +} \ No newline at end of file diff --git a/client/src/css/sidebar.css b/client/src/css/sidebar.css deleted file mode 100644 index aca0d99..0000000 --- a/client/src/css/sidebar.css +++ /dev/null @@ -1,45 +0,0 @@ - -aside { - /* display */ - display: flex; - flex-direction: column; - justify-content: start; - align-items: start; - - /* size */ - width: 100%; - height: 100%; - font-size: larger; - font-weight: 800; - - /* padding */ - padding: 4rem; - - /* gap */ - gap: 2.5rem; - - /* test border */ - border-right: solid 1px black; -} - -.sidebar-items { - /* display */ - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - gap: 1rem; - - /* color */ - color: #19332D; -} - -.sidebar-items:hover { - color: #234a41; - filter: invert(25%) sepia(6%) saturate(3183%) hue-rotate(116deg) brightness(88%) contrast(89%); - cursor: pointer; -} - -button img { - align-self: end; -} \ No newline at end of file diff --git a/client/src/theme.js b/client/src/theme.js index 459c199..ff33a94 100644 --- a/client/src/theme.js +++ b/client/src/theme.js @@ -95,6 +95,52 @@ const widgetRecipe = defineSlotRecipe({ }); const config = defineConfig({ + globalCss: { + ".react-grid-placeholder": { + background: "#c0d2e3ff !important", + borderColor: "#a9b6c2ff !important", + boxShadow: "0 0 10px #c0d2e3ff !important", + opacity: "1 !important", + borderRadius: "5px", + }, + ".react-resizable-handle-se": { + zIndex: "1", + }, + "*": { + scrollbarWidth: "thin", + scrollbarColor: "#a0aec0 transparent", + }, + "::-webkit-scrollbar": { + width: "8px", + }, + "::-webkit-scrollbar-thumb": { + backgroundColor:" rgba(100, 100, 100, 0.4)", + borderRadius: "4px", + }, + "::-webkit-scrollbar-track": { + background: "transparent", + }, + '.leaflet-tile': { + _dark: { + filter: "invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)", + } + }, + '.leaflet-control-zoom-in .leaflet-control-zoom-out .leaflet-control-attribution .leaflet-container': { + _dark: { + filter: "invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)", + } + }, + '.leaflet-control-attribution': { + _dark: { + filter: "invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)", + } + }, + '.leaflet-container': { + _dark: { + filter: "invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)", + } + }, + }, theme: { semanticTokens: { colors: {