Skip to content

Commit 28fe050

Browse files
authored
Explicitly support video (#1660)
Adds documentation on how to use videos and a little style. Closes #995
1 parent 8d78d73 commit 28fe050

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

README.asciidoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,6 +1674,24 @@ Which looks like:
16741674

16751675
image::resources/readme/example.svg[An example svg]
16761676

1677+
[[videos]]
1678+
== Videos
1679+
1680+
You can add a vimeo hosted video with Asciidoctor's
1681+
https://asciidoctor.org/docs/user-manual/#video[video] tag:
1682+
1683+
[source,asciidoc]
1684+
----
1685+
video::366852847[vimeo,height=480]
1686+
----
1687+
1688+
NOTE: You *should* set height or else the video will be tiny. You *shouldn't*
1689+
set width because Vimeo will preserve the aspect ratio for you.
1690+
1691+
Which renders like this:
1692+
1693+
video::366852847[vimeo,height=480]
1694+
16771695
[[tables]]
16781696
== Tables
16791697

resources/web/style/video.pcss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#guide {
2+
/* This should line up with img.pcss. */
3+
.videoblock {
4+
img {
5+
max-width: 100%;
6+
}
7+
iframe {
8+
width: 100%
9+
}
10+
}
11+
}

resources/web/styles.pcss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
@import './style/this_page.pcss';
2727
@import './style/toc.pcss';
2828
@import './style/util.pcss';
29+
@import './style/video.pcss';
2930
@import './style/xpack.pcss';
3031

3132
/* test comment used to detect unminified source */

0 commit comments

Comments
 (0)