Skip to content

Commit 3bd55c4

Browse files
committed
Initial webinar mockups
1 parent 39c096e commit 3bd55c4

File tree

13 files changed

+70
-10
lines changed

13 files changed

+70
-10
lines changed

src/components/Layout.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Prose from '@/components/Prose.astro'
1212
</head>
1313
<body>
1414
<main class="container mx-auto flex flex-col gap-2">
15-
<div class="flex flex-row gap-4">
15+
<div class="flex flex-row flex-wrap gap-4">
1616
<a
1717
class="font-bold text-primary hover:bg-gray-100 transition p-4"
1818
class:list={[Astro.url.pathname === `${import.meta.env.BASE_URL}/` && 'underline']}
@@ -43,6 +43,12 @@ import Prose from '@/components/Prose.astro'
4343
href={`${import.meta.env.BASE_URL}/publications/`}>
4444
Publications
4545
</a>
46+
<a
47+
class="font-bold text-primary hover:bg-gray-100 transition p-4"
48+
class:list={[Astro.url.pathname.startsWith(`${import.meta.env.BASE_URL}/webinars/`) && 'underline']}
49+
href={`${import.meta.env.BASE_URL}/webinars/`}>
50+
Webinars
51+
</a>
4652
</div>
4753
<Prose>
4854
<slot />

src/components/WebinarCard.astro

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
const { webinar } = Astro.props
3+
---
4+
5+
<div class="flex flex-col border-b">
6+
<h3>{new Date(webinar.frontmatter.start_date).toLocaleDateString('default', {month: 'short', year: 'numeric', day: '2-digit', weekday: 'long'})}</h3>
7+
{webinar.frontmatter.agenda.map(section =>
8+
<div>
9+
<h4>{section.label}</h4>
10+
{section.presenters && section.presenters.length > 0 && section.presenters.map(presenter =>
11+
<div>
12+
<h5>{presenter.presenter}</h5>
13+
<h5><em>{presenter.affiliation}</em></h5>
14+
</div>
15+
)}
16+
<div>
17+
{section.summary ?
18+
<>
19+
<strong>Summary</strong>
20+
<div class="overflow-ellipsis">{section.summary}</div>
21+
</>
22+
: <div>The summary and video for the webinar will be added shortly.</div>}
23+
{section.video_link && <a href={section.video_link} target="_blank" rel="noopener noreferrer">WATCH VIDEO ON YOUTUBE</a>}
24+
</div>
25+
</div>
26+
)}
27+
</div>

src/layouts/Webinar.astro

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
import '@/styles/base.css'
3+
import Layout from '@/components/Layout.astro'
4+
const { frontmatter } = Astro.props
5+
---
6+
<Layout>
7+
<slot />
8+
</Layout>

src/layouts/Webinars.astro

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
---
22
import '@/styles/base.css'
33
import Layout from '@/components/Layout.astro'
4-
const { frontmatter } = Astro.props
4+
import WebinarCard from '@/components/WebinarCard.astro'
5+
const webinars = Object.values(import.meta.glob('@/pages/webinars/*.md', { eager: true })).filter(webinar => webinar.frontmatter.layout === '@/layouts/Webinar.astro')
56
---
7+
68
<Layout>
79
<slot />
10+
<h2>Upcoming Webinars</h2>
11+
<div class="flex flex-col gap-2">
12+
{webinars.filter(webinar => (new Date(webinar.frontmatter.end_date)).getTime() >= Date.now()).map(webinar => <WebinarCard webinar={webinar} />)}
13+
</div>
14+
<h2>Past Webinars</h2>
15+
<div class="flex flex-col gap-2">
16+
{webinars.filter(webinar => (new Date(webinar.frontmatter.end_date)).getTime() < Date.now()).map(webinar => <WebinarCard webinar={webinar} />)}
17+
</div>
18+
819
</Layout>

src/pages/webinars/2024-04-26.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ agenda:
2121
summary: ''
2222
video_link: https://www.youtube.com/watch?v=T6voxUktE94
2323
end_date: '2024-04-26T14:00:00-04:00'
24-
layout: '@/layouts/Webinars.astro'
24+
layout: '@/layouts/Webinar.astro'
2525
start_date: '2024-04-26T13:00:00-04:00'
2626
---

src/pages/webinars/2024-05-31.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ agenda:
3232
https://maayanlab.cloud/archs4/'
3333
video_link: https://www.youtube.com/watch?v=mVNI0E-98sA
3434
end_date: '2024-05-31T14:00:00-04:00'
35-
layout: '@/layouts/Webinars.astro'
35+
layout: '@/layouts/Webinar.astro'
3636
start_date: '2024-05-31T13:00:00-04:00'
3737
---

src/pages/webinars/2024-06-28.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ agenda:
4040
Relevant resources that will be discussed: <br/> **Pharos**: https://pharos.nih.gov/'
4141
video_link: https://www.youtube.com/watch?v=q1-gDwq4FcM
4242
end_date: '2024-06-28T14:00:00-04:00'
43-
layout: '@/layouts/Webinars.astro'
43+
layout: '@/layouts/Webinar.astro'
4444
start_date: '2024-06-28T13:00:00-04:00'
4545
---

src/pages/webinars/2024-07-26.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ agenda:
1010
\ of HuBMAP and the concept of the Vascular Common Coordinate Framework (VCCF). "
1111
video_link: https://www.youtube.com/watch?v=pBsrMIYyRhw
1212
end_date: '2024-07-26T14:00:00-04:00'
13-
layout: '@/layouts/Webinars.astro'
13+
layout: '@/layouts/Webinar.astro'
1414
start_date: '2024-07-26T13:00:00-04:00'
1515
---

src/pages/webinars/2024-08-30.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ agenda:
2424
various DCCs. '
2525
video_link: https://www.youtube.com/watch?v=o9FhAhKt44U
2626
end_date: '2024-08-30T14:00:00-04:00'
27-
layout: '@/layouts/Webinars.astro'
27+
layout: '@/layouts/Webinar.astro'
2828
start_date: '2024-08-30T13:00:00-04:00'
2929
---

src/pages/webinars/2024-09-27.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ agenda:
1414
CFDE Link Data Hub (CFDE LDH; https://genboree.org/cfde-gene/ui/).
1515
video_link: https://www.youtube.com/watch?v=3fIkXudPzX0
1616
end_date: '2024-09-27T14:00:00-04:00'
17-
layout: '@/layouts/Webinars.astro'
17+
layout: '@/layouts/Webinar.astro'
1818
start_date: '2024-09-27T13:00:00-04:00'
1919
---

0 commit comments

Comments
 (0)