File tree Expand file tree Collapse file tree 5 files changed +44
-30
lines changed
Expand file tree Collapse file tree 5 files changed +44
-30
lines changed Original file line number Diff line number Diff line change 1- @use ' ../../styles/mixins' as * ;
2- @use ' ../../styles/variables' as * ;
3-
41.contactCards {
5- background-color : $ white ;
2+ background-color : var ( -- white) ;
63}
Original file line number Diff line number Diff line change 1- import { useRouter } from 'next/router' ;
2- import { heroOptions } from '@/utils/hero-options' ;
3- import Hero from '@/components/layout/Hero' ;
4- import Meta from '@/components/layout/Meta' ;
5- import Footer from '@/components/layout/Footer' ;
6- import S from './styles' ;
7-
8- export default function Layout ( { children } ) {
9- const router = useRouter ( ) ;
10- const heroPathKeys = Object . keys ( heroOptions )
11- . sort ( ( a , b ) => a - b )
12- . filter ( k => router . pathname . startsWith ( k ) ) ;
13-
14- const heroKey = heroPathKeys [ heroPathKeys . length - 1 ] ;
15- return (
16- < >
17- < Meta />
18- < S . Main >
19- < Hero { ...heroOptions [ heroKey ] } />
20- { children }
21- < Footer />
22- </ S . Main >
23- </ >
24- ) ;
25- }
1+ import { useRouter } from 'next/router' ;
2+ import { heroOptions } from '@/utils/hero-options' ;
3+ import Hero from '@/components/layout/Hero' ;
4+ import Meta from '@/components/layout/Meta' ;
5+ import Footer from '@/components/layout/Footer' ;
6+ import S from './styles' ;
7+
8+ export default function Layout ( { children } ) {
9+ const router = useRouter ( ) ;
10+ const heroPathKeys = Object . keys ( heroOptions )
11+ . sort ( ( a , b ) => a - b )
12+ . filter ( k => router . pathname . startsWith ( k ) ) ;
13+
14+ const heroKey = heroPathKeys [ heroPathKeys . length - 1 ] ;
15+ return (
16+ < >
17+ < Meta />
18+ < S . Main >
19+ < Hero { ...heroOptions [ heroKey ] } />
20+ { children }
21+ < Footer />
22+ </ S . Main >
23+ </ >
24+ ) ;
25+ }
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import Layout from '@/components/layout/Layout';
22import { useState } from 'react' ;
33import { ThemeProvider } from 'styled-components' ;
44import { lightTheme , darkTheme , GlobalStyles } from '@/styles/themeConfig' ;
5+ import '@/styles/index.scss' ;
56
67function MyApp ( { Component, pageProps } ) {
7-
88 // Only uncomment when the darkTheme is set
99 // const [theme, setTheme] = useState('light');
1010 // const toggleTheme = () => {
Original file line number Diff line number Diff line change 1+ @use ' ./themes' ;
2+ @use ' ./mixins' ;
3+ @use ' ./variables' ;
Original file line number Diff line number Diff line change 1+ :root {
2+ --white : #ffffff ;
3+ --bg-color : #eaeaea ;
4+ }
5+
6+ [data-theme = ' dark' ] {
7+ --bg-color : #333 ;
8+ }
9+
10+ // Theming notes:
11+ /*
12+ Set document data-theme to dark to activate dark theme, for example
13+ document.documentElement.setAttribute('data-theme', 'dark');
14+ */
You can’t perform that action at this time.
0 commit comments