Monorepo for Tangled tangled.org
2

Configure Feed

Select the types of activity you want to include in your feed.

ogre/components/shared: scale card header font for long handles

Signed-off-by: eti <eti@eti.tf>

author
eti
committer
Tangled
date (Jun 12, 2026, 11:35 AM +0300) commit 170b18ff parent 49e34bda
+9 -1
+9 -1
ogre/src/components/shared/card-header.tsx
··· 13 13 ownerHandle, 14 14 repoName, 15 15 }: CardHeaderProps) { 16 + const text = `${ownerHandle} / ${repoName}`; 17 + const BASE_SIZE = TYPOGRAPHY.cardHeader.fontSize; 18 + const MAX_CHARS = 28; 19 + const fontSize = 20 + text.length > MAX_CHARS 21 + ? Math.max(28, Math.floor((BASE_SIZE * MAX_CHARS) / text.length)) 22 + : BASE_SIZE; 23 + 16 24 return ( 17 25 <Row style={{ gap: 16 }}> 18 26 <Avatar src={avatarUrl} size={64} /> 19 - <span style={{ ...TYPOGRAPHY.cardHeader, color: "#000000" }}> 27 + <span style={{ ...TYPOGRAPHY.cardHeader, fontSize, color: "#000000" }}> 20 28 {ownerHandle} / {repoName} 21 29 </span> 22 30 </Row>