Skip to content

Commit e83b685

Browse files
committed
docs: add youtube videos to docs
1 parent 4f6dd28 commit e83b685

File tree

4 files changed

+59
-1
lines changed

4 files changed

+59
-1
lines changed

doc/_static/custom.css

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,37 @@ table.docutils td p {
2323
table.docutils td li {
2424
line-height: 18px;
2525

26-
}
26+
}
27+
28+
/* Elevation
29+
*
30+
* The box-shadows style is from Material Design's idea of elevation. These particular numbers are taken from here:
31+
*
32+
* https://github.com/material-components/material-components-web
33+
* https://material-components-web.appspot.com/elevation.html
34+
*
35+
* The div.youtube-video styling is done to get the YouTube video to size dynamically
36+
* to 100% of the content width.
37+
*/
38+
39+
.rst-content div.youtube-video {
40+
position: relative;
41+
width: 100%;
42+
height: 0px;
43+
/* This must be equal to the inverse of the aspect ratio of the video */
44+
/* The current value is: 56.25% = 315/560 */
45+
padding-bottom: 56.25%;
46+
border: none;
47+
/* MD Elevation 8 */
48+
box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2),
49+
0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);
50+
margin-bottom: 24px;
51+
}
52+
53+
.rst-content div.youtube-video iframe {
54+
position: absolute;
55+
left: 0px;
56+
top: 0px;
57+
width: 100%;
58+
height: 100%;
59+
}

doc/getting_started/overview.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,13 @@ handled automatically. Building on this declarative plotting idea, a surprising
3131
of simple to sophisticated plots and visualizations can be created using a relatively
3232
concise grammar.
3333

34+
For a more detailed overview of the Altair's visualization grammar, see the following
35+
36+
.. raw:: html
37+
38+
<div class="youtube-video">
39+
<iframe src="https://www.youtube-nocookie.com/embed/U7w1XumKK60?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
40+
</div>
41+
3442
.. _Vega: http://vega.github.io/vega
3543
.. _Vega-Lite: http://vega.github.io/vega-lite

doc/user_guide/encoding.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@ or more.
173173
Specifying the correct type for your data is important, as it affects the
174174
way Altair represents your encoding in the resulting plot.
175175

176+
The following video is a brief overview of Altair's data types.
177+
178+
.. raw:: html
179+
180+
<div class="youtube-video">
181+
<iframe src="https://www.youtube-nocookie.com/embed/LSEPyCqjoAg?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
182+
</div>
183+
184+
176185
.. _type-legend-scale:
177186

178187
Effect of Data Type on Color Scales

doc/user_guide/internals.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ That's it. In order to take those specifications and turn them into actual
1818
visualizations requires a frontend that is correctly set up, but strictly
1919
speaking that rendering is generally not controlled by the Altair package.
2020

21+
Below is a short explaination about Altair and the software stack it is built on for more context.
22+
23+
.. raw:: html
24+
25+
<div class="youtube-video">
26+
<iframe src="https://www.youtube-nocookie.com/embed/AAuPPorsmJc?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
27+
</div>
28+
2129
Altair chart to Vega-Lite Spec
2230
------------------------------
2331
Since Altair is fundamentally about constructing chart specifications, the central

0 commit comments

Comments
 (0)