diff --git a/components/portfolio/CapabilityRows.tsx b/components/portfolio/CapabilityRows.tsx index 6d86b62..1b8b908 100644 --- a/components/portfolio/CapabilityRows.tsx +++ b/components/portfolio/CapabilityRows.tsx @@ -4,26 +4,18 @@ import { m, useReducedMotion } from "motion/react"; import { capabilities } from "@/lib/portfolio"; -function formatCapabilityIndex(index: string) { - return `/.${index}`; -} - export function CapabilityRows() { const shouldReduceMotion = useReducedMotion(); - const firstMarker = formatCapabilityIndex(capabilities[0]?.index ?? "01"); - const lastMarker = formatCapabilityIndex( - capabilities[capabilities.length - 1]?.index ?? "05", - ); return (
-
+
-

CAPABILITIES

+

CAPABILITIES /.04

-

- {firstMarker}—{lastMarker} -

@@ -53,8 +42,8 @@ export function CapabilityRows() {

{capability.text}

-

- {formatCapabilityIndex(capability.index)} +

+ {capability.index}

))} diff --git a/components/portfolio/Manifesto.tsx b/components/portfolio/Manifesto.tsx index d7541eb..a11a798 100644 --- a/components/portfolio/Manifesto.tsx +++ b/components/portfolio/Manifesto.tsx @@ -5,32 +5,47 @@ import { m, useReducedMotion } from "motion/react"; import { manifesto } from "@/lib/portfolio"; const SURVIVE_PHRASE = "survive contact"; -const PROOF_PHRASE = "proof"; + +function splitAccentPhrase(statement: string) { + const phraseIndex = statement.indexOf(SURVIVE_PHRASE); + + if (phraseIndex < 0) { + return null; + } + + return { + before: statement.slice(0, phraseIndex), + after: statement.slice(phraseIndex + SURVIVE_PHRASE.length), + }; +} export function Manifesto() { const shouldReduceMotion = useReducedMotion(); - const [beforeSurvive, afterSurvive = ""] = manifesto.split(SURVIVE_PHRASE); - const [betweenAccents, afterProof = ""] = afterSurvive.split(PROOF_PHRASE); + const accentSplit = splitAccentPhrase(manifesto); return ( -

OPERATING PRINCIPLE

+

PRINCIPLE /.03

- {beforeSurvive} - {SURVIVE_PHRASE} - {betweenAccents} - {PROOF_PHRASE} - {afterProof} + {accentSplit ? ( + <> + {accentSplit.before} + {SURVIVE_PHRASE} + {accentSplit.after} + + ) : ( + manifesto + )}

);