feat(branding): rebrand navigation from 'Soroban Generator' to 'Abaci One'
Changes: - Add new subtitle data file with 75 three-word rhyming options - Update AppNavBar to display "🧮 Abaci One" with random subtitle - Implement Radix UI tooltip showing subtitle description on hover - Use useMemo for performance (subtitle won't change on re-renders) - Clean, minimal design with italic subtitle and help cursor Implementation: - Created `/src/data/abaciOneSubtitles.ts` with subtitle data structure - Updated AppNavBar imports to include Radix Tooltip and subtitle util - Wrapped navigation in Tooltip.Provider with 200ms delay - Logo displays vertically with brand name and subtitle - Tooltip shows description like "blaze through bead races" on hover 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
'use client'
|
||||
|
||||
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'
|
||||
import * as Tooltip from '@radix-ui/react-tooltip'
|
||||
import Link from 'next/link'
|
||||
import { usePathname, useRouter } from 'next/navigation'
|
||||
import React, { useState } from 'react'
|
||||
import React, { useMemo, useState } from 'react'
|
||||
import { css } from '../../styled-system/css'
|
||||
import { container, hstack } from '../../styled-system/patterns'
|
||||
import { Z_INDEX } from '../constants/zIndex'
|
||||
import { useFullscreen } from '../contexts/FullscreenContext'
|
||||
import { getRandomSubtitle } from '../data/abaciOneSubtitles'
|
||||
import { AbacusDisplayDropdown } from './AbacusDisplayDropdown'
|
||||
|
||||
interface AppNavBarProps {
|
||||
@@ -514,6 +516,9 @@ export function AppNavBar({ variant = 'full', navSlot }: AppNavBarProps) {
|
||||
const isArcadePage = pathname?.startsWith('/arcade')
|
||||
const { isFullscreen, toggleFullscreen, exitFullscreen } = useFullscreen()
|
||||
|
||||
// Select a random subtitle once on mount (performance: won't change on re-renders)
|
||||
const subtitle = useMemo(() => getRandomSubtitle(), [])
|
||||
|
||||
// Auto-detect variant based on context
|
||||
const actualVariant = variant === 'full' && (isGamePage || isArcadePage) ? 'minimal' : variant
|
||||
|
||||
@@ -533,53 +538,104 @@ export function AppNavBar({ variant = 'full', navSlot }: AppNavBarProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<header
|
||||
className={css({
|
||||
bg: 'white',
|
||||
shadow: 'sm',
|
||||
borderBottom: '1px solid',
|
||||
borderColor: 'gray.200',
|
||||
position: 'sticky',
|
||||
top: 0,
|
||||
zIndex: 30,
|
||||
})}
|
||||
>
|
||||
<div className={container({ maxW: '7xl', px: '4', py: '3' })}>
|
||||
<div className={hstack({ justify: 'space-between', alignItems: 'center' })}>
|
||||
{/* Logo */}
|
||||
<Link
|
||||
href="/"
|
||||
className={css({
|
||||
fontSize: 'xl',
|
||||
fontWeight: 'bold',
|
||||
color: 'brand.800',
|
||||
textDecoration: 'none',
|
||||
_hover: { color: 'brand.900' },
|
||||
})}
|
||||
>
|
||||
🧮 Soroban Generator
|
||||
</Link>
|
||||
<Tooltip.Provider delayDuration={200}>
|
||||
<header
|
||||
className={css({
|
||||
bg: 'white',
|
||||
shadow: 'sm',
|
||||
borderBottom: '1px solid',
|
||||
borderColor: 'gray.200',
|
||||
position: 'sticky',
|
||||
top: 0,
|
||||
zIndex: 30,
|
||||
})}
|
||||
>
|
||||
<div className={container({ maxW: '7xl', px: '4', py: '3' })}>
|
||||
<div className={hstack({ justify: 'space-between', alignItems: 'center' })}>
|
||||
{/* Logo */}
|
||||
<Link
|
||||
href="/"
|
||||
className={css({
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: '0',
|
||||
textDecoration: 'none',
|
||||
_hover: { '& > .brand-name': { color: 'brand.900' } },
|
||||
})}
|
||||
>
|
||||
<span
|
||||
className={css({
|
||||
fontSize: 'xl',
|
||||
fontWeight: 'bold',
|
||||
color: 'brand.800',
|
||||
})}
|
||||
>
|
||||
🧮 Abaci One
|
||||
</span>
|
||||
<Tooltip.Root>
|
||||
<Tooltip.Trigger asChild>
|
||||
<span
|
||||
className={css({
|
||||
fontSize: 'xs',
|
||||
fontWeight: 'medium',
|
||||
color: 'brand.600',
|
||||
fontStyle: 'italic',
|
||||
cursor: 'help',
|
||||
_hover: { color: 'brand.700' },
|
||||
})}
|
||||
>
|
||||
{subtitle.text}
|
||||
</span>
|
||||
</Tooltip.Trigger>
|
||||
<Tooltip.Portal>
|
||||
<Tooltip.Content
|
||||
side="bottom"
|
||||
align="start"
|
||||
sideOffset={4}
|
||||
className={css({
|
||||
bg: 'gray.900',
|
||||
color: 'white',
|
||||
px: '3',
|
||||
py: '2',
|
||||
rounded: 'md',
|
||||
fontSize: 'sm',
|
||||
maxW: '250px',
|
||||
shadow: 'lg',
|
||||
zIndex: 50,
|
||||
})}
|
||||
>
|
||||
{subtitle.description}
|
||||
<Tooltip.Arrow
|
||||
className={css({
|
||||
fill: 'gray.900',
|
||||
})}
|
||||
/>
|
||||
</Tooltip.Content>
|
||||
</Tooltip.Portal>
|
||||
</Tooltip.Root>
|
||||
</Link>
|
||||
|
||||
<div className={hstack({ gap: '6', alignItems: 'center' })}>
|
||||
{/* Navigation Links */}
|
||||
<nav className={hstack({ gap: '4' })}>
|
||||
<NavLink href="/create" currentPath={pathname}>
|
||||
Create
|
||||
</NavLink>
|
||||
<NavLink href="/guide" currentPath={pathname}>
|
||||
Guide
|
||||
</NavLink>
|
||||
<NavLink href="/games" currentPath={pathname}>
|
||||
Games
|
||||
</NavLink>
|
||||
</nav>
|
||||
<div className={hstack({ gap: '6', alignItems: 'center' })}>
|
||||
{/* Navigation Links */}
|
||||
<nav className={hstack({ gap: '4' })}>
|
||||
<NavLink href="/create" currentPath={pathname}>
|
||||
Create
|
||||
</NavLink>
|
||||
<NavLink href="/guide" currentPath={pathname}>
|
||||
Guide
|
||||
</NavLink>
|
||||
<NavLink href="/games" currentPath={pathname}>
|
||||
Games
|
||||
</NavLink>
|
||||
</nav>
|
||||
|
||||
{/* Abacus Style Dropdown */}
|
||||
<AbacusDisplayDropdown isFullscreen={false} />
|
||||
{/* Abacus Style Dropdown */}
|
||||
<AbacusDisplayDropdown isFullscreen={false} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</header>
|
||||
</Tooltip.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
97
apps/web/src/data/abaciOneSubtitles.ts
Normal file
97
apps/web/src/data/abaciOneSubtitles.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* Abaci One subtitle options with descriptions
|
||||
* Three-word rhyming subtitles for the main app navigation
|
||||
*/
|
||||
|
||||
export interface Subtitle {
|
||||
text: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export const subtitles: Subtitle[] = [
|
||||
{ text: 'Speed Bead Lead', description: 'blaze through bead races' },
|
||||
{ text: 'Rod Mod Nod', description: 'tweak rod technique, approval earned' },
|
||||
{ text: 'Grid Kid Lid', description: 'lock in neat grid habits' },
|
||||
{ text: 'Count Mount Amount', description: 'stack up that number sense' },
|
||||
{ text: 'Stack Track Tack', description: 'line up beads, lock in sums' },
|
||||
{ text: 'Quick Flick Trick', description: 'rapid-fire bead tactics' },
|
||||
{ text: 'Flash Dash Math', description: 'fly through numeric challenges' },
|
||||
{ text: 'Slide Glide Pride', description: 'smooth soroban strokes' },
|
||||
{ text: 'Shift Sift Gift', description: 'sort beads, reveal talent' },
|
||||
{ text: 'Beat Seat Meet', description: 'compete head-to-head' },
|
||||
{ text: 'Brain Train Gain', description: 'mental math muscle building' },
|
||||
{ text: 'Flow Show Pro', description: 'demonstrate soroban mastery' },
|
||||
{ text: 'Fast Blast Past', description: 'surpass speed limits' },
|
||||
{ text: 'Snap Tap Map', description: 'chart your calculation path' },
|
||||
{ text: 'Row Grow Know', description: 'advance through structured drills' },
|
||||
{ text: 'Drill Skill Thrill', description: 'practice that excites' },
|
||||
{ text: 'Think Link Sync', description: 'connect mind and beads' },
|
||||
{ text: 'Boost Joust Roost', description: 'power up, compete, settle in' },
|
||||
{ text: 'Add Grad Rad', description: 'level up addition awesomely' },
|
||||
{ text: 'Sum Fun Run', description: 'enjoy the arithmetic sprint' },
|
||||
{ text: 'Track Stack Pack', description: 'organize solutions systematically' },
|
||||
{ text: 'Beat Neat Feat', description: 'clean victories, impressive wins' },
|
||||
{ text: 'Math Path Wrath', description: 'dominate numeric challenges' },
|
||||
{ text: 'Spark Mark Arc', description: 'ignite progress, track growth' },
|
||||
{ text: 'Race Pace Ace', description: 'speed up, master it' },
|
||||
{ text: 'Flex Hex Reflex', description: 'adapt calculations instantly' },
|
||||
{ text: 'Glide Pride Stride', description: 'smooth confident progress' },
|
||||
{ text: 'Flash Dash Smash', description: 'speed through, crush totals' },
|
||||
{ text: 'Stack Attack Jack', description: 'aggressive bead strategies' },
|
||||
{ text: 'Quick Pick Click', description: 'rapid bead selection' },
|
||||
{ text: 'Snap Map Tap', description: 'visualize and execute' },
|
||||
{ text: 'Mind Find Grind', description: 'discover mental endurance' },
|
||||
{ text: 'Flip Skip Rip', description: 'fast transitions, tear through' },
|
||||
{ text: 'Blend Trend Send', description: 'mix methods, share progress' },
|
||||
{ text: 'Power Tower Hour', description: 'build skills intensively' },
|
||||
{ text: 'Launch Staunch Haunch', description: 'start strong, stay firm' },
|
||||
{ text: 'Rush Crush Hush', description: 'speed quietly dominates' },
|
||||
{ text: 'Swipe Stripe Hype', description: 'sleek moves, excitement' },
|
||||
{ text: 'Train Gain Sustain', description: 'build lasting ability' },
|
||||
{ text: 'Frame Claim Flame', description: 'structure your fire' },
|
||||
{ text: 'Streak Peak Tweak', description: 'hot runs, optimize performance' },
|
||||
{ text: 'Edge Pledge Wedge', description: 'commit to precision' },
|
||||
{ text: 'Pace Grace Space', description: 'rhythm, elegance, room to grow' },
|
||||
{ text: 'Link Think Brink', description: 'connect at breakthrough edge' },
|
||||
{ text: 'Quest Test Best', description: 'challenge yourself to excel' },
|
||||
{ text: 'Drive Thrive Arrive', description: 'push hard, succeed, reach goals' },
|
||||
{ text: 'Smart Start Chart', description: 'begin wisely, track progress' },
|
||||
{ text: 'Boost Coast Toast', description: 'accelerate, cruise, celebrate' },
|
||||
{ text: 'Spark Dark Embark', description: 'ignite before dawn journeys' },
|
||||
{ text: 'Blaze Graze Amaze', description: 'burn through, touch lightly, wow' },
|
||||
{ text: 'Shift Drift Gift', description: 'adapt smoothly, reveal talent' },
|
||||
{ text: 'Zone Hone Own', description: 'focus, refine, claim mastery' },
|
||||
{ text: 'Vault Halt Exalt', description: 'leap high, pause, celebrate' },
|
||||
{ text: 'Peak Seek Streak', description: 'find heights, maintain momentum' },
|
||||
{ text: 'Glow Show Grow', description: 'shine, display, expand' },
|
||||
{ text: 'Scope Hope Rope', description: 'survey possibilities, climb up' },
|
||||
{ text: 'Core Score More', description: 'fundamentals yield better results' },
|
||||
{ text: 'Rank Bank Thank', description: 'earn status, save wins, appreciate' },
|
||||
{ text: 'Merge Surge Verge', description: 'combine forces, power up, edge closer' },
|
||||
{ text: 'Bold Gold Hold', description: 'brave attempts, prize rewards, maintain' },
|
||||
{ text: 'Rise Prize Wise', description: 'ascend, win, learn' },
|
||||
{ text: 'Move Groove Prove', description: 'act, find rhythm, demonstrate' },
|
||||
{ text: 'Trust Thrust Adjust', description: 'believe, push, refine' },
|
||||
{ text: 'Beam Dream Team', description: 'radiate, aspire, collaborate' },
|
||||
{ text: 'Spin Win Grin', description: 'rotate beads, succeed, smile' },
|
||||
{ text: 'String Ring Bring', description: 'connect, cycle, deliver' },
|
||||
{ text: 'Clear Gear Steer', description: 'focus, equip, direct' },
|
||||
{ text: 'Path Math Aftermath', description: 'route, calculate, results' },
|
||||
{ text: 'Play Slay Day', description: 'engage, dominate, own it' },
|
||||
{ text: 'Code Mode Road', description: 'pattern, style, journey' },
|
||||
{ text: 'Craft Draft Shaft', description: 'build, sketch, core structure' },
|
||||
{ text: 'Light Might Fight', description: 'illuminate, empower, compete' },
|
||||
{ text: 'Stream Dream Extreme', description: 'flow, envision, push limits' },
|
||||
{ text: 'Claim Frame Aim', description: 'assert, structure, target' },
|
||||
{ text: 'Chart Smart Start', description: 'map, intelligent, begin' },
|
||||
{ text: 'Bright Flight Height', description: 'brilliant, soar, elevation' },
|
||||
]
|
||||
|
||||
/**
|
||||
* Get a random subtitle from the list
|
||||
* Uses current timestamp as seed for variety across sessions
|
||||
*/
|
||||
export function getRandomSubtitle(): Subtitle {
|
||||
const index = Math.floor(Math.random() * subtitles.length)
|
||||
return subtitles[index]
|
||||
}
|
||||
Reference in New Issue
Block a user