Skip to content

Commit 79c8cef

Browse files
committed
feat(videos): add promo video to home and course intro pages
1 parent 28de5ec commit 79c8cef

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

docs/docs/01_course_intro/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ id: intro
44

55
# REST APIs with Flask and Python
66

7+
import VideoEmbed from "@site/src/components/VideoEmbed";
8+
9+
<VideoEmbed url="https://customer-zmitazl0ztnd2pvm.cloudflarestream.com/1c4db6119cf0c6e682a88a737af146eb/iframe?poster=https%3A%2F%2Fcustomer-zmitazl0ztnd2pvm.cloudflarestream.com%2F1c4db6119cf0c6e682a88a737af146eb%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600" />
10+
711
Hi, and welcome!
812

913
REST APIs with Flask and Python is a complete course that teaches you how to develop complete, professional REST APIs using **Flask**, **PostgreSQL**, and **Docker**.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from "react";
2+
import clsx from "clsx";
3+
import styles from "./styles.module.css";
4+
5+
export default function VideoEmbed({ url }) {
6+
return (
7+
<div style={{ position: "relative", paddingTop: "56.25%" }}>
8+
<iframe
9+
src={url}
10+
style={{
11+
border: "none",
12+
position: "absolute",
13+
top: "0",
14+
left: "0",
15+
height: "100%",
16+
width: "100%",
17+
}}
18+
allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"
19+
allowfullscreen="true"
20+
></iframe>
21+
</div>
22+
);
23+
}

docs/src/components/VideoEmbed/styles.module.css

Whitespace-only changes.

docs/src/pages/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Link from "@docusaurus/Link";
55
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
66
import styles from "./index.module.css";
77
import HomepageFeatures from "@site/src/components/HomepageFeatures";
8+
import VideoEmbed from "@site/src/components/VideoEmbed";
89

910
function HomepageHeader() {
1011
const { siteConfig } = useDocusaurusContext();
@@ -35,6 +36,15 @@ export default function Home() {
3536
>
3637
<HomepageHeader />
3738
<main>
39+
<div
40+
style={{
41+
border: "4px solid black",
42+
maxWidth: "800px",
43+
margin: "4rem auto 4rem auto",
44+
}}
45+
>
46+
<VideoEmbed url="https://customer-zmitazl0ztnd2pvm.cloudflarestream.com/1c4db6119cf0c6e682a88a737af146eb/iframe?poster=https%3A%2F%2Fcustomer-zmitazl0ztnd2pvm.cloudflarestream.com%2F1c4db6119cf0c6e682a88a737af146eb%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600" />
47+
</div>
3848
<HomepageFeatures />
3949
</main>
4050
</Layout>

0 commit comments

Comments
 (0)