Move more into branding; proxy /images to backend (e.g., more overlays)

This commit is contained in:
2023-02-03 19:12:54 -06:00
parent 83cc240724
commit 570bf05053
9 changed files with 62 additions and 58 deletions

View File

@ -40,6 +40,11 @@ interface Props
[key: string]: any;
}
Footer.defaultProps = {
company: {href: "", name: ""},
links: [],
};
function Footer({company, links}: Props): JSX.Element
{
const {href, name} = company;
@ -67,27 +72,30 @@ function Footer({company, links}: Props): JSX.Element
position: "fixed", bottom: "0px", zIndex: -1, marginBottom: "10px",
}}
>
<Box
display="flex"
justifyContent="center"
alignItems="center"
flexWrap="wrap"
color="text"
fontSize={size.sm}
px={1.5}
>
&copy;
{" "}
{new Date().getFullYear()}
,
<Link href={href} target="_blank">
<MDTypography variant="button" fontWeight="medium">
&nbsp;
{name}
&nbsp;
</MDTypography>
</Link>
</Box>
{
href && name &&
<Box
display="flex"
justifyContent="center"
alignItems="center"
flexWrap="wrap"
color="text"
fontSize={size.sm}
px={1.5}
>
&copy;
{" "}
{new Date().getFullYear()}
,
<Link href={href} target="_blank">
<MDTypography variant="button" fontWeight="medium">
&nbsp;
{name}
&nbsp;
</MDTypography>
</Link>
</Box>
}
<Box
component="ul"
sx={({breakpoints}) => ({
@ -111,10 +119,4 @@ function Footer({company, links}: Props): JSX.Element
);
}
// Declaring default props for Footer
Footer.defaultProps = {
company: {href: "https://www.nutrifreshservices.com/", name: "Nutrifresh Services"},
links: [],
};
export default Footer;

View File

@ -41,7 +41,7 @@ interface Props
color?: "primary" | "secondary" | "info" | "success" | "warning" | "error" | "dark";
icon?: string;
logo?: string;
companyName?: string;
appName?: string;
routes: {
[key: string]:
| ReactNode
@ -64,7 +64,7 @@ interface Props
[key: string]: any;
}
function Sidenav({color, icon, logo, companyName, routes, ...rest}: Props): JSX.Element
function Sidenav({color, icon, logo, appName, routes, ...rest}: Props): JSX.Element
{
const [openCollapse, setOpenCollapse] = useState<boolean | string>(false);
const [openNestedCollapse, setOpenNestedCollapse] = useState<boolean | string>(false);
@ -319,11 +319,11 @@ function Sidenav({color, icon, logo, companyName, routes, ...rest}: Props): JSX.
</MDTypography>
</Box>
<Box component={NavLink} to="/" display="flex" alignItems="center">
{!miniSidenav && logo && <Box component="img" src={logo} alt="Logo" width="100%" />}
{miniSidenav && icon && <Box component="img" src={icon} alt="Icon" width="160%" />}
{!miniSidenav && companyName && <Box width={!companyName && "100%"} sx={(theme: any) => sidenavLogoLabel(theme, {miniSidenav})}>
{!miniSidenav && logo && <Box component="img" src={logo} alt={appName} title={appName} width="100%" />}
{miniSidenav && icon && <Box component="img" src={icon} alt={appName} title={appName} width="160%" />}
{!miniSidenav && !logo && appName && <Box width={appName && "100%"} sx={(theme: any) => sidenavLogoLabel(theme, {miniSidenav})}>
<MDTypography component="h6" variant="button" fontWeight="medium" color={textColor}>
{companyName}
{appName}
</MDTypography>
</Box>
}
@ -352,7 +352,7 @@ Sidenav.defaultProps = {
color: "info",
icon: "",
logo: "",
companyName: "",
appName: "",
};
export default Sidenav;