Skip to content

Commit 88c07a6

Browse files
committed
Make logo clickable
1 parent af44a4a commit 88c07a6

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/sidebar/Sidebar.module.css

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,19 @@
5656
letter-spacing: 0.05em;
5757
}
5858

59-
.logo > span {
59+
.logoLink {
60+
margin: -0.25rem -0.5rem;
61+
padding: 0.25rem 0.5rem;
62+
border-radius: 1.5rem; /* for focus outline */
63+
color: inherit;
64+
text-decoration: none;
65+
}
66+
67+
.logoLink[aria-current] {
68+
pointer-events: none; /* remove interactivity when already on homepage to avoid confusion */
69+
}
70+
71+
.logo5 {
6072
color: var(--color-five);
6173
}
6274

src/sidebar/Sidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ function Sidebar() {
1616
<div className={styles.sidebar} data-collapsed={isCollapsed || undefined}>
1717
<div className={styles.sidebarInner}>
1818
<h1 className={styles.logo} data-reveal>
19-
myHDF<span>5</span>
19+
<NavLink className={styles.logoLink} to="/">
20+
myHDF<span className={styles.logo5}>5</span>
21+
</NavLink>
2022
</h1>
2123
<nav className={styles.nav} data-reveal>
2224
<NavLink

0 commit comments

Comments
 (0)