converted frontend from tailwind to material-ui using AI
parent
3e5e728d92
commit
70b690ab9d
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
|||||||
export default {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
autoprefixer: {},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,27 +1,40 @@
|
|||||||
import { useLocation } from "preact-iso";
|
import { useLocation } from "preact-iso";
|
||||||
|
import { AppBar, Toolbar, Button, Box } from "@mui/material";
|
||||||
|
import { styled } from "@mui/system";
|
||||||
|
|
||||||
|
const StyledToolbar = styled(Toolbar)({
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
backgroundColor: "#E0E7FF", // Indigo-200 equivalent
|
||||||
|
});
|
||||||
|
|
||||||
|
const StyledButton = styled(Button)(({ theme, active }) => ({
|
||||||
|
color: theme.palette.text.primary,
|
||||||
|
fontWeight: active ? "bold" : "normal",
|
||||||
|
textDecoration: active ? "underline" : "none",
|
||||||
|
}));
|
||||||
|
|
||||||
export function Header() {
|
export function Header() {
|
||||||
const { url } = useLocation();
|
const { url } = useLocation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header class="flex flex-row justify-center">
|
<AppBar position="static" elevation={0}>
|
||||||
<nav class="flex flex-row justify-center text-lg gap-4 max-w-5xl py-2 px-3 rounded-full bg-indigo-200">
|
<StyledToolbar>
|
||||||
<a
|
<Box sx={{ display: "flex", gap: 2 }}>
|
||||||
|
<StyledButton
|
||||||
href="/"
|
href="/"
|
||||||
class={
|
active={url === "/" || url === "/historical-calendar-prices"}
|
||||||
(url === "/" || url === "/historical-calendar-prices") &&
|
|
||||||
"underline font-bold"
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
Historical Calendar Prices
|
Historical Calendar Prices
|
||||||
</a>
|
</StyledButton>
|
||||||
<a
|
<StyledButton
|
||||||
href="/calendar-optimizer"
|
href="/calendar-optimizer"
|
||||||
class={url === "/calendar-optimizer" && "underline font-bold"}
|
active={url === "/calendar-optimizer"}
|
||||||
>
|
>
|
||||||
Calendar Optimizer
|
Calendar Optimizer
|
||||||
</a>
|
</StyledButton>
|
||||||
</nav>
|
</Box>
|
||||||
</header>
|
</StyledToolbar>
|
||||||
|
</AppBar>
|
||||||
);
|
);
|
||||||
}
|
}
|
@ -1,13 +0,0 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
export default {
|
|
||||||
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
||||||
theme: {
|
|
||||||
extend: {
|
|
||||||
width: {
|
|
||||||
128: "32rem",
|
|
||||||
160: "40rem",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [],
|
|
||||||
};
|
|
Loading…
Reference in New Issue