-
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
0f052ca
commit 763d83b
Showing
5 changed files
with
109 additions
and
96 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -8,40 +8,27 @@ import { Box, Container, Divider, Grid } from "@mui/material"; | |
export default function Footer() { | ||
return ( | ||
<> | ||
<Divider | ||
{/* <Divider | ||
sx={{ borderBottomWidth: 1, borderColor: "black", marginTop: "1rem" }} | ||
/> | ||
/> */} | ||
<Box | ||
sx={{ | ||
width: "100%", | ||
height: "auto", | ||
padding: "1rem 0", | ||
backgroundColor: "black", | ||
}} | ||
> | ||
<Container maxWidth="lg"> | ||
<Grid container direction="column" alignItems="center"> | ||
<Grid | ||
item | ||
xs={12} | ||
style={{ | ||
fontSize: "1.5rem", | ||
}} | ||
> | ||
Carte Blanche | ||
</Grid> | ||
<Grid item xs={12}> | ||
Open to submissions at:{" "} | ||
<Link href="mailto:[email protected]"> | ||
[email protected] | ||
</Link> | ||
</Grid> | ||
<Grid container direction="column" alignItems="center" gap="0.2rem"> | ||
<Grid item xs={12}> | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
flexWrap: "wrap", | ||
alignItems: "center", | ||
gap: "10px", | ||
color: "white", | ||
}} | ||
> | ||
<Link href="https://www.instagram.com/" target="_blank"> | ||
|
@@ -56,7 +43,17 @@ export default function Footer() { | |
</Box> | ||
</Grid> | ||
<Grid item xs={12}> | ||
2023 | Partnership with Full Stack at Brown | ||
<span className="text-xs text-white md:text-lg"> | ||
2023 | Partnership with Full Stack at Brown | ||
</span> | ||
</Grid> | ||
<Grid item xs={12}> | ||
<span className="text-xs text-white md:text-lg"> | ||
Open to submissions at:{" "} | ||
<Link href="mailto:[email protected]"> | ||
[email protected] | ||
</Link> | ||
</span> | ||
</Grid> | ||
</Grid> | ||
</Container> | ||
|
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,86 @@ | ||
import CreateIcon from "@mui/icons-material/Create"; | ||
import DashboardCustomizeIcon from "@mui/icons-material/DashboardCustomize"; | ||
import ManageAccountsIcon from "@mui/icons-material/ManageAccounts"; | ||
import Box from "@mui/material/Box"; | ||
import SpeedDial from "@mui/material/SpeedDial"; | ||
import SpeedDialIcon from "@mui/material/SpeedDialIcon"; | ||
import SpeedDialAction from "@mui/material/SpeedDialAction"; | ||
import Link from "next/link"; | ||
import "react-grid-layout/css/styles.css"; | ||
import "react-resizable/css/styles.css"; | ||
import type { User } from "@prisma/client"; | ||
|
||
interface PiecesSidebarProps { | ||
user?: User; | ||
} | ||
|
||
const actions = [ | ||
{ | ||
icon: ( | ||
<Link href="/upload"> | ||
<CreateIcon /> | ||
</Link> | ||
), | ||
name: "Create Content", | ||
roles: ["ADMIN", "WRITER"], | ||
}, | ||
{ | ||
icon: ( | ||
<Link href="/accounts"> | ||
<ManageAccountsIcon /> | ||
</Link> | ||
), | ||
name: "Manage Accounts", | ||
roles: ["ADMIN"], | ||
}, | ||
{ | ||
icon: <DashboardCustomizeIcon />, | ||
name: "Customize Dashboard", | ||
// onClick: () => setIsEditing(!isEditing), | ||
roles: ["ADMIN"], | ||
}, | ||
]; | ||
|
||
export default function PiecesSidebar({ user }: PiecesSidebarProps) { | ||
return ( | ||
<div className="relative flex basis-1/4 justify-end bg-black p-10 text-right text-white"> | ||
<div className="sticky top-1/3 h-min w-full"> | ||
<p className="text-xl lowercase">Vous Avez</p> | ||
<h1 className="text-3xl font-extrabold uppercase">Carte Blanche</h1> | ||
{user?.role != "READER" && ( | ||
<Box sx={{ height: 320, transform: "translateZ(0px)", flexGrow: 1 }}> | ||
<div className="flex-1" /> | ||
<SpeedDial | ||
ariaLabel="SpeedDial basic example" | ||
sx={{ | ||
"& .MuiFab-root": { | ||
backgroundColor: "#fff", | ||
}, | ||
"& .MuiFab-root:hover": { | ||
backgroundColor: "#a5a5a5", | ||
}, | ||
"& .MuiSpeedDialAction-fab": { | ||
backgroundColor: "#fff", | ||
}, | ||
}} | ||
icon={<SpeedDialIcon style={{ color: "black" }} />} | ||
> | ||
{actions.map( | ||
(action) => | ||
action.roles.includes(user?.role ?? "READER") && ( | ||
<SpeedDialAction | ||
key={action.name} | ||
icon={action.icon} | ||
tooltipTitle={action.name} | ||
// onClick={action.onClick} | ||
/> | ||
) | ||
)} | ||
</SpeedDial> | ||
<div className="flex-1" /> | ||
</Box> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
} |
Empty file.
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