pineafan | df39fd4 | 2021-09-04 16:05:27 +0100 | [diff] [blame] | 1 | import '../styles/globals.css'; |
| 2 | import NavBar from '../Components/NavBar'; |
Skyler Turner | 16c08d3 | 2021-11-04 20:06:50 +0000 | [diff] [blame] | 3 | import { ThemeProvider } from 'theme-ui'; |
pineafan | 7bd0ad6 | 2022-10-26 22:11:29 +0100 | [diff] [blame^] | 4 | import React from 'react'; |
pineafan | ff3d452 | 2022-05-06 19:51:02 +0100 | [diff] [blame] | 5 | import Styles from '../styles/globals.module.css'; |
pineafan | df39fd4 | 2021-09-04 16:05:27 +0100 | [diff] [blame] | 6 | |
Skyler Turner | 16c08d3 | 2021-11-04 20:06:50 +0000 | [diff] [blame] | 7 | const theme = { |
| 8 | config: { |
| 9 | useColorSchemeMediaQuery: true, |
| 10 | initialColorModeName: 'light', |
| 11 | }, |
| 12 | colors: { |
| 13 | text: '#424242', |
| 14 | background: '#ffffff', |
| 15 | primary: '#6576CC', |
| 16 | cardText: '#ffffff', |
| 17 | cardBackground: 'rgba(255, 255, 255, 0.65)', |
| 18 | cardBorder: '#C4C4C4', |
| 19 | cardFilter: 'rgba(0, 0, 0, 0)', |
| 20 | cardOverlay: '#00000080', |
pineafan | e0283a8 | 2022-02-13 10:05:56 +0000 | [diff] [blame] | 21 | hint: '#E4E4E4', |
| 22 | panelColor: "#F0F0F0", |
pineafan | 4627016 | 2022-02-13 12:06:17 +0000 | [diff] [blame] | 23 | fadeGradient: "rgba(240, 240, 240, 1)", |
pineafan | 7bd0ad6 | 2022-10-26 22:11:29 +0100 | [diff] [blame^] | 24 | offset: "2.5px", |
pineafan | df39fd4 | 2021-09-04 16:05:27 +0100 | [diff] [blame] | 25 | |
Skyler Turner | 16c08d3 | 2021-11-04 20:06:50 +0000 | [diff] [blame] | 26 | modes: { |
| 27 | dark: { |
| 28 | text: '#ffffff', |
| 29 | background: '#252525', |
| 30 | primary: '#6576CC', |
| 31 | cardText: '#424242', |
| 32 | cardBackground: 'rgba(0, 0, 0, 0.65)', |
| 33 | cardBorder: '#424242', |
pineafan | a841c76 | 2021-11-14 21:21:04 +0000 | [diff] [blame] | 34 | cardFilter: 'brightness(0.5)', |
Skyler Turner | 16c08d3 | 2021-11-04 20:06:50 +0000 | [diff] [blame] | 35 | cardOverlay: '#42424280', |
pineafan | e0283a8 | 2022-02-13 10:05:56 +0000 | [diff] [blame] | 36 | hint: '#242424', |
pineafan | 4627016 | 2022-02-13 12:06:17 +0000 | [diff] [blame] | 37 | panelColor: "rgba(255, 255, 255, 0.05)", |
| 38 | fadeGradient: "rgba(48, 48, 48, 1)", |
pineafan | 7bd0ad6 | 2022-10-26 22:11:29 +0100 | [diff] [blame^] | 39 | offset: "-20px" |
Skyler Turner | 16c08d3 | 2021-11-04 20:06:50 +0000 | [diff] [blame] | 40 | } |
| 41 | } |
| 42 | }, |
| 43 | }; |
| 44 | |
Samuel Shuert | 016ea02 | 2021-09-01 16:17:24 -0500 | [diff] [blame] | 45 | |
pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame] | 46 | function App({ Component, pageProps }) { |
pineafan | 7bd0ad6 | 2022-10-26 22:11:29 +0100 | [diff] [blame^] | 47 | const ref = React.forwardRef(function Ref(props, ref) { |
| 48 | return <NavBar {...props} ref={ref} /> |
| 49 | }); |
| 50 | |
| 51 | const navbar = React.useRef(ref); |
| 52 | |
pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame] | 53 | return <> |
Skyler Turner | 16c08d3 | 2021-11-04 20:06:50 +0000 | [diff] [blame] | 54 | <ThemeProvider theme={theme}> |
pineafan | 7bd0ad6 | 2022-10-26 22:11:29 +0100 | [diff] [blame^] | 55 | {navbar.current.render()} |
| 56 | <Component |
| 57 | {...pageProps} |
| 58 | navbar={navbar} |
| 59 | navRef={ref} |
| 60 | /> |
pineafan | ff3d452 | 2022-05-06 19:51:02 +0100 | [diff] [blame] | 61 | <div className={Styles.container} /> |
Skyler Turner | 16c08d3 | 2021-11-04 20:06:50 +0000 | [diff] [blame] | 62 | </ThemeProvider> |
pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame] | 63 | </> |
Samuel Shuert | 016ea02 | 2021-09-01 16:17:24 -0500 | [diff] [blame] | 64 | } |
| 65 | |
pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame] | 66 | export default App |