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:
2026-10-02 00:18:23 +02:00
parent e59c3ba4ef
commit b3b78e7d6f
5 changed files with 158 additions and 23 deletions
+43
View File
@@ -0,0 +1,43 @@
import { chakra } from '@chakra-ui/react';
import { Link } from '@tanstack/react-router';
const ChakraLink = chakra(Link);
type NavLinkProps = React.ComponentProps<typeof ChakraLink>;
export default function NavLink({ children, ...props }: NavLinkProps) {
return (
<ChakraLink
textTransform="uppercase"
fontWeight="300"
fontSize="0.72rem"
letterSpacing="0.22em"
position="relative"
display="inline-block"
py="2"
mx="4"
css={{
'&::after': {
content: '""',
position: 'absolute',
left: 0,
bottom: 0,
width: '100%',
height: '1px',
bg: 'currentColor',
transform: 'scaleX(0)',
transformOrigin: 'right',
transition: 'transform 0.45s cubic-bezier(.22,.61,.36,1)',
},
'&:hover::after, &:focus-visible::after, &[aria-current="page"]::after':
{
transform: 'scaleX(1)',
transformOrigin: 'left',
},
}}
{...props}
>
{children}
</ChakraLink>
);
}