Skip to content

Commit 7b5d901

Browse files
committed
frontend: support highlight footer link text
1 parent 348346c commit 7b5d901

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

frontend/app/src/app/(main)/page.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,22 @@ export default function Page () {
6565
</div>
6666
<div className="lg:h-[var(--ask-referral-height)] h-1/3 flex lg:justify-center justify-end items-center gap-4 lg:flex-row flex-col pb-4 lg:pb-0" style={{ display: 'auto' }}>
6767
{homepage_footer_links?.map(link => (
68-
<NextLink key={link.text} href={link.href} target="_blank" className="font-light text-sm hover:underline opacity-50 flex justify-center">
69-
{link.text}
68+
<NextLink key={link.text} href={link.href} target="_blank" className={cn('font-light text-sm hover:underline opacity-50 flex justify-center', isHighlightedLinkText('font-semibold text-yellow-500 dark:text-yellow-400 opacity-100 underline'))}>
69+
{trimHighlightedLinkText(link.text)}
7070
</NextLink>
7171
))}
7272
</div>
7373
</div>
7474
);
7575
}
76+
77+
function isHighlightedLinkText (text: string) {
78+
return text.startsWith('*') && text.endsWith('*')
79+
}
80+
81+
function trimHighlightedLinkText (text: string) {
82+
if (isHighlightedLinkText(text)) {
83+
return text.slice(1, -1)
84+
}
85+
return text
86+
}

0 commit comments

Comments
 (0)