forked from fdnd-agency/avl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start detail page webinars fdnd-agency#31
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import fetchJson from "$lib/fetch-json" | ||
|
||
const baseURL = 'https://fdnd-agency.directus.app/items/' | ||
|
||
export async function load({params}) { | ||
const url = `${baseURL}/avl_webinars?fields=*.*.*&filter[slug][_eq]=${params.slug}` | ||
|
||
const webinar = await fetchJson(url) | ||
|
||
return { | ||
webinar: webinar.data[0] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script> | ||
export let data; | ||
</script> | ||
|
||
<video controls width="250"> | ||
<source src="https://fdnd-agency.directus.app/assets/{data.webinar.video.id}"> | ||
<track kind="captions"> | ||
</video> | ||
|
||
<h1>{data.webinar.title}</h1> | ||
|
||
<div class='description'> | ||
{@html data.webinar.description} | ||
</div> | ||
|
||
<style> | ||
.description :global(p) { | ||
padding-block: .2rem; | ||
} | ||
video { | ||
width: 90vw; | ||
margin: var(--margin-center); | ||
} | ||
@media screen and (min-width: 600px){ | ||
video { | ||
width: 50vw; | ||
} | ||
} | ||
</style> |