Skip to content

Commit a7d87b8

Browse files
committed
Add hash to route
1 parent d8370ee commit a7d87b8

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

docs/index.561da924.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.561da924.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.a1b1167a.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.a1b1167a.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scripts/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ const toggleCard = (id: string) => {
1717
if (card) {
1818
window.scrollTo({ behavior: 'smooth', left: 0, top: 0 })
1919
card.classList.toggle('card-open')
20+
document.location.hash = id
2021
if (navbar && navbar.classList.contains('open')) {
2122
toggleNavbar()
2223
}
2324
}
2425
}
2526

27+
const id = document.location.hash.replace('#', '');
28+
if (id) {
29+
toggleCard(id)
30+
}

src/styling/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ body {
258258
padding-top: 25px;
259259
}
260260

261-
ul {
261+
ul, ol {
262262
padding: 25px;
263263
}
264264
}

0 commit comments

Comments
 (0)