diff --git a/src/app/design/page.tsx b/src/app/design/page.tsx index 930c4bd..629a366 100644 --- a/src/app/design/page.tsx +++ b/src/app/design/page.tsx @@ -33,7 +33,7 @@ import { Hud } from '@/components/atoms/hud' import { Icon } from '@/components/atoms/icon' import { Logo } from '@/components/atoms/logo' import { Marquee } from '@/components/atoms/marquee' -import { Reticle } from '@/components/atoms/reticle' +import { ReticleLogo } from '@/components/atoms/reticle-logo' import { Signature } from '@/components/atoms/signature' import { Ticker } from '@/components/atoms/ticker' import { Bio } from '@/components/molecules/bio' @@ -216,7 +216,7 @@ const DesignPage = () => {
{
- +
diff --git a/src/components/atoms/reticle-dial.tsx b/src/components/atoms/reticle-dial.tsx index e03f01b..7671da8 100644 --- a/src/components/atoms/reticle-dial.tsx +++ b/src/components/atoms/reticle-dial.tsx @@ -24,16 +24,13 @@ const styles = { } type ReticleDialReadout = { - /** Small caps label above the value, e.g. a designation or unit. */ label: string - /** The real value the label describes; never a placeholder. */ value: string } type ReticleDialRef = SVGSVGElement type ReticleDialProps = SVGAttributes & VariantProps & { - /** Boxed readouts on the side rails: index 0 left, index 1 right. Real data only. */ readouts?: ReticleDialReadout[] } diff --git a/src/components/atoms/reticle.tsx b/src/components/atoms/reticle-logo.tsx similarity index 96% rename from src/components/atoms/reticle.tsx rename to src/components/atoms/reticle-logo.tsx index ab2f7c9..71ceb72 100644 --- a/src/components/atoms/reticle.tsx +++ b/src/components/atoms/reticle-logo.tsx @@ -32,10 +32,10 @@ const styles = { ]) } -type ReticleRef = SVGSVGElement -type ReticleProps = SVGAttributes & VariantProps +type ReticleLogoRef = SVGSVGElement +type ReticleLogoProps = SVGAttributes & VariantProps -const Reticle = forwardRef((props, ref) => { +const ReticleLogo = forwardRef((props, ref) => { // props const { className, ...rest } = props @@ -148,7 +148,7 @@ const Reticle = forwardRef((props, ref) => { ) }) -Reticle.displayName = 'Reticle' +ReticleLogo.displayName = 'ReticleLogo' -export { Reticle } -export type { ReticleProps, ReticleRef } +export { ReticleLogo } +export type { ReticleLogoProps, ReticleLogoRef } diff --git a/src/components/molecules/tile.tsx b/src/components/molecules/tile.tsx index 2776cb4..5f652ba 100644 --- a/src/components/molecules/tile.tsx +++ b/src/components/molecules/tile.tsx @@ -7,21 +7,28 @@ import { cn, cva, type VariantProps } from '@/utils/theme' const styles = { root: cva(['relative size-full p-4', 'flex items-center justify-center']), - tile: cva(['bg-background rounded-sm', 'relative aspect-video h-8/10 w-auto overflow-hidden'], { - variants: { - loaded: { - true: 'animate-boot-in fill-mode-both opacity-100 motion-reduce:animate-none', - false: 'opacity-0' + tile: cva( + ['group bg-background rounded-sm', 'relative aspect-video h-8/10 w-auto overflow-hidden'], + { + variants: { + loaded: { + true: 'animate-boot-in fill-mode-both opacity-100 motion-reduce:animate-none', + false: 'opacity-0' + } + }, + defaultVariants: { + loaded: false } - }, - defaultVariants: { - loaded: false } - }), + ), img: cva([ 'absolute inset-0 size-full object-cover', - 'opacity-15 hover:scale-102 hover:opacity-30', - 'transition-all duration-1000' + 'opacity-15 transition-all duration-1000', + 'group-hover:scale-102 group-hover:opacity-100' + ]), + logo: cva([ + 'pointer-events-none absolute inset-0 m-auto h-auto w-1/6 object-contain', + 'transition-opacity duration-500 group-hover:opacity-0' ]) } @@ -29,11 +36,13 @@ type TileRef = HTMLDivElement type TileProps = HTMLAttributes & VariantProps & { asset: AssetEntry + /** Overlaid client logo, faded out on the same hover that fades the image in. */ + logo?: AssetEntry } const Tile = forwardRef((props, ref) => { // props - const { asset, className, ...rest } = props + const { asset, logo, className, ...rest } = props // hooks const [loaded, setLoaded] = useState(false) @@ -43,6 +52,7 @@ const Tile = forwardRef((props, ref) => {
setLoaded(true)} /> + {!!logo && }
) diff --git a/src/components/organisms/about-hero.tsx b/src/components/organisms/about-hero.tsx index 3a48a90..332cca5 100644 --- a/src/components/organisms/about-hero.tsx +++ b/src/components/organisms/about-hero.tsx @@ -1,8 +1,8 @@ import { forwardRef, type HTMLAttributes } from 'react' import { Hud, type HudProps } from '@/components/atoms/hud' import { Intro, type IntroProps } from '@/components/atoms/intro' -import { Reticle } from '@/components/atoms/reticle' import { ReticleDial, type ReticleDialReadout } from '@/components/atoms/reticle-dial' +import { ReticleLogo } from '@/components/atoms/reticle-logo' import { cn, cva, type VariantProps } from '@/utils/theme' const styles = { @@ -17,30 +17,22 @@ type AboutHeroProps = HTMLAttributes & hudProps: HudProps introProps: IntroProps /** Which reticle atom to render. Defaults to the tick-dial variant. */ - reticleVariant?: 'dial' | 'branded' + reticle?: 'dial' | 'logo' /** Boxed readouts on the reticle's side rails, dial variant only. Real data only. */ readouts?: ReticleDialReadout[] } const AboutHero = forwardRef((props, ref) => { // props - const { - hudProps, - introProps, - reticleVariant = 'dial', - readouts, - children, - className, - ...rest - } = props + const { hudProps, introProps, reticle = 'dial', readouts, children, className, ...rest } = props // jsx return (
- {reticleVariant === 'dial' ? ( + {reticle === 'dial' ? ( ) : ( - + )} diff --git a/src/components/organisms/design-hero.tsx b/src/components/organisms/design-hero.tsx index 38096d2..e18daff 100644 --- a/src/components/organisms/design-hero.tsx +++ b/src/components/organisms/design-hero.tsx @@ -1,8 +1,8 @@ import { forwardRef, type HTMLAttributes } from 'react' import { Hud, type HudProps } from '@/components/atoms/hud' import { Intro, type IntroProps } from '@/components/atoms/intro' -import { Reticle } from '@/components/atoms/reticle' import { ReticleDial, type ReticleDialReadout } from '@/components/atoms/reticle-dial' +import { ReticleLogo } from '@/components/atoms/reticle-logo' import { cn, cva, type VariantProps } from '@/utils/theme' const styles = { @@ -17,30 +17,22 @@ type DesignHeroProps = HTMLAttributes & hudProps: HudProps introProps: IntroProps /** Which reticle atom to render. Defaults to the tick-dial variant. */ - reticleVariant?: 'dial' | 'branded' + reticle?: 'dial' | 'logo' /** Boxed readouts on the reticle's side rails, dial variant only. Real data only. */ readouts?: ReticleDialReadout[] } const DesignHero = forwardRef((props, ref) => { // props - const { - hudProps, - introProps, - reticleVariant = 'dial', - readouts, - children, - className, - ...rest - } = props + const { hudProps, introProps, reticle = 'dial', readouts, children, className, ...rest } = props // jsx return (
- {reticleVariant === 'dial' ? ( + {reticle === 'dial' ? ( ) : ( - + )} diff --git a/src/components/organisms/error-hero.tsx b/src/components/organisms/error-hero.tsx index 79599b1..d73f8f7 100644 --- a/src/components/organisms/error-hero.tsx +++ b/src/components/organisms/error-hero.tsx @@ -1,8 +1,8 @@ import { forwardRef, type HTMLAttributes, type ReactNode } from 'react' import { Hud, type HudProps } from '@/components/atoms/hud' import { Intro, type IntroProps } from '@/components/atoms/intro' -import { Reticle } from '@/components/atoms/reticle' import { ReticleDial, type ReticleDialReadout } from '@/components/atoms/reticle-dial' +import { ReticleLogo } from '@/components/atoms/reticle-logo' import { cn, cva, type VariantProps } from '@/utils/theme' const styles = { @@ -17,7 +17,7 @@ type ErrorHeroProps = HTMLAttributes & hudProps: HudProps introProps: IntroProps /** Which reticle atom to render. Defaults to the tick-dial variant. */ - reticleVariant?: 'dial' | 'branded' + reticle?: 'dial' | 'logo' /** Boxed readouts on the reticle's side rails, dial variant only. Real data only. */ readouts?: ReticleDialReadout[] children?: ReactNode @@ -25,23 +25,15 @@ type ErrorHeroProps = HTMLAttributes & const ErrorHero = forwardRef((props, ref) => { // props - const { - hudProps, - introProps, - reticleVariant = 'dial', - readouts, - children, - className, - ...rest - } = props + const { hudProps, introProps, reticle = 'dial', readouts, children, className, ...rest } = props // jsx return (
- {reticleVariant === 'dial' ? ( + {reticle === 'dial' ? ( ) : ( - + )} diff --git a/src/components/organisms/experience-hero.tsx b/src/components/organisms/experience-hero.tsx index 6092693..addab7c 100644 --- a/src/components/organisms/experience-hero.tsx +++ b/src/components/organisms/experience-hero.tsx @@ -1,8 +1,8 @@ import { forwardRef, type HTMLAttributes } from 'react' import { Hud, type HudProps } from '@/components/atoms/hud' import { Intro, type IntroProps } from '@/components/atoms/intro' -import { Reticle } from '@/components/atoms/reticle' import { ReticleDial, type ReticleDialReadout } from '@/components/atoms/reticle-dial' +import { ReticleLogo } from '@/components/atoms/reticle-logo' import { cn, cva, type VariantProps } from '@/utils/theme' const styles = { @@ -17,30 +17,22 @@ type ExperienceHeroProps = HTMLAttributes & hudProps: HudProps introProps: IntroProps /** Which reticle atom to render. Defaults to the tick-dial variant. */ - reticleVariant?: 'dial' | 'branded' + reticle?: 'dial' | 'logo' /** Boxed readouts on the reticle's side rails, dial variant only. Real data only. */ readouts?: ReticleDialReadout[] } const ExperienceHero = forwardRef((props, ref) => { // props - const { - hudProps, - introProps, - reticleVariant = 'dial', - readouts, - children, - className, - ...rest - } = props + const { hudProps, introProps, reticle = 'dial', readouts, children, className, ...rest } = props // jsx return (
- {reticleVariant === 'dial' ? ( + {reticle === 'dial' ? ( ) : ( - + )} diff --git a/src/components/organisms/home-hero.tsx b/src/components/organisms/home-hero.tsx index dc14c4e..5d4398b 100644 --- a/src/components/organisms/home-hero.tsx +++ b/src/components/organisms/home-hero.tsx @@ -1,8 +1,8 @@ import { forwardRef, type HTMLAttributes } from 'react' import { Hud, type HudProps } from '@/components/atoms/hud' import { Intro, type IntroProps } from '@/components/atoms/intro' -import { Reticle } from '@/components/atoms/reticle' import { ReticleDial, type ReticleDialReadout } from '@/components/atoms/reticle-dial' +import { ReticleLogo } from '@/components/atoms/reticle-logo' import { cn, cva, type VariantProps } from '@/utils/theme' const styles = { @@ -17,30 +17,22 @@ type HomeHeroProps = HTMLAttributes & hudProps: HudProps introProps: IntroProps /** Which reticle atom to render. Defaults to the tick-dial variant. */ - reticleVariant?: 'dial' | 'branded' + reticle?: 'dial' | 'logo' /** Boxed readouts on the reticle's side rails, dial variant only. Real data only. */ readouts?: ReticleDialReadout[] } const HomeHero = forwardRef((props, ref) => { // props - const { - hudProps, - introProps, - reticleVariant = 'dial', - readouts, - children, - className, - ...rest - } = props + const { hudProps, introProps, reticle = 'dial', readouts, children, className, ...rest } = props // jsx return (
- {reticleVariant === 'dial' ? ( + {reticle === 'dial' ? ( ) : ( - + )} diff --git a/src/components/organisms/project-hero.tsx b/src/components/organisms/project-hero.tsx index c8a79e1..a7c6959 100644 --- a/src/components/organisms/project-hero.tsx +++ b/src/components/organisms/project-hero.tsx @@ -1,5 +1,4 @@ import { forwardRef, type HTMLAttributes } from 'react' -import { Asset } from '@/components/atoms/asset' import { Hud, type HudProps } from '@/components/atoms/hud' import { Dossier, type DossierProps } from '@/components/molecules/dossier' import { Tile } from '@/components/molecules/tile' @@ -10,8 +9,7 @@ const styles = { root: cva(['size-full', 'flex flex-col']), stage: cva(['relative grow', 'flex items-center justify-center', 'min-h-0']), hud: cva('absolute inset-0'), - tile: cva('aspect-video w-full'), - logo: cva('absolute inset-0 m-auto h-auto w-1/6 object-contain') + tile: cva('aspect-video w-full') } type ProjectHeroRef = HTMLDivElement @@ -32,8 +30,7 @@ const ProjectHero = forwardRef((props, ref) =>
- - {!!logo && } +