feat(levels): redesign kyu details with larger operators and prominent digits
- Increase operator icon size from xl to 4xl for better visibility - Center-align card layout with operator icon at top - Extract and prominently display digit count in 2xl bold text - Change hover effect from slide to scale for centered design - Increase base font size from sm to md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
cb20019c16
commit
6739d59f2b
|
|
@ -655,7 +655,7 @@ export default function LevelsPage() {
|
||||||
const sections = rawText ? parseKyuDetails(rawText) : []
|
const sections = rawText ? parseKyuDetails(rawText) : []
|
||||||
|
|
||||||
// Use consistent sizing across all levels
|
// Use consistent sizing across all levels
|
||||||
const sizing = { fontSize: 'sm', gap: '3', iconSize: 'xl' }
|
const sizing = { fontSize: 'md', gap: '3', iconSize: '4xl' }
|
||||||
|
|
||||||
return sections.length > 0 ? (
|
return sections.length > 0 ? (
|
||||||
<div
|
<div
|
||||||
|
|
@ -672,60 +672,63 @@ export default function LevelsPage() {
|
||||||
alignContent: 'center',
|
alignContent: 'center',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{sections.map((section, idx) => (
|
{sections.map((section, idx) => {
|
||||||
<div
|
// Extract the digit count (e.g., "4" from "4-digit total")
|
||||||
key={idx}
|
const digitMatch = section.value.match(/(\d+)-digit/)
|
||||||
className={css({
|
const digitCount = digitMatch ? digitMatch[1] : null
|
||||||
bg: 'rgba(0, 0, 0, 0.4)',
|
|
||||||
border: '1px solid',
|
return (
|
||||||
borderColor: 'gray.700',
|
|
||||||
rounded: 'md',
|
|
||||||
p: '2',
|
|
||||||
transition: 'all 0.2s',
|
|
||||||
_hover: {
|
|
||||||
borderColor: 'gray.500',
|
|
||||||
transform: 'translateX(4px)',
|
|
||||||
},
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
|
key={idx}
|
||||||
className={css({
|
className={css({
|
||||||
|
bg: 'rgba(0, 0, 0, 0.4)',
|
||||||
|
border: '1px solid',
|
||||||
|
borderColor: 'gray.700',
|
||||||
|
rounded: 'md',
|
||||||
|
p: '4',
|
||||||
|
transition: 'all 0.2s',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
gap: '2',
|
gap: '2',
|
||||||
mb: '1',
|
_hover: {
|
||||||
|
borderColor: 'gray.500',
|
||||||
|
transform: 'scale(1.05)',
|
||||||
|
},
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<span className={css({ fontSize: sizing.iconSize })}>
|
<span className={css({ fontSize: sizing.iconSize, lineHeight: '1' })}>
|
||||||
{section.icon}
|
{section.icon}
|
||||||
</span>
|
</span>
|
||||||
<span
|
{digitCount && (
|
||||||
|
<div
|
||||||
|
className={css({
|
||||||
|
fontSize: '2xl',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color:
|
||||||
|
currentLevel.color === 'green'
|
||||||
|
? 'green.300'
|
||||||
|
: currentLevel.color === 'blue'
|
||||||
|
? 'blue.300'
|
||||||
|
: 'violet.300',
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{digitCount} digits
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div
|
||||||
className={css({
|
className={css({
|
||||||
fontSize: sizing.fontSize,
|
fontSize: 'xs',
|
||||||
fontWeight: 'semibold',
|
color: 'gray.500',
|
||||||
color:
|
textAlign: 'center',
|
||||||
currentLevel.color === 'green'
|
|
||||||
? 'green.300'
|
|
||||||
: currentLevel.color === 'blue'
|
|
||||||
? 'blue.300'
|
|
||||||
: 'violet.300',
|
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{section.label}
|
{section.label}
|
||||||
</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
)
|
||||||
className={css({
|
})}
|
||||||
fontSize: sizing.fontSize,
|
|
||||||
color: 'gray.400',
|
|
||||||
lineHeight: '1.4',
|
|
||||||
pl: sizing.gap === '3' ? '6' : sizing.gap === '2' ? '5' : '4',
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{section.value}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
) : null
|
) : null
|
||||||
})()}
|
})()}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue