Reformat starting changes on layout for better UI visuals
This commit is contained in:
+5
-5
@@ -33,12 +33,12 @@ function AppFoundation() {
|
|||||||
height="100vh"
|
height="100vh"
|
||||||
width="100vw"
|
width="100vw"
|
||||||
>
|
>
|
||||||
<GridItem rowSpan={1} colSpan={2}>
|
<GridItem rowSpan={2} colSpan={1}>
|
||||||
<Header />
|
|
||||||
</GridItem>
|
|
||||||
<GridItem colSpan={1}>
|
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
</GridItem>
|
</GridItem>
|
||||||
|
<GridItem rowSpan={1} colSpan={1}>
|
||||||
|
<Header />
|
||||||
|
</GridItem>
|
||||||
<GridItem colSpan={1} width="100%" overflow="auto">
|
<GridItem colSpan={1} width="100%" overflow="auto">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</GridItem>
|
</GridItem>
|
||||||
@@ -75,7 +75,7 @@ function App() {
|
|||||||
|
|
||||||
<Route path="/home" element={<Home />}>
|
<Route path="/home" element={<Home />}>
|
||||||
<Route index element={<MyDashboard />} />
|
<Route index element={<MyDashboard />} />
|
||||||
<Route path="gas" element={<MyDashboard />} />
|
<Route path="gas" element={<Placeholder name="Gas" />} />
|
||||||
<Route path="seismic" element={<Placeholder name="Seismic" />} />
|
<Route path="seismic" element={<Placeholder name="Seismic" />} />
|
||||||
<Route path="remote" element={<Placeholder name="Remote Sensing" />} />
|
<Route path="remote" element={<Placeholder name="Remote Sensing" />} />
|
||||||
<Route path="daily" element={<Placeholder name="Daily Activity" />} />
|
<Route path="daily" element={<Placeholder name="Daily Activity" />} />
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ export default function Header() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex css={styles} justify="space-between" align="center" width="100%">
|
<Flex css={styles} justify="space-between" align="center" width="100%">
|
||||||
{/* Home Link Logo */}
|
{/*/!* Home Link Logo *!/*/}
|
||||||
<Button as={NavLink} to="/home" color="color" variant="plain" textStyle="5xl" fontWeight="bold">
|
{/*<Button as={NavLink} to="/home" color="color" variant="plain" textStyle="5xl" fontWeight="bold">*/}
|
||||||
VDAP
|
{/* VDAP*/}
|
||||||
</Button>
|
{/*</Button>*/}
|
||||||
|
|
||||||
{/* User Profile Section */}
|
{/* User Profile Section */}
|
||||||
<Flex align="center" gap={3} pr={6}>
|
<Flex align="center" gap={3} pr={6}>
|
||||||
|
|||||||
@@ -24,10 +24,42 @@ export default function Sidebar() {
|
|||||||
const toggleSidebar = () => setIsOpen((prev) => !prev);
|
const toggleSidebar = () => setIsOpen((prev) => !prev);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box css={styles.root} width={isOpen ? "210px" : "71px"} transition="width 0.4s ease" position="relative" display="flex" flexDirection="column" gap={2}
|
<Box
|
||||||
|
css={styles.root}
|
||||||
|
width={isOpen ? "210px" : "71px"}
|
||||||
|
transition="width 0.4s ease"
|
||||||
|
position="relative"
|
||||||
|
display="flex"
|
||||||
|
flexDirection="column"
|
||||||
|
gap={4} // Increased gap slightly to help with the squashed look
|
||||||
|
pt={4} // Added top padding to give the logo room to breathe
|
||||||
>
|
>
|
||||||
|
{/* Home Link Logo */}
|
||||||
|
<Button
|
||||||
|
as={NavLink}
|
||||||
|
to="/home"
|
||||||
|
color="color"
|
||||||
|
variant="plain"
|
||||||
|
textStyle={isOpen ? "5xl" : "4xl"} // Scale down slightly when closed
|
||||||
|
fontWeight="bold"
|
||||||
|
height="auto" // Prevents the large text from squashing vertically
|
||||||
|
overflow="hidden"
|
||||||
|
px={0}
|
||||||
|
justifyContent={isOpen ? "flex-start" : "center"} // Center the 'V' when collapsed
|
||||||
|
ml={isOpen ? 3 : 0} // Align with other buttons when open
|
||||||
|
>
|
||||||
|
{isOpen ? "VDAP" : "V"}
|
||||||
|
</Button>
|
||||||
|
|
||||||
{/* Menu Trigger */}
|
{/* Menu Trigger */}
|
||||||
<IconButton aria-label="Toggle Sidebar" variant="plain" size="md" onClick={toggleSidebar} width="54px" alignSelf="flex-start"
|
<IconButton
|
||||||
|
aria-label="Toggle Sidebar"
|
||||||
|
variant="plain"
|
||||||
|
size="md"
|
||||||
|
onClick={toggleSidebar}
|
||||||
|
width="54px"
|
||||||
|
alignSelf={isOpen ? "flex-start" : "center"} // Center the icon when collapsed
|
||||||
|
ml={isOpen ? 3 : 0} // Align with other buttons when open
|
||||||
>
|
>
|
||||||
<Menu />
|
<Menu />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@@ -67,7 +99,8 @@ export default function Sidebar() {
|
|||||||
<ColorModeButton
|
<ColorModeButton
|
||||||
position="absolute"
|
position="absolute"
|
||||||
bottom="4"
|
bottom="4"
|
||||||
left="4"
|
left={isOpen ? "4" : "50%"} // Center the toggle when collapsed
|
||||||
|
transform={isOpen ? "none" : "translateX(-50%)"} // Exact centering logic
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const ResponsiveGridLayout = WidthProvider(Responsive);
|
|||||||
|
|
||||||
export default function MyDashboard() {
|
export default function MyDashboard() {
|
||||||
// 🌗 Let's adjust for our light and dark mode
|
// 🌗 Let's adjust for our light and dark mode
|
||||||
const frameBg = useColorModeValue("gray.100", "gray.800");
|
const frameBg = useColorModeValue("gray.100", "#1E1E2B");
|
||||||
const titleColor = useColorModeValue("gray.800", "gray.100");
|
const titleColor = useColorModeValue("gray.800", "gray.100");
|
||||||
const iconColor = useColorModeValue("gray.600", "gray.400");
|
const iconColor = useColorModeValue("gray.600", "gray.400");
|
||||||
const iconHoverBg = useColorModeValue("gray.100", "gray.700");
|
const iconHoverBg = useColorModeValue("gray.100", "gray.700");
|
||||||
|
|||||||
Reference in New Issue
Block a user