Skip to content

Commit 617205a

Browse files
committed
add semantic markup + anchor links to alumni page
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
1 parent 9153e77 commit 617205a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/components/AlumniTimeline.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ html[data-theme='dark'] .icon {
9595
display: inline-block;
9696
margin-bottom: 1.2em;
9797
padding: 0.25em 1em 0.2em 1em;
98+
scroll-margin-top: calc(var(--ifm-navbar-height) + 0.5rem);
99+
}
100+
101+
.date:hover {
102+
text-decoration: none;
98103
}
99104

100105
html[data-theme='dark'] .date {

src/components/AlumniTimeline.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ const AlumniTimeline = ({ alumni }: AlumniProps): ReactElement => (
1818
<div className={styles.iconWrap}>
1919
<span className={styles.icon} />
2020
</div>
21-
<div className={styles.body}>
22-
<p className={styles.date}>
21+
<section className={styles.body}>
22+
<a
23+
id={String(classOf)}
24+
href={`#${classOf}`}
25+
className={styles.date}>
2326
<Translate id="alumni.classOf" values={{ classOf }}>
2427
{'{classOf} 届'}
2528
</Translate>
26-
</p>
29+
</a>
2730
<MemberList members={members} />
28-
</div>
31+
</section>
2932
</li>
3033
)
3134
)}

0 commit comments

Comments
 (0)