Skip to content

Commit

Permalink
Make links to author pages more discoverable (#4396)
Browse files Browse the repository at this point in the history
- Add underline on hover to person's name
- Link also from the person's image
  • Loading branch information
rakyi authored Jan 8, 2025
1 parent c8cf78e commit 9e6c9c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions site/gdocs/components/Person.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@

a {
color: inherit;

&:hover {
text-decoration: underline;
}
}
}

Expand Down
16 changes: 10 additions & 6 deletions site/gdocs/components/Person.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,20 @@ export default function Person({ person }: { person: EnrichedBlockPerson }) {
</div>
)

const image = person.image ? (
<Image
className="person-image"
filename={person.image}
containerType="person"
shouldLightbox={false}
/>
) : null

return (
<div className="person">
{person.image && (
<div className="person-image-container">
<Image
className="person-image"
filename={person.image}
containerType="person"
shouldLightbox={false}
/>
{url ? <a href={url}>{image}</a> : image}
{isSmallScreen && header}
</div>
)}
Expand Down

0 comments on commit 9e6c9c8

Please sign in to comment.