Adds Chakra theme tokens, hero background, and animated nav underline
Defines bg/fg semantic tokens and heading/body font tokens (Marcellus + Jost), sets the hero image as the page background, and gives NavigationBar's links a hover/active underline that mirrors the design's left-to-right wipe animation.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
import { createSystem, defaultConfig, defineConfig } from '@chakra-ui/react';
|
||||
import heroImage from './assets/hero-1.jpg';
|
||||
|
||||
const config = defineConfig({
|
||||
cssVarsRoot: ':where(:root, :host)',
|
||||
cssVarsPrefix: 'slp',
|
||||
preflight: true,
|
||||
globalCss: {
|
||||
body: {
|
||||
backgroundImage: `url(${heroImage})`,
|
||||
backgroundPosition: 'top center',
|
||||
backgroundSize: 'cover',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
height: '100vh',
|
||||
width: '100vw',
|
||||
},
|
||||
},
|
||||
theme: {
|
||||
// Use default breakpoints from Chakra UI when breakpoints are commented out. Uncomment the breakpoints below for custom breakpoints.
|
||||
// breakpoints: {
|
||||
// sm: '480px',
|
||||
// md: '768px',
|
||||
// lg: '1024px',
|
||||
// xl: '1280px',
|
||||
// '2xl': '1536px',
|
||||
// },
|
||||
tokens: {
|
||||
fonts: {
|
||||
heading: {
|
||||
value: "'Marcellus', 'Iowan Old Style', Georgia, 'Times New Roman', serif",
|
||||
},
|
||||
body: {
|
||||
value: "'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif",
|
||||
},
|
||||
},
|
||||
},
|
||||
semanticTokens: {
|
||||
colors: {
|
||||
bg: {
|
||||
DEFAULT: {
|
||||
value: {
|
||||
_light: '{colors.orange.100}',
|
||||
_dark: '{colors.gray.800}',
|
||||
},
|
||||
},
|
||||
},
|
||||
fg: {
|
||||
DEFAULT: {
|
||||
value: {
|
||||
_light: '{colors.gray.900}',
|
||||
_dark: '{colors.gray.50}',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default createSystem(defaultConfig, config);
|
||||
Reference in New Issue
Block a user