Skip to content

Commit 137c612

Browse files
authored
Merge pull request #225 from gamoutatsumi/jump_session_header
2 parents b71de0a + 3eee4f6 commit 137c612

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

2025/src/components/Sessions/Session.astro

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ type Props = {
1111
image_url?: string;
1212
};
1313
14-
const { speaker_name, title, abstract, self_introduction, image_url } =
15-
Astro.props;
14+
const {
15+
session_id,
16+
speaker_name,
17+
title,
18+
abstract,
19+
self_introduction,
20+
image_url,
21+
} = Astro.props;
1622
---
1723

1824
<Card class="mb-5 p-8">
@@ -32,8 +38,13 @@ const { speaker_name, title, abstract, self_introduction, image_url } =
3238
</div>
3339
<div class="flex-1 text-center md:text-left">
3440
<div class="mb-3">
35-
<h3 class="mb-2 text-2xl font-bold text-gray-900 md:text-3xl">
36-
{speaker_name}
41+
<h3
42+
id={session_id}
43+
class="mb-2 text-2xl font-bold text-gray-900 md:text-3xl"
44+
>
45+
<a href={`#${session_id}`} class="hover:underline">
46+
{speaker_name}
47+
</a>
3748
</h3>
3849
</div>
3950
<div class="mb-4">

2025/src/styles/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ body {
88
font-family: Arial, Helvetica, sans-serif;
99
}
1010

11+
html {
12+
scroll-padding-top: calc(var(--spacing) * 16);
13+
}
14+
1115
@layer utilities {
1216
.text-balance {
1317
text-wrap: balance;

0 commit comments

Comments
 (0)