Skip to content

Commit e0cbc4f

Browse files
committed
fix(terracotta): hero wordmark was rendering 'Fezccdex' instead of 'Fezcodex'
- Pre-slice was -4 (dropping 4 chars), should be -5 to trim 'codex' - Anchor now correctly takes the 'c' at position title.length-5 - Post now keeps 'odex' (4 chars) instead of 'dex' (3)
1 parent 184f5e6 commit e0cbc4f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/pages/terracotta-views/TerracottaHomePage.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,11 @@ const useClock = () => {
6868
HERO WORDMARK — the plumb line dangles above the 'd' of "codex"
6969
========================================================================= */
7070
const HeroWordmark = ({ title = 'Fezcodex' }) => {
71-
// split: "Fezco" + "d" (anchor) + "ex" + terra period
71+
// split: "Fez" + "c" (anchor — plumb hangs from it) + "odex" + terra period
7272
const endsInCodex = title.toLowerCase().endsWith('codex');
73-
const pre = endsInCodex ? title.slice(0, title.length - 4) : title.slice(0, -1);
74-
// we want to hang above the 'd' in codex — if title doesn't contain it, we anchor on the last char.
75-
const anchor = endsInCodex ? 'c' : title.slice(-1);
76-
const post = endsInCodex ? title.slice(-3) : '';
73+
const pre = endsInCodex ? title.slice(0, title.length - 5) : title.slice(0, -1);
74+
const anchor = endsInCodex ? title.slice(title.length - 5, title.length - 4) : title.slice(-1);
75+
const post = endsInCodex ? title.slice(-4) : '';
7776

7877
return (
7978
<h1

0 commit comments

Comments
 (0)