2022-02-01 07:40:53 -08:00
|
|
|
import {
|
|
|
|
createTheme,
|
|
|
|
CssBaseline,
|
|
|
|
responsiveFontSizes,
|
|
|
|
ThemeProvider,
|
|
|
|
} from "@mui/material";
|
|
|
|
import TimeAgo from "javascript-time-ago";
|
|
|
|
import en from "javascript-time-ago/locale/en";
|
|
|
|
import React from "react";
|
|
|
|
import { NetworkContextProvider } from "../../src/contexts/NetworkContext";
|
2022-02-23 15:10:05 -08:00
|
|
|
import bg from "../../src/images/bg.svg";
|
|
|
|
import { Helmet } from "react-helmet";
|
|
|
|
|
|
|
|
import Suisse from "../../src/fonts/SuisseBPIntlBold.woff2";
|
2022-02-01 07:40:53 -08:00
|
|
|
|
|
|
|
TimeAgo.addDefaultLocale(en);
|
|
|
|
|
|
|
|
let theme = createTheme({
|
|
|
|
palette: {
|
|
|
|
mode: "dark",
|
|
|
|
background: {
|
|
|
|
default: "#17153f",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
typography: {
|
|
|
|
fontFamily: ["Poppins", "Arial"].join(","),
|
|
|
|
fontSize: 13,
|
2022-02-23 15:10:05 -08:00
|
|
|
body1: {
|
|
|
|
fontWeight: 300,
|
|
|
|
},
|
|
|
|
body2: {
|
|
|
|
fontWeight: 300,
|
|
|
|
},
|
2022-02-01 07:40:53 -08:00
|
|
|
h1: {
|
|
|
|
fontWeight: "bold",
|
2022-02-23 15:10:05 -08:00
|
|
|
fontFamily: ["Suisse BP Intl", "Arial"],
|
|
|
|
lineHeight: 0.9,
|
|
|
|
letterSpacing: -2.7,
|
|
|
|
},
|
|
|
|
h3: {
|
|
|
|
fontSize: 49,
|
|
|
|
fontWeight: "bold",
|
|
|
|
fontFamily: "Suisse BP Intl",
|
|
|
|
lineHeight: 0.9,
|
|
|
|
letterSpacing: -1.47,
|
|
|
|
},
|
|
|
|
h4: {
|
|
|
|
fontSize: 40,
|
|
|
|
fontWeight: "bold",
|
|
|
|
fontFamily: "Suisse BP Intl",
|
|
|
|
letterSpacing: -1.2,
|
|
|
|
lineHeight: 0.9,
|
|
|
|
},
|
|
|
|
caption: {
|
|
|
|
textTransform: "uppercase",
|
|
|
|
fontSize: 8,
|
|
|
|
letterSpacing: 2,
|
|
|
|
fontFamily: "Suisse BP Intl",
|
|
|
|
fontWeight: 400,
|
|
|
|
display: "block",
|
|
|
|
marginTop: 10,
|
2022-02-01 07:40:53 -08:00
|
|
|
},
|
|
|
|
},
|
2022-02-23 15:10:05 -08:00
|
|
|
|
2022-02-01 07:40:53 -08:00
|
|
|
components: {
|
|
|
|
MuiCssBaseline: {
|
|
|
|
styleOverrides: {
|
2022-02-23 15:10:05 -08:00
|
|
|
body: {
|
|
|
|
overscrollBehaviorY: "none",
|
|
|
|
backgroundColor: "#17153f",
|
|
|
|
backgroundImage: `url(${bg})`,
|
|
|
|
backgroundPosition: "top center",
|
|
|
|
backgroundRepeat: "repeat-y",
|
|
|
|
backgroundSize: "120%",
|
|
|
|
},
|
2022-02-01 07:40:53 -08:00
|
|
|
ul: {
|
|
|
|
paddingLeft: "0px",
|
|
|
|
},
|
|
|
|
"*": {
|
|
|
|
scrollbarWidth: "thin",
|
|
|
|
scrollbarColor: `#4e4e54 rgba(0,0,0,.25)`,
|
|
|
|
},
|
|
|
|
"*::-webkit-scrollbar": {
|
|
|
|
width: "8px",
|
|
|
|
height: "8px",
|
|
|
|
backgroundColor: "rgba(0, 0, 0, 0.25)",
|
|
|
|
},
|
|
|
|
"*::-webkit-scrollbar-thumb": {
|
|
|
|
backgroundColor: "#4e4e54",
|
|
|
|
borderRadius: "4px",
|
|
|
|
},
|
|
|
|
"*::-webkit-scrollbar-corner": {
|
|
|
|
// this hides an annoying white box which appears when both scrollbars are present
|
|
|
|
backgroundColor: "transparent",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiButton: {
|
|
|
|
styleOverrides: {
|
|
|
|
root: {
|
|
|
|
borderRadius: 22,
|
|
|
|
fontSize: 12,
|
|
|
|
fontWeight: 700,
|
|
|
|
letterSpacing: 1.5,
|
2022-02-23 15:10:05 -08:00
|
|
|
padding: "8px 22.5px 8px",
|
2022-02-01 07:40:53 -08:00
|
|
|
"&:hover .MuiButton-endIcon": {
|
2022-02-23 15:10:05 -08:00
|
|
|
transform: "translateX(4px)",
|
2022-02-01 07:40:53 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
contained: {
|
|
|
|
boxShadow: "none",
|
|
|
|
"&:hover": {
|
|
|
|
boxShadow: "none",
|
|
|
|
},
|
|
|
|
"&:active": {
|
|
|
|
boxShadow: "none",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
endIcon: {
|
|
|
|
marginLeft: 12,
|
2022-02-23 15:10:05 -08:00
|
|
|
transition: "transform 300ms",
|
2022-02-01 07:40:53 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiOutlinedInput: {
|
|
|
|
styleOverrides: {
|
|
|
|
notchedOutline: {
|
|
|
|
borderRadius: 24,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
MuiSelect: {
|
|
|
|
styleOverrides: {
|
|
|
|
select: {
|
|
|
|
paddingTop: 8,
|
|
|
|
paddingRight: "40px!important",
|
|
|
|
paddingBottom: 8,
|
|
|
|
paddingLeft: 20,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
theme = responsiveFontSizes(theme);
|
|
|
|
|
|
|
|
const TopLayout = ({ children }) => (
|
|
|
|
<ThemeProvider theme={theme}>
|
2022-02-23 15:10:05 -08:00
|
|
|
<Helmet>
|
|
|
|
<link
|
|
|
|
rel="preload"
|
|
|
|
as="font"
|
|
|
|
href={Suisse}
|
|
|
|
type="font/woff2"
|
|
|
|
crossOrigin="anonymous"
|
|
|
|
/>
|
|
|
|
</Helmet>
|
2022-02-01 07:40:53 -08:00
|
|
|
<CssBaseline />
|
|
|
|
<NetworkContextProvider>{children}</NetworkContextProvider>
|
|
|
|
</ThemeProvider>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default TopLayout;
|