Skip to content

Commit b94044f

Browse files
authored
Merge pull request #89 from tecladocode/jose/cou-178-rest-add-videos-to-ebook-in-most-popular
2 parents 28de5ec + b1e66aa commit b94044f

File tree

12 files changed

+198
-12
lines changed

12 files changed

+198
-12
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<div align="center">
88

9-
[![Udemy rating 4.6/5](https://img.shields.io/badge/udemy-4.6%2F5-brightgreen)](https://go.tecla.do/rest-apis-sale) ![GitHub last commit](https://img.shields.io/github/last-commit/tecladocode/rest-apis-flask-python/develop) ![Python 3.10](https://img.shields.io/badge/python-3.10-yellow) [![Discord](https://img.shields.io/discord/614395983807250433)](https://discord.gg/78Nvd3p) [![Twitter Follow](https://img.shields.io/twitter/follow/jslvtr?style=social) ](https://twitter.com/jslvtr)
9+
[![Udemy rating 4.6/5](https://img.shields.io/badge/udemy-4.6%2F5-brightgreen)](https://go.tecla.do/rest-apis-ebook) ![GitHub last commit](https://img.shields.io/github/last-commit/tecladocode/rest-apis-flask-python/develop) ![Python 3.10](https://img.shields.io/badge/python-3.10-yellow) [![Discord](https://img.shields.io/discord/614395983807250433)](https://discord.gg/78Nvd3p) [![Twitter Follow](https://img.shields.io/twitter/follow/jslvtr?style=social) ](https://twitter.com/jslvtr)
1010

1111
</div>
1212

@@ -16,7 +16,7 @@
1616

1717
## Getting started
1818

19-
Enrol in the course by going to [this link](https://go.tecla.do/rest-apis-sale).
19+
Enrol in the course by going to [this link](https://go.tecla.do/rest-apis-ebook).
2020

2121
Then you can come back here to download the repository. This repository contains the code that we develop in each section of the course.
2222

docs/docs/01_course_intro/01_curriculum_overview/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ description: A brief description of the lecture goes here.
55

66
# Curriculum overview
77

8-
The curriculum overview goes here.
8+
import DocCategoryIndex from '@theme/DocCardList';
9+
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
10+
11+
<DocCategoryIndex items={useDocsSidebar().items} />

docs/docs/01_course_intro/index.md

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

55
# REST APIs with Flask and Python
66

7+
import VideoEmbed from "@site/src/components/VideoEmbed";
8+
9+
<div style={{ maxWidth: "720px", margin: "3rem auto", boxShadow: "0 5px 15px 0 rgba(0, 0, 0, 0.15)" }}>
10+
<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" />
11+
</div>
12+
713
Hi, and welcome!
814

915
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**.

docs/docs/03_first_rest_api/01_project_overview/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ description: A first look at the project we'll build in this section.
55

66
# Overview of your first REST API
77

8+
import VideoEmbed from "@site/src/components/VideoEmbed";
9+
10+
<div style={{ maxWidth: "720px", margin: "3rem auto", boxShadow: "0 5px 15px 0 rgba(0, 0, 0, 0.15)" }}>
11+
<VideoEmbed url="https://customer-zmitazl0ztnd2pvm.cloudflarestream.com/cda9c0473bdc485a36905144f13f4d3f/iframe?poster=https%3A%2F%2Fcustomer-zmitazl0ztnd2pvm.cloudflarestream.com%2Fcda9c0473bdc485a36905144f13f4d3f%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600" />
12+
</div>
13+
814
In this section we'll make a simple REST API that allows us to:
915

1016
- Create stores, each with a `name` and a list of stocked `items`.

docs/docs/03_first_rest_api/02_getting_set_up/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ description: Set up a Flask project and create the Flask app.
55

66
# Getting set up
77

8+
import VideoEmbed from "@site/src/components/VideoEmbed";
9+
10+
<div style={{ maxWidth: "720px", margin: "3rem auto", boxShadow: "0 5px 15px 0 rgba(0, 0, 0, 0.15)" }}>
11+
<VideoEmbed url="https://customer-zmitazl0ztnd2pvm.cloudflarestream.com/42b7de55034431b4c4c9420460f8df7d/iframe?poster=https%3A%2F%2Fcustomer-zmitazl0ztnd2pvm.cloudflarestream.com%2F42b7de55034431b4c4c9420460f8df7d%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600" />
12+
</div>
13+
814
Create a virtual environment and activate it.
915

1016
```

docs/docs/03_first_rest_api/03_first_rest_api_endpoint/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ description: Learn how to define a REST API endpoint using Flask.
55

66
# Your First REST API Endpoint
77

8+
import LockedVideoEmbed from "@site/src/components/LockedVideoEmbed";
9+
10+
<LockedVideoEmbed />
11+
812
Let's start off by defining where we'll store our data. In most REST APIs, you'd store your data in a database. For now, and for simplicity, we'll store it in a Python list.
913

1014
Later on we'll work on making this data dynamic. For now let's use some sample data.

docs/docusaurus.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,28 @@ const config = {
5858
label: "Tutorial",
5959
},
6060
{
61-
href: "https://go.tecla.do/rest-apis-sale",
61+
href: "https://go.tecla.do/rest-apis-ebook",
6262
label: "Get the course",
6363
position: "right",
6464
},
6565
],
6666
},
67+
announcementBar: {
68+
id: "support_us",
69+
content:
70+
'<span style="font-weight: 600">Unlock all video lessons and support us by <a target="_blank" style="background-image: linear-gradient(90deg, #FF7D82, #50e3c2); background-clip: text; color: transparent; " rel="noopener noreferrer" href="https://go.tecla.do/rest-apis-ebook">buying the course</a>!</span>',
71+
backgroundColor: "#1c2023",
72+
textColor: "#fff",
73+
isCloseable: false,
74+
},
6775
footer: {
6876
style: "dark",
6977
links: [
7078
{
7179
title: "Learn",
7280
items: [
7381
{
74-
href: "https://go.tecla.do/rest-apis-sale",
82+
href: "https://go.tecla.do/rest-apis-ebook",
7583
label: "Get the course",
7684
},
7785
{
419 KB
Loading
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
import React from "react";
2+
import Background from "./background.png";
3+
4+
export default function LockedVideoEmbed() {
5+
return (
6+
<div style={{ maxWidth: "720px", margin: "4rem auto 4rem auto" }}>
7+
<div style={{ position: "relative", paddingTop: "56.25%" }}>
8+
<div
9+
style={{
10+
border: "none",
11+
position: "absolute",
12+
top: "0",
13+
left: "0",
14+
height: "100%",
15+
width: "100%",
16+
textAlign: "center",
17+
display: "flex",
18+
flexDirection: "column",
19+
alignItems: "center",
20+
justifyContent: "center",
21+
}}
22+
>
23+
<img
24+
src={Background}
25+
style={{
26+
zIndex: 1,
27+
position: "absolute",
28+
top: "0",
29+
left: "0",
30+
height: "100%",
31+
width: "100%",
32+
objectFit: "cover",
33+
filter: "blur(5px) grayscale(80%) brightness(0.4)",
34+
}}
35+
/>
36+
<svg
37+
style={{ zIndex: 2 }}
38+
viewBox="0 0 100 100"
39+
height="50%"
40+
xmlns="http://www.w3.org/2000/svg"
41+
>
42+
<path
43+
d="M10.000 50.000 A40.000 40.000 0 1 0 90.000 50.000 A40.000 40.000 0 1 0 10.000 50.000 Z"
44+
fill="#D9EDFF"
45+
/>
46+
<path
47+
d="M71.767,43.426a1.323,1.323,0,0,1,0,1.476C69.6,48.127,60.072,60.827,44.47,60.827s-25.129-12.7-27.3-15.925a1.326,1.326,0,0,1,0-1.476C19.341,40.2,28.868,27.5,44.47,27.5S69.6,40.2,71.767,43.426Z"
48+
fill="#ffffff"
49+
/>
50+
<path
51+
d="M32.568 44.164 A11.902 11.902 0 1 0 56.372 44.164 A11.902 11.902 0 1 0 32.568 44.164 Z"
52+
fill="#B0D9FF"
53+
/>
54+
<path
55+
d="M71.767,43.426a1.323,1.323,0,0,1,0,1.476C69.6,48.127,60.072,60.827,44.47,60.827s-25.129-12.7-27.3-15.925a1.326,1.326,0,0,1,0-1.476C19.341,40.2,28.868,27.5,44.47,27.5S69.6,40.2,71.767,43.426Z"
56+
fill="none"
57+
stroke="#020064"
58+
strokeLinecap="round"
59+
strokeLinejoin="round"
60+
/>
61+
<path
62+
d="M32.568 44.164 A11.902 11.902 0 1 0 56.372 44.164 A11.902 11.902 0 1 0 32.568 44.164 Z"
63+
fill="none"
64+
stroke="#020064"
65+
strokeLinecap="round"
66+
strokeLinejoin="round"
67+
/>
68+
<path
69+
d="M39.841 44.164 A4.629 4.629 0 1 0 49.099 44.164 A4.629 4.629 0 1 0 39.841 44.164 Z"
70+
fill="#ffffff"
71+
/>
72+
<path
73+
d="M39.841 44.164 A4.629 4.629 0 1 0 49.099 44.164 A4.629 4.629 0 1 0 39.841 44.164 Z"
74+
fill="none"
75+
stroke="#020064"
76+
strokeLinecap="round"
77+
strokeLinejoin="round"
78+
/>
79+
<path
80+
d="M31.820 69.282 A12.65 1.725 0 1 0 57.120 69.282 A12.65 1.725 0 1 0 31.820 69.282 Z"
81+
fill="#B0D9FF"
82+
/>
83+
<path
84+
d="M56.917 54.275 L80.377 54.275 L80.377 72.623 L56.917 72.623 Z"
85+
fill="#B0D9FF"
86+
/>
87+
<path
88+
d="M59.263,54.275v-4.3A9.774,9.774,0,0,1,69.038,40.2h0a9.774,9.774,0,0,1,9.774,9.775v4.3H74.9v-4.3a5.865,5.865,0,0,0-5.865-5.865h0a5.865,5.865,0,0,0-5.865,5.865v4.3Z"
89+
fill="#ffffff"
90+
stroke="#020064"
91+
strokeLinecap="round"
92+
strokeLinejoin="round"
93+
/>
94+
<path
95+
d="M56.917 54.275 L80.377 54.275 L80.377 72.623 L56.917 72.623 Z"
96+
fill="none"
97+
stroke="#020064"
98+
strokeLinecap="round"
99+
strokeLinejoin="round"
100+
/>
101+
<path
102+
d="M71.775,62.066a2.737,2.737,0,1,0-3.91,2.463v1.447a1.173,1.173,0,0,0,1.173,1.173h0a1.173,1.173,0,0,0,1.173-1.173V64.529A2.729,2.729,0,0,0,71.775,62.066Z"
103+
fill="#ffffff"
104+
stroke="#020064"
105+
strokeLinecap="round"
106+
strokeLinejoin="round"
107+
/>
108+
</svg>
109+
<p
110+
style={{
111+
zIndex: 2,
112+
textAlign: "center",
113+
color: "#020064",
114+
color: "white",
115+
fontWeight: "bolder",
116+
}}
117+
>
118+
This video is locked. Please{" "}
119+
<a href="https://go.tecla.do/rest-apis-ebook">
120+
purchase the course
121+
</a>{" "}
122+
to view it.
123+
</p>
124+
</div>
125+
</div>
126+
</div>
127+
);
128+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react";
2+
3+
export default function VideoEmbed({ url }) {
4+
return (
5+
<div style={{ position: "relative", paddingTop: "56.25%" }}>
6+
<iframe
7+
src={url}
8+
style={{
9+
border: "none",
10+
position: "absolute",
11+
top: "0",
12+
left: "0",
13+
height: "100%",
14+
width: "100%",
15+
}}
16+
allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"
17+
allowfullscreen="true"
18+
></iframe>
19+
</div>
20+
);
21+
}

0 commit comments

Comments
 (0)