Skip to content

Commit 0fd3e0a

Browse files
authored
Add a filename and downlod button (#2131)
1 parent a7f1bfa commit 0fd3e0a

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

src/app/conf/2025/schedule/[id]/page.tsx

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { Button } from "@/app/conf/_design-system/button"
2323
import { SessionTags } from "../../components/session-tags"
2424
import { formatDescription } from "./format-description"
2525
import { formatBlockTime } from "../_components/format-block-time"
26+
import DownloadIcon from "@/app/conf/_design-system/pixelarticons/download.svg?svgr"
2627

2728
type SessionProps = { params: { id: string } }
2829

@@ -123,15 +124,35 @@ export default function SessionPage({ params }: SessionProps) {
123124
<h3 className="typography-h2 my-8 px-2 sm:px-3 lg:my-16">
124125
Session resources
125126
</h3>
126-
<section>
127-
{session.files?.map(({ path }) => (
128-
<iframe
129-
key={path}
130-
src={path}
131-
className="aspect-video size-full"
132-
/>
127+
<ul className="flex max-w-full flex-col gap-y-2">
128+
{session.files?.map(({ path, name }) => (
129+
<li key={path}>
130+
<iframe
131+
src={path}
132+
className="aspect-video size-full"
133+
/>
134+
<div className="flex items-stretch justify-between overflow-hidden">
135+
<a
136+
className="typography-link flex items-center truncate p-3 leading-none text-neu-700 max-xs:hidden sm:px-6"
137+
href={path}
138+
>
139+
<span className="inline-block truncate">
140+
{name}
141+
</span>
142+
</a>
143+
<Button
144+
href={path}
145+
variant="tertiary"
146+
className="shrink-0"
147+
download
148+
>
149+
Download
150+
<DownloadIcon className="size-6" />
151+
</Button>
152+
</div>
153+
</li>
133154
))}
134-
</section>
155+
</ul>
135156
</>
136157
)}
137158
</div>
Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)