-
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.
add sprinkles to the uncooked doughnut (add styles and theming)
- Loading branch information
1 parent
31e855f
commit 9b4fd68
Showing
15 changed files
with
1,217 additions
and
42 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<link href="./output.css" rel="stylesheet"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg"/> | ||
<link href="./src/output.css" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" | ||
rel="stylesheet"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<title>GeoSense</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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
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,10 @@ | ||
import { ThemeSwitcher } from "./ThemeSwitcher.tsx"; | ||
|
||
export const Header = () => { | ||
return ( | ||
<div className="flex items-center bg-base-300 justify-between p-4 m-4 w-[96%] shadow-xl border rounded-box"> | ||
<h1 className="text-3xl font-bold pl-4">BGS Sensors Plotter</h1> | ||
<ThemeSwitcher/> | ||
</div> | ||
) | ||
} |
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,25 @@ | ||
import React from "react"; | ||
|
||
interface ISelectProps { | ||
children: React.ReactNode; | ||
disabled?: boolean; | ||
label?: string; | ||
value: string; | ||
updateValue: (value: string) => void; | ||
} | ||
|
||
export const Select = ({ children, disabled, label, value, updateValue }: ISelectProps) => { | ||
return ( | ||
<div className="flex flex-col w-full gap-2 items-center"> | ||
{label ? <label className="label p-0">{label}</label> : null} | ||
<select | ||
className="flex w-full select select-bordered w-1/2 rounded bg-primary text-primary-content p-2" | ||
value={value} | ||
onChange={(e) => updateValue(e.target.value)} | ||
disabled={disabled || false} | ||
> | ||
{children} | ||
</select> | ||
</div> | ||
) | ||
} |
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,26 @@ | ||
import { FeatureSelect } from "./FeatureSelect.tsx"; | ||
import { SensorSelect, sensorSelectLabel } from "./SensorSelect.tsx"; | ||
import { useGetFeatures } from "../hooks/useFetch.ts"; | ||
import { useFeature } from "../store/useFeature.ts"; | ||
import { Select } from "./Select.tsx"; | ||
|
||
export const SelectorBar = () => { | ||
const { | ||
data: features, | ||
loading: featuresLoading, | ||
error: featuresError | ||
} = useGetFeatures(); | ||
|
||
const { selectedFeature } = useFeature(); | ||
|
||
return ( | ||
<div className="flex w-full p-4 border-b-4 border-accent rounded-t-box gap-[10vw]"> | ||
<FeatureSelect features={features} loading={featuresLoading} error={featuresError}/> | ||
{ | ||
selectedFeature | ||
? <SensorSelect /> | ||
: <Select value={''} updateValue={() => {}} label={sensorSelectLabel} disabled></Select> | ||
} | ||
</div> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { LuMoonStar } from "react-icons/lu"; | ||
import { FiSun } from "react-icons/fi"; | ||
|
||
export const ThemeSwitcher = () => { | ||
return ( | ||
<div className="flex space-x-0.5"> | ||
<button className="btn btn-ghost text-2xl" data-set-theme="synthwave" data-act-class="ACTIVECLASS"> | ||
<LuMoonStar /> | ||
</button> | ||
<div className="divider divider-horizontal divider-accent"></div> | ||
<button className="btn btn-ghost text-2xl" data-set-theme="light" data-act-class="ACTIVECLASS"> | ||
<FiSun /> | ||
</button> | ||
</div> | ||
) | ||
} |
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,14 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
body { | ||
font-family: 'Kanit', sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
* { | ||
@apply transition duration-[0.03s]; | ||
box-sizing: border-box; | ||
} |
Oops, something went wrong.