mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-09-07 21:20:51 +02:00
Compare commits
417 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
00b0ace386 | ||
|
542bcab569 | ||
|
f023678755 | ||
|
a4ba7a899b | ||
|
d54049445c | ||
|
633e754fee | ||
|
b6933b45ad | ||
|
768335f34b | ||
|
8f4927ac27 | ||
|
94d98ff7d8 | ||
|
b6cc6b4916 | ||
|
d213fac34c | ||
|
eaf3988311 | ||
|
003a848790 | ||
|
33ed32c4f0 | ||
|
8a54118f43 | ||
|
45f468ccc4 | ||
|
a59b1415f8 | ||
|
281b518620 | ||
|
9693816480 | ||
|
731f6819ac | ||
|
d969ec5f25 | ||
|
ac50753521 | ||
|
76a8193fc2 | ||
|
76187bc666 | ||
|
dbf575f8db | ||
|
7a169732de | ||
|
6f9b10b269 | ||
|
201e8316a2 | ||
|
bb8b4d8883 | ||
|
94de806f06 | ||
|
1515ddcf87 | ||
|
c189a21efd | ||
|
1cf5ffe029 | ||
|
6ab72eae51 | ||
|
f9affb550a | ||
|
6979383e4b | ||
|
02a42d1c9e | ||
|
a458676614 | ||
|
474731d829 | ||
|
52e57d3677 | ||
|
073d0e3358 | ||
|
07c20ef9d9 | ||
|
d5662a203e | ||
|
a6f1511d1a | ||
|
cf027f21c6 | ||
|
585aafed95 | ||
|
0935462706 | ||
|
1bacb27072 | ||
|
abac58cfc5 | ||
|
bd3758a4df | ||
|
5fb743e65e | ||
|
c92d08acdd | ||
|
ff2a927de8 | ||
|
bba760e549 | ||
|
51e8da5d9a | ||
|
f6f7f28ad9 | ||
|
bdda443335 | ||
|
f5759c3d52 | ||
|
969e7b3ef1 | ||
|
c62f4c7cfb | ||
|
99c3498253 | ||
|
25e521a16c | ||
|
a1dd1028a1 | ||
|
9108519dc1 | ||
|
a2e9e525d5 | ||
|
23c12d7332 | ||
|
9ac654d584 | ||
|
bd1e82d19a | ||
|
6ac01281d2 | ||
|
1766e37a63 | ||
|
078ba62050 | ||
|
39ed39f3e2 | ||
|
1f5fb971d4 | ||
|
a16b71a981 | ||
|
32197bd77d | ||
|
33bed47dac | ||
|
9aa514bc70 | ||
|
3ff070536e | ||
|
e9ba289e80 | ||
|
7eb2cec6b6 | ||
|
c636b88b2d | ||
|
3643112b35 | ||
|
4c557a5959 | ||
|
15dec96e73 | ||
|
da4ec074f1 | ||
|
485870946f | ||
|
25c504c22f | ||
|
3da09f1fef | ||
|
eb5d79370b | ||
|
2734aa3da0 | ||
|
e6fa04d485 | ||
|
94cbfcbdf6 | ||
|
29ea072ddf | ||
|
df25fbebba | ||
|
d6f0f41f77 | ||
|
6faab091bb | ||
|
922d791fd9 | ||
|
93b1abc736 | ||
|
b8de5e02d2 | ||
|
ae556d0844 | ||
|
b5fe0f8126 | ||
|
01874c6e70 | ||
|
b4c6c92033 | ||
|
c7db11d9cf | ||
|
b180d94e02 | ||
|
6410ed15aa | ||
|
5301a9ea03 | ||
|
cfc2f9cf9c | ||
|
553a174cc7 | ||
|
7b62a0f356 | ||
|
fbbae1dc55 | ||
|
7b66abd49c | ||
|
00e30a11e2 | ||
|
da53b3a637 | ||
|
8690858b6f | ||
|
5adc2032c0 | ||
|
69ee643846 | ||
|
cef864a7be | ||
|
b6e136776a | ||
|
d0771922c9 | ||
|
fc30774ef2 | ||
|
dd6f8b402c | ||
|
c40e9819a2 | ||
|
d780352b7f | ||
|
c2e048bc16 | ||
|
46f8f86fa1 | ||
|
4862de26eb | ||
|
213023760a | ||
|
3b4fabc8a7 | ||
|
4a8899e520 | ||
|
5ae2d3eb1e | ||
|
205ef8fdcc | ||
|
d549204ef1 | ||
|
a36f7cbf99 | ||
|
bb4eeb6c3c | ||
|
1efb8260af | ||
|
d927cdf579 | ||
|
27b70ed0ba | ||
|
9e3a52f14a | ||
|
2d57981261 | ||
|
7867b77833 | ||
|
ce53e63b5b | ||
|
d0337246f2 | ||
|
2a9edd23e6 | ||
|
812b802c1c | ||
|
9c1615fff1 | ||
|
43d1c71107 | ||
|
aa8be6829c | ||
|
90473eeb05 | ||
|
6a2cb42e6b | ||
|
2219107c69 | ||
|
23c2d2795c | ||
|
481208f43f | ||
|
2fa3ab6a6b | ||
|
51b1658a60 | ||
|
4c3f778e6e | ||
|
fef15ea9d1 | ||
|
baac3413ed | ||
|
ddd9f818f3 | ||
|
41858b91d5 | ||
|
5002304fb1 | ||
|
65584ff3a9 | ||
|
cf4af0fbcd | ||
|
a86dab0363 | ||
|
126365627b | ||
|
abee356e42 | ||
|
c36caef5e7 | ||
|
10e44aabfc | ||
|
9712cc9ad6 | ||
|
65938f388b | ||
|
b645828707 | ||
|
6ef565c9fb | ||
|
7eb74ac335 | ||
|
dedad930e3 | ||
|
665dfb9cd6 | ||
|
db9c346b41 | ||
|
9f1856d55b | ||
|
6fe0cbc0dd | ||
|
c2270cc0c5 | ||
|
0b3e7839eb | ||
|
fd6245bb28 | ||
|
87d6af2cb4 | ||
|
82076c5a0b | ||
|
8ac3383bee | ||
|
f042a8c394 | ||
|
b6ce0a9724 | ||
|
1c07fccc35 | ||
|
bc2477bf10 | ||
|
2b61dde83b | ||
|
8e5bdcc2bb | ||
|
42e796afb2 | ||
|
6abc6e0058 | ||
|
4ac153c46f | ||
|
8a35a1e1ed | ||
|
7d66999c7f | ||
|
387455b755 | ||
|
a4dc1c6440 | ||
|
62cd74a890 | ||
|
7b707696b4 | ||
|
5890f602b3 | ||
|
e7a365255f | ||
|
f32cd8586d | ||
|
fb089e7083 | ||
|
196d2a3971 | ||
|
01ceba3f73 | ||
|
29b0e86089 | ||
|
d5cf3fa13c | ||
|
8582c9aac8 | ||
|
90fc0bc466 | ||
|
c35cce54a5 | ||
|
c9ab489ba2 | ||
|
f089e1b228 | ||
|
436b41a8fc | ||
|
7b2769901e | ||
|
ed581add7f | ||
|
7dbf519104 | ||
|
4b1866b040 | ||
|
b0ebb7deed | ||
|
b003a54f91 | ||
|
f52460a6fd | ||
|
249f013959 | ||
|
2c5396b7d3 | ||
|
72b05a3245 | ||
|
b6aa0cac23 | ||
|
f6f7f58537 | ||
|
b9bb353a11 | ||
|
fd95c8c266 | ||
|
be87adcdf8 | ||
|
078a7520cd | ||
|
3680f1ad10 | ||
|
a86146180f | ||
|
a9e95e7e6c | ||
|
4bea8e17e8 | ||
|
a82c4333ed | ||
|
27553e2fcb | ||
|
4672801229 | ||
|
30b670cf42 | ||
|
3c5c50f3fe | ||
|
ee63b2ac60 | ||
|
667c83f1b7 | ||
|
0bbcc6b594 | ||
|
042fbde61b | ||
|
4ba0d73345 | ||
|
de41f6cf50 | ||
|
5771ae39f0 | ||
|
f1133f0e10 | ||
|
2a57223939 | ||
|
531d1e8791 | ||
|
f713d9d67d | ||
|
97c1a0ecc1 | ||
|
ceb1738a0f | ||
|
397feab8b4 | ||
|
64b2a27455 | ||
|
93cacaa40c | ||
|
1257ee7e27 | ||
|
4cb0d52c73 | ||
|
ba0e432542 | ||
|
a2e69a4b42 | ||
|
3bbf969686 | ||
|
49251078f3 | ||
|
8bf1cc601a | ||
|
6dbc593280 | ||
|
9dbccd6978 | ||
|
443b4475bc | ||
|
ea57e697a1 | ||
|
8ff5fe4986 | ||
|
f76b4fda93 | ||
|
511397c177 | ||
|
389c3f52b5 | ||
|
0282413b69 | ||
|
5848a432d9 | ||
|
250580fc4c | ||
|
6a2c5b4de8 | ||
|
8468d82433 | ||
|
1427f7a1ae | ||
|
325162692e | ||
|
5d273cfb29 | ||
|
d5f4edeeef | ||
|
b2d532ea28 | ||
|
7cd2c9138d | ||
|
18e7dd2173 | ||
|
fb97d99bff | ||
|
27aba10756 | ||
|
5eba331935 | ||
|
496db06441 | ||
|
7991693bde | ||
|
410f7767b9 | ||
|
57a4c45cf6 | ||
|
80bc1971e0 | ||
|
4dabd439d2 | ||
|
e704b3ffc8 | ||
|
de746bb642 | ||
|
4232f41abd | ||
|
f9d0766637 | ||
|
f0fa6fb226 | ||
|
e382d5cfab | ||
|
e3205a55be | ||
|
6816a0205e | ||
|
40e5544776 | ||
|
fd7894fa13 | ||
|
d68423f310 | ||
|
260f287926 | ||
|
0c946ae18b | ||
|
7a0b4a56f9 | ||
|
edc9c0a8fd | ||
|
09471a0508 | ||
|
aee62ff0af | ||
|
137e383950 | ||
|
773569b4a2 | ||
|
1f1f86ec73 | ||
|
c966c118fa | ||
|
6028844452 | ||
|
8579fc773d | ||
|
a0a9aa7821 | ||
|
a0c013606e | ||
|
65bdccd580 | ||
|
8a63686017 | ||
|
a03e803628 | ||
|
4022cbfe84 | ||
|
fa8a7334ce | ||
|
28d6a7775b | ||
|
afce29d79a | ||
|
9d0a3d7d5e | ||
|
41e86a2a22 | ||
|
1c8edfc8e4 | ||
|
463770cc53 | ||
|
3d1d7683b2 | ||
|
376d140b2a | ||
|
3beda63a7d | ||
|
1002d39e7c | ||
|
44a5673e6f | ||
|
8041759b8b | ||
|
4a4719b587 | ||
|
665d3a151d | ||
|
56504b50a9 | ||
|
f9a4a27087 | ||
|
c0109d948f | ||
|
04dcc48fa9 | ||
|
08e0f5e47b | ||
|
a2cf23b30c | ||
|
bfd431a0c4 | ||
|
8725593805 | ||
|
b04489b129 | ||
|
76eea30083 | ||
|
af6754bfb7 | ||
|
a781b6a22b | ||
|
7d0d3c24ca | ||
|
af7c33b902 | ||
|
dc17129082 | ||
|
1233092223 | ||
|
9342d19b5a | ||
|
6ae4ad69d2 | ||
|
5e279efdf3 | ||
|
2961f00946 | ||
|
43eada7990 | ||
|
9139bc32de | ||
|
b279a47a76 | ||
|
9ab14374e5 | ||
|
0388c96e60 | ||
|
53c56510ed | ||
|
b64c35ed0b | ||
|
fab28362ce | ||
|
ce467b53bc | ||
|
9c3a65744c | ||
|
e3a3d3aa0a | ||
|
64bcfc4f69 | ||
|
522db9513c | ||
|
955075bfc4 | ||
|
b1a7b0799f | ||
|
9a7d491ede | ||
|
7ae18c6b1e | ||
|
052a3f0c71 | ||
|
b7b3fe3ed4 | ||
|
453a888797 | ||
|
6dde00fb2e | ||
|
fb1b8a2790 | ||
|
a5e175d59f | ||
|
d770f32bb9 | ||
|
c966672aa4 | ||
|
b784bd56d1 | ||
|
13733edaa8 | ||
|
67507ccb9d | ||
|
9e013ccbb2 | ||
|
617c17be3c | ||
|
58dc6b7c36 | ||
|
f8b5813e59 | ||
|
16c03a5b03 | ||
|
92049d8244 | ||
|
2a0a6cbabc | ||
|
54a2137c0d | ||
|
2cc5ae946b | ||
|
44a355b6e9 | ||
|
10545d41cc | ||
|
2155415767 | ||
|
e45a425575 | ||
|
4fb8e78eb4 | ||
|
a9fcaa6f9e | ||
|
8a09557699 | ||
|
69c72b9e08 | ||
|
ce4537f883 | ||
|
1319016957 | ||
|
963e5c8678 | ||
|
0d1be9920f | ||
|
ada8003183 | ||
|
00570ea5ce | ||
|
d948c2cd6b | ||
|
b294323854 | ||
|
b86b667d25 | ||
|
e16508477a | ||
|
f8bc679182 | ||
|
40a46e1c0c | ||
|
e48e1e19b9 | ||
|
8bf9986fa2 | ||
|
7297474b2e | ||
|
f070ba47ec | ||
|
ee98f13dd9 |
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: [hakimel]
|
24
.github/workflows/js.yml
vendored
Normal file
24
.github/workflows/js.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: tests
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8.x, 10.x, 12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm install
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
||||
env:
|
||||
CI: true
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,4 +10,4 @@ tmp/**
|
||||
node_modules/
|
||||
.sass-cache
|
||||
css/reveal.min.css
|
||||
js/reveal.min.js
|
||||
js/reveal.min.js
|
||||
|
@@ -1,5 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 4.1.1
|
||||
before_script:
|
||||
- npm install -g grunt-cli
|
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 2017 Hakim El Hattab, http://hakim.se, and reveal.js contributors
|
||||
Copyright (C) 2020 Hakim El Hattab, http://hakim.se, and reveal.js contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@@ -1,19 +1,16 @@
|
||||
{
|
||||
"name": "reveal.js",
|
||||
"version": "3.5.0",
|
||||
"version": "3.9.2",
|
||||
"main": [
|
||||
"js/reveal.js",
|
||||
"css/reveal.css"
|
||||
],
|
||||
"homepage": "http://lab.hakim.se/reveal-js/",
|
||||
"homepage": "http://revealjs.com",
|
||||
"license": "MIT",
|
||||
"description": "The HTML Presentation Framework",
|
||||
"authors": [
|
||||
"Hakim El Hattab <hakim.elhattab@gmail.com>"
|
||||
],
|
||||
"dependencies": {
|
||||
"headjs": "~1.0.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/hakimel/reveal.js.git"
|
||||
|
@@ -63,6 +63,7 @@ ul, ol, div, p {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
zoom: 1 !important;
|
||||
pointer-events: initial;
|
||||
|
||||
left: auto;
|
||||
top: auto;
|
||||
@@ -72,15 +73,8 @@ ul, ol, div, p {
|
||||
overflow: visible;
|
||||
display: block;
|
||||
|
||||
-webkit-perspective: none;
|
||||
-moz-perspective: none;
|
||||
-ms-perspective: none;
|
||||
perspective: none;
|
||||
|
||||
-webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */
|
||||
-moz-perspective-origin: 50% 50%;
|
||||
-ms-perspective-origin: 50% 50%;
|
||||
perspective-origin: 50% 50%;
|
||||
perspective: none;
|
||||
perspective-origin: 50% 50%;
|
||||
}
|
||||
|
||||
.reveal .slides .pdf-page {
|
||||
@@ -103,15 +97,8 @@ ul, ol, div, p {
|
||||
|
||||
opacity: 1 !important;
|
||||
|
||||
-webkit-transform-style: flat !important;
|
||||
-moz-transform-style: flat !important;
|
||||
-ms-transform-style: flat !important;
|
||||
transform-style: flat !important;
|
||||
|
||||
-webkit-transform: none !important;
|
||||
-moz-transform: none !important;
|
||||
-ms-transform: none !important;
|
||||
transform: none !important;
|
||||
transform-style: flat !important;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
.reveal section.stack {
|
||||
@@ -144,9 +131,14 @@ ul, ol, div, p {
|
||||
}
|
||||
|
||||
/* Display slide speaker notes when 'showNotes' is enabled */
|
||||
.reveal.show-notes {
|
||||
max-width: none;
|
||||
max-height: none;
|
||||
}
|
||||
.reveal .speaker-notes-pdf {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: none;
|
||||
top: auto;
|
||||
right: auto;
|
||||
@@ -162,6 +154,7 @@ ul, ol, div, p {
|
||||
background-color: transparent;
|
||||
padding: 20px;
|
||||
page-break-after: always;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* Display slide numbers when 'slideNumber' is enabled */
|
||||
|
30
css/reset.css
Normal file
30
css/reset.css
Normal file
@@ -0,0 +1,30 @@
|
||||
/* http://meyerweb.com/eric/tools/css/reset/
|
||||
v4.0 | 20180602
|
||||
License: none (public domain)
|
||||
*/
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
main, menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, main, menu, nav, section {
|
||||
display: block;
|
||||
}
|
651
css/reveal.css
651
css/reveal.css
File diff suppressed because it is too large
Load Diff
626
css/reveal.scss
626
css/reveal.scss
@@ -1,57 +1,30 @@
|
||||
/*!
|
||||
* reveal.js
|
||||
* http://lab.hakim.se/reveal-js
|
||||
* http://revealjs.com
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2017 Hakim El Hattab, http://hakim.se
|
||||
* Copyright (C) 2020 Hakim El Hattab, http://hakim.se
|
||||
*/
|
||||
|
||||
|
||||
/*********************************************
|
||||
* RESET STYLES
|
||||
*********************************************/
|
||||
|
||||
html, body, .reveal div, .reveal span, .reveal applet, .reveal object, .reveal iframe,
|
||||
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6, .reveal p, .reveal blockquote, .reveal pre,
|
||||
.reveal a, .reveal abbr, .reveal acronym, .reveal address, .reveal big, .reveal cite, .reveal code,
|
||||
.reveal del, .reveal dfn, .reveal em, .reveal img, .reveal ins, .reveal kbd, .reveal q, .reveal s, .reveal samp,
|
||||
.reveal small, .reveal strike, .reveal strong, .reveal sub, .reveal sup, .reveal tt, .reveal var,
|
||||
.reveal b, .reveal u, .reveal center,
|
||||
.reveal dl, .reveal dt, .reveal dd, .reveal ol, .reveal ul, .reveal li,
|
||||
.reveal fieldset, .reveal form, .reveal label, .reveal legend,
|
||||
.reveal table, .reveal caption, .reveal tbody, .reveal tfoot, .reveal thead, .reveal tr, .reveal th, .reveal td,
|
||||
.reveal article, .reveal aside, .reveal canvas, .reveal details, .reveal embed,
|
||||
.reveal figure, .reveal figcaption, .reveal footer, .reveal header, .reveal hgroup,
|
||||
.reveal menu, .reveal nav, .reveal output, .reveal ruby, .reveal section, .reveal summary,
|
||||
.reveal time, .reveal mark, .reveal audio, .reveal video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.reveal article, .reveal aside, .reveal details, .reveal figcaption, .reveal figure,
|
||||
.reveal footer, .reveal header, .reveal hgroup, .reveal menu, .reveal nav, .reveal section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* GLOBAL STYLES
|
||||
*********************************************/
|
||||
|
||||
html,
|
||||
body {
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
height: calc( var(--vh, 1vh) * 100 );
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
@@ -129,7 +102,7 @@ body {
|
||||
}
|
||||
|
||||
.reveal .slides section .fragment.fade-up {
|
||||
transform: translate(0, 20%);
|
||||
transform: translate(0, 40px);
|
||||
|
||||
&.visible {
|
||||
transform: translate(0, 0);
|
||||
@@ -137,7 +110,7 @@ body {
|
||||
}
|
||||
|
||||
.reveal .slides section .fragment.fade-down {
|
||||
transform: translate(0, -20%);
|
||||
transform: translate(0, -40px);
|
||||
|
||||
&.visible {
|
||||
transform: translate(0, 0);
|
||||
@@ -145,7 +118,7 @@ body {
|
||||
}
|
||||
|
||||
.reveal .slides section .fragment.fade-right {
|
||||
transform: translate(-20%, 0);
|
||||
transform: translate(-40px, 0);
|
||||
|
||||
&.visible {
|
||||
transform: translate(0, 0);
|
||||
@@ -153,13 +126,14 @@ body {
|
||||
}
|
||||
|
||||
.reveal .slides section .fragment.fade-left {
|
||||
transform: translate(20%, 0);
|
||||
transform: translate(40px, 0);
|
||||
|
||||
&.visible {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.reveal .slides section .fragment.fade-in-then-out,
|
||||
.reveal .slides section .fragment.current-visible {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
@@ -170,6 +144,21 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.reveal .slides section .fragment.fade-in-then-semi-out {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
|
||||
&.visible {
|
||||
opacity: 0.5;
|
||||
visibility: inherit;
|
||||
}
|
||||
|
||||
&.current-fragment {
|
||||
opacity: 1;
|
||||
visibility: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.reveal .slides section .fragment.highlight-red,
|
||||
.reveal .slides section .fragment.highlight-current-red,
|
||||
.reveal .slides section .fragment.highlight-green,
|
||||
@@ -235,90 +224,287 @@ body {
|
||||
* CONTROLS
|
||||
*********************************************/
|
||||
|
||||
@keyframes bounce-right {
|
||||
0%, 10%, 25%, 40%, 50% {transform: translateX(0);}
|
||||
20% {transform: translateX(10px);}
|
||||
30% {transform: translateX(-5px);}
|
||||
}
|
||||
|
||||
@keyframes bounce-down {
|
||||
0%, 10%, 25%, 40%, 50% {transform: translateY(0);}
|
||||
20% {transform: translateY(10px);}
|
||||
30% {transform: translateY(-5px);}
|
||||
}
|
||||
|
||||
$controlArrowSize: 3.6em;
|
||||
$controlArrowSpacing: 1.4em;
|
||||
$controlArrowLength: 2.6em;
|
||||
$controlArrowThickness: 0.5em;
|
||||
$controlsArrowAngle: 45deg;
|
||||
$controlsArrowAngleHover: 40deg;
|
||||
$controlsArrowAngleActive: 36deg;
|
||||
|
||||
@mixin controlsArrowTransform( $angle ) {
|
||||
&:before {
|
||||
transform: translateX(($controlArrowSize - $controlArrowLength)/2) translateY(($controlArrowSize - $controlArrowThickness)/2) rotate( $angle );
|
||||
}
|
||||
|
||||
&:after {
|
||||
transform: translateX(($controlArrowSize - $controlArrowLength)/2) translateY(($controlArrowSize - $controlArrowThickness)/2) rotate( -$angle );
|
||||
}
|
||||
}
|
||||
|
||||
.reveal .controls {
|
||||
$spacing: 12px;
|
||||
|
||||
display: none;
|
||||
position: fixed;
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
z-index: 30;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.reveal .controls button {
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
opacity: 0.05;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background-color: transparent;
|
||||
border: 12px solid transparent;
|
||||
transform: scale(.9999);
|
||||
transition: all 0.2s ease;
|
||||
-webkit-appearance: none;
|
||||
-webkit-tap-highlight-color: rgba( 0, 0, 0, 0 );
|
||||
top: auto;
|
||||
bottom: $spacing;
|
||||
right: $spacing;
|
||||
left: auto;
|
||||
z-index: 11;
|
||||
color: #000;
|
||||
pointer-events: none;
|
||||
font-size: 10px;
|
||||
|
||||
button {
|
||||
position: absolute;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
color: currentColor;
|
||||
transform: scale(.9999);
|
||||
transition: color 0.2s ease,
|
||||
opacity 0.2s ease,
|
||||
transform 0.2s ease;
|
||||
z-index: 2; // above slides
|
||||
pointer-events: auto;
|
||||
font-size: inherit;
|
||||
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
|
||||
-webkit-appearance: none;
|
||||
-webkit-tap-highlight-color: rgba( 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
.controls-arrow:before,
|
||||
.controls-arrow:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: $controlArrowLength;
|
||||
height: $controlArrowThickness;
|
||||
border-radius: $controlArrowThickness/2;
|
||||
background-color: currentColor;
|
||||
|
||||
transition: all 0.15s ease, background-color 0.8s ease;
|
||||
transform-origin: floor(($controlArrowThickness/2)*10)/10 50%;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.controls-arrow {
|
||||
position: relative;
|
||||
width: $controlArrowSize;
|
||||
height: $controlArrowSize;
|
||||
|
||||
@include controlsArrowTransform( $controlsArrowAngle );
|
||||
|
||||
&:hover {
|
||||
@include controlsArrowTransform( $controlsArrowAngleHover );
|
||||
}
|
||||
|
||||
&:active {
|
||||
@include controlsArrowTransform( $controlsArrowAngleActive );
|
||||
}
|
||||
}
|
||||
|
||||
.navigate-left {
|
||||
right: $controlArrowSize + $controlArrowSpacing*2;
|
||||
bottom: $controlArrowSpacing + $controlArrowSize/2;
|
||||
transform: translateX( -10px );
|
||||
}
|
||||
|
||||
.navigate-right {
|
||||
right: 0;
|
||||
bottom: $controlArrowSpacing + $controlArrowSize/2;
|
||||
transform: translateX( 10px );
|
||||
|
||||
.controls-arrow {
|
||||
transform: rotate( 180deg );
|
||||
}
|
||||
|
||||
&.highlight {
|
||||
animation: bounce-right 2s 50 both ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
.navigate-up {
|
||||
right: $controlArrowSpacing + $controlArrowSize/2;
|
||||
bottom: $controlArrowSpacing*2 + $controlArrowSize;
|
||||
transform: translateY( -10px );
|
||||
|
||||
.controls-arrow {
|
||||
transform: rotate( 90deg );
|
||||
}
|
||||
}
|
||||
|
||||
.navigate-down {
|
||||
right: $controlArrowSpacing + $controlArrowSize/2;
|
||||
bottom: -$controlArrowSpacing;
|
||||
padding-bottom: $controlArrowSpacing;
|
||||
transform: translateY( 10px );
|
||||
|
||||
.controls-arrow {
|
||||
transform: rotate( -90deg );
|
||||
}
|
||||
|
||||
&.highlight {
|
||||
animation: bounce-down 2s 50 both ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
// Back arrow style: "faded":
|
||||
// Deemphasize backwards navigation arrows in favor of drawing
|
||||
// attention to forwards navigation
|
||||
&[data-controls-back-arrows="faded"] .navigate-left.enabled,
|
||||
&[data-controls-back-arrows="faded"] .navigate-up.enabled {
|
||||
opacity: 0.3;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Back arrow style: "hidden":
|
||||
// Never show arrows for backwards navigation
|
||||
&[data-controls-back-arrows="hidden"] .navigate-left.enabled,
|
||||
&[data-controls-back-arrows="hidden"] .navigate-up.enabled {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
// Any control button that can be clicked is "enabled"
|
||||
.enabled {
|
||||
visibility: visible;
|
||||
opacity: 0.9;
|
||||
cursor: pointer;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
// Any control button that leads to showing or hiding
|
||||
// a fragment
|
||||
.enabled.fragmented {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.enabled:hover,
|
||||
.enabled.fragmented:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.reveal .controls .enabled {
|
||||
opacity: 0.7;
|
||||
cursor: pointer;
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-up,
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-down {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.reveal .controls .enabled:active {
|
||||
margin-top: 1px;
|
||||
// Adjust the layout when there are no vertical slides
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-left,
|
||||
.reveal:not(.has-vertical-slides) .controls .navigate-left {
|
||||
bottom: $controlArrowSpacing;
|
||||
right: 0.5em + $controlArrowSpacing + $controlArrowSize;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-left {
|
||||
top: 42px;
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-right,
|
||||
.reveal:not(.has-vertical-slides) .controls .navigate-right {
|
||||
bottom: $controlArrowSpacing;
|
||||
right: 0.5em;
|
||||
}
|
||||
|
||||
border-right-width: 22px;
|
||||
border-right-color: #000;
|
||||
}
|
||||
.reveal .controls .navigate-left.fragmented {
|
||||
opacity: 0.3;
|
||||
// Adjust the layout when there are no horizontal slides
|
||||
.reveal:not(.has-horizontal-slides) .controls .navigate-up {
|
||||
right: $controlArrowSpacing;
|
||||
bottom: $controlArrowSpacing + $controlArrowSize;
|
||||
}
|
||||
.reveal:not(.has-horizontal-slides) .controls .navigate-down {
|
||||
right: $controlArrowSpacing;
|
||||
bottom: 0.5em;
|
||||
}
|
||||
|
||||
// Invert arrows based on background color
|
||||
.reveal.has-dark-background .controls {
|
||||
color: #fff;
|
||||
}
|
||||
.reveal.has-light-background .controls {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
// Disable active states on touch devices
|
||||
.reveal.no-hover .controls .controls-arrow:hover,
|
||||
.reveal.no-hover .controls .controls-arrow:active {
|
||||
@include controlsArrowTransform( $controlsArrowAngle );
|
||||
}
|
||||
|
||||
// Edge aligned controls layout
|
||||
@media screen and (min-width: 500px) {
|
||||
|
||||
$spacing: 0.8em;
|
||||
|
||||
.reveal .controls[data-controls-layout="edges"] {
|
||||
& {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-right {
|
||||
left: 74px;
|
||||
top: 42px;
|
||||
|
||||
border-left-width: 22px;
|
||||
border-left-color: #000;
|
||||
}
|
||||
.reveal .controls .navigate-right.fragmented {
|
||||
opacity: 0.3;
|
||||
.navigate-left,
|
||||
.navigate-right,
|
||||
.navigate-up,
|
||||
.navigate-down {
|
||||
bottom: auto;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-up {
|
||||
left: 42px;
|
||||
|
||||
border-bottom-width: 22px;
|
||||
border-bottom-color: #000;
|
||||
}
|
||||
.reveal .controls .navigate-up.fragmented {
|
||||
opacity: 0.3;
|
||||
.navigate-left {
|
||||
top: 50%;
|
||||
left: $spacing;
|
||||
margin-top: -$controlArrowSize/2;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-down {
|
||||
left: 42px;
|
||||
top: 74px;
|
||||
|
||||
border-top-width: 22px;
|
||||
border-top-color: #000;
|
||||
}
|
||||
.reveal .controls .navigate-down.fragmented {
|
||||
opacity: 0.3;
|
||||
.navigate-right {
|
||||
top: 50%;
|
||||
right: $spacing;
|
||||
margin-top: -$controlArrowSize/2;
|
||||
}
|
||||
|
||||
.navigate-up {
|
||||
top: $spacing;
|
||||
left: 50%;
|
||||
margin-left: -$controlArrowSize/2;
|
||||
}
|
||||
|
||||
.navigate-down {
|
||||
bottom: $spacing - $controlArrowSpacing + 0.3em;
|
||||
left: 50%;
|
||||
margin-left: -$controlArrowSize/2;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
|
||||
.reveal .progress {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
display: none;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
@@ -327,21 +513,22 @@ body {
|
||||
z-index: 10;
|
||||
|
||||
background-color: rgba( 0, 0, 0, 0.2 );
|
||||
color: #fff;
|
||||
}
|
||||
.reveal .progress:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
height: 20px;
|
||||
height: 10px;
|
||||
width: 100%;
|
||||
top: -20px;
|
||||
top: -10px;
|
||||
}
|
||||
.reveal .progress span {
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 0px;
|
||||
|
||||
background-color: #000;
|
||||
background-color: currentColor;
|
||||
transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
}
|
||||
|
||||
@@ -350,7 +537,7 @@ body {
|
||||
*********************************************/
|
||||
|
||||
.reveal .slide-number {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
display: block;
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
@@ -363,6 +550,10 @@ body {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.reveal .slide-number a {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
.reveal .slide-number-delimiter {
|
||||
margin: 0 3px;
|
||||
}
|
||||
@@ -376,7 +567,7 @@ body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
touch-action: none;
|
||||
touch-action: pinch-zoom;
|
||||
}
|
||||
|
||||
.reveal .slides {
|
||||
@@ -398,7 +589,7 @@ body {
|
||||
}
|
||||
|
||||
.reveal .slides>section {
|
||||
-ms-perspective: 600px;
|
||||
perspective: 600px;
|
||||
}
|
||||
|
||||
.reveal .slides>section,
|
||||
@@ -436,6 +627,8 @@ body {
|
||||
.reveal .slides>section.stack {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
pointer-events: none;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.reveal .slides>section.present,
|
||||
@@ -610,10 +803,10 @@ body {
|
||||
transform: scale(0.2);
|
||||
}
|
||||
@include transition-vertical-past(zoom) {
|
||||
transform: translate(0, -150%);
|
||||
transform: scale(16);
|
||||
}
|
||||
@include transition-vertical-future(zoom) {
|
||||
transform: translate(0, 150%);
|
||||
transform: scale(0.2);
|
||||
}
|
||||
|
||||
|
||||
@@ -813,6 +1006,25 @@ body {
|
||||
z-index: 100;
|
||||
transition: all 1s ease;
|
||||
}
|
||||
|
||||
.reveal .pause-overlay .resume-button {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
color: #ccc;
|
||||
border-radius: 2px;
|
||||
padding: 6px 14px;
|
||||
border: 2px solid #ccc;
|
||||
font-size: 16px;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.reveal.paused .pause-overlay {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
@@ -827,37 +1039,38 @@ body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.no-transforms .reveal {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.no-transforms .reveal .slides {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
height: auto !important;
|
||||
max-width: 1280px;
|
||||
height: auto;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin: 0;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-transforms .reveal .controls,
|
||||
.no-transforms .reveal .progress {
|
||||
display: none !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.no-transforms .reveal .slides section {
|
||||
display: block !important;
|
||||
opacity: 1 !important;
|
||||
position: relative !important;
|
||||
display: block;
|
||||
opacity: 1;
|
||||
position: relative;
|
||||
height: auto;
|
||||
min-height: 0;
|
||||
top: 0;
|
||||
left: -50%;
|
||||
left: 0;
|
||||
margin: 10vh 0;
|
||||
margin: 70px 0;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.no-transforms .reveal .slides section section {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.reveal .no-transition,
|
||||
.reveal .no-transition * {
|
||||
transition: none !important;
|
||||
@@ -886,11 +1099,18 @@ body {
|
||||
overflow: hidden;
|
||||
|
||||
background-color: rgba( 0, 0, 0, 0 );
|
||||
|
||||
transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
}
|
||||
|
||||
.reveal .slide-background-content {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
}
|
||||
|
||||
.reveal .slide-background.stack {
|
||||
@@ -1169,10 +1389,10 @@ body {
|
||||
|
||||
|
||||
/*********************************************
|
||||
* LINK PREVIEW OVERLAY
|
||||
* OVERLAY FOR LINK PREVIEWS AND HELP
|
||||
*********************************************/
|
||||
|
||||
.reveal .overlay {
|
||||
.reveal > .overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -1184,12 +1404,12 @@ body {
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.reveal .overlay.visible {
|
||||
.reveal > .overlay.visible {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.reveal .overlay .spinner {
|
||||
.reveal > .overlay .spinner {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 50%;
|
||||
@@ -1205,7 +1425,7 @@ body {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.reveal .overlay header {
|
||||
.reveal > .overlay header {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@@ -1214,7 +1434,7 @@ body {
|
||||
z-index: 2;
|
||||
border-bottom: 1px solid #222;
|
||||
}
|
||||
.reveal .overlay header a {
|
||||
.reveal > .overlay header a {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
@@ -1225,10 +1445,10 @@ body {
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.reveal .overlay header a:hover {
|
||||
.reveal > .overlay header a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.reveal .overlay header a .icon {
|
||||
.reveal > .overlay header a .icon {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
@@ -1237,14 +1457,14 @@ body {
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.reveal .overlay header a.close .icon {
|
||||
.reveal > .overlay header a.close .icon {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABkklEQVRYR8WX4VHDMAxG6wnoJrABZQPYBCaBTWAD2g1gE5gg6OOsXuxIlr40d81dfrSJ9V4c2VLK7spHuTJ/5wpM07QXuXc5X0opX2tEJcadjHuV80li/FgxTIEK/5QBCICBD6xEhSMGHgQPgBgLiYVAB1dpSqKDawxTohFw4JSEA3clzgIBPCURwE2JucBR7rhPJJv5OpJwDX+SfDjgx1wACQeJG1aChP9K/IMmdZ8DtESV1WyP3Bt4MwM6sj4NMxMYiqUWHQu4KYA/SYkIjOsm3BXYWMKFDwU2khjCQ4ELJUJ4SmClRArOCmSXGuKma0fYD5CbzHxFpCSGAhfAVSSUGDUk2BWZaff2g6GE15BsBQ9nwmpIGDiyHQddwNTMKkbZaf9fajXQca1EX44puJZUsnY0ObGmITE3GVLCbEhQUjGVt146j6oasWN+49Vph2w1pZ5EansNZqKBm1txbU57iRRcZ86RWMDdWtBJUHBHwoQPi1GV+JCbntmvok7iTX4/Up9mgyTc/FJYDTcndgH/AA5A/CHsyEkVAAAAAElFTkSuQmCC);
|
||||
}
|
||||
.reveal .overlay header a.external .icon {
|
||||
.reveal > .overlay header a.external .icon {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAcElEQVRYR+2WSQoAIQwEzf8f7XiOMkUQxUPlGkM3hVmiQfQR9GYnH1SsAQlI4DiBqkCMoNb9y2e90IAEJPAcgdznU9+engMaeJ7Azh5Y1U67gAho4DqBqmB1buAf0MB1AlVBek83ZPkmJMGc1wAR+AAqod/B97TRpQAAAABJRU5ErkJggg==);
|
||||
}
|
||||
|
||||
.reveal .overlay .viewport {
|
||||
.reveal > .overlay .viewport {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
top: 40px;
|
||||
@@ -1253,7 +1473,7 @@ body {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-preview .viewport iframe {
|
||||
.reveal > .overlay.overlay-preview .viewport iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
@@ -1265,12 +1485,12 @@ body {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .viewport iframe {
|
||||
.reveal > .overlay.overlay-preview.loaded .viewport iframe {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .viewport-inner {
|
||||
.reveal > .overlay.overlay-preview.loaded .viewport-inner {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
left: 0;
|
||||
@@ -1279,26 +1499,26 @@ body {
|
||||
text-align: center;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
.reveal .overlay.overlay-preview .x-frame-error {
|
||||
.reveal > .overlay.overlay-preview .x-frame-error {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease 0.3s;
|
||||
}
|
||||
.reveal .overlay.overlay-preview.loaded .x-frame-error {
|
||||
.reveal > .overlay.overlay-preview.loaded .x-frame-error {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .spinner {
|
||||
.reveal > .overlay.overlay-preview.loaded .spinner {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: scale(0.2);
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport {
|
||||
.reveal > .overlay.overlay-help .viewport {
|
||||
overflow: auto;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner {
|
||||
width: 600px;
|
||||
margin: auto;
|
||||
padding: 20px 20px 80px 20px;
|
||||
@@ -1306,42 +1526,42 @@ body {
|
||||
letter-spacing: normal;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner .title {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner .title {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table {
|
||||
border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table th,
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table td {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table th,
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table td {
|
||||
width: 200px;
|
||||
padding: 14px;
|
||||
border: 1px solid #fff;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table th {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table th {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*********************************************
|
||||
* PLAYBACK COMPONENT
|
||||
*********************************************/
|
||||
|
||||
.reveal .playback {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
bottom: 20px;
|
||||
z-index: 30;
|
||||
cursor: pointer;
|
||||
transition: all 400ms ease;
|
||||
-webkit-tap-highlight-color: rgba( 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
.reveal.overview .playback {
|
||||
@@ -1350,6 +1570,40 @@ body {
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* CODE HIGHLGIHTING
|
||||
*********************************************/
|
||||
|
||||
.reveal .hljs table {
|
||||
margin: initial;
|
||||
}
|
||||
|
||||
.reveal .hljs-ln-code,
|
||||
.reveal .hljs-ln-numbers {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.reveal .hljs-ln-numbers {
|
||||
opacity: 0.6;
|
||||
padding-right: 0.75em;
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.reveal .hljs.has-highlights tr:not(.highlight-line) {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.reveal .hljs:not(:first-child).fragment {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* ROLLING LINKS
|
||||
*********************************************/
|
||||
@@ -1400,6 +1654,8 @@ body {
|
||||
* SPEAKER NOTES
|
||||
*********************************************/
|
||||
|
||||
$notesWidthPercent: 25%;
|
||||
|
||||
// Hide on-page notes
|
||||
.reveal aside.notes {
|
||||
display: none;
|
||||
@@ -1410,37 +1666,89 @@ body {
|
||||
.reveal .speaker-notes {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 70%;
|
||||
max-height: 15%;
|
||||
left: 15%;
|
||||
bottom: 26px;
|
||||
padding: 10px;
|
||||
width: $notesWidthPercent / (1-$notesWidthPercent/100) * 1%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
padding: 14px 18px 14px 18px;
|
||||
z-index: 1;
|
||||
font-size: 18px;
|
||||
line-height: 1.4;
|
||||
color: #fff;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
border: 1px solid rgba( 0, 0, 0, 0.05 );
|
||||
color: #222;
|
||||
background-color: #f5f5f5;
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
text-align: left;
|
||||
font-family: Helvetica, sans-serif;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
.notes-placeholder {
|
||||
color: #ccc;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: 'Speaker notes';
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.reveal .speaker-notes.visible:not(:empty) {
|
||||
|
||||
.reveal.show-notes {
|
||||
max-width: 100% - $notesWidthPercent;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.reveal.show-notes .speaker-notes {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
@media screen and (min-width: 1600px) {
|
||||
.reveal .speaker-notes {
|
||||
font-size: 14px;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.reveal.show-notes {
|
||||
border-left: 0;
|
||||
max-width: none;
|
||||
max-height: 70%;
|
||||
max-height: 70vh;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.reveal.show-notes .speaker-notes {
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: (30/0.7)*1%;
|
||||
height: 30vh;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.reveal.show-notes {
|
||||
max-height: 60%;
|
||||
max-height: 60vh;
|
||||
}
|
||||
|
||||
.reveal.show-notes .speaker-notes {
|
||||
top: 100%;
|
||||
height: (40/0.6)*1%;
|
||||
height: 40vh;
|
||||
}
|
||||
|
||||
.reveal .speaker-notes {
|
||||
width: 90%;
|
||||
left: 5%;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
## Dependencies
|
||||
|
||||
Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceding: https://github.com/hakimel/reveal.js#full-setup
|
||||
Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceeding: https://github.com/hakimel/reveal.js#full-setup
|
||||
|
||||
## Creating a Theme
|
||||
|
||||
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `grunt css-themes`.
|
||||
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/gruntfile.js)) when you run `npm run build -- css-themes`.
|
||||
|
||||
Each theme file does four things in the following order:
|
||||
|
||||
|
@@ -34,8 +34,8 @@ body {
|
||||
background: rgba(79, 64, 28, 0.99);
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -126,10 +126,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -157,10 +153,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -196,10 +193,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -255,42 +254,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #8b743d; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #8b743d; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #8b743d; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #8b743d; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #c0a86e; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #c0a86e; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #c0a86e; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #c0a86e; }
|
||||
.reveal .controls {
|
||||
color: #8b743d; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #8b743d; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #8b743d;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #f7f3de; } }
|
||||
|
@@ -11,8 +11,8 @@ section.has-light-background, section.has-light-background h1, section.has-light
|
||||
* GLOBAL STYLES
|
||||
*********************************************/
|
||||
body {
|
||||
background: #222;
|
||||
background-color: #222; }
|
||||
background: #191919;
|
||||
background-color: #191919; }
|
||||
|
||||
.reveal {
|
||||
font-family: "Source Sans Pro", Helvetica, sans-serif;
|
||||
@@ -30,8 +30,8 @@ body {
|
||||
background: #bee4fd;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -122,10 +122,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -153,10 +149,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -192,10 +189,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -251,42 +250,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #42affa; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #42affa; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #42affa; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #42affa; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #8dcffc; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #8dcffc; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #8dcffc; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #8dcffc; }
|
||||
.reveal .controls {
|
||||
color: #42affa; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #42affa; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #42affa;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #191919; } }
|
||||
|
@@ -33,8 +33,8 @@ body {
|
||||
background: #a23;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -125,10 +125,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -156,10 +152,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -195,10 +192,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -254,46 +253,28 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #a23; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #a23; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #a23; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #a23; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #dd5566; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #dd5566; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #dd5566; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #dd5566; }
|
||||
.reveal .controls {
|
||||
color: #a23; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #a23; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #a23;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #222; } }
|
||||
|
||||
.reveal p {
|
||||
font-weight: 300;
|
||||
text-shadow: 1px 1px #222; }
|
||||
|
@@ -36,8 +36,8 @@ body {
|
||||
background: #FF5E99;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -128,10 +128,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -159,10 +155,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -198,10 +195,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -257,42 +256,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #13DAEC; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #13DAEC; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #13DAEC; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #13DAEC; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #71e9f4; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #71e9f4; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #71e9f4; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #71e9f4; }
|
||||
.reveal .controls {
|
||||
color: #13DAEC; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #13DAEC; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #13DAEC;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #2b2b2b; } }
|
||||
|
@@ -34,8 +34,8 @@ body {
|
||||
background: #d33682;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -126,10 +126,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -157,10 +153,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -196,10 +193,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -255,42 +254,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #268bd2; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #268bd2; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #268bd2; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #268bd2; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #78b9e6; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #78b9e6; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #78b9e6; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #78b9e6; }
|
||||
.reveal .controls {
|
||||
color: #268bd2; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #268bd2; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #268bd2;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #002b36; } }
|
||||
|
@@ -28,8 +28,8 @@ body {
|
||||
background: #e7ad52;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -120,10 +120,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -151,10 +147,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -190,10 +187,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -249,42 +248,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #e7ad52; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #e7ad52; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #e7ad52; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #e7ad52; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #f3d7ac; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #f3d7ac; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #f3d7ac; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #f3d7ac; }
|
||||
.reveal .controls {
|
||||
color: #e7ad52; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #e7ad52; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #e7ad52;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #111; } }
|
||||
|
@@ -30,8 +30,8 @@ body {
|
||||
background: #26351C;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -122,10 +122,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -153,10 +149,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -192,10 +189,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -251,42 +250,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #51483D; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #51483D; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #51483D; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #51483D; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #8b7c69; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #8b7c69; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #8b7c69; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #8b7c69; }
|
||||
.reveal .controls {
|
||||
color: #51483D; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #51483D; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #51483D;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #F0F1EB; } }
|
||||
|
@@ -33,8 +33,8 @@ body {
|
||||
background: rgba(0, 0, 0, 0.99);
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -125,10 +125,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -156,10 +152,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -195,10 +192,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -254,42 +253,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #00008B; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #00008B; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #00008B; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #00008B; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #0000f1; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #0000f1; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #0000f1; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #0000f1; }
|
||||
.reveal .controls {
|
||||
color: #00008B; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #00008B; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #00008B;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #fff; } }
|
||||
|
@@ -37,8 +37,8 @@ body {
|
||||
background: #134674;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -129,10 +129,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -160,10 +156,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -199,10 +196,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -258,42 +257,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #3b759e; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #3b759e; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #3b759e; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #3b759e; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #74a7cb; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #74a7cb; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #74a7cb; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #74a7cb; }
|
||||
.reveal .controls {
|
||||
color: #3b759e; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #3b759e; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #3b759e;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #f7fbfc; } }
|
||||
|
@@ -34,8 +34,8 @@ body {
|
||||
background: #d33682;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -126,10 +126,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -157,10 +153,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -196,10 +193,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -255,42 +254,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #268bd2; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #268bd2; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #268bd2; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #268bd2; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #78b9e6; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #78b9e6; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #78b9e6; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #78b9e6; }
|
||||
.reveal .controls {
|
||||
color: #268bd2; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #268bd2; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #268bd2;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #fdf6e3; } }
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
// Override theme settings (see ../template/settings.scss)
|
||||
$backgroundColor: #222;
|
||||
$backgroundColor: #191919;
|
||||
|
||||
$mainColor: #fff;
|
||||
$headingColor: #fff;
|
||||
|
@@ -28,6 +28,8 @@ $heading2Size: 2.11em;
|
||||
$heading3Size: 1.55em;
|
||||
$heading4Size: 1.00em;
|
||||
|
||||
$codeFont: monospace;
|
||||
|
||||
// Links and actions
|
||||
$linkColor: #13DAEC;
|
||||
$linkColorHover: lighten( $linkColor, 20% );
|
||||
@@ -40,4 +42,4 @@ $selectionColor: #fff;
|
||||
// to return a background image or gradient
|
||||
@mixin bodyBackground() {
|
||||
background: $backgroundColor;
|
||||
}
|
||||
}
|
||||
|
@@ -28,8 +28,8 @@ body {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.reveal .slides>section,
|
||||
.reveal .slides>section>section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section>section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit;
|
||||
}
|
||||
@@ -134,11 +134,6 @@ body {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -167,15 +162,17 @@ body {
|
||||
|
||||
text-align: left;
|
||||
font-size: 0.55em;
|
||||
font-family: monospace;
|
||||
font-family: $codeFont;
|
||||
line-height: 1.2em;
|
||||
|
||||
word-wrap: break-word;
|
||||
|
||||
box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
font-family: $codeFont;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.reveal pre code {
|
||||
@@ -220,9 +217,11 @@ body {
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super;
|
||||
font-size: smaller;
|
||||
}
|
||||
.reveal sub {
|
||||
vertical-align: sub;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.reveal small {
|
||||
@@ -297,40 +296,8 @@ body {
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: $linkColor;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: $linkColor;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: $linkColor;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: $linkColor;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: $linkColorHover;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: $linkColorHover;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: $linkColorHover;
|
||||
}
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: $linkColorHover;
|
||||
.reveal .controls {
|
||||
color: $linkColor;
|
||||
}
|
||||
|
||||
|
||||
@@ -340,13 +307,19 @@ body {
|
||||
|
||||
.reveal .progress {
|
||||
background: rgba(0,0,0,0.2);
|
||||
color: $linkColor;
|
||||
}
|
||||
.reveal .progress span {
|
||||
background: $linkColor;
|
||||
|
||||
-webkit-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: $backgroundColor;
|
||||
}
|
||||
}
|
||||
|
@@ -30,8 +30,8 @@ body {
|
||||
background: #98bdef;
|
||||
text-shadow: none; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit; }
|
||||
|
||||
@@ -122,10 +122,6 @@ body {
|
||||
.reveal dd {
|
||||
margin-left: 40px; }
|
||||
|
||||
.reveal q,
|
||||
.reveal blockquote {
|
||||
quotes: none; }
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -153,10 +149,11 @@ body {
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace; }
|
||||
font-family: monospace;
|
||||
text-transform: none; }
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
@@ -192,10 +189,12 @@ body {
|
||||
border-bottom: none; }
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super; }
|
||||
vertical-align: super;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub; }
|
||||
vertical-align: sub;
|
||||
font-size: smaller; }
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
@@ -251,42 +250,24 @@ body {
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls .navigate-left,
|
||||
.reveal .controls .navigate-left.enabled {
|
||||
border-right-color: #2a76dd; }
|
||||
|
||||
.reveal .controls .navigate-right,
|
||||
.reveal .controls .navigate-right.enabled {
|
||||
border-left-color: #2a76dd; }
|
||||
|
||||
.reveal .controls .navigate-up,
|
||||
.reveal .controls .navigate-up.enabled {
|
||||
border-bottom-color: #2a76dd; }
|
||||
|
||||
.reveal .controls .navigate-down,
|
||||
.reveal .controls .navigate-down.enabled {
|
||||
border-top-color: #2a76dd; }
|
||||
|
||||
.reveal .controls .navigate-left.enabled:hover {
|
||||
border-right-color: #6ca0e8; }
|
||||
|
||||
.reveal .controls .navigate-right.enabled:hover {
|
||||
border-left-color: #6ca0e8; }
|
||||
|
||||
.reveal .controls .navigate-up.enabled:hover {
|
||||
border-bottom-color: #6ca0e8; }
|
||||
|
||||
.reveal .controls .navigate-down.enabled:hover {
|
||||
border-top-color: #6ca0e8; }
|
||||
.reveal .controls {
|
||||
color: #2a76dd; }
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2); }
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #2a76dd; }
|
||||
|
||||
.reveal .progress span {
|
||||
background: #2a76dd;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #fff; } }
|
||||
|
77
demo.html
77
demo.html
@@ -12,13 +12,14 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="css/reset.css">
|
||||
<link rel="stylesheet" href="css/reveal.css">
|
||||
<link rel="stylesheet" href="css/theme/black.css" id="theme">
|
||||
|
||||
<!-- Theme used for syntax highlighting of code -->
|
||||
<link rel="stylesheet" href="lib/css/zenburn.css">
|
||||
<link rel="stylesheet" href="lib/css/monokai.css">
|
||||
|
||||
<!-- Printing and PDF exports -->
|
||||
<script>
|
||||
@@ -44,7 +45,7 @@
|
||||
<h1>Reveal.js</h1>
|
||||
<h3>The HTML Presentation Framework</h3>
|
||||
<p>
|
||||
<small>Created by <a href="http://hakim.se">Hakim El Hattab</a> / <a href="http://twitter.com/hakimel">@hakimel</a></small>
|
||||
<small>Created by <a href="http://hakim.se">Hakim El Hattab</a> and <a href="https://github.com/hakimel/reveal.js/graphs/contributors">contributors</a></small>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -83,7 +84,7 @@
|
||||
<section>
|
||||
<h2>Slides</h2>
|
||||
<p>
|
||||
Not a coder? Not a problem. There's a fully-featured visual editor for authoring these, try it out at <a href="http://slides.com" target="_blank">http://slides.com</a>.
|
||||
Not a coder? Not a problem. There's a fully-featured visual editor for authoring these, try it out at <a href="https://slides.com" target="_blank">https://slides.com</a>.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -93,7 +94,10 @@
|
||||
Press <strong>ESC</strong> to enter the slide overview.
|
||||
</p>
|
||||
<p>
|
||||
Hold down alt and click on any element to zoom in on it using <a href="http://lab.hakim.se/zoom-js">zoom.js</a>. Alt + click anywhere to zoom back out.
|
||||
Hold down the <strong>alt</strong> key (<strong>ctrl</strong> in Linux) and click on any element to zoom towards it using <a href="http://lab.hakim.se/zoom-js">zoom.js</a>. Click again to zoom back out.
|
||||
</p>
|
||||
<p>
|
||||
(NOTE: Use ctrl + click in Linux.)
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -139,8 +143,14 @@
|
||||
<p class="fragment grow">grow</p>
|
||||
<p class="fragment shrink">shrink</p>
|
||||
<p class="fragment fade-out">fade-out</p>
|
||||
<p class="fragment fade-up">fade-up (also down, left and right!)</p>
|
||||
<p class="fragment current-visible">current-visible</p>
|
||||
<p>
|
||||
<span style="display: inline-block;" class="fragment fade-right">fade-right, </span>
|
||||
<span style="display: inline-block;" class="fragment fade-up">up, </span>
|
||||
<span style="display: inline-block;" class="fragment fade-down">down, </span>
|
||||
<span style="display: inline-block;" class="fragment fade-left">left</span>
|
||||
</p>
|
||||
<p class="fragment fade-in-then-out">fade-in-then-out</p>
|
||||
<p class="fragment fade-in-then-semi-out">fade-in-then-semi-out</p>
|
||||
<p>Highlight <span class="fragment highlight-red">red</span> <span class="fragment highlight-blue">blue</span> <span class="fragment highlight-green">green</span></p>
|
||||
</section>
|
||||
</section>
|
||||
@@ -189,16 +199,16 @@
|
||||
</section>
|
||||
<section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png">
|
||||
<h2>Image Backgrounds</h2>
|
||||
<pre><code class="hljs"><section data-background="image.png"></code></pre>
|
||||
<pre><code class="hljs html"><section data-background="image.png"></code></pre>
|
||||
</section>
|
||||
<section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png" data-background-repeat="repeat" data-background-size="100px">
|
||||
<h2>Tiled Backgrounds</h2>
|
||||
<pre><code class="hljs" style="word-wrap: break-word;"><section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"></code></pre>
|
||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"></code></pre>
|
||||
</section>
|
||||
<section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm" data-background-color="#000000">
|
||||
<div style="background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px;">
|
||||
<h2>Video Backgrounds</h2>
|
||||
<pre><code class="hljs" style="word-wrap: break-word;"><section data-background-video="video.mp4,video.webm"></code></pre>
|
||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background-video="video.mp4,video.webm"></code></pre>
|
||||
</div>
|
||||
</section>
|
||||
<section data-background="http://i.giphy.com/90F8aUepslB84.gif">
|
||||
@@ -211,7 +221,7 @@
|
||||
<p>
|
||||
Different background transitions are available via the backgroundTransition option. This one's called "zoom".
|
||||
</p>
|
||||
<pre><code class="hljs">Reveal.configure({ backgroundTransition: 'zoom' })</code></pre>
|
||||
<pre><code class="hljs javascript">Reveal.configure({ backgroundTransition: 'zoom' })</code></pre>
|
||||
</section>
|
||||
|
||||
<section data-transition="slide" data-background="#b5533c" data-background-transition="zoom">
|
||||
@@ -219,25 +229,32 @@
|
||||
<p>
|
||||
You can override background transitions per-slide.
|
||||
</p>
|
||||
<pre><code class="hljs" style="word-wrap: break-word;"><section data-background-transition="zoom"></code></pre>
|
||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background-transition="zoom"></code></pre>
|
||||
</section>
|
||||
|
||||
<section data-background-iframe="https://hakim.se" data-background-interactive>
|
||||
<div style="position: absolute; width: 40%; right: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.5), 0 5px 25px rgba(0,0,0,0.2); background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px; font-size: 20px; text-align: left;">
|
||||
<h2>Iframe Backgrounds</h2>
|
||||
<p>Since reveal.js runs on the web, you can easily embed other web content. Try interacting with the page in the background.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Pretty Code</h2>
|
||||
<pre><code class="hljs" data-trim contenteditable>
|
||||
function linkify( selector ) {
|
||||
if( supports3DTransforms ) {
|
||||
<pre><code class="hljs" data-trim data-line-numbers="4|9|4,8-11">
|
||||
import React, { useState } from 'react';
|
||||
|
||||
var nodes = document.querySelectorAll( selector );
|
||||
function Example() {
|
||||
const [count, setCount] = useState(0);
|
||||
|
||||
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
||||
var node = nodes[i];
|
||||
|
||||
if( !node.className ) {
|
||||
node.className += ' roll';
|
||||
}
|
||||
}
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<p>You clicked {count} times</p>
|
||||
<button onClick={() => setCount(count + 1)}>
|
||||
Click me
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
</code></pre>
|
||||
<p>Code syntax highlighting courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p>
|
||||
@@ -295,8 +312,7 @@ function linkify( selector ) {
|
||||
<section>
|
||||
<h2>Clever Quotes</h2>
|
||||
<p>
|
||||
These guys come in two forms, inline: <q cite="http://searchservervirtualization.techtarget.com/definition/Our-Favorite-Technology-Quotations">
|
||||
“The nice thing about standards is that there are so many to choose from”</q> and block:
|
||||
These guys come in two forms, inline: <q cite="http://searchservervirtualization.techtarget.com/definition/Our-Favorite-Technology-Quotations">The nice thing about standards is that there are so many to choose from</q> and block:
|
||||
</p>
|
||||
<blockquote cite="http://searchservervirtualization.techtarget.com/definition/Our-Favorite-Technology-Quotations">
|
||||
“For years there has been a theory that millions of monkeys typing at random on millions of typewriters would
|
||||
@@ -370,7 +386,7 @@ Reveal.addEventListener( 'customevent', function() {
|
||||
<section style="text-align: left;">
|
||||
<h1>THE END</h1>
|
||||
<p>
|
||||
- <a href="http://slides.com">Try the online editor</a> <br>
|
||||
- <a href="https://slides.com">Try the online editor</a> <br>
|
||||
- <a href="https://github.com/hakimel/reveal.js">Source code & documentation</a>
|
||||
</p>
|
||||
</section>
|
||||
@@ -379,7 +395,6 @@ Reveal.addEventListener( 'customevent', function() {
|
||||
|
||||
</div>
|
||||
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
@@ -388,17 +403,17 @@ Reveal.addEventListener( 'customevent', function() {
|
||||
Reveal.initialize({
|
||||
controls: true,
|
||||
progress: true,
|
||||
history: true,
|
||||
center: true,
|
||||
hash: true,
|
||||
|
||||
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
||||
|
||||
// More info https://github.com/hakimel/reveal.js#dependencies
|
||||
dependencies: [
|
||||
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
|
||||
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
||||
{ src: 'plugin/highlight/highlight.js' },
|
||||
{ src: 'plugin/search/search.js', async: true },
|
||||
{ src: 'plugin/zoom-js/zoom.js', async: true },
|
||||
{ src: 'plugin/notes/notes.js', async: true }
|
||||
]
|
||||
|
@@ -1,7 +1,11 @@
|
||||
/* global module:false */
|
||||
module.exports = function(grunt) {
|
||||
var port = grunt.option('port') || 8000;
|
||||
var root = grunt.option('root') || '.';
|
||||
const sass = require('node-sass');
|
||||
|
||||
module.exports = grunt => {
|
||||
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
let port = grunt.option('port') || 8000;
|
||||
let root = grunt.option('root') || '.';
|
||||
|
||||
if (!Array.isArray(root)) root = [root];
|
||||
|
||||
@@ -12,10 +16,10 @@ module.exports = function(grunt) {
|
||||
banner:
|
||||
'/*!\n' +
|
||||
' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +
|
||||
' * http://lab.hakim.se/reveal-js\n' +
|
||||
' * http://revealjs.com\n' +
|
||||
' * MIT licensed\n' +
|
||||
' *\n' +
|
||||
' * Copyright (C) 2017 Hakim El Hattab, http://hakim.se\n' +
|
||||
' * Copyright (C) 2020 Hakim El Hattab, http://hakim.se\n' +
|
||||
' */'
|
||||
},
|
||||
|
||||
@@ -25,7 +29,8 @@ module.exports = function(grunt) {
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
banner: '<%= meta.banner %>\n'
|
||||
banner: '<%= meta.banner %>\n',
|
||||
ie8: true
|
||||
},
|
||||
build: {
|
||||
src: 'js/reveal.js',
|
||||
@@ -34,35 +39,36 @@ module.exports = function(grunt) {
|
||||
},
|
||||
|
||||
sass: {
|
||||
options: {
|
||||
implementation: sass,
|
||||
sourceMap: false
|
||||
},
|
||||
core: {
|
||||
files: {
|
||||
'css/reveal.css': 'css/reveal.scss',
|
||||
}
|
||||
src: 'css/reveal.scss',
|
||||
dest: 'css/reveal.css'
|
||||
},
|
||||
themes: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
cwd: 'css/theme/source',
|
||||
src: ['*.sass', '*.scss'],
|
||||
dest: 'css/theme',
|
||||
ext: '.css'
|
||||
}
|
||||
]
|
||||
expand: true,
|
||||
cwd: 'css/theme/source',
|
||||
src: ['*.sass', '*.scss'],
|
||||
dest: 'css/theme',
|
||||
ext: '.css'
|
||||
}
|
||||
},
|
||||
|
||||
autoprefixer: {
|
||||
dist: {
|
||||
core: {
|
||||
src: 'css/reveal.css'
|
||||
}
|
||||
},
|
||||
|
||||
cssmin: {
|
||||
options: {
|
||||
compatibility: 'ie9'
|
||||
},
|
||||
compress: {
|
||||
files: {
|
||||
'css/reveal.min.css': [ 'css/reveal.css' ]
|
||||
}
|
||||
src: 'css/reveal.css',
|
||||
dest: 'css/reveal.min.css'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -72,7 +78,7 @@ module.exports = function(grunt) {
|
||||
eqeqeq: true,
|
||||
immed: true,
|
||||
esnext: true,
|
||||
latedef: true,
|
||||
latedef: 'nofunc',
|
||||
newcap: true,
|
||||
noarg: true,
|
||||
sub: true,
|
||||
@@ -80,16 +86,18 @@ module.exports = function(grunt) {
|
||||
eqnull: true,
|
||||
browser: true,
|
||||
expr: true,
|
||||
loopfunc: true,
|
||||
globals: {
|
||||
head: false,
|
||||
module: false,
|
||||
console: false,
|
||||
unescape: false,
|
||||
define: false,
|
||||
exports: false
|
||||
exports: false,
|
||||
require: false
|
||||
}
|
||||
},
|
||||
files: [ 'Gruntfile.js', 'js/reveal.js' ]
|
||||
files: [ 'gruntfile.js', 'js/reveal.js' ]
|
||||
},
|
||||
|
||||
connect: {
|
||||
@@ -98,27 +106,30 @@ module.exports = function(grunt) {
|
||||
port: port,
|
||||
base: root,
|
||||
livereload: true,
|
||||
open: true
|
||||
open: true,
|
||||
useAvailablePort: true
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
zip: {
|
||||
'reveal-js-presentation.zip': [
|
||||
'index.html',
|
||||
'css/**',
|
||||
'js/**',
|
||||
'lib/**',
|
||||
'images/**',
|
||||
'plugin/**',
|
||||
'**.md'
|
||||
]
|
||||
bundle: {
|
||||
src: [
|
||||
'index.html',
|
||||
'css/**',
|
||||
'js/**',
|
||||
'lib/**',
|
||||
'images/**',
|
||||
'plugin/**',
|
||||
'**.md'
|
||||
],
|
||||
dest: 'reveal-js-presentation.zip'
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
js: {
|
||||
files: [ 'Gruntfile.js', 'js/reveal.js' ],
|
||||
files: [ 'gruntfile.js', 'js/reveal.js' ],
|
||||
tasks: 'js'
|
||||
},
|
||||
theme: {
|
||||
@@ -134,6 +145,10 @@ module.exports = function(grunt) {
|
||||
files: [ 'css/reveal.scss' ],
|
||||
tasks: 'css-core'
|
||||
},
|
||||
test: {
|
||||
files: [ 'test/*.html' ],
|
||||
tasks: 'test'
|
||||
},
|
||||
html: {
|
||||
files: root.map(path => path + '/*.html')
|
||||
},
|
||||
@@ -143,28 +158,10 @@ module.exports = function(grunt) {
|
||||
options: {
|
||||
livereload: true
|
||||
}
|
||||
},
|
||||
|
||||
retire: {
|
||||
js: ['js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js'],
|
||||
node: ['.'],
|
||||
options: {}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Dependencies
|
||||
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
grunt.loadNpmTasks( 'grunt-sass' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-connect' );
|
||||
grunt.loadNpmTasks( 'grunt-autoprefixer' );
|
||||
grunt.loadNpmTasks( 'grunt-zip' );
|
||||
grunt.loadNpmTasks( 'grunt-retire' );
|
||||
|
||||
// Default task
|
||||
grunt.registerTask( 'default', [ 'css', 'js' ] );
|
||||
|
@@ -6,11 +6,12 @@
|
||||
|
||||
<title>reveal.js</title>
|
||||
|
||||
<link rel="stylesheet" href="css/reset.css">
|
||||
<link rel="stylesheet" href="css/reveal.css">
|
||||
<link rel="stylesheet" href="css/theme/black.css">
|
||||
|
||||
<!-- Theme used for syntax highlighting of code -->
|
||||
<link rel="stylesheet" href="lib/css/zenburn.css">
|
||||
<link rel="stylesheet" href="lib/css/monokai.css">
|
||||
|
||||
<!-- Printing and PDF exports -->
|
||||
<script>
|
||||
@@ -29,7 +30,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
@@ -37,11 +37,12 @@
|
||||
// - https://github.com/hakimel/reveal.js#configuration
|
||||
// - https://github.com/hakimel/reveal.js#dependencies
|
||||
Reveal.initialize({
|
||||
hash: true,
|
||||
dependencies: [
|
||||
{ src: 'plugin/markdown/marked.js' },
|
||||
{ src: 'plugin/markdown/markdown.js' },
|
||||
{ src: 'plugin/notes/notes.js', async: true },
|
||||
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
|
||||
{ src: 'plugin/highlight/highlight.js' },
|
||||
{ src: 'plugin/notes/notes.js', async: true }
|
||||
]
|
||||
});
|
||||
</script>
|
||||
|
2191
js/reveal.js
2191
js/reveal.js
File diff suppressed because it is too large
Load Diff
71
lib/css/monokai.css
Normal file
71
lib/css/monokai.css
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Monokai style - ported by Luigi Maselli - http://grigio.org
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #272822;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-strong,
|
||||
.hljs-name {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.hljs-code {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #bf79db;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet,
|
||||
.hljs-subst,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-emphasis,
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #75715e;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-selector-id {
|
||||
font-weight: bold;
|
||||
}
|
@@ -1,2 +0,0 @@
|
||||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
|
||||
if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p<o;p++){if(p in this&&this[p]===q){return p}}return -1},n=function(o,p){this.name=o;this.code=DOMException[o];this.message=p},g=function(p,o){if(o===""){throw new n("SYNTAX_ERR","An invalid or illegal string was specified")}if(/\s/.test(o)){throw new n("INVALID_CHARACTER_ERR","String contains an invalid character")}return c.call(p,o)},d=function(s){var r=k.call(s.className),q=r?r.split(/\s+/):[],p=0,o=q.length;for(;p<o;p++){this.push(q[p])}this._updateClassName=function(){s.className=this.toString()}},e=d[f]=[],i=function(){return new d(this)};n[f]=Error[f];e.item=function(o){return this[o]||null};e.contains=function(o){o+="";return g(this,o)!==-1};e.add=function(o){o+="";if(g(this,o)===-1){this.push(o);this._updateClassName()}};e.remove=function(p){p+="";var o=g(this,p);if(o!==-1){this.splice(o,1);this._updateClassName()}};e.toggle=function(o){o+="";if(g(this,o)===-1){this.add(o)}else{this.remove(o)}};e.toString=function(){return this.join(" ")};if(b.defineProperty){var l={get:i,enumerable:true,configurable:true};try{b.defineProperty(m,a,l)}catch(h){if(h.number===-2146823252){l.enumerable=false;b.defineProperty(m,a,l)}}}else{if(b[f].__defineGetter__){m.__defineGetter__(a,i)}}}(self))};
|
9
lib/js/head.min.js
vendored
9
lib/js/head.min.js
vendored
@@ -1,9 +0,0 @@
|
||||
/*! head.core - v1.0.2 */
|
||||
(function(n,t){"use strict";function r(n){a[a.length]=n}function k(n){var t=new RegExp(" ?\\b"+n+"\\b");c.className=c.className.replace(t,"")}function p(n,t){for(var i=0,r=n.length;i<r;i++)t.call(n,n[i],i)}function tt(){var t,e,f,o;c.className=c.className.replace(/ (w-|eq-|gt-|gte-|lt-|lte-|portrait|no-portrait|landscape|no-landscape)\d+/g,"");t=n.innerWidth||c.clientWidth;e=n.outerWidth||n.screen.width;u.screen.innerWidth=t;u.screen.outerWidth=e;r("w-"+t);p(i.screens,function(n){t>n?(i.screensCss.gt&&r("gt-"+n),i.screensCss.gte&&r("gte-"+n)):t<n?(i.screensCss.lt&&r("lt-"+n),i.screensCss.lte&&r("lte-"+n)):t===n&&(i.screensCss.lte&&r("lte-"+n),i.screensCss.eq&&r("e-q"+n),i.screensCss.gte&&r("gte-"+n))});f=n.innerHeight||c.clientHeight;o=n.outerHeight||n.screen.height;u.screen.innerHeight=f;u.screen.outerHeight=o;u.feature("portrait",f>t);u.feature("landscape",f<t)}function it(){n.clearTimeout(b);b=n.setTimeout(tt,50)}var y=n.document,rt=n.navigator,ut=n.location,c=y.documentElement,a=[],i={screens:[240,320,480,640,768,800,1024,1280,1440,1680,1920],screensCss:{gt:!0,gte:!1,lt:!0,lte:!1,eq:!1},browsers:[{ie:{min:6,max:11}}],browserCss:{gt:!0,gte:!1,lt:!0,lte:!1,eq:!0},html5:!0,page:"-page",section:"-section",head:"head"},v,u,s,w,o,h,l,d,f,g,nt,e,b;if(n.head_conf)for(v in n.head_conf)n.head_conf[v]!==t&&(i[v]=n.head_conf[v]);u=n[i.head]=function(){u.ready.apply(null,arguments)};u.feature=function(n,t,i){return n?(Object.prototype.toString.call(t)==="[object Function]"&&(t=t.call()),r((t?"":"no-")+n),u[n]=!!t,i||(k("no-"+n),k(n),u.feature()),u):(c.className+=" "+a.join(" "),a=[],u)};u.feature("js",!0);s=rt.userAgent.toLowerCase();w=/mobile|android|kindle|silk|midp|phone|(windows .+arm|touch)/.test(s);u.feature("mobile",w,!0);u.feature("desktop",!w,!0);s=/(chrome|firefox)[ \/]([\w.]+)/.exec(s)||/(iphone|ipad|ipod)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(android)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(webkit|opera)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(msie) ([\w.]+)/.exec(s)||/(trident).+rv:(\w.)+/.exec(s)||[];o=s[1];h=parseFloat(s[2]);switch(o){case"msie":case"trident":o="ie";h=y.documentMode||h;break;case"firefox":o="ff";break;case"ipod":case"ipad":case"iphone":o="ios";break;case"webkit":o="safari"}for(u.browser={name:o,version:h},u.browser[o]=!0,l=0,d=i.browsers.length;l<d;l++)for(f in i.browsers[l])if(o===f)for(r(f),g=i.browsers[l][f].min,nt=i.browsers[l][f].max,e=g;e<=nt;e++)h>e?(i.browserCss.gt&&r("gt-"+f+e),i.browserCss.gte&&r("gte-"+f+e)):h<e?(i.browserCss.lt&&r("lt-"+f+e),i.browserCss.lte&&r("lte-"+f+e)):h===e&&(i.browserCss.lte&&r("lte-"+f+e),i.browserCss.eq&&r("eq-"+f+e),i.browserCss.gte&&r("gte-"+f+e));else r("no-"+f);r(o);r(o+parseInt(h,10));i.html5&&o==="ie"&&h<9&&p("abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|progress|section|summary|time|video".split("|"),function(n){y.createElement(n)});p(ut.pathname.split("/"),function(n,u){if(this.length>2&&this[u+1]!==t)u&&r(this.slice(u,u+1).join("-").toLowerCase()+i.section);else{var f=n||"index",e=f.indexOf(".");e>0&&(f=f.substring(0,e));c.id=f.toLowerCase()+i.page;u||r("root"+i.section)}});u.screen={height:n.screen.height,width:n.screen.width};tt();b=0;n.addEventListener?n.addEventListener("resize",it,!1):n.attachEvent("onresize",it)})(window);
|
||||
/*! head.css3 - v1.0.0 */
|
||||
(function(n,t){"use strict";function a(n){for(var r in n)if(i[n[r]]!==t)return!0;return!1}function r(n){var t=n.charAt(0).toUpperCase()+n.substr(1),i=(n+" "+c.join(t+" ")+t).split(" ");return!!a(i)}var h=n.document,o=h.createElement("i"),i=o.style,s=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),c="Webkit Moz O ms Khtml".split(" "),l=n.head_conf&&n.head_conf.head||"head",u=n[l],f={gradient:function(){var n="background-image:";return i.cssText=(n+s.join("gradient(linear,left top,right bottom,from(#9f9),to(#fff));"+n)+s.join("linear-gradient(left top,#eee,#fff);"+n)).slice(0,-n.length),!!i.backgroundImage},rgba:function(){return i.cssText="background-color:rgba(0,0,0,0.5)",!!i.backgroundColor},opacity:function(){return o.style.opacity===""},textshadow:function(){return i.textShadow===""},multiplebgs:function(){i.cssText="background:url(https://),url(https://),red url(https://)";var n=(i.background||"").match(/url/g);return Object.prototype.toString.call(n)==="[object Array]"&&n.length===3},boxshadow:function(){return r("boxShadow")},borderimage:function(){return r("borderImage")},borderradius:function(){return r("borderRadius")},cssreflections:function(){return r("boxReflect")},csstransforms:function(){return r("transform")},csstransitions:function(){return r("transition")},touch:function(){return"ontouchstart"in n},retina:function(){return n.devicePixelRatio>1},fontface:function(){var t=u.browser.name,n=u.browser.version;switch(t){case"ie":return n>=9;case"chrome":return n>=13;case"ff":return n>=6;case"ios":return n>=5;case"android":return!1;case"webkit":return n>=5.1;case"opera":return n>=10;default:return!1}}};for(var e in f)f[e]&&u.feature(e,f[e].call(),!0);u.feature()})(window);
|
||||
/*! head.load - v1.0.3 */
|
||||
(function(n,t){"use strict";function w(){}function u(n,t){if(n){typeof n=="object"&&(n=[].slice.call(n));for(var i=0,r=n.length;i<r;i++)t.call(n,n[i],i)}}function it(n,i){var r=Object.prototype.toString.call(i).slice(8,-1);return i!==t&&i!==null&&r===n}function s(n){return it("Function",n)}function a(n){return it("Array",n)}function et(n){var i=n.split("/"),t=i[i.length-1],r=t.indexOf("?");return r!==-1?t.substring(0,r):t}function f(n){(n=n||w,n._done)||(n(),n._done=1)}function ot(n,t,r,u){var f=typeof n=="object"?n:{test:n,success:!t?!1:a(t)?t:[t],failure:!r?!1:a(r)?r:[r],callback:u||w},e=!!f.test;return e&&!!f.success?(f.success.push(f.callback),i.load.apply(null,f.success)):e||!f.failure?u():(f.failure.push(f.callback),i.load.apply(null,f.failure)),i}function v(n){var t={},i,r;if(typeof n=="object")for(i in n)!n[i]||(t={name:i,url:n[i]});else t={name:et(n),url:n};return(r=c[t.name],r&&r.url===t.url)?r:(c[t.name]=t,t)}function y(n){n=n||c;for(var t in n)if(n.hasOwnProperty(t)&&n[t].state!==l)return!1;return!0}function st(n){n.state=ft;u(n.onpreload,function(n){n.call()})}function ht(n){n.state===t&&(n.state=nt,n.onpreload=[],rt({url:n.url,type:"cache"},function(){st(n)}))}function ct(){var n=arguments,t=n[n.length-1],r=[].slice.call(n,1),f=r[0];return(s(t)||(t=null),a(n[0]))?(n[0].push(t),i.load.apply(null,n[0]),i):(f?(u(r,function(n){s(n)||!n||ht(v(n))}),b(v(n[0]),s(f)?f:function(){i.load.apply(null,r)})):b(v(n[0])),i)}function lt(){var n=arguments,t=n[n.length-1],r={};return(s(t)||(t=null),a(n[0]))?(n[0].push(t),i.load.apply(null,n[0]),i):(u(n,function(n){n!==t&&(n=v(n),r[n.name]=n)}),u(n,function(n){n!==t&&(n=v(n),b(n,function(){y(r)&&f(t)}))}),i)}function b(n,t){if(t=t||w,n.state===l){t();return}if(n.state===tt){i.ready(n.name,t);return}if(n.state===nt){n.onpreload.push(function(){b(n,t)});return}n.state=tt;rt(n,function(){n.state=l;t();u(h[n.name],function(n){f(n)});o&&y()&&u(h.ALL,function(n){f(n)})})}function at(n){n=n||"";var t=n.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function rt(t,i){function e(t){t=t||n.event;u.onload=u.onreadystatechange=u.onerror=null;i()}function o(f){f=f||n.event;(f.type==="load"||/loaded|complete/.test(u.readyState)&&(!r.documentMode||r.documentMode<9))&&(n.clearTimeout(t.errorTimeout),n.clearTimeout(t.cssTimeout),u.onload=u.onreadystatechange=u.onerror=null,i())}function s(){if(t.state!==l&&t.cssRetries<=20){for(var i=0,f=r.styleSheets.length;i<f;i++)if(r.styleSheets[i].href===u.href){o({type:"load"});return}t.cssRetries++;t.cssTimeout=n.setTimeout(s,250)}}var u,h,f;i=i||w;h=at(t.url);h==="css"?(u=r.createElement("link"),u.type="text/"+(t.type||"css"),u.rel="stylesheet",u.href=t.url,t.cssRetries=0,t.cssTimeout=n.setTimeout(s,500)):(u=r.createElement("script"),u.type="text/"+(t.type||"javascript"),u.src=t.url);u.onload=u.onreadystatechange=o;u.onerror=e;u.async=!1;u.defer=!1;t.errorTimeout=n.setTimeout(function(){e({type:"timeout"})},7e3);f=r.head||r.getElementsByTagName("head")[0];f.insertBefore(u,f.lastChild)}function vt(){for(var t,u=r.getElementsByTagName("script"),n=0,f=u.length;n<f;n++)if(t=u[n].getAttribute("data-headjs-load"),!!t){i.load(t);return}}function yt(n,t){var v,p,e;return n===r?(o?f(t):d.push(t),i):(s(n)&&(t=n,n="ALL"),a(n))?(v={},u(n,function(n){v[n]=c[n];i.ready(n,function(){y(v)&&f(t)})}),i):typeof n!="string"||!s(t)?i:(p=c[n],p&&p.state===l||n==="ALL"&&y()&&o)?(f(t),i):(e=h[n],e?e.push(t):e=h[n]=[t],i)}function e(){if(!r.body){n.clearTimeout(i.readyTimeout);i.readyTimeout=n.setTimeout(e,50);return}o||(o=!0,vt(),u(d,function(n){f(n)}))}function k(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",k,!1),e()):r.readyState==="complete"&&(r.detachEvent("onreadystatechange",k),e())}var r=n.document,d=[],h={},c={},ut="async"in r.createElement("script")||"MozAppearance"in r.documentElement.style||n.opera,o,g=n.head_conf&&n.head_conf.head||"head",i=n[g]=n[g]||function(){i.ready.apply(null,arguments)},nt=1,ft=2,tt=3,l=4,p;if(r.readyState==="complete")e();else if(r.addEventListener)r.addEventListener("DOMContentLoaded",k,!1),n.addEventListener("load",e,!1);else{r.attachEvent("onreadystatechange",k);n.attachEvent("onload",e);p=!1;try{p=!n.frameElement&&r.documentElement}catch(wt){}p&&p.doScroll&&function pt(){if(!o){try{p.doScroll("left")}catch(t){n.clearTimeout(i.readyTimeout);i.readyTimeout=n.setTimeout(pt,50);return}e()}}()}i.load=i.js=ut?lt:ct;i.test=ot;i.ready=yt;i.ready(r,function(){y()&&u(h.ALL,function(n){f(n)});i.feature&&i.feature("domloaded",!0)})})(window);
|
||||
/*
|
||||
//# sourceMappingURL=head.min.js.map
|
||||
*/
|
2
lib/js/promise.js
Normal file
2
lib/js/promise.js
Normal file
@@ -0,0 +1,2 @@
|
||||
/* MIT | https://github.com/taylorhakes/promise-polyfill */
|
||||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(){}function t(e){if(!(this instanceof t))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],u(e,this)}function o(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,t._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(f){return void i(n.promise,f)}r(n.promise,o)}else(1===e._state?r:i)(n.promise,e._value)})):e._deferreds.push(n)}function r(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if(n instanceof t)return e._state=3,e._value=n,void f(e);if("function"==typeof o)return void u(function(e,n){return function(){e.apply(n,arguments)}}(o,n),e)}e._state=1,e._value=n,f(e)}catch(r){i(e,r)}}function i(e,n){e._state=2,e._value=n,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&t._immediateFn(function(){e._handled||t._unhandledRejectionFn(e._value)});for(var n=0,r=e._deferreds.length;r>n;n++)o(e,e._deferreds[n]);e._deferreds=null}function u(e,n){var t=!1;try{e(function(e){t||(t=!0,r(n,e))},function(e){t||(t=!0,i(n,e))})}catch(o){if(t)return;t=!0,i(n,o)}}var c=setTimeout;t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,t,r)),r},t.prototype["finally"]=e,t.all=function(e){return new t(function(n,t){function o(e,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(n){o(e,n)},t)}r[e]=f,0==--i&&n(r)}catch(c){t(c)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return n([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(n){n(e)})},t.reject=function(e){return new t(function(n,t){t(e)})},t.race=function(e){return new t(function(n,t){for(var o=0,r=e.length;r>o;o++)e[o].then(n,t)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=t});
|
5703
package-lock.json
generated
Normal file
5703
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
36
package.json
36
package.json
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "reveal.js",
|
||||
"version": "3.5.0",
|
||||
"version": "3.9.2",
|
||||
"description": "The HTML Presentation Framework",
|
||||
"homepage": "http://lab.hakim.se/reveal-js",
|
||||
"homepage": "http://revealjs.com",
|
||||
"subdomain": "revealjs",
|
||||
"main": "js/reveal.js",
|
||||
"scripts": {
|
||||
@@ -20,25 +20,25 @@
|
||||
"url": "git://github.com/hakimel/reveal.js.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
"node": ">=9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"express": "~4.14.0",
|
||||
"grunt": "~1.0.1",
|
||||
"grunt-autoprefixer": "~3.0.3",
|
||||
"grunt-cli": "~1.2.0",
|
||||
"grunt-contrib-connect": "~0.11.2",
|
||||
"grunt-contrib-cssmin": "~0.14.0",
|
||||
"grunt-contrib-jshint": "~0.11.3",
|
||||
"grunt-contrib-qunit": "~1.2.0",
|
||||
"grunt-contrib-uglify": "~0.9.2",
|
||||
"grunt-contrib-watch": "~1.0.0",
|
||||
"grunt-sass": "~1.2.0",
|
||||
"grunt-retire": "~0.3.10",
|
||||
"express": "^4.16.2",
|
||||
"grunt": "^1.0.4",
|
||||
"grunt-autoprefixer": "^3.0.4",
|
||||
"grunt-cli": "^1.3.2",
|
||||
"grunt-contrib-connect": "^2.0.0",
|
||||
"grunt-contrib-cssmin": "^3.0.0",
|
||||
"grunt-contrib-jshint": "^2.0.0",
|
||||
"grunt-contrib-qunit": "^3.1.0",
|
||||
"grunt-contrib-uglify": "^3.3.0",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-sass": "^3.0.2",
|
||||
"grunt-zip": "~0.17.1",
|
||||
"mustache": "~2.2.1",
|
||||
"node-sass": "~3.13.0",
|
||||
"socket.io": "^1.4.8"
|
||||
"load-grunt-tasks": "^4.0.0",
|
||||
"mustache": "^2.3.0",
|
||||
"node-sass": "^4.13.1",
|
||||
"socket.io": "^2.2.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
<link rel="stylesheet" href="../../css/reveal.css">
|
||||
<link rel="stylesheet" href="../../css/theme/white.css" id="theme">
|
||||
|
||||
<link rel="stylesheet" href="../../lib/css/zenburn.css">
|
||||
<link rel="stylesheet" href="../../lib/css/monokai.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -99,10 +99,16 @@
|
||||
</script>
|
||||
</section>
|
||||
|
||||
<!-- Images -->
|
||||
<section data-markdown>
|
||||
<script type="text/template">
|
||||

|
||||
</script>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../lib/js/head.min.js"></script>
|
||||
<script src="../../js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
@@ -115,7 +121,6 @@
|
||||
|
||||
// Optional libraries used to extend on reveal.js
|
||||
dependencies: [
|
||||
{ src: '../../lib/js/classList.js', condition: function() { return !document.body.classList; } },
|
||||
{ src: 'marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: 'markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: '../highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
||||
|
@@ -29,3 +29,8 @@ Content 3.1
|
||||
## External 3.2
|
||||
|
||||
Content 3.2
|
||||
|
||||
|
||||
## External 3.3
|
||||
|
||||

|
||||
|
@@ -7,18 +7,16 @@
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
root.marked = require( './marked' );
|
||||
root.RevealMarkdown = factory( root.marked );
|
||||
root.RevealMarkdown.initialize();
|
||||
} else if( typeof exports === 'object' ) {
|
||||
module.exports = factory( require( './marked' ) );
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.RevealMarkdown = factory( root.marked );
|
||||
root.RevealMarkdown.initialize();
|
||||
}
|
||||
}( this, function( marked ) {
|
||||
|
||||
var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$',
|
||||
DEFAULT_NOTES_SEPARATOR = 'note:',
|
||||
DEFAULT_NOTES_SEPARATOR = 'notes?:',
|
||||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$',
|
||||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$';
|
||||
|
||||
@@ -199,81 +197,108 @@
|
||||
*/
|
||||
function processSlides() {
|
||||
|
||||
var sections = document.querySelectorAll( '[data-markdown]'),
|
||||
section;
|
||||
return new Promise( function( resolve ) {
|
||||
|
||||
for( var i = 0, len = sections.length; i < len; i++ ) {
|
||||
var externalPromises = [];
|
||||
|
||||
section = sections[i];
|
||||
[].slice.call( document.querySelectorAll( '[data-markdown]') ).forEach( function( section, i ) {
|
||||
|
||||
if( section.getAttribute( 'data-markdown' ).length ) {
|
||||
if( section.getAttribute( 'data-markdown' ).length ) {
|
||||
|
||||
var xhr = new XMLHttpRequest(),
|
||||
url = section.getAttribute( 'data-markdown' );
|
||||
|
||||
datacharset = section.getAttribute( 'data-charset' );
|
||||
|
||||
// see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes
|
||||
if( datacharset != null && datacharset != '' ) {
|
||||
xhr.overrideMimeType( 'text/html; charset=' + datacharset );
|
||||
}
|
||||
|
||||
xhr.onreadystatechange = function() {
|
||||
if( xhr.readyState === 4 ) {
|
||||
// file protocol yields status code 0 (useful for local debug, mobile applications etc.)
|
||||
if ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status === 0 ) {
|
||||
externalPromises.push( loadExternalMarkdown( section ).then(
|
||||
|
||||
// Finished loading external file
|
||||
function( xhr, url ) {
|
||||
section.outerHTML = slidify( xhr.responseText, {
|
||||
separator: section.getAttribute( 'data-separator' ),
|
||||
verticalSeparator: section.getAttribute( 'data-separator-vertical' ),
|
||||
notesSeparator: section.getAttribute( 'data-separator-notes' ),
|
||||
attributes: getForwardedAttributes( section )
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
// Failed to load markdown
|
||||
function( xhr, url ) {
|
||||
section.outerHTML = '<section data-state="alert">' +
|
||||
'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.' +
|
||||
'Check your browser\'s JavaScript console for more details.' +
|
||||
'<p>Remember that you need to serve the presentation HTML from a HTTP server.</p>' +
|
||||
'</section>';
|
||||
|
||||
}
|
||||
|
||||
) );
|
||||
|
||||
}
|
||||
else if( section.getAttribute( 'data-separator' ) || section.getAttribute( 'data-separator-vertical' ) || section.getAttribute( 'data-separator-notes' ) ) {
|
||||
|
||||
section.outerHTML = slidify( getMarkdownFromSlide( section ), {
|
||||
separator: section.getAttribute( 'data-separator' ),
|
||||
verticalSeparator: section.getAttribute( 'data-separator-vertical' ),
|
||||
notesSeparator: section.getAttribute( 'data-separator-notes' ),
|
||||
attributes: getForwardedAttributes( section )
|
||||
});
|
||||
|
||||
}
|
||||
else {
|
||||
section.innerHTML = createMarkdownSlide( getMarkdownFromSlide( section ) );
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Promise.all( externalPromises ).then( resolve );
|
||||
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
function loadExternalMarkdown( section ) {
|
||||
|
||||
return new Promise( function( resolve, reject ) {
|
||||
|
||||
var xhr = new XMLHttpRequest(),
|
||||
url = section.getAttribute( 'data-markdown' );
|
||||
|
||||
datacharset = section.getAttribute( 'data-charset' );
|
||||
|
||||
// see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes
|
||||
if( datacharset != null && datacharset != '' ) {
|
||||
xhr.overrideMimeType( 'text/html; charset=' + datacharset );
|
||||
}
|
||||
|
||||
xhr.onreadystatechange = function( section, xhr ) {
|
||||
if( xhr.readyState === 4 ) {
|
||||
// file protocol yields status code 0 (useful for local debug, mobile applications etc.)
|
||||
if ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status === 0 ) {
|
||||
|
||||
resolve( xhr, url );
|
||||
|
||||
}
|
||||
};
|
||||
else {
|
||||
|
||||
xhr.open( 'GET', url, false );
|
||||
reject( xhr, url );
|
||||
|
||||
try {
|
||||
xhr.send();
|
||||
}
|
||||
catch ( e ) {
|
||||
alert( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e );
|
||||
}
|
||||
}
|
||||
}.bind( this, section, xhr );
|
||||
|
||||
}
|
||||
else if( section.getAttribute( 'data-separator' ) || section.getAttribute( 'data-separator-vertical' ) || section.getAttribute( 'data-separator-notes' ) ) {
|
||||
xhr.open( 'GET', url, true );
|
||||
|
||||
section.outerHTML = slidify( getMarkdownFromSlide( section ), {
|
||||
separator: section.getAttribute( 'data-separator' ),
|
||||
verticalSeparator: section.getAttribute( 'data-separator-vertical' ),
|
||||
notesSeparator: section.getAttribute( 'data-separator-notes' ),
|
||||
attributes: getForwardedAttributes( section )
|
||||
});
|
||||
try {
|
||||
xhr.send();
|
||||
}
|
||||
catch ( e ) {
|
||||
alert( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e );
|
||||
resolve( xhr, url );
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
section.innerHTML = createMarkdownSlide( getMarkdownFromSlide( section ) );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a node value has the attributes pattern.
|
||||
* If yes, extract it and add that value as one or several attributes
|
||||
* the the terget element.
|
||||
* to the target element.
|
||||
*
|
||||
* You need Cache Killer on Chrome to see the effect on any FOM transformation
|
||||
* directly on refresh (F5)
|
||||
@@ -342,44 +367,47 @@
|
||||
*/
|
||||
function convertSlides() {
|
||||
|
||||
var sections = document.querySelectorAll( '[data-markdown]');
|
||||
var sections = document.querySelectorAll( '[data-markdown]:not([data-markdown-parsed])');
|
||||
|
||||
for( var i = 0, len = sections.length; i < len; i++ ) {
|
||||
[].slice.call( sections ).forEach( function( section ) {
|
||||
|
||||
var section = sections[i];
|
||||
section.setAttribute( 'data-markdown-parsed', true )
|
||||
|
||||
// Only parse the same slide once
|
||||
if( !section.getAttribute( 'data-markdown-parsed' ) ) {
|
||||
var notes = section.querySelector( 'aside.notes' );
|
||||
var markdown = getMarkdownFromSlide( section );
|
||||
|
||||
section.setAttribute( 'data-markdown-parsed', true )
|
||||
|
||||
var notes = section.querySelector( 'aside.notes' );
|
||||
var markdown = getMarkdownFromSlide( section );
|
||||
|
||||
section.innerHTML = marked( markdown );
|
||||
addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) ||
|
||||
section.parentNode.getAttribute( 'data-element-attributes' ) ||
|
||||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR,
|
||||
section.getAttribute( 'data-attributes' ) ||
|
||||
section.parentNode.getAttribute( 'data-attributes' ) ||
|
||||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR);
|
||||
|
||||
// If there were notes, we need to re-add them after
|
||||
// having overwritten the section's HTML
|
||||
if( notes ) {
|
||||
section.appendChild( notes );
|
||||
}
|
||||
section.innerHTML = marked( markdown );
|
||||
addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) ||
|
||||
section.parentNode.getAttribute( 'data-element-attributes' ) ||
|
||||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR,
|
||||
section.getAttribute( 'data-attributes' ) ||
|
||||
section.parentNode.getAttribute( 'data-attributes' ) ||
|
||||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR);
|
||||
|
||||
// If there were notes, we need to re-add them after
|
||||
// having overwritten the section's HTML
|
||||
if( notes ) {
|
||||
section.appendChild( notes );
|
||||
}
|
||||
|
||||
}
|
||||
} );
|
||||
|
||||
return Promise.resolve();
|
||||
|
||||
}
|
||||
|
||||
// API
|
||||
return {
|
||||
var RevealMarkdown = {
|
||||
|
||||
/**
|
||||
* Starts processing and converting Markdown within the
|
||||
* current reveal.js deck.
|
||||
*
|
||||
* @param {function} callback function to invoke once
|
||||
* we've finished loading and parsing Markdown
|
||||
*/
|
||||
init: function( callback ) {
|
||||
|
||||
initialize: function() {
|
||||
if( typeof marked === 'undefined' ) {
|
||||
throw 'The reveal.js Markdown plugin requires marked to be loaded';
|
||||
}
|
||||
@@ -392,14 +420,14 @@
|
||||
});
|
||||
}
|
||||
|
||||
// marked can be configured via reveal.js config options
|
||||
var options = Reveal.getConfig().markdown;
|
||||
|
||||
if ( options ) {
|
||||
if( options ) {
|
||||
marked.setOptions( options );
|
||||
}
|
||||
|
||||
processSlides();
|
||||
convertSlides();
|
||||
return processSlides().then( convertSlides );
|
||||
|
||||
},
|
||||
|
||||
// TODO: Do these belong in the API?
|
||||
@@ -409,4 +437,10 @@
|
||||
|
||||
};
|
||||
|
||||
// Register our plugin so that reveal.js will call our
|
||||
// plugin 'init' method as part of the initialization
|
||||
Reveal.registerPlugin( 'markdown', RevealMarkdown );
|
||||
|
||||
return RevealMarkdown;
|
||||
|
||||
}));
|
||||
|
File diff suppressed because one or more lines are too long
@@ -7,33 +7,28 @@
|
||||
var RevealMath = window.RevealMath || (function(){
|
||||
|
||||
var options = Reveal.getConfig().math || {};
|
||||
options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
|
||||
options.config = options.config || 'TeX-AMS_HTML-full';
|
||||
var mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
|
||||
var config = options.config || 'TeX-AMS_HTML-full';
|
||||
var url = mathjax + '?config=' + config;
|
||||
|
||||
loadScript( options.mathjax + '?config=' + options.config, function() {
|
||||
var defaultOptions = {
|
||||
messageStyle: 'none',
|
||||
tex2jax: {
|
||||
inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ],
|
||||
skipTags: [ 'script', 'noscript', 'style', 'textarea', 'pre' ]
|
||||
},
|
||||
skipStartupTypeset: true
|
||||
};
|
||||
|
||||
MathJax.Hub.Config({
|
||||
messageStyle: 'none',
|
||||
tex2jax: {
|
||||
inlineMath: [['$','$'],['\\(','\\)']] ,
|
||||
skipTags: ['script','noscript','style','textarea','pre']
|
||||
},
|
||||
skipStartupTypeset: true
|
||||
});
|
||||
function defaults( options, defaultOptions ) {
|
||||
|
||||
// Typeset followed by an immediate reveal.js layout since
|
||||
// the typesetting process could affect slide height
|
||||
MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] );
|
||||
MathJax.Hub.Queue( Reveal.layout );
|
||||
for ( var i in defaultOptions ) {
|
||||
if ( !options.hasOwnProperty( i ) ) {
|
||||
options[i] = defaultOptions[i];
|
||||
}
|
||||
}
|
||||
|
||||
// Reprocess equations in slides when they turn visible
|
||||
Reveal.addEventListener( 'slidechanged', function( event ) {
|
||||
|
||||
MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] );
|
||||
|
||||
} );
|
||||
|
||||
} );
|
||||
}
|
||||
|
||||
function loadScript( url, callback ) {
|
||||
|
||||
@@ -64,4 +59,34 @@ var RevealMath = window.RevealMath || (function(){
|
||||
|
||||
}
|
||||
|
||||
return {
|
||||
init: function() {
|
||||
|
||||
defaults( options, defaultOptions );
|
||||
defaults( options.tex2jax, defaultOptions.tex2jax );
|
||||
options.mathjax = options.config = null;
|
||||
|
||||
loadScript( url, function() {
|
||||
|
||||
MathJax.Hub.Config( options );
|
||||
|
||||
// Typeset followed by an immediate reveal.js layout since
|
||||
// the typesetting process could affect slide height
|
||||
MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] );
|
||||
MathJax.Hub.Queue( Reveal.layout );
|
||||
|
||||
// Reprocess equations in slides when they turn visible
|
||||
Reveal.addEventListener( 'slidechanged', function( event ) {
|
||||
|
||||
MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] );
|
||||
|
||||
} );
|
||||
|
||||
} );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
Reveal.registerPlugin( 'math', RevealMath );
|
||||
|
@@ -19,6 +19,9 @@
|
||||
|
||||
};
|
||||
|
||||
// post once the page is loaded, so the client follows also on "open URL".
|
||||
window.addEventListener( 'load', post );
|
||||
|
||||
// Monitor events that trigger a change in state
|
||||
Reveal.addEventListener( 'slidechanged', post );
|
||||
Reveal.addEventListener( 'fragmentshown', post );
|
||||
@@ -28,4 +31,4 @@
|
||||
Reveal.addEventListener( 'paused', post );
|
||||
Reveal.addEventListener( 'resumed', post );
|
||||
|
||||
}());
|
||||
}());
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"name": "reveal-js-multiplex",
|
||||
"version": "1.0.0",
|
||||
"description": "reveal.js multiplex server",
|
||||
"homepage": "http://lab.hakim.se/reveal-js",
|
||||
"homepage": "http://revealjs.com",
|
||||
"scripts": {
|
||||
"start": "node index.js"
|
||||
},
|
||||
|
@@ -34,6 +34,22 @@
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#connection-status {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 20;
|
||||
padding: 30% 20% 20% 20%;
|
||||
font-size: 18px;
|
||||
color: #222;
|
||||
background: #fff;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.overlay-element {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
@@ -288,6 +304,8 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div id="connection-status">Loading speaker view...</div>
|
||||
|
||||
<div id="current-slide"></div>
|
||||
<div id="upcoming-slide"><span class="overlay-element label">Upcoming</span></div>
|
||||
<div id="speaker-controls">
|
||||
@@ -329,6 +347,8 @@
|
||||
upcomingSlide,
|
||||
layoutLabel,
|
||||
layoutDropdown,
|
||||
pendingCalls = {},
|
||||
lastRevealApiCallId = 0,
|
||||
connected = false;
|
||||
|
||||
var SPEAKER_LAYOUTS = {
|
||||
@@ -340,8 +360,16 @@
|
||||
|
||||
setupLayout();
|
||||
|
||||
var connectionStatus = document.querySelector( '#connection-status' );
|
||||
var connectionTimeout = setTimeout( function() {
|
||||
connectionStatus.innerHTML = 'Error connecting to main window.<br>Please try closing and reopening the speaker view.';
|
||||
}, 5000 );
|
||||
|
||||
window.addEventListener( 'message', function( event ) {
|
||||
|
||||
clearTimeout( connectionTimeout );
|
||||
connectionStatus.style.display = 'none';
|
||||
|
||||
var data = JSON.parse( event.data );
|
||||
|
||||
// The overview mode is only useful to the reveal.js instance
|
||||
@@ -356,6 +384,10 @@
|
||||
else if( data.type === 'state' ) {
|
||||
handleStateMessage( data );
|
||||
}
|
||||
else if( data.type === 'return' ) {
|
||||
pendingCalls[data.callId](data.result);
|
||||
delete pendingCalls[data.callId];
|
||||
}
|
||||
}
|
||||
// Messages sent by the reveal.js inside of the current slide preview
|
||||
else if( data && data.namespace === 'reveal' ) {
|
||||
@@ -372,6 +404,23 @@
|
||||
|
||||
} );
|
||||
|
||||
/**
|
||||
* Asynchronously calls the Reveal.js API of the main frame.
|
||||
*/
|
||||
function callRevealApi( methodName, methodArguments, callback ) {
|
||||
|
||||
var callId = ++lastRevealApiCallId;
|
||||
pendingCalls[callId] = callback;
|
||||
window.opener.postMessage( JSON.stringify( {
|
||||
namespace: 'reveal-notes',
|
||||
type: 'call',
|
||||
callId: callId,
|
||||
methodName: methodName,
|
||||
arguments: methodArguments
|
||||
} ), '*' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the main window is trying to establish a
|
||||
* connection.
|
||||
@@ -427,10 +476,17 @@
|
||||
* Forward keyboard events to the current slide window.
|
||||
* This enables keyboard events to work even if focus
|
||||
* isn't set on the current slide iframe.
|
||||
*
|
||||
* Block F5 default handling, it reloads and disconnects
|
||||
* the speaker notes window.
|
||||
*/
|
||||
function setupKeyboard() {
|
||||
|
||||
document.addEventListener( 'keydown', function( event ) {
|
||||
if( event.keyCode === 116 || ( event.metaKey && event.keyCode === 82 ) ) {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
|
||||
} );
|
||||
|
||||
@@ -479,28 +535,54 @@
|
||||
|
||||
}
|
||||
|
||||
function getTimings() {
|
||||
function getTimings( callback ) {
|
||||
|
||||
var slides = Reveal.getSlides();
|
||||
var defaultTiming = Reveal.getConfig().defaultTiming;
|
||||
if (defaultTiming == null) {
|
||||
return null;
|
||||
}
|
||||
var timings = [];
|
||||
for ( var i in slides ) {
|
||||
var slide = slides[i];
|
||||
var timing = defaultTiming;
|
||||
if( slide.hasAttribute( 'data-timing' )) {
|
||||
var t = slide.getAttribute( 'data-timing' );
|
||||
timing = parseInt(t);
|
||||
if( isNaN(timing) ) {
|
||||
console.warn("Could not parse timing '" + t + "' of slide " + i + "; using default of " + defaultTiming);
|
||||
timing = defaultTiming;
|
||||
callRevealApi( 'getSlidesAttributes', [], function ( slideAttributes ) {
|
||||
callRevealApi( 'getConfig', [], function ( config ) {
|
||||
var totalTime = config.totalTime;
|
||||
var minTimePerSlide = config.minimumTimePerSlide || 0;
|
||||
var defaultTiming = config.defaultTiming;
|
||||
if ((defaultTiming == null) && (totalTime == null)) {
|
||||
callback(null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
timings.push(timing);
|
||||
}
|
||||
return timings;
|
||||
// Setting totalTime overrides defaultTiming
|
||||
if (totalTime) {
|
||||
defaultTiming = 0;
|
||||
}
|
||||
var timings = [];
|
||||
for ( var i in slideAttributes ) {
|
||||
var slide = slideAttributes[ i ];
|
||||
var timing = defaultTiming;
|
||||
if( slide.hasOwnProperty( 'data-timing' )) {
|
||||
var t = slide[ 'data-timing' ];
|
||||
timing = parseInt(t);
|
||||
if( isNaN(timing) ) {
|
||||
console.warn("Could not parse timing '" + t + "' of slide " + i + "; using default of " + defaultTiming);
|
||||
timing = defaultTiming;
|
||||
}
|
||||
}
|
||||
timings.push(timing);
|
||||
}
|
||||
if ( totalTime ) {
|
||||
// After we've allocated time to individual slides, we summarize it and
|
||||
// subtract it from the total time
|
||||
var remainingTime = totalTime - timings.reduce( function(a, b) { return a + b; }, 0 );
|
||||
// The remaining time is divided by the number of slides that have 0 seconds
|
||||
// allocated at the moment, giving the average time-per-slide on the remaining slides
|
||||
var remainingSlides = (timings.filter( function(x) { return x == 0 }) ).length
|
||||
var timePerSlide = Math.round( remainingTime / remainingSlides, 0 )
|
||||
// And now we replace every zero-value timing with that average
|
||||
timings = timings.map( function(x) { return (x==0 ? timePerSlide : x) } );
|
||||
}
|
||||
var slidesUnderMinimum = timings.filter( function(x) { return (x < minTimePerSlide) } ).length
|
||||
if ( slidesUnderMinimum ) {
|
||||
message = "The pacing time for " + slidesUnderMinimum + " slide(s) is under the configured minimum of " + minTimePerSlide + " seconds. Check the data-timing attribute on individual slides, or consider increasing the totalTime or minimumTimePerSlide configuration options (or removing some slides).";
|
||||
alert(message);
|
||||
}
|
||||
callback( timings );
|
||||
} );
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
@@ -508,15 +590,15 @@
|
||||
* Return the number of seconds allocated for presenting
|
||||
* all slides up to and including this one.
|
||||
*/
|
||||
function getTimeAllocated(timings) {
|
||||
function getTimeAllocated( timings, callback ) {
|
||||
|
||||
var slides = Reveal.getSlides();
|
||||
var allocated = 0;
|
||||
var currentSlide = Reveal.getSlidePastCount();
|
||||
for (var i in slides.slice(0, currentSlide + 1)) {
|
||||
allocated += timings[i];
|
||||
}
|
||||
return allocated;
|
||||
callRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {
|
||||
var allocated = 0;
|
||||
for (var i in timings.slice(0, currentSlide + 1)) {
|
||||
allocated += timings[i];
|
||||
}
|
||||
callback( allocated );
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
@@ -538,12 +620,51 @@
|
||||
pacingMinutesEl = pacingEl.querySelector( '.minutes-value' ),
|
||||
pacingSecondsEl = pacingEl.querySelector( '.seconds-value' );
|
||||
|
||||
var timings = getTimings();
|
||||
if (timings !== null) {
|
||||
pacingTitleEl.style.removeProperty('display');
|
||||
pacingEl.style.removeProperty('display');
|
||||
var timings = null;
|
||||
getTimings( function ( _timings ) {
|
||||
|
||||
timings = _timings;
|
||||
if (_timings !== null) {
|
||||
pacingTitleEl.style.removeProperty('display');
|
||||
pacingEl.style.removeProperty('display');
|
||||
}
|
||||
|
||||
// Update once directly
|
||||
_updateTimer();
|
||||
|
||||
// Then update every second
|
||||
setInterval( _updateTimer, 1000 );
|
||||
|
||||
} );
|
||||
|
||||
|
||||
function _resetTimer() {
|
||||
|
||||
if (timings == null) {
|
||||
start = new Date();
|
||||
_updateTimer();
|
||||
}
|
||||
else {
|
||||
// Reset timer to beginning of current slide
|
||||
getTimeAllocated( timings, function ( slideEndTimingSeconds ) {
|
||||
var slideEndTiming = slideEndTimingSeconds * 1000;
|
||||
callRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {
|
||||
var currentSlideTiming = timings[currentSlide] * 1000;
|
||||
var previousSlidesTiming = slideEndTiming - currentSlideTiming;
|
||||
var now = new Date();
|
||||
start = new Date(now.getTime() - previousSlidesTiming);
|
||||
_updateTimer();
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
timeEl.addEventListener( 'click', function() {
|
||||
_resetTimer();
|
||||
return false;
|
||||
} );
|
||||
|
||||
function _displayTime( hrEl, minEl, secEl, time) {
|
||||
|
||||
var sign = Math.sign(time) == -1 ? "-" : "";
|
||||
@@ -585,52 +706,26 @@
|
||||
|
||||
function _updatePacing(diff) {
|
||||
|
||||
var slideEndTiming = getTimeAllocated(timings) * 1000;
|
||||
var currentSlide = Reveal.getSlidePastCount();
|
||||
var currentSlideTiming = timings[currentSlide] * 1000;
|
||||
var timeLeftCurrentSlide = slideEndTiming - diff;
|
||||
if (timeLeftCurrentSlide < 0) {
|
||||
pacingEl.className = 'pacing behind';
|
||||
}
|
||||
else if (timeLeftCurrentSlide < currentSlideTiming) {
|
||||
pacingEl.className = 'pacing on-track';
|
||||
}
|
||||
else {
|
||||
pacingEl.className = 'pacing ahead';
|
||||
}
|
||||
_displayTime( pacingHoursEl, pacingMinutesEl, pacingSecondsEl, timeLeftCurrentSlide );
|
||||
getTimeAllocated( timings, function ( slideEndTimingSeconds ) {
|
||||
var slideEndTiming = slideEndTimingSeconds * 1000;
|
||||
|
||||
callRevealApi( 'getSlidePastCount', [], function ( currentSlide ) {
|
||||
var currentSlideTiming = timings[currentSlide] * 1000;
|
||||
var timeLeftCurrentSlide = slideEndTiming - diff;
|
||||
if (timeLeftCurrentSlide < 0) {
|
||||
pacingEl.className = 'pacing behind';
|
||||
}
|
||||
else if (timeLeftCurrentSlide < currentSlideTiming) {
|
||||
pacingEl.className = 'pacing on-track';
|
||||
}
|
||||
else {
|
||||
pacingEl.className = 'pacing ahead';
|
||||
}
|
||||
_displayTime( pacingHoursEl, pacingMinutesEl, pacingSecondsEl, timeLeftCurrentSlide );
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
// Update once directly
|
||||
_updateTimer();
|
||||
|
||||
// Then update every second
|
||||
setInterval( _updateTimer, 1000 );
|
||||
|
||||
function _resetTimer() {
|
||||
|
||||
if (timings == null) {
|
||||
start = new Date();
|
||||
}
|
||||
else {
|
||||
// Reset timer to beginning of current slide
|
||||
var slideEndTiming = getTimeAllocated(timings) * 1000;
|
||||
var currentSlide = Reveal.getSlidePastCount();
|
||||
var currentSlideTiming = timings[currentSlide] * 1000;
|
||||
var previousSlidesTiming = slideEndTiming - currentSlideTiming;
|
||||
var now = new Date();
|
||||
start = new Date(now.getTime() - previousSlidesTiming);
|
||||
}
|
||||
_updateTimer();
|
||||
|
||||
}
|
||||
|
||||
timeEl.addEventListener( 'click', function() {
|
||||
_resetTimer();
|
||||
return false;
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -675,7 +770,7 @@
|
||||
document.body.setAttribute( 'data-speaker-layout', value );
|
||||
|
||||
// Persist locally
|
||||
if( window.localStorage ) {
|
||||
if( supportsLocalStorage() ) {
|
||||
window.localStorage.setItem( 'reveal-speaker-layout', value );
|
||||
}
|
||||
|
||||
@@ -687,7 +782,7 @@
|
||||
*/
|
||||
function getLayout() {
|
||||
|
||||
if( window.localStorage ) {
|
||||
if( supportsLocalStorage() ) {
|
||||
var layout = window.localStorage.getItem( 'reveal-speaker-layout' );
|
||||
if( layout ) {
|
||||
return layout;
|
||||
@@ -701,6 +796,19 @@
|
||||
|
||||
}
|
||||
|
||||
function supportsLocalStorage() {
|
||||
|
||||
try {
|
||||
localStorage.setItem('test', 'test');
|
||||
localStorage.removeItem('test');
|
||||
return true;
|
||||
}
|
||||
catch( e ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function zeroPadInteger( num ) {
|
||||
|
||||
var str = '00' + parseInt( num );
|
||||
|
@@ -11,18 +11,27 @@
|
||||
*/
|
||||
var RevealNotes = (function() {
|
||||
|
||||
var notesPopup = null;
|
||||
|
||||
function openNotes( notesFilePath ) {
|
||||
|
||||
if (notesPopup && !notesPopup.closed) {
|
||||
notesPopup.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if( !notesFilePath ) {
|
||||
var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
|
||||
jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
|
||||
notesFilePath = jsFileLocation + 'notes.html';
|
||||
}
|
||||
|
||||
var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
|
||||
notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
|
||||
|
||||
// Allow popup window access to Reveal API
|
||||
notesPopup.Reveal = this.Reveal;
|
||||
if( !notesPopup ) {
|
||||
alert( 'Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.' );
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to the notes window through a postmessage handshake.
|
||||
@@ -47,9 +56,28 @@ var RevealNotes = (function() {
|
||||
clearInterval( connectInterval );
|
||||
onConnected();
|
||||
}
|
||||
if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) {
|
||||
callRevealApi( data.methodName, data.arguments, data.callId );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the specified Reveal.js method with the provided argument
|
||||
* and then pushes the result to the notes frame.
|
||||
*/
|
||||
function callRevealApi( methodName, methodArguments, callId ) {
|
||||
|
||||
var result = Reveal[methodName].apply( Reveal, methodArguments );
|
||||
notesPopup.postMessage( JSON.stringify( {
|
||||
namespace: 'reveal-notes',
|
||||
type: 'return',
|
||||
result: result,
|
||||
callId: callId
|
||||
} ), '*' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts the current slide data to the notes window
|
||||
*/
|
||||
@@ -123,33 +151,28 @@ var RevealNotes = (function() {
|
||||
|
||||
}
|
||||
|
||||
if( !/receiver/i.test( window.location.search ) ) {
|
||||
return {
|
||||
init: function() {
|
||||
|
||||
// If the there's a 'notes' query set, open directly
|
||||
if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
|
||||
openNotes();
|
||||
}
|
||||
if( !/receiver/i.test( window.location.search ) ) {
|
||||
|
||||
// Open the notes when the 's' key is hit
|
||||
document.addEventListener( 'keydown', function( event ) {
|
||||
// Disregard the event if the target is editable or a
|
||||
// modifier is present
|
||||
if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
|
||||
// If the there's a 'notes' query set, open directly
|
||||
if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
|
||||
openNotes();
|
||||
}
|
||||
|
||||
// Disregard the event if keyboard is disabled
|
||||
if ( Reveal.getConfig().keyboard === false ) return;
|
||||
// Open the notes when the 's' key is hit
|
||||
Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function() {
|
||||
openNotes();
|
||||
} );
|
||||
|
||||
if( event.keyCode === 83 ) {
|
||||
event.preventDefault();
|
||||
openNotes();
|
||||
}
|
||||
}, false );
|
||||
|
||||
// Show our keyboard shortcut in the reveal.js help overlay
|
||||
if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' );
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
return { open: openNotes };
|
||||
open: openNotes
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
Reveal.registerPlugin( 'notes', RevealNotes );
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* phantomjs script for printing presentations to PDF.
|
||||
*
|
||||
* Example:
|
||||
* phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf
|
||||
* phantomjs print-pdf.js "http://revealjs.com?print-pdf" reveal-demo.pdf
|
||||
*
|
||||
* @author Manuel Bieh (https://github.com/manuelbieh)
|
||||
* @author Hakim El Hattab (https://github.com/hakimel)
|
||||
@@ -42,28 +42,26 @@ probePage.open( inputFile, function( status ) {
|
||||
|
||||
printPage.open( inputFile, function( status ) {
|
||||
console.log( 'Export PDF: Preparing pdf [3/4]')
|
||||
printPage.evaluate(function() {
|
||||
printPage.evaluate( function() {
|
||||
Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom );
|
||||
});
|
||||
} );
|
||||
} );
|
||||
|
||||
printPage.onCallback = function(data) {
|
||||
printPage.onCallback = function( data ) {
|
||||
// For some reason we need to "jump the queue" for syntax highlighting to work.
|
||||
// See: http://stackoverflow.com/a/3580132/129269
|
||||
setTimeout(function() {
|
||||
setTimeout( function() {
|
||||
console.log( 'Export PDF: Writing file [4/4]' );
|
||||
printPage.render( outputFile );
|
||||
console.log( 'Export PDF: Finished successfully!' );
|
||||
phantom.exit();
|
||||
}, 0);
|
||||
}, 0 );
|
||||
};
|
||||
}
|
||||
else {
|
||||
|
||||
console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' );
|
||||
phantom.exit(1);
|
||||
console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' );
|
||||
phantom.exit( 1 );
|
||||
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
|
@@ -19,111 +19,117 @@ var RevealSearch = (function() {
|
||||
function Hilitor(id, tag)
|
||||
{
|
||||
|
||||
var targetNode = document.getElementById(id) || document.body;
|
||||
var hiliteTag = tag || "EM";
|
||||
var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM|SPAN)$");
|
||||
var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"];
|
||||
var wordColor = [];
|
||||
var colorIdx = 0;
|
||||
var matchRegex = "";
|
||||
var matchingSlides = [];
|
||||
var targetNode = document.getElementById(id) || document.body;
|
||||
var hiliteTag = tag || "EM";
|
||||
var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM)$");
|
||||
var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"];
|
||||
var wordColor = [];
|
||||
var colorIdx = 0;
|
||||
var matchRegex = "";
|
||||
var matchingSlides = [];
|
||||
|
||||
this.setRegex = function(input)
|
||||
{
|
||||
input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|");
|
||||
matchRegex = new RegExp("(" + input + ")","i");
|
||||
}
|
||||
this.setRegex = function(input)
|
||||
{
|
||||
input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|");
|
||||
matchRegex = new RegExp("(" + input + ")","i");
|
||||
}
|
||||
|
||||
this.getRegex = function()
|
||||
{
|
||||
return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
|
||||
}
|
||||
this.getRegex = function()
|
||||
{
|
||||
return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
|
||||
}
|
||||
|
||||
// recursively apply word highlighting
|
||||
this.hiliteWords = function(node)
|
||||
{
|
||||
if(node == undefined || !node) return;
|
||||
if(!matchRegex) return;
|
||||
if(skipTags.test(node.nodeName)) return;
|
||||
// recursively apply word highlighting
|
||||
this.hiliteWords = function(node)
|
||||
{
|
||||
if(node == undefined || !node) return;
|
||||
if(!matchRegex) return;
|
||||
if(skipTags.test(node.nodeName)) return;
|
||||
|
||||
if(node.hasChildNodes()) {
|
||||
for(var i=0; i < node.childNodes.length; i++)
|
||||
this.hiliteWords(node.childNodes[i]);
|
||||
}
|
||||
if(node.nodeType == 3) { // NODE_TEXT
|
||||
if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) {
|
||||
//find the slide's section element and save it in our list of matching slides
|
||||
var secnode = node.parentNode;
|
||||
while (secnode.nodeName != 'SECTION') {
|
||||
secnode = secnode.parentNode;
|
||||
}
|
||||
|
||||
var slideIndex = Reveal.getIndices(secnode);
|
||||
var slidelen = matchingSlides.length;
|
||||
var alreadyAdded = false;
|
||||
for (var i=0; i < slidelen; i++) {
|
||||
if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) {
|
||||
alreadyAdded = true;
|
||||
}
|
||||
}
|
||||
if (! alreadyAdded) {
|
||||
matchingSlides.push(slideIndex);
|
||||
}
|
||||
|
||||
if(!wordColor[regs[0].toLowerCase()]) {
|
||||
wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length];
|
||||
}
|
||||
if(node.hasChildNodes()) {
|
||||
for(var i=0; i < node.childNodes.length; i++)
|
||||
this.hiliteWords(node.childNodes[i]);
|
||||
}
|
||||
if(node.nodeType == 3) { // NODE_TEXT
|
||||
if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) {
|
||||
//find the slide's section element and save it in our list of matching slides
|
||||
var secnode = node;
|
||||
while (secnode != null && secnode.nodeName != 'SECTION') {
|
||||
secnode = secnode.parentNode;
|
||||
}
|
||||
|
||||
var match = document.createElement(hiliteTag);
|
||||
match.appendChild(document.createTextNode(regs[0]));
|
||||
match.style.backgroundColor = wordColor[regs[0].toLowerCase()];
|
||||
match.style.fontStyle = "inherit";
|
||||
match.style.color = "#000";
|
||||
var slideIndex = Reveal.getIndices(secnode);
|
||||
var slidelen = matchingSlides.length;
|
||||
var alreadyAdded = false;
|
||||
for (var i=0; i < slidelen; i++) {
|
||||
if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) {
|
||||
alreadyAdded = true;
|
||||
}
|
||||
}
|
||||
if (! alreadyAdded) {
|
||||
matchingSlides.push(slideIndex);
|
||||
}
|
||||
|
||||
var after = node.splitText(regs.index);
|
||||
after.nodeValue = after.nodeValue.substring(regs[0].length);
|
||||
node.parentNode.insertBefore(match, after);
|
||||
}
|
||||
}
|
||||
};
|
||||
if(!wordColor[regs[0].toLowerCase()]) {
|
||||
wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length];
|
||||
}
|
||||
|
||||
// remove highlighting
|
||||
this.remove = function()
|
||||
{
|
||||
var arr = document.getElementsByTagName(hiliteTag);
|
||||
while(arr.length && (el = arr[0])) {
|
||||
el.parentNode.replaceChild(el.firstChild, el);
|
||||
}
|
||||
};
|
||||
var match = document.createElement(hiliteTag);
|
||||
match.appendChild(document.createTextNode(regs[0]));
|
||||
match.style.backgroundColor = wordColor[regs[0].toLowerCase()];
|
||||
match.style.fontStyle = "inherit";
|
||||
match.style.color = "#000";
|
||||
|
||||
// start highlighting at target node
|
||||
this.apply = function(input)
|
||||
{
|
||||
if(input == undefined || !input) return;
|
||||
this.remove();
|
||||
this.setRegex(input);
|
||||
this.hiliteWords(targetNode);
|
||||
return matchingSlides;
|
||||
};
|
||||
var after = node.splitText(regs.index);
|
||||
after.nodeValue = after.nodeValue.substring(regs[0].length);
|
||||
node.parentNode.insertBefore(match, after);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// remove highlighting
|
||||
this.remove = function()
|
||||
{
|
||||
var arr = document.getElementsByTagName(hiliteTag);
|
||||
while(arr.length && (el = arr[0])) {
|
||||
el.parentNode.replaceChild(el.firstChild, el);
|
||||
}
|
||||
};
|
||||
|
||||
// start highlighting at target node
|
||||
this.apply = function(input)
|
||||
{
|
||||
if(input == undefined || !input) return;
|
||||
this.remove();
|
||||
this.setRegex(input);
|
||||
this.hiliteWords(targetNode);
|
||||
return matchingSlides;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
function openSearch() {
|
||||
//ensure the search term input dialog is visible and has focus:
|
||||
var inputboxdiv = document.getElementById("searchinputdiv");
|
||||
var inputbox = document.getElementById("searchinput");
|
||||
inputbox.style.display = "inline";
|
||||
inputboxdiv.style.display = "inline";
|
||||
inputbox.focus();
|
||||
inputbox.select();
|
||||
}
|
||||
|
||||
function closeSearch() {
|
||||
var inputboxdiv = document.getElementById("searchinputdiv");
|
||||
inputboxdiv.style.display = "none";
|
||||
if(myHilitor) myHilitor.remove();
|
||||
}
|
||||
|
||||
function toggleSearch() {
|
||||
var inputbox = document.getElementById("searchinput");
|
||||
if (inputbox.style.display !== "inline") {
|
||||
var inputboxdiv = document.getElementById("searchinputdiv");
|
||||
if (inputboxdiv.style.display !== "inline") {
|
||||
openSearch();
|
||||
}
|
||||
else {
|
||||
inputbox.style.display = "none";
|
||||
myHilitor.remove();
|
||||
closeSearch();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,19 +138,27 @@ function Hilitor(id, tag)
|
||||
if (searchboxDirty) {
|
||||
var searchstring = document.getElementById("searchinput").value;
|
||||
|
||||
//find the keyword amongst the slides
|
||||
myHilitor = new Hilitor("slidecontent");
|
||||
matchedSlides = myHilitor.apply(searchstring);
|
||||
currentMatchedIndex = 0;
|
||||
if (searchstring === '') {
|
||||
if(myHilitor) myHilitor.remove();
|
||||
matchedSlides = null;
|
||||
}
|
||||
else {
|
||||
//find the keyword amongst the slides
|
||||
myHilitor = new Hilitor("slidecontent");
|
||||
matchedSlides = myHilitor.apply(searchstring);
|
||||
currentMatchedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//navigate to the next slide that has the keyword, wrapping to the first if necessary
|
||||
if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) {
|
||||
currentMatchedIndex = 0;
|
||||
}
|
||||
if (matchedSlides.length > currentMatchedIndex) {
|
||||
Reveal.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v);
|
||||
currentMatchedIndex++;
|
||||
if (matchedSlides) {
|
||||
//navigate to the next slide that has the keyword, wrapping to the first if necessary
|
||||
if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) {
|
||||
currentMatchedIndex = 0;
|
||||
}
|
||||
if (matchedSlides.length > currentMatchedIndex) {
|
||||
Reveal.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v);
|
||||
currentMatchedIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,19 +169,20 @@ function Hilitor(id, tag)
|
||||
var searchElement = document.createElement( 'div' );
|
||||
searchElement.id = "searchinputdiv";
|
||||
searchElement.classList.add( 'searchdiv' );
|
||||
searchElement.style.position = 'absolute';
|
||||
searchElement.style.top = '10px';
|
||||
searchElement.style.left = '10px';
|
||||
//embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/:
|
||||
searchElement.style.position = 'absolute';
|
||||
searchElement.style.top = '10px';
|
||||
searchElement.style.right = '10px';
|
||||
searchElement.style.zIndex = 10;
|
||||
//embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/:
|
||||
searchElement.innerHTML = '<span><input type="search" id="searchinput" class="searchinput" style="vertical-align: top;"/><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJiSURBVHjatFZNaxNBGH5md+Mmu92NVdKDRipSAyqCghgQD4L4cRe86UUtAQ+eFCxoa4/25EXBFi8eBE+eRPoDhB6KgiiixdAPCEkx2pjvTXadd9yNsflwuyUDD/O+u8PzzDPvzOwyx3EwyCZhwG3gAkp7MnpjgbopjsltcD4gjuXZZKeAR348MYLYTm3LzOs/y3j3JTfZxgXWXmTuwPHIc4VmoOmv5IrI53+AO2DdHLjkDWQ3GoEEVFXtXQOvkSnPWcyUceviLhwbDYv8/XIVj97kse7TodLvZXxYxrPUHkQ1ufXs3FEdybEIxucySOesoNvUgWU1cP3MkCBfTFdw9fGaAMVmRELq7LBw2Q3/FaAxxWIRpw+ZIr/7IouPqzUBiqmdHAv7EuhRAwf1er2Vy4x1jW3b2d5Jfvu5IPp7l2LYbcgCFFNb+FoJ7oBqEAqFMPNqFcmEgVMJDfMT+1tvN0pNjERlMS6QA5pFOKxiKVPFhakPeL3It+WGJUDxt2wFR+JhzI7v5ctkd8DXOZAkCYYxhO+lKm4+Xfqz/rIixBuNBl7eOYzkQQNzqX249mRl6zUgEcYkaJrGhUwBinVdh6IouPzwE6/DL5w4oLkH8y981aDf+uq6hlKpJESiUdNfDZi7/ehG9K6KfiA3pml0PLcsq+cSMTj2NL9ukc4UOmz7AZ3+crkC4mHujFvXNaMFB3bEr8xPS6p5O+jXxq4VZtaen7/PwzrntjcLUE0iHPS1Ud1cdiEJl/8WivZk0wXd7zWOMkeF8s0CcAmkNrC2nvXZDbbbN73ccYnZoH9bfgswAFzAe9/h3dbKAAAAAElFTkSuQmCC" id="searchbutton" class="searchicon" style="vertical-align: top; margin-top: -1px;"/></span>';
|
||||
dom.wrapper.appendChild( searchElement );
|
||||
}
|
||||
|
||||
document.getElementById("searchbutton").addEventListener( 'click', function(event) {
|
||||
document.getElementById( 'searchbutton' ).addEventListener( 'click', function(event) {
|
||||
doSearch();
|
||||
}, false );
|
||||
|
||||
document.getElementById("searchinput").addEventListener( 'keyup', function( event ) {
|
||||
document.getElementById( 'searchinput' ).addEventListener( 'keyup', function( event ) {
|
||||
switch (event.keyCode) {
|
||||
case 13:
|
||||
event.preventDefault();
|
||||
@@ -179,18 +194,13 @@ function Hilitor(id, tag)
|
||||
}
|
||||
}, false );
|
||||
|
||||
// Open the search when the 's' key is hit (yes, this conflicts with the notes plugin, disabling for now)
|
||||
/*
|
||||
document.addEventListener( 'keydown', function( event ) {
|
||||
// Disregard the event if the target is editable or a
|
||||
// modifier is present
|
||||
if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
|
||||
|
||||
if( event.keyCode === 83 ) {
|
||||
if( event.key == "F" && (event.ctrlKey || event.metaKey) ) { //Control+Shift+f
|
||||
event.preventDefault();
|
||||
openSearch();
|
||||
toggleSearch();
|
||||
}
|
||||
}, false );
|
||||
*/
|
||||
if( window.Reveal ) Reveal.registerKeyboardShortcut( 'CTRL + Shift + F', 'Search' );
|
||||
closeSearch();
|
||||
return { open: openSearch };
|
||||
})();
|
||||
|
@@ -1,42 +1,34 @@
|
||||
// Custom reveal.js integration
|
||||
(function(){
|
||||
var isEnabled = true;
|
||||
var RevealZoom = (function(){
|
||||
|
||||
document.querySelector( '.reveal .slides' ).addEventListener( 'mousedown', function( event ) {
|
||||
var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : 'alt' ) + 'Key';
|
||||
return {
|
||||
init: function() {
|
||||
|
||||
var zoomPadding = 20;
|
||||
var revealScale = Reveal.getScale();
|
||||
Reveal.getRevealElement().addEventListener( 'mousedown', function( event ) {
|
||||
var defaultModifier = /Linux/.test( window.navigator.platform ) ? 'ctrl' : 'alt';
|
||||
|
||||
if( event[ modifier ] && isEnabled ) {
|
||||
event.preventDefault();
|
||||
var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : defaultModifier ) + 'Key';
|
||||
var zoomLevel = ( Reveal.getConfig().zoomLevel ? Reveal.getConfig().zoomLevel : 2 );
|
||||
|
||||
var bounds;
|
||||
var originalDisplay = event.target.style.display;
|
||||
if( event[ modifier ] && !Reveal.isOverview() ) {
|
||||
event.preventDefault();
|
||||
|
||||
// Get the bounding rect of the contents, not the containing box
|
||||
if( window.getComputedStyle( event.target ).display === 'block' ) {
|
||||
event.target.style.display = 'inline-block';
|
||||
bounds = event.target.getBoundingClientRect();
|
||||
event.target.style.display = originalDisplay;
|
||||
} else {
|
||||
bounds = event.target.getBoundingClientRect();
|
||||
}
|
||||
zoom.to({
|
||||
x: event.clientX,
|
||||
y: event.clientY,
|
||||
scale: zoomLevel,
|
||||
pan: false
|
||||
});
|
||||
}
|
||||
} );
|
||||
|
||||
zoom.to({
|
||||
x: ( bounds.left * revealScale ) - zoomPadding,
|
||||
y: ( bounds.top * revealScale ) - zoomPadding,
|
||||
width: ( bounds.width * revealScale ) + ( zoomPadding * 2 ),
|
||||
height: ( bounds.height * revealScale ) + ( zoomPadding * 2 ),
|
||||
pan: false
|
||||
});
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'overviewshown', function() { isEnabled = false; } );
|
||||
Reveal.addEventListener( 'overviewhidden', function() { isEnabled = true; } );
|
||||
})();
|
||||
|
||||
Reveal.registerPlugin( 'zoom', RevealZoom );
|
||||
|
||||
/*!
|
||||
* zoom.js 0.3 (modified for use with reveal.js)
|
||||
* http://lab.hakim.se/zoom-js
|
||||
@@ -283,6 +275,3 @@ var zoom = (function(){
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
|
||||
|
||||
|
1
test/assets/external-script-a.js
Normal file
1
test/assets/external-script-a.js
Normal file
@@ -0,0 +1 @@
|
||||
window.externalScriptSequence += 'A';
|
1
test/assets/external-script-b.js
Normal file
1
test/assets/external-script-b.js
Normal file
@@ -0,0 +1 @@
|
||||
window.externalScriptSequence += 'B';
|
1
test/assets/external-script-c.js
Normal file
1
test/assets/external-script-c.js
Normal file
@@ -0,0 +1 @@
|
||||
window.externalScriptSequence += 'C';
|
1
test/assets/external-script-d.js
Normal file
1
test/assets/external-script-d.js
Normal file
@@ -0,0 +1 @@
|
||||
window.externalScriptSequence += 'D';
|
2
test/examples/assets/beeping.txt
Normal file
2
test/examples/assets/beeping.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Source: https://freesound.org/people/fennelliott/sounds/379419/
|
||||
License: CC0 (public domain)
|
BIN
test/examples/assets/beeping.wav
Normal file
BIN
test/examples/assets/beeping.wav
Normal file
Binary file not shown.
@@ -30,11 +30,15 @@
|
||||
<h2>Empty Slide</h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Auto-playing audio</h2>
|
||||
<audio src="assets/beeping.wav" data-autoplay></audio>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../../lib/js/head.min.js"></script>
|
||||
<script src="../../js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
|
@@ -82,6 +82,14 @@
|
||||
\]
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>TeX Macros</h3>
|
||||
|
||||
Here is a common vector space:
|
||||
\[L^2(\R) = \set{u : \R \to \R}{\int_\R |u|^2 < +\infty}\]
|
||||
used in functional analysis.
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<section>
|
||||
<h3>The Lorenz Equations</h3>
|
||||
@@ -153,13 +161,20 @@
|
||||
\]
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>TeX Macros</h3>
|
||||
|
||||
Here is a common vector space:
|
||||
\[L^2(\R) = \set{u : \R \to \R}{\int_\R |u|^2 < +\infty}\]
|
||||
used in functional analysis.
|
||||
</section>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../../lib/js/head.min.js"></script>
|
||||
<script src="../../js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
@@ -170,11 +185,16 @@
|
||||
|
||||
math: {
|
||||
// mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
|
||||
config: 'TeX-AMS_HTML-full'
|
||||
config: 'TeX-AMS_HTML-full',
|
||||
TeX: {
|
||||
Macros: {
|
||||
R: '\\mathbb{R}',
|
||||
set: [ '\\left\\{#1 \\; ; \\; #2\\right\\}', 2 ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
dependencies: [
|
||||
{ src: '../../lib/js/classList.js' },
|
||||
{ src: '../../plugin/math/math.js', async: true }
|
||||
]
|
||||
});
|
||||
|
@@ -122,7 +122,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../../lib/js/head.min.js"></script>
|
||||
<script src="../../js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
|
@@ -81,7 +81,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../../lib/js/head.min.js"></script>
|
||||
<script src="../../js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
|
@@ -1,244 +0,0 @@
|
||||
/**
|
||||
* QUnit v1.12.0 - A JavaScript Unit Testing Framework
|
||||
*
|
||||
* http://qunitjs.com
|
||||
*
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/** Header */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #8699a4;
|
||||
background-color: #0d3349;
|
||||
|
||||
font-size: 1.5em;
|
||||
line-height: 1em;
|
||||
font-weight: normal;
|
||||
|
||||
border-radius: 5px 5px 0 0;
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
-webkit-border-top-left-radius: 5px;
|
||||
}
|
||||
|
||||
#qunit-header a {
|
||||
text-decoration: none;
|
||||
color: #c2ccd1;
|
||||
}
|
||||
|
||||
#qunit-header a:hover,
|
||||
#qunit-header a:focus {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar label {
|
||||
display: inline-block;
|
||||
padding: 0 .5em 0 .1em;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 0 0.5em 2em;
|
||||
color: #5E740B;
|
||||
background-color: #eee;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 0 0.5em 2.5em;
|
||||
background-color: #2b81af;
|
||||
color: #fff;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-container {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 0.5em 0.4em 2.5em;
|
||||
border-bottom: 1px solid #fff;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #c2ccd1;
|
||||
text-decoration: none;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#qunit-tests li .runtime {
|
||||
float: right;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.qunit-assert-list {
|
||||
margin-top: 0.5em;
|
||||
padding: 0.5em;
|
||||
|
||||
background-color: #fff;
|
||||
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
}
|
||||
|
||||
.qunit-collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests table {
|
||||
border-collapse: collapse;
|
||||
margin-top: .2em;
|
||||
}
|
||||
|
||||
#qunit-tests th {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
padding: 0 .5em 0 0;
|
||||
}
|
||||
|
||||
#qunit-tests td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#qunit-tests pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#qunit-tests del {
|
||||
background-color: #e0f2be;
|
||||
color: #374e0c;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests ins {
|
||||
background-color: #ffcaca;
|
||||
color: #500;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*** Test Counts */
|
||||
|
||||
#qunit-tests b.counts { color: black; }
|
||||
#qunit-tests b.passed { color: #5E740B; }
|
||||
#qunit-tests b.failed { color: #710909; }
|
||||
|
||||
#qunit-tests li li {
|
||||
padding: 5px;
|
||||
background-color: #fff;
|
||||
border-bottom: none;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #3c510c;
|
||||
background-color: #fff;
|
||||
border-left: 10px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests .pass .test-name { color: #366097; }
|
||||
|
||||
#qunit-tests .pass .test-actual,
|
||||
#qunit-tests .pass .test-expected { color: #999999; }
|
||||
|
||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #fff;
|
||||
border-left: 10px solid #EE5757;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#qunit-tests > li:last-child {
|
||||
border-radius: 0 0 5px 5px;
|
||||
-moz-border-radius: 0 0 5px 5px;
|
||||
-webkit-border-bottom-right-radius: 5px;
|
||||
-webkit-border-bottom-left-radius: 5px;
|
||||
}
|
||||
|
||||
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
|
||||
#qunit-tests .fail .test-name,
|
||||
#qunit-tests .fail .module-name { color: #000000; }
|
||||
|
||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||
#qunit-tests .fail .test-expected { color: green; }
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
padding: 0.5em 0.5em 0.5em 2.5em;
|
||||
|
||||
color: #2b81af;
|
||||
background-color: #D2E0E6;
|
||||
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
#qunit-testresult .module-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
#qunit-fixture {
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
}
|
2212
test/qunit-1.12.0.js
2212
test/qunit-1.12.0.js
File diff suppressed because it is too large
Load Diff
436
test/qunit-2.5.0.css
Normal file
436
test/qunit-2.5.0.css
Normal file
@@ -0,0 +1,436 @@
|
||||
/*!
|
||||
* QUnit 2.5.0
|
||||
* https://qunitjs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2018-01-10T02:56Z
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/** Header (excluding toolbar) */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #8699A4;
|
||||
background-color: #0D3349;
|
||||
|
||||
font-size: 1.5em;
|
||||
line-height: 1em;
|
||||
font-weight: 400;
|
||||
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
|
||||
#qunit-header a {
|
||||
text-decoration: none;
|
||||
color: #C2CCD1;
|
||||
}
|
||||
|
||||
#qunit-header a:hover,
|
||||
#qunit-header a:focus {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-filteredTest {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #366097;
|
||||
background-color: #F4FF77;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #FFF;
|
||||
background-color: #2B81AF;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
|
||||
/** Toolbar */
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #5E740B;
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar .clearfix {
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar input[type=checkbox],
|
||||
#qunit-testrunner-toolbar input[type=radio] {
|
||||
margin: 3px;
|
||||
vertical-align: -2px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar input[type=text] {
|
||||
box-sizing: border-box;
|
||||
height: 1.6em;
|
||||
}
|
||||
|
||||
.qunit-url-config,
|
||||
.qunit-filter,
|
||||
#qunit-modulefilter {
|
||||
display: inline-block;
|
||||
line-height: 2.1em;
|
||||
}
|
||||
|
||||
.qunit-filter,
|
||||
#qunit-modulefilter {
|
||||
float: right;
|
||||
position: relative;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.qunit-url-config label {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-search {
|
||||
box-sizing: border-box;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-search-container:after {
|
||||
position: absolute;
|
||||
right: 0.3em;
|
||||
content: "\25bc";
|
||||
color: black;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown {
|
||||
/* align with #qunit-modulefilter-search */
|
||||
box-sizing: border-box;
|
||||
width: 400px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
margin-top: 0.8em;
|
||||
|
||||
border: 1px solid #D3D3D3;
|
||||
border-top: none;
|
||||
border-radius: 0 0 .25em .25em;
|
||||
color: #000;
|
||||
background-color: #F5F5F5;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown .clickable.checked {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
background-color: #D2E0E6;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown .clickable:hover {
|
||||
color: #FFF;
|
||||
background-color: #0D3349;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-actions {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
|
||||
/* align with #qunit-modulefilter-dropdown-list */
|
||||
font: smaller/1.5em sans-serif;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > * {
|
||||
box-sizing: border-box;
|
||||
max-height: 2.8em;
|
||||
display: block;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > button {
|
||||
float: right;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > :last-child {
|
||||
/* insert padding to align with checkbox margins */
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
border-top: 2px groove threedhighlight;
|
||||
padding: 0.4em 0 0;
|
||||
font: smaller/1.5em sans-serif;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list li {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list .clickable {
|
||||
display: block;
|
||||
padding-left: 0.15em;
|
||||
}
|
||||
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 1em 0.4em 1em;
|
||||
border-bottom: 1px solid #FFF;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests > li {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests li.running,
|
||||
#qunit-tests li.pass,
|
||||
#qunit-tests li.fail,
|
||||
#qunit-tests li.skipped,
|
||||
#qunit-tests li.aborted {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.running,
|
||||
#qunit-tests.hidepass li.pass:not(.todo) {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li.skipped strong {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #C2CCD1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests li p a {
|
||||
padding: 0.25em;
|
||||
color: #6B6464;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#qunit-tests li .runtime {
|
||||
float: right;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.qunit-assert-list {
|
||||
margin-top: 0.5em;
|
||||
padding: 0.5em;
|
||||
|
||||
background-color: #FFF;
|
||||
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.qunit-source {
|
||||
margin: 0.6em 0 0.3em;
|
||||
}
|
||||
|
||||
.qunit-collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests table {
|
||||
border-collapse: collapse;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
#qunit-tests th {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
padding: 0 0.5em 0 0;
|
||||
}
|
||||
|
||||
#qunit-tests td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#qunit-tests pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#qunit-tests del {
|
||||
color: #374E0C;
|
||||
background-color: #E0F2BE;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests ins {
|
||||
color: #500;
|
||||
background-color: #FFCACA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*** Test Counts */
|
||||
|
||||
#qunit-tests b.counts { color: #000; }
|
||||
#qunit-tests b.passed { color: #5E740B; }
|
||||
#qunit-tests b.failed { color: #710909; }
|
||||
|
||||
#qunit-tests li li {
|
||||
padding: 5px;
|
||||
background-color: #FFF;
|
||||
border-bottom: none;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #3C510C;
|
||||
background-color: #FFF;
|
||||
border-left: 10px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests .pass .test-name { color: #366097; }
|
||||
|
||||
#qunit-tests .pass .test-actual,
|
||||
#qunit-tests .pass .test-expected { color: #999; }
|
||||
|
||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #FFF;
|
||||
border-left: 10px solid #EE5757;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#qunit-tests > li:last-child {
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
||||
#qunit-tests .fail .test-name,
|
||||
#qunit-tests .fail .module-name { color: #000; }
|
||||
|
||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||
#qunit-tests .fail .test-expected { color: #008000; }
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
|
||||
/*** Aborted tests */
|
||||
#qunit-tests .aborted { color: #000; background-color: orange; }
|
||||
/*** Skipped tests */
|
||||
|
||||
#qunit-tests .skipped {
|
||||
background-color: #EBECE9;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-todo-label,
|
||||
#qunit-tests .qunit-skipped-label {
|
||||
background-color: #F4FF77;
|
||||
display: inline-block;
|
||||
font-style: normal;
|
||||
color: #366097;
|
||||
line-height: 1.8em;
|
||||
padding: 0 0.5em;
|
||||
margin: -0.4em 0.4em -0.4em 0;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-todo-label {
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
color: #2B81AF;
|
||||
background-color: #D2E0E6;
|
||||
|
||||
border-bottom: 1px solid #FFF;
|
||||
}
|
||||
#qunit-testresult .clearfix {
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
#qunit-testresult .module-name {
|
||||
font-weight: 700;
|
||||
}
|
||||
#qunit-testresult-display {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
width: 85%;
|
||||
float:left;
|
||||
}
|
||||
#qunit-testresult-controls {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
width: 10%;
|
||||
float:left;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
#qunit-fixture {
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
}
|
5188
test/qunit-2.5.0.js
Normal file
5188
test/qunit-2.5.0.js
Normal file
File diff suppressed because it is too large
Load Diff
78
test/test-dependencies-async.html
Normal file
78
test/test-dependencies-async.html
Normal file
@@ -0,0 +1,78 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Async Dependencies</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div class="reveal" style="display: none;">
|
||||
|
||||
<div class="slides">
|
||||
|
||||
<section>Slide content</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script>
|
||||
var externalScriptSequence = '';
|
||||
var scriptCount = 0;
|
||||
|
||||
QUnit.config.autostart = false;
|
||||
QUnit.module( 'Async Dependencies' );
|
||||
|
||||
QUnit.test( 'Async scripts are loaded', function( assert ) {
|
||||
assert.expect( 5 );
|
||||
var done = assert.async( 5 );
|
||||
|
||||
function callback( event ) {
|
||||
if( externalScriptSequence.length === 1 ) {
|
||||
assert.ok( externalScriptSequence === 'A', 'first callback was sync script' );
|
||||
done();
|
||||
}
|
||||
else {
|
||||
assert.ok( true, 'async script loaded' );
|
||||
done();
|
||||
}
|
||||
|
||||
if( externalScriptSequence.length === 4 ) {
|
||||
assert.ok( externalScriptSequence.indexOf( 'A' ) !== -1 &&
|
||||
externalScriptSequence.indexOf( 'B' ) !== -1 &&
|
||||
externalScriptSequence.indexOf( 'C' ) !== -1 &&
|
||||
externalScriptSequence.indexOf( 'D' ) !== -1, 'four unique scripts were loaded' );
|
||||
done();
|
||||
}
|
||||
|
||||
scriptCount ++;
|
||||
}
|
||||
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
{ src: 'assets/external-script-a.js', async: false, callback: callback },
|
||||
{ src: 'assets/external-script-b.js', async: true, callback: callback },
|
||||
{ src: 'assets/external-script-c.js', async: true, callback: callback },
|
||||
{ src: 'assets/external-script-d.js', async: true, callback: callback }
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
QUnit.start();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
54
test/test-dependencies.html
Normal file
54
test/test-dependencies.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Dependencies</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div class="reveal" style="display: none;">
|
||||
|
||||
<div class="slides">
|
||||
|
||||
<section>Slide content</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script>
|
||||
window.externalScriptSequence = '';
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Dependencies' );
|
||||
|
||||
QUnit.test( 'Load synchronous scripts', function( assert ) {
|
||||
assert.strictEqual( window.externalScriptSequence, 'ABC', 'Loaded and executed in order' );
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
{ src: 'assets/external-script-a.js' },
|
||||
{ src: 'assets/external-script-b.js' },
|
||||
{ src: 'assets/external-script-c.js' }
|
||||
]
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
74
test/test-grid-navigation.html
Normal file
74
test/test-grid-navigation.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Grid</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div class="reveal" style="display: none;">
|
||||
|
||||
<div class="slides">
|
||||
|
||||
<section>0</section>
|
||||
<section>
|
||||
<section>1.1</section>
|
||||
<section>1.2</section>
|
||||
<section>1.3</section>
|
||||
<section>1.4</section>
|
||||
</section>
|
||||
<section>
|
||||
<section>2.1</section>
|
||||
<section>2.2</section>
|
||||
<section>2.3</section>
|
||||
<section>2.4</section>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script>
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Grid Navigation' );
|
||||
|
||||
QUnit.test( 'Disabled', function( assert ) {
|
||||
Reveal.right();
|
||||
Reveal.down();
|
||||
Reveal.down();
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined }, 'Correct starting point' );
|
||||
Reveal.right();
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: undefined }, 'Moves to top when going to adjacent stack' );
|
||||
});
|
||||
|
||||
QUnit.test( 'Enabled', function( assert ) {
|
||||
Reveal.configure({ navigationMode: 'grid' });
|
||||
Reveal.slide( 0, 0 );
|
||||
Reveal.right();
|
||||
Reveal.down();
|
||||
Reveal.down();
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined }, 'Correct starting point' );
|
||||
Reveal.right();
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 2, f: undefined }, 'Remains at same vertical index when going to adjacent stack' );
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
104
test/test-iframe-backgrounds.html
Normal file
104
test/test-iframe-backgrounds.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Iframe Backgrounds</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div class="reveal" style="display: none;">
|
||||
|
||||
<div class="slides">
|
||||
|
||||
<section data-background-iframe="#1">1</section>
|
||||
<section data-background-iframe="#2">2</section>
|
||||
<section data-background-iframe="#3" data-preload>3</section>
|
||||
<section data-background-iframe="#4">4</section>
|
||||
<section data-background-iframe="#5">5</section>
|
||||
<section data-background-iframe="#6">6</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
function getIframe( index ) {
|
||||
return document.querySelectorAll( '.slide-background' )[index].querySelector( 'iframe' );
|
||||
}
|
||||
|
||||
QUnit.module( 'Iframe' );
|
||||
|
||||
QUnit.test( 'Using default settings', function( assert ) {
|
||||
|
||||
Reveal.slide(0);
|
||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'not preloaded when within viewDistance' );
|
||||
|
||||
Reveal.slide(1);
|
||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
||||
|
||||
Reveal.slide(0);
|
||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'unloaded when slide becomes invisible' );
|
||||
|
||||
});
|
||||
|
||||
QUnit.test( 'Using data-preload', function( assert ) {
|
||||
|
||||
Reveal.slide(1);
|
||||
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
||||
|
||||
Reveal.slide(0);
|
||||
assert.strictEqual( getIframe(3).hasAttribute( 'src' ), false, 'unloads outside of viewDistance' );
|
||||
|
||||
});
|
||||
|
||||
QUnit.test( 'Using preloadIframes: true', function( assert ) {
|
||||
|
||||
Reveal.configure({ preloadIframes: true });
|
||||
|
||||
Reveal.slide(1);
|
||||
assert.strictEqual( getIframe(0).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
||||
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
||||
|
||||
});
|
||||
|
||||
QUnit.test( 'Using preloadIframes: false', function( assert ) {
|
||||
|
||||
Reveal.configure({ preloadIframes: false });
|
||||
|
||||
Reveal.slide(0);
|
||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
|
||||
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
|
||||
|
||||
Reveal.slide(1);
|
||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
||||
|
||||
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize({
|
||||
viewDistance: 3
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
108
test/test-iframes.html
Normal file
108
test/test-iframes.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Iframes</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div class="reveal" style="display: none;">
|
||||
|
||||
<div class="slides">
|
||||
|
||||
<section>1</section>
|
||||
<section>2</section>
|
||||
<section>
|
||||
<iframe class="default-iframe" data-src="#"></iframe>
|
||||
<iframe class="preload-iframe" data-src="#" data-preload></iframe>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
var defaultIframe = document.querySelector( '.default-iframe' ),
|
||||
preloadIframe = document.querySelector( '.preload-iframe' );
|
||||
|
||||
QUnit.module( 'Iframe' );
|
||||
|
||||
QUnit.test( 'Using default settings', function( assert ) {
|
||||
|
||||
Reveal.slide(1);
|
||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'not preloaded when within viewDistance' );
|
||||
|
||||
Reveal.slide(2);
|
||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
||||
|
||||
Reveal.slide(1);
|
||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'unloaded when slide becomes invisible' );
|
||||
|
||||
});
|
||||
|
||||
QUnit.test( 'Using data-preload', function( assert ) {
|
||||
|
||||
Reveal.slide(1);
|
||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
||||
|
||||
Reveal.slide(2);
|
||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becoems visible' );
|
||||
|
||||
Reveal.slide(0);
|
||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), false, 'unloads outside of viewDistance' );
|
||||
|
||||
});
|
||||
|
||||
QUnit.test( 'Using preloadIframes: true', function( assert ) {
|
||||
|
||||
Reveal.configure({ preloadIframes: true });
|
||||
|
||||
Reveal.slide(1);
|
||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
||||
|
||||
Reveal.slide(2);
|
||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
||||
|
||||
});
|
||||
|
||||
QUnit.test( 'Using preloadIframes: false', function( assert ) {
|
||||
|
||||
Reveal.configure({ preloadIframes: false });
|
||||
|
||||
Reveal.slide(0);
|
||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
|
||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
|
||||
|
||||
Reveal.slide(2);
|
||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
||||
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize({
|
||||
viewDistance: 2
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -7,7 +7,7 @@
|
||||
<title>reveal.js - Test Markdown Element Attributes</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-1.12.0.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -66,8 +66,7 @@
|
||||
|
||||
Test
|
||||
|
||||

|
||||
<!-- {_class="reveal stretch"} -->
|
||||
 <!-- {_class="reveal stretch"} -->
|
||||
|
||||
</script>
|
||||
</section>
|
||||
@@ -122,11 +121,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../lib/js/head.min.js"></script>
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="../plugin/markdown/marked.js"></script>
|
||||
<script src="../plugin/markdown/markdown.js"></script>
|
||||
<script src="qunit-1.12.0.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script src="test-markdown-element-attributes.js"></script>
|
||||
|
||||
|
@@ -1,46 +1,44 @@
|
||||
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
||||
test( 'Vertical separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 4, 'found four slides' );
|
||||
QUnit.test( 'Vertical separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 4, 'found four slides' );
|
||||
});
|
||||
|
||||
|
||||
test( 'Attributes on element header in vertical slides', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.fade-out' ).length, 1, 'found one vertical slide with class fragment.fade-out on header' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.shrink' ).length, 1, 'found one vertical slide with class fragment.shrink on header' );
|
||||
QUnit.test( 'Attributes on element header in vertical slides', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.fade-out' ).length, 1, 'found one vertical slide with class fragment.fade-out on header' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.shrink' ).length, 1, 'found one vertical slide with class fragment.shrink on header' );
|
||||
});
|
||||
|
||||
test( 'Attributes on element paragraphs in vertical slides', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section>section p.fragment.grow' ).length, 2, 'found a vertical slide with two paragraphs with class fragment.grow' );
|
||||
QUnit.test( 'Attributes on element paragraphs in vertical slides', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section p.fragment.grow' ).length, 2, 'found a vertical slide with two paragraphs with class fragment.grow' );
|
||||
});
|
||||
|
||||
test( 'Attributes on element list items in vertical slides', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' );
|
||||
QUnit.test( 'Attributes on element list items in vertical slides', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' );
|
||||
});
|
||||
|
||||
test( 'Attributes on element paragraphs in horizontal slides', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-red' ).length, 4, 'found a horizontal slide with four paragraphs with class fragment.grow' );
|
||||
});
|
||||
test( 'Attributes on element list items in horizontal slides', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section li.fragment.highlight-green' ).length, 5, 'found a horizontal slide with five list items with class fragment.roll-in' );
|
||||
});
|
||||
test( 'Attributes on element list items in horizontal slides', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section img.reveal.stretch' ).length, 1, 'found a horizontal slide with stretched image, class img.reveal.stretch' );
|
||||
QUnit.test( 'Attributes on element paragraphs in horizontal slides', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-red' ).length, 4, 'found a horizontal slide with four paragraphs with class fragment.grow' );
|
||||
});
|
||||
|
||||
test( 'Attributes on elements in vertical slides with default element attribute separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section h2.fragment.highlight-red' ).length, 2, 'found two h2 titles with fragment highlight-red in vertical slides with default element attribute separator' );
|
||||
QUnit.test( 'Attributes on element list items in horizontal slides', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section li.fragment.highlight-green' ).length, 5, 'found a horizontal slide with five list items with class fragment.roll-in' );
|
||||
});
|
||||
|
||||
test( 'Attributes on elements in single slides with default element attribute separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-blue' ).length, 3, 'found three elements with fragment highlight-blue in single slide with default element attribute separator' );
|
||||
QUnit.test( 'Attributes on element image in horizontal slides', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section img.reveal.stretch' ).length, 1, 'found a horizontal slide with stretched image, class img.reveal.stretch' );
|
||||
});
|
||||
|
||||
QUnit.test( 'Attributes on elements in vertical slides with default element attribute separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section h2.fragment.highlight-red' ).length, 2, 'found two h2 titles with fragment highlight-red in vertical slides with default element attribute separator' );
|
||||
});
|
||||
|
||||
QUnit.test( 'Attributes on elements in single slides with default element attribute separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-blue' ).length, 3, 'found three elements with fragment highlight-blue in single slide with default element attribute separator' );
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize();
|
||||
|
||||
|
@@ -7,30 +7,31 @@
|
||||
<title>reveal.js - Test Markdown</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-1.12.0.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div class="reveal" style="display: none;">
|
||||
|
||||
<div class="slides">
|
||||
<section data-markdown="simple.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
|
||||
<!-- <section data-markdown="simple.md" data-separator="^\r?\n\r?\n\r?\n" data-separator-vertical="^\r?\n\r?\n"></section> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../lib/js/head.min.js"></script>
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="../plugin/highlight/highlight.js"></script>
|
||||
<script src="../plugin/markdown/marked.js"></script>
|
||||
<script src="../plugin/markdown/markdown.js"></script>
|
||||
<script src="qunit-1.12.0.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script src="test-markdown-external.js"></script>
|
||||
<!-- <script src="test-markdown-external.js"></script> -->
|
||||
|
||||
<!-- Test disabled 28/2/2019 by Hakim – Markdown plugin needs to be updated to load extenal files asycnhronously -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,24 +1,20 @@
|
||||
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
||||
test( 'Vertical separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
|
||||
QUnit.test( 'Vertical separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
|
||||
});
|
||||
|
||||
test( 'Horizontal separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' );
|
||||
QUnit.test( 'Horizontal separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' );
|
||||
});
|
||||
|
||||
test( 'Language highlighter', function() {
|
||||
strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' );
|
||||
strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' );
|
||||
QUnit.test( 'Language highlighter', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' );
|
||||
assert.strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' );
|
||||
});
|
||||
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize();
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<title>reveal.js - Test Markdown Options</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-1.12.0.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -31,9 +31,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../lib/js/head.min.js"></script>
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-1.12.0.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script src="test-markdown-options.js"></script>
|
||||
|
||||
|
@@ -2,15 +2,15 @@ Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
||||
test( 'Options are set', function() {
|
||||
strictEqual( marked.defaults.smartypants, true );
|
||||
QUnit.test( 'Options are set', function( assert ) {
|
||||
assert.strictEqual( marked.defaults.smartypants, true );
|
||||
});
|
||||
|
||||
test( 'Smart quotes are activated', function() {
|
||||
QUnit.test( 'Smart quotes are activated', function( assert ) {
|
||||
var text = document.querySelector( '.reveal .slides>section>p' ).textContent;
|
||||
|
||||
strictEqual( /['"]/.test( text ), false );
|
||||
strictEqual( /[“”‘’]/.test( text ), true );
|
||||
assert.strictEqual( /['"]/.test( text ), false );
|
||||
assert.strictEqual( /[“”‘’]/.test( text ), true );
|
||||
});
|
||||
|
||||
} );
|
||||
@@ -18,7 +18,8 @@ Reveal.addEventListener( 'ready', function() {
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
{ src: '../plugin/markdown/marked.js' },
|
||||
{ src: '../plugin/markdown/markdown.js' },
|
||||
// Test loading JS files with query strings
|
||||
{ src: '../plugin/markdown/markdown.js?query=string' },
|
||||
],
|
||||
markdown: {
|
||||
smartypants: true
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<title>reveal.js - Test Markdown Attributes</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-1.12.0.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -116,11 +116,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../lib/js/head.min.js"></script>
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="../plugin/markdown/marked.js"></script>
|
||||
<script src="../plugin/markdown/markdown.js"></script>
|
||||
<script src="qunit-1.12.0.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script src="test-markdown-slide-attributes.js"></script>
|
||||
|
||||
|
@@ -1,47 +1,44 @@
|
||||
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
||||
test( 'Vertical separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' );
|
||||
QUnit.test( 'Vertical separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' );
|
||||
});
|
||||
|
||||
test( 'Id on slide', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' );
|
||||
QUnit.test( 'Id on slide', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' );
|
||||
});
|
||||
|
||||
test( 'data-background attributes', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
|
||||
QUnit.test( 'data-background attributes', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
|
||||
});
|
||||
|
||||
test( 'data-transition attributes', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' );
|
||||
QUnit.test( 'data-transition attributes', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' );
|
||||
});
|
||||
|
||||
test( 'data-background attributes with default separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
|
||||
QUnit.test( 'data-background attributes with default separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
|
||||
});
|
||||
|
||||
test( 'data-transition attributes with default separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' );
|
||||
QUnit.test( 'data-transition attributes with default separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' );
|
||||
});
|
||||
|
||||
test( 'data-transition attributes with inline content', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' );
|
||||
QUnit.test( 'data-transition attributes with inline content', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' );
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize();
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<title>reveal.js - Test Markdown</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-1.12.0.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -40,11 +40,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../lib/js/head.min.js"></script>
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="../plugin/markdown/marked.js"></script>
|
||||
<script src="../plugin/markdown/markdown.js"></script>
|
||||
<script src="qunit-1.12.0.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script src="test-markdown.js"></script>
|
||||
|
||||
|
@@ -1,15 +1,11 @@
|
||||
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
||||
test( 'Vertical separator', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
|
||||
QUnit.test( 'Vertical separator', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
|
||||
});
|
||||
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize();
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="../css/print/pdf.css">
|
||||
<link rel="stylesheet" href="qunit-1.12.0.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<section>
|
||||
<h1>1</h1>
|
||||
<img data-src="fake-url.png">
|
||||
<img data-src="">
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -73,9 +73,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../lib/js/head.min.js"></script>
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-1.12.0.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script src="test-pdf.js"></script>
|
||||
|
||||
|
@@ -1,15 +1,12 @@
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
// Only one test for now, we're mainly ensuring that there
|
||||
// are no execution errors when running PDF mode
|
||||
|
||||
test( 'Reveal.isReady', function() {
|
||||
strictEqual( Reveal.isReady(), true, 'returns true' );
|
||||
QUnit.test( 'Reveal.isReady', function( assert ) {
|
||||
assert.strictEqual( Reveal.isReady(), true, 'returns true' );
|
||||
});
|
||||
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize({ pdf: true });
|
||||
|
||||
|
105
test/test-plugins.html
Normal file
105
test/test-plugins.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Plugins</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div class="reveal" style="display: none;">
|
||||
|
||||
<div class="slides">
|
||||
|
||||
<section>Slide content</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
QUnit.module( 'Plugins' );
|
||||
|
||||
var initCounter = { PluginB: 0, PluginC: 0, PluginD: 0 };
|
||||
|
||||
// Plugin with no init method
|
||||
var PluginA = {};
|
||||
|
||||
// Plugin with init method
|
||||
var PluginB = { init: function() {
|
||||
initCounter['PluginB'] += 1;
|
||||
} };
|
||||
|
||||
// Async plugin with init method
|
||||
var PluginC = { init: function() {
|
||||
return new Promise(function( resolve ) {
|
||||
setTimeout( () => {
|
||||
initCounter['PluginC'] += 1;
|
||||
resolve();
|
||||
}, 1000 );
|
||||
});
|
||||
} };
|
||||
|
||||
// Plugin initialized after reveal.js is ready
|
||||
var PluginD = { init: function() {
|
||||
initCounter['PluginD'] += 1;
|
||||
} };
|
||||
|
||||
var PluginE = {};
|
||||
|
||||
Reveal.registerPlugin( 'PluginA', PluginA );
|
||||
Reveal.registerPlugin( 'PluginB', PluginB );
|
||||
Reveal.registerPlugin( 'PluginC', PluginC );
|
||||
|
||||
Reveal.initialize();
|
||||
|
||||
QUnit.test( 'Can initialize synchronously', function( assert ) {
|
||||
assert.strictEqual( initCounter['PluginB'], 1 );
|
||||
|
||||
Reveal.registerPlugin( 'PluginB', PluginB );
|
||||
|
||||
assert.strictEqual( initCounter['PluginB'], 1, 'prevents duplicate registration' );
|
||||
});
|
||||
|
||||
QUnit.test( 'Can initialize asynchronously', function( assert ) {
|
||||
assert.expect( 3 );
|
||||
var done = assert.async( 2 );
|
||||
|
||||
assert.strictEqual( initCounter['PluginC'], 0, 'async plugin not immediately initialized' );
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
assert.strictEqual( initCounter['PluginC'], 1, 'finsihed initializing when reveal.js dispatches "ready"' );
|
||||
done();
|
||||
|
||||
Reveal.registerPlugin( 'PluginD', PluginD );
|
||||
assert.strictEqual( initCounter['PluginD'], 1, 'plugin registered after reveal.js is ready still initiailizes' );
|
||||
done();
|
||||
});
|
||||
} );
|
||||
|
||||
QUnit.test( 'Can check if plugin is registered', function( assert ) {
|
||||
assert.strictEqual( Reveal.hasPlugin( 'PluginA' ), true );
|
||||
assert.strictEqual( Reveal.hasPlugin( 'PluginE' ), false );
|
||||
Reveal.registerPlugin( 'PluginE', PluginE );
|
||||
assert.strictEqual( Reveal.hasPlugin( 'PluginE' ), true );
|
||||
} );
|
||||
|
||||
QUnit.test( 'Can retrieve plugin instance', function( assert ) {
|
||||
assert.strictEqual( Reveal.getPlugin( 'PluginB' ), PluginB );
|
||||
} );
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
139
test/test-state.html
Normal file
139
test/test-state.html
Normal file
@@ -0,0 +1,139 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test State</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
|
||||
<div class="reveal" style="display: none;">
|
||||
|
||||
<div class="slides">
|
||||
|
||||
<section>No state</section>
|
||||
<section id="slide2" data-state="state1">State 1</section>
|
||||
<section data-state="state1">State 1</section>
|
||||
<section data-state="state2">State 2</section>
|
||||
<section>
|
||||
<section>No state</section>
|
||||
<section data-state="state1">State 1</section>
|
||||
<section data-state="state3">State 3</section>
|
||||
<section>No state</section>
|
||||
</section>
|
||||
<section>No state</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'State' );
|
||||
|
||||
QUnit.test( 'Fire events when changing slide', function( assert ) {
|
||||
assert.expect( 2 );
|
||||
var state1 = assert.async();
|
||||
var state2 = assert.async();
|
||||
|
||||
var _onState1 = function( event ) {
|
||||
assert.ok( true, 'state1 fired' );
|
||||
state1();
|
||||
}
|
||||
|
||||
var _onState2 = function( event ) {
|
||||
assert.ok( true, 'state2 fired' );
|
||||
state2();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'state1', _onState1 );
|
||||
Reveal.addEventListener( 'state2', _onState2 );
|
||||
|
||||
Reveal.slide( 1 );
|
||||
Reveal.slide( 3 );
|
||||
|
||||
Reveal.removeEventListener( 'state1', _onState1 );
|
||||
Reveal.removeEventListener( 'state2', _onState2 );
|
||||
});
|
||||
|
||||
QUnit.test( 'Fire state events for vertical slides', function( assert ) {
|
||||
assert.expect( 2 );
|
||||
var done = assert.async( 2 );
|
||||
|
||||
var _onState1 = function( event ) {
|
||||
assert.ok( true, 'state1 fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
var _onState3 = function( event ) {
|
||||
assert.ok( true, 'state3 fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'state1', _onState1 );
|
||||
Reveal.addEventListener( 'state3', _onState3 );
|
||||
|
||||
Reveal.slide( 0 );
|
||||
Reveal.slide( 4, 1 );
|
||||
Reveal.slide( 4, 2 );
|
||||
|
||||
Reveal.removeEventListener( 'state1', _onState1 );
|
||||
Reveal.removeEventListener( 'state3', _onState3 );
|
||||
});
|
||||
|
||||
QUnit.test( 'No events if state remains unchanged', function( assert ) {
|
||||
var stateChanges = 0;
|
||||
|
||||
var _onEvent = function( event ) {
|
||||
stateChanges += 1;
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'state1', _onEvent );
|
||||
|
||||
Reveal.slide( 0 ); // no state
|
||||
Reveal.slide( 1 ); // state1
|
||||
Reveal.slide( 2 ); // state1
|
||||
Reveal.prev(); // state1
|
||||
Reveal.next(); // state1
|
||||
Reveal.slide( 4, 1 ); // state1
|
||||
Reveal.slide( 0 ); // no state
|
||||
|
||||
Reveal.removeEventListener( 'state1', _onEvent );
|
||||
|
||||
assert.strictEqual( stateChanges, 1, 'no event was fired when going to slide with same state' );
|
||||
});
|
||||
|
||||
QUnit.test( 'Event order', function( assert ) {
|
||||
var _onEvent = function( event ) {
|
||||
assert.ok( Reveal.getCurrentSlide() == document.querySelector( '#slide2' ), 'correct current slide immediately after state event' );
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'state1', _onEvent );
|
||||
|
||||
Reveal.slide( 0 );
|
||||
Reveal.slide( 1 );
|
||||
|
||||
Reveal.removeEventListener( 'state1', _onEvent );
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -7,7 +7,7 @@
|
||||
<title>reveal.js - Tests</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/reveal.css">
|
||||
<link rel="stylesheet" href="qunit-1.12.0.css">
|
||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -21,9 +21,9 @@
|
||||
|
||||
<section data-background-image="examples/assets/image1.png">
|
||||
<h1>1</h1>
|
||||
<img data-src="fake-url.png">
|
||||
<video data-src="fake-url.mp4"></video>
|
||||
<audio data-src="fake-url.mp3"></audio>
|
||||
<img data-src="">
|
||||
<video data-src=""></video>
|
||||
<audio data-src=""></audio>
|
||||
<aside class="notes">speaker notes 1</aside>
|
||||
</section>
|
||||
|
||||
@@ -76,9 +76,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../lib/js/head.min.js"></script>
|
||||
<script src="../js/reveal.js"></script>
|
||||
<script src="qunit-1.12.0.js"></script>
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
|
||||
<script src="test.js"></script>
|
||||
|
||||
|
393
test/test.js
393
test/test.js
@@ -1,4 +1,3 @@
|
||||
|
||||
// These tests expect the DOM to contain a presentation
|
||||
// with the following slide structure:
|
||||
//
|
||||
@@ -8,7 +7,6 @@
|
||||
// 3 - Two fragments with same data-fragment-index
|
||||
// 4
|
||||
|
||||
|
||||
Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
@@ -16,16 +14,16 @@ Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'DOM' );
|
||||
|
||||
test( 'Initial slides classes', function() {
|
||||
QUnit.test( 'Initial slides classes', function( assert ) {
|
||||
var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' )
|
||||
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' );
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' );
|
||||
|
||||
strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' );
|
||||
|
||||
ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' );
|
||||
assert.ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' );
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
@@ -33,203 +31,203 @@ Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'API' );
|
||||
|
||||
test( 'Reveal.isReady', function() {
|
||||
strictEqual( Reveal.isReady(), true, 'returns true' );
|
||||
QUnit.test( 'Reveal.isReady', function( assert ) {
|
||||
assert.strictEqual( Reveal.isReady(), true, 'returns true' );
|
||||
});
|
||||
|
||||
test( 'Reveal.isOverview', function() {
|
||||
strictEqual( Reveal.isOverview(), false, 'false by default' );
|
||||
QUnit.test( 'Reveal.isOverview', function( assert ) {
|
||||
assert.strictEqual( Reveal.isOverview(), false, 'false by default' );
|
||||
|
||||
Reveal.toggleOverview();
|
||||
strictEqual( Reveal.isOverview(), true, 'true after toggling on' );
|
||||
assert.strictEqual( Reveal.isOverview(), true, 'true after toggling on' );
|
||||
|
||||
Reveal.toggleOverview();
|
||||
strictEqual( Reveal.isOverview(), false, 'false after toggling off' );
|
||||
assert.strictEqual( Reveal.isOverview(), false, 'false after toggling off' );
|
||||
});
|
||||
|
||||
test( 'Reveal.isPaused', function() {
|
||||
strictEqual( Reveal.isPaused(), false, 'false by default' );
|
||||
QUnit.test( 'Reveal.isPaused', function( assert ) {
|
||||
assert.strictEqual( Reveal.isPaused(), false, 'false by default' );
|
||||
|
||||
Reveal.togglePause();
|
||||
strictEqual( Reveal.isPaused(), true, 'true after pausing' );
|
||||
assert.strictEqual( Reveal.isPaused(), true, 'true after pausing' );
|
||||
|
||||
Reveal.togglePause();
|
||||
strictEqual( Reveal.isPaused(), false, 'false after resuming' );
|
||||
assert.strictEqual( Reveal.isPaused(), false, 'false after resuming' );
|
||||
});
|
||||
|
||||
test( 'Reveal.isFirstSlide', function() {
|
||||
QUnit.test( 'Reveal.isFirstSlide', function( assert ) {
|
||||
Reveal.slide( 0, 0 );
|
||||
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
||||
assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
||||
|
||||
Reveal.slide( 1, 0 );
|
||||
strictEqual( Reveal.isFirstSlide(), false, 'false after Reveal.slide( 1, 0 )' );
|
||||
assert.strictEqual( Reveal.isFirstSlide(), false, 'false after Reveal.slide( 1, 0 )' );
|
||||
|
||||
Reveal.slide( 0, 0 );
|
||||
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
||||
assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
||||
});
|
||||
|
||||
test( 'Reveal.isFirstSlide after vertical slide', function() {
|
||||
QUnit.test( 'Reveal.isFirstSlide after vertical slide', function( assert ) {
|
||||
Reveal.slide( 1, 1 );
|
||||
Reveal.slide( 0, 0 );
|
||||
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( 0, 0 )' );
|
||||
assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( 0, 0 )' );
|
||||
});
|
||||
|
||||
test( 'Reveal.isLastSlide', function() {
|
||||
QUnit.test( 'Reveal.isLastSlide', function( assert ) {
|
||||
Reveal.slide( 0, 0 );
|
||||
strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
||||
assert.strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
||||
|
||||
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
||||
|
||||
Reveal.slide( lastSlideIndex, 0 );
|
||||
strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( '+ lastSlideIndex +', 0 )' );
|
||||
assert.strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( '+ lastSlideIndex +', 0 )' );
|
||||
|
||||
Reveal.slide( 0, 0 );
|
||||
strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
||||
assert.strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
||||
});
|
||||
|
||||
test( 'Reveal.isLastSlide after vertical slide', function() {
|
||||
QUnit.test( 'Reveal.isLastSlide after vertical slide', function( assert ) {
|
||||
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
||||
|
||||
Reveal.slide( 1, 1 );
|
||||
Reveal.slide( lastSlideIndex );
|
||||
strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( '+ lastSlideIndex +', 0 )' );
|
||||
assert.strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( '+ lastSlideIndex +', 0 )' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getTotalSlides', function() {
|
||||
strictEqual( Reveal.getTotalSlides(), 8, 'eight slides in total' );
|
||||
QUnit.test( 'Reveal.getTotalSlides', function( assert ) {
|
||||
assert.strictEqual( Reveal.getTotalSlides(), 8, 'eight slides in total' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getIndices', function() {
|
||||
QUnit.test( 'Reveal.getIndices', function( assert ) {
|
||||
var indices = Reveal.getIndices();
|
||||
|
||||
ok( indices.hasOwnProperty( 'h' ), 'h exists' );
|
||||
ok( indices.hasOwnProperty( 'v' ), 'v exists' );
|
||||
ok( indices.hasOwnProperty( 'f' ), 'f exists' );
|
||||
assert.ok( indices.hasOwnProperty( 'h' ), 'h exists' );
|
||||
assert.ok( indices.hasOwnProperty( 'v' ), 'v exists' );
|
||||
assert.ok( indices.hasOwnProperty( 'f' ), 'f exists' );
|
||||
|
||||
Reveal.slide( 1, 0 );
|
||||
strictEqual( Reveal.getIndices().h, 1, 'h 1' );
|
||||
strictEqual( Reveal.getIndices().v, 0, 'v 0' );
|
||||
assert.strictEqual( Reveal.getIndices().h, 1, 'h 1' );
|
||||
assert.strictEqual( Reveal.getIndices().v, 0, 'v 0' );
|
||||
|
||||
Reveal.slide( 1, 2 );
|
||||
strictEqual( Reveal.getIndices().h, 1, 'h 1' );
|
||||
strictEqual( Reveal.getIndices().v, 2, 'v 2' );
|
||||
assert.strictEqual( Reveal.getIndices().h, 1, 'h 1' );
|
||||
assert.strictEqual( Reveal.getIndices().v, 2, 'v 2' );
|
||||
|
||||
Reveal.slide( 0, 0 );
|
||||
strictEqual( Reveal.getIndices().h, 0, 'h 0' );
|
||||
strictEqual( Reveal.getIndices().v, 0, 'v 0' );
|
||||
assert.strictEqual( Reveal.getIndices().h, 0, 'h 0' );
|
||||
assert.strictEqual( Reveal.getIndices().v, 0, 'v 0' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getSlide', function() {
|
||||
equal( Reveal.getSlide( 0 ), document.querySelector( '.reveal .slides>section:first-child' ), 'gets correct first slide' );
|
||||
equal( Reveal.getSlide( 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)' ), 'no v index returns stack' );
|
||||
equal( Reveal.getSlide( 1, 0 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(1)' ), 'v index 0 returns first vertical child' );
|
||||
equal( Reveal.getSlide( 1, 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(2)' ), 'v index 1 returns second vertical child' );
|
||||
QUnit.test( 'Reveal.getSlide', function( assert ) {
|
||||
assert.equal( Reveal.getSlide( 0 ), document.querySelector( '.reveal .slides>section:first-child' ), 'gets correct first slide' );
|
||||
assert.equal( Reveal.getSlide( 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)' ), 'no v index returns stack' );
|
||||
assert.equal( Reveal.getSlide( 1, 0 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(1)' ), 'v index 0 returns first vertical child' );
|
||||
assert.equal( Reveal.getSlide( 1, 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(2)' ), 'v index 1 returns second vertical child' );
|
||||
|
||||
strictEqual( Reveal.getSlide( 100 ), undefined, 'undefined when out of horizontal bounds' );
|
||||
strictEqual( Reveal.getSlide( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
|
||||
assert.strictEqual( Reveal.getSlide( 100 ), undefined, 'undefined when out of horizontal bounds' );
|
||||
assert.strictEqual( Reveal.getSlide( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getSlideBackground', function() {
|
||||
equal( Reveal.getSlideBackground( 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:first-child' ), 'gets correct first background' );
|
||||
equal( Reveal.getSlideBackground( 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2)' ), 'no v index returns stack' );
|
||||
equal( Reveal.getSlideBackground( 1, 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(1)' ), 'v index 0 returns first vertical child' );
|
||||
equal( Reveal.getSlideBackground( 1, 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(2)' ), 'v index 1 returns second vertical child' );
|
||||
QUnit.test( 'Reveal.getSlideBackground', function( assert ) {
|
||||
assert.equal( Reveal.getSlideBackground( 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:first-child' ), 'gets correct first background' );
|
||||
assert.equal( Reveal.getSlideBackground( 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2)' ), 'no v index returns stack' );
|
||||
assert.equal( Reveal.getSlideBackground( 1, 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(2)' ), 'v index 0 returns first vertical child' );
|
||||
assert.equal( Reveal.getSlideBackground( 1, 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(3)' ), 'v index 1 returns second vertical child' );
|
||||
|
||||
strictEqual( Reveal.getSlideBackground( 100 ), undefined, 'undefined when out of horizontal bounds' );
|
||||
strictEqual( Reveal.getSlideBackground( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
|
||||
assert.strictEqual( Reveal.getSlideBackground( 100 ), undefined, 'undefined when out of horizontal bounds' );
|
||||
assert.strictEqual( Reveal.getSlideBackground( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getSlideNotes', function() {
|
||||
QUnit.test( 'Reveal.getSlideNotes', function( assert ) {
|
||||
Reveal.slide( 0, 0 );
|
||||
ok( Reveal.getSlideNotes() === 'speaker notes 1', 'works with <aside class="notes">' );
|
||||
assert.ok( Reveal.getSlideNotes() === 'speaker notes 1', 'works with <aside class="notes">' );
|
||||
|
||||
Reveal.slide( 1, 0 );
|
||||
ok( Reveal.getSlideNotes() === 'speaker notes 2', 'works with <section data-notes="">' );
|
||||
assert.ok( Reveal.getSlideNotes() === 'speaker notes 2', 'works with <section data-notes="">' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getPreviousSlide/getCurrentSlide', function() {
|
||||
QUnit.test( 'Reveal.getPreviousSlide/getCurrentSlide', function( assert ) {
|
||||
Reveal.slide( 0, 0 );
|
||||
Reveal.slide( 1, 0 );
|
||||
|
||||
var firstSlide = document.querySelector( '.reveal .slides>section:first-child' );
|
||||
var secondSlide = document.querySelector( '.reveal .slides>section:nth-child(2)>section' );
|
||||
|
||||
equal( Reveal.getPreviousSlide(), firstSlide, 'previous is slide #0' );
|
||||
equal( Reveal.getCurrentSlide(), secondSlide, 'current is slide #1' );
|
||||
assert.equal( Reveal.getPreviousSlide(), firstSlide, 'previous is slide #0' );
|
||||
assert.equal( Reveal.getCurrentSlide(), secondSlide, 'current is slide #1' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getProgress', function() {
|
||||
QUnit.test( 'Reveal.getProgress', function( assert ) {
|
||||
Reveal.slide( 0, 0 );
|
||||
strictEqual( Reveal.getProgress(), 0, 'progress is 0 on first slide' );
|
||||
assert.strictEqual( Reveal.getProgress(), 0, 'progress is 0 on first slide' );
|
||||
|
||||
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
||||
|
||||
Reveal.slide( lastSlideIndex, 0 );
|
||||
strictEqual( Reveal.getProgress(), 1, 'progress is 1 on last slide' );
|
||||
assert.strictEqual( Reveal.getProgress(), 1, 'progress is 1 on last slide' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getScale', function() {
|
||||
ok( typeof Reveal.getScale() === 'number', 'has scale' );
|
||||
QUnit.test( 'Reveal.getScale', function( assert ) {
|
||||
assert.ok( typeof Reveal.getScale() === 'number', 'has scale' );
|
||||
});
|
||||
|
||||
test( 'Reveal.getConfig', function() {
|
||||
ok( typeof Reveal.getConfig() === 'object', 'has config' );
|
||||
QUnit.test( 'Reveal.getConfig', function( assert ) {
|
||||
assert.ok( typeof Reveal.getConfig() === 'object', 'has config' );
|
||||
});
|
||||
|
||||
test( 'Reveal.configure', function() {
|
||||
strictEqual( Reveal.getConfig().loop, false, '"loop" is false to start with' );
|
||||
QUnit.test( 'Reveal.configure', function( assert ) {
|
||||
assert.strictEqual( Reveal.getConfig().loop, false, '"loop" is false to start with' );
|
||||
|
||||
Reveal.configure({ loop: true });
|
||||
strictEqual( Reveal.getConfig().loop, true, '"loop" has changed to true' );
|
||||
assert.strictEqual( Reveal.getConfig().loop, true, '"loop" has changed to true' );
|
||||
|
||||
Reveal.configure({ loop: false, customTestValue: 1 });
|
||||
strictEqual( Reveal.getConfig().customTestValue, 1, 'supports custom values' );
|
||||
assert.strictEqual( Reveal.getConfig().customTestValue, 1, 'supports custom values' );
|
||||
});
|
||||
|
||||
test( 'Reveal.availableRoutes', function() {
|
||||
QUnit.test( 'Reveal.availableRoutes', function( assert ) {
|
||||
Reveal.slide( 0, 0 );
|
||||
deepEqual( Reveal.availableRoutes(), { left: false, up: false, down: false, right: true }, 'correct for first slide' );
|
||||
assert.deepEqual( Reveal.availableRoutes(), { left: false, up: false, down: false, right: true }, 'correct for first slide' );
|
||||
|
||||
Reveal.slide( 1, 0 );
|
||||
deepEqual( Reveal.availableRoutes(), { left: true, up: false, down: true, right: true }, 'correct for vertical slide' );
|
||||
assert.deepEqual( Reveal.availableRoutes(), { left: true, up: false, down: true, right: true }, 'correct for vertical slide' );
|
||||
});
|
||||
|
||||
test( 'Reveal.next', function() {
|
||||
QUnit.test( 'Reveal.next', function( assert ) {
|
||||
Reveal.slide( 0, 0 );
|
||||
|
||||
// Step through vertical child slides
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 1, v: 0, f: undefined } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 0, f: undefined } );
|
||||
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 1, v: 1, f: undefined } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 1, f: undefined } );
|
||||
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined } );
|
||||
|
||||
// Step through fragments
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 } );
|
||||
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 } );
|
||||
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 } );
|
||||
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 } );
|
||||
});
|
||||
|
||||
test( 'Reveal.next at end', function() {
|
||||
QUnit.test( 'Reveal.next at end', function( assert ) {
|
||||
Reveal.slide( 3 );
|
||||
|
||||
// We're at the end, this should have no effect
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
||||
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
||||
});
|
||||
|
||||
|
||||
@@ -238,121 +236,144 @@ Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Fragments' );
|
||||
|
||||
test( 'Sliding to fragments', function() {
|
||||
QUnit.test( 'Sliding to fragments', function( assert ) {
|
||||
Reveal.slide( 2, 0, -1 );
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 }, 'Reveal.slide( 2, 0, -1 )' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 }, 'Reveal.slide( 2, 0, -1 )' );
|
||||
|
||||
Reveal.slide( 2, 0, 0 );
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'Reveal.slide( 2, 0, 0 )' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'Reveal.slide( 2, 0, 0 )' );
|
||||
|
||||
Reveal.slide( 2, 0, 2 );
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'Reveal.slide( 2, 0, 2 )' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'Reveal.slide( 2, 0, 2 )' );
|
||||
|
||||
Reveal.slide( 2, 0, 1 );
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'Reveal.slide( 2, 0, 1 )' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'Reveal.slide( 2, 0, 1 )' );
|
||||
});
|
||||
|
||||
test( 'Hiding all fragments', function() {
|
||||
QUnit.test( 'data-fragment is set on slide <section>', function( assert ) {
|
||||
Reveal.slide( 2, 0, -1 );
|
||||
assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '-1' );
|
||||
|
||||
Reveal.slide( 2, 0, 2 );
|
||||
assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '2' );
|
||||
|
||||
Reveal.slide( 2, 0, 0 );
|
||||
assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '0' );
|
||||
|
||||
var fragmentSlide = Reveal.getCurrentSlide();
|
||||
|
||||
Reveal.slide( 3, 0 );
|
||||
assert.deepEqual( fragmentSlide.getAttribute( 'data-fragment' ), '0', 'data-fragment persists when jumping to another slide' );
|
||||
});
|
||||
|
||||
QUnit.test( 'Hiding all fragments', function( assert ) {
|
||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
||||
|
||||
Reveal.slide( 2, 0, 0 );
|
||||
strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 1, 'one fragment visible when index is 0' );
|
||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 1, 'one fragment visible when index is 0' );
|
||||
|
||||
Reveal.slide( 2, 0, -1 );
|
||||
strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when index is -1' );
|
||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when index is -1' );
|
||||
});
|
||||
|
||||
test( 'Current fragment', function() {
|
||||
QUnit.test( 'Current fragment', function( assert ) {
|
||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
||||
var lastFragmentIndex = [].slice.call( fragmentSlide.querySelectorAll( '.fragment' ) ).pop().getAttribute( 'data-fragment-index' );
|
||||
|
||||
Reveal.slide( 2, 0 );
|
||||
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment at index -1' );
|
||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment at index -1' );
|
||||
|
||||
Reveal.slide( 2, 0, 0 );
|
||||
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 1, 'one current fragment at index 0' );
|
||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 1, 'one current fragment at index 0' );
|
||||
|
||||
Reveal.slide( 1, 0, 0 );
|
||||
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to previous slide' );
|
||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to previous slide' );
|
||||
|
||||
Reveal.slide( 3, 0, 0 );
|
||||
strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to next slide' );
|
||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to next slide' );
|
||||
|
||||
Reveal.slide( 2, 1, -1 );
|
||||
Reveal.prev();
|
||||
assert.strictEqual( fragmentSlide.querySelector( '.fragment.current-fragment' ).getAttribute( 'data-fragment-index' ), lastFragmentIndex, 'last fragment is current fragment when returning from future slide' );
|
||||
});
|
||||
|
||||
test( 'Stepping through fragments', function() {
|
||||
QUnit.test( 'Stepping through fragments', function( assert ) {
|
||||
Reveal.slide( 2, 0, -1 );
|
||||
|
||||
// forwards:
|
||||
|
||||
Reveal.next();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'next() goes to next fragment' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'next() goes to next fragment' );
|
||||
|
||||
Reveal.right();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'right() goes to next fragment' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'right() goes to next fragment' );
|
||||
|
||||
Reveal.down();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'down() goes to next fragment' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'down() goes to next fragment' );
|
||||
|
||||
Reveal.down(); // moves to f #3
|
||||
|
||||
// backwards:
|
||||
|
||||
Reveal.prev();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'prev() goes to prev fragment' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'prev() goes to prev fragment' );
|
||||
|
||||
Reveal.left();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'left() goes to prev fragment' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'left() goes to prev fragment' );
|
||||
|
||||
Reveal.up();
|
||||
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'up() goes to prev fragment' );
|
||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'up() goes to prev fragment' );
|
||||
});
|
||||
|
||||
test( 'Stepping past fragments', function() {
|
||||
QUnit.test( 'Stepping past fragments', function( assert ) {
|
||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
||||
|
||||
Reveal.slide( 0, 0, 0 );
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when on previous slide' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when on previous slide' );
|
||||
|
||||
Reveal.slide( 3, 0, 0 );
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 3, 'all fragments visible when on future slide' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 3, 'all fragments visible when on future slide' );
|
||||
});
|
||||
|
||||
test( 'Fragment indices', function() {
|
||||
QUnit.test( 'Fragment indices', function( assert ) {
|
||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(2)' );
|
||||
|
||||
Reveal.slide( 3, 0, 0 );
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' );
|
||||
|
||||
// This slide has three fragments, first one is index 0, second and third have index 1
|
||||
Reveal.slide( 2, 2, 0 );
|
||||
equal( Reveal.getIndices().f, 0, 'returns correct index for first fragment' );
|
||||
assert.equal( Reveal.getIndices().f, 0, 'returns correct index for first fragment' );
|
||||
|
||||
Reveal.slide( 2, 2, 1 );
|
||||
equal( Reveal.getIndices().f, 1, 'returns correct index for two fragments with same index' );
|
||||
assert.equal( Reveal.getIndices().f, 1, 'returns correct index for two fragments with same index' );
|
||||
});
|
||||
|
||||
test( 'Index generation', function() {
|
||||
QUnit.test( 'Index generation', function( assert ) {
|
||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
||||
|
||||
// These have no indices defined to start with
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '2' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '2' );
|
||||
});
|
||||
|
||||
test( 'Index normalization', function() {
|
||||
QUnit.test( 'Index normalization', function( assert ) {
|
||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(3)' );
|
||||
|
||||
// These start out as 1-4-4 and should normalize to 0-1-1
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
||||
equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '1' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '1' );
|
||||
});
|
||||
|
||||
asyncTest( 'fragmentshown event', function() {
|
||||
expect( 2 );
|
||||
QUnit.test( 'fragmentshown event', function( assert ) {
|
||||
assert.expect( 2 );
|
||||
var done = assert.async( 2 );
|
||||
|
||||
var _onEvent = function( event ) {
|
||||
ok( true, 'event fired' );
|
||||
assert.ok( true, 'event fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'fragmentshown', _onEvent );
|
||||
@@ -364,16 +385,16 @@ Reveal.addEventListener( 'ready', function() {
|
||||
Reveal.next();
|
||||
Reveal.prev(); // shouldn't fire fragmentshown
|
||||
|
||||
start();
|
||||
|
||||
Reveal.removeEventListener( 'fragmentshown', _onEvent );
|
||||
});
|
||||
|
||||
asyncTest( 'fragmenthidden event', function() {
|
||||
expect( 2 );
|
||||
QUnit.test( 'fragmenthidden event', function( assert ) {
|
||||
assert.expect( 2 );
|
||||
var done = assert.async( 2 );
|
||||
|
||||
var _onEvent = function( event ) {
|
||||
ok( true, 'event fired' );
|
||||
assert.ok( true, 'event fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'fragmenthidden', _onEvent );
|
||||
@@ -384,8 +405,6 @@ Reveal.addEventListener( 'ready', function() {
|
||||
Reveal.prev();
|
||||
Reveal.next(); // shouldn't fire fragmenthidden
|
||||
|
||||
start();
|
||||
|
||||
Reveal.removeEventListener( 'fragmenthidden', _onEvent );
|
||||
});
|
||||
|
||||
@@ -395,50 +414,52 @@ Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Auto Sliding' );
|
||||
|
||||
test( 'Reveal.isAutoSliding', function() {
|
||||
strictEqual( Reveal.isAutoSliding(), false, 'false by default' );
|
||||
QUnit.test( 'Reveal.isAutoSliding', function( assert ) {
|
||||
assert.strictEqual( Reveal.isAutoSliding(), false, 'false by default' );
|
||||
|
||||
Reveal.configure({ autoSlide: 10000 });
|
||||
strictEqual( Reveal.isAutoSliding(), true, 'true after starting' );
|
||||
assert.strictEqual( Reveal.isAutoSliding(), true, 'true after starting' );
|
||||
|
||||
Reveal.configure({ autoSlide: 0 });
|
||||
strictEqual( Reveal.isAutoSliding(), false, 'false after setting to 0' );
|
||||
assert.strictEqual( Reveal.isAutoSliding(), false, 'false after setting to 0' );
|
||||
});
|
||||
|
||||
test( 'Reveal.toggleAutoSlide', function() {
|
||||
QUnit.test( 'Reveal.toggleAutoSlide', function( assert ) {
|
||||
Reveal.configure({ autoSlide: 10000 });
|
||||
|
||||
Reveal.toggleAutoSlide();
|
||||
strictEqual( Reveal.isAutoSliding(), false, 'false after first toggle' );
|
||||
assert.strictEqual( Reveal.isAutoSliding(), false, 'false after first toggle' );
|
||||
Reveal.toggleAutoSlide();
|
||||
strictEqual( Reveal.isAutoSliding(), true, 'true after second toggle' );
|
||||
assert.strictEqual( Reveal.isAutoSliding(), true, 'true after second toggle' );
|
||||
|
||||
Reveal.configure({ autoSlide: 0 });
|
||||
});
|
||||
|
||||
asyncTest( 'autoslidepaused', function() {
|
||||
expect( 1 );
|
||||
QUnit.test( 'autoslidepaused', function( assert ) {
|
||||
assert.expect( 1 );
|
||||
var done = assert.async();
|
||||
|
||||
var _onEvent = function( event ) {
|
||||
ok( true, 'event fired' );
|
||||
assert.ok( true, 'event fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'autoslidepaused', _onEvent );
|
||||
Reveal.configure({ autoSlide: 10000 });
|
||||
Reveal.toggleAutoSlide();
|
||||
|
||||
start();
|
||||
|
||||
// cleanup
|
||||
Reveal.configure({ autoSlide: 0 });
|
||||
Reveal.removeEventListener( 'autoslidepaused', _onEvent );
|
||||
});
|
||||
|
||||
asyncTest( 'autoslideresumed', function() {
|
||||
expect( 1 );
|
||||
QUnit.test( 'autoslideresumed', function( assert ) {
|
||||
assert.expect( 1 );
|
||||
var done = assert.async();
|
||||
|
||||
var _onEvent = function( event ) {
|
||||
ok( true, 'event fired' );
|
||||
assert.ok( true, 'event fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'autoslideresumed', _onEvent );
|
||||
@@ -446,8 +467,6 @@ Reveal.addEventListener( 'ready', function() {
|
||||
Reveal.toggleAutoSlide();
|
||||
Reveal.toggleAutoSlide();
|
||||
|
||||
start();
|
||||
|
||||
// cleanup
|
||||
Reveal.configure({ autoSlide: 0 });
|
||||
Reveal.removeEventListener( 'autoslideresumed', _onEvent );
|
||||
@@ -459,36 +478,36 @@ Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Configuration' );
|
||||
|
||||
test( 'Controls', function() {
|
||||
QUnit.test( 'Controls', function( assert ) {
|
||||
var controlsElement = document.querySelector( '.reveal>.controls' );
|
||||
|
||||
Reveal.configure({ controls: false });
|
||||
equal( controlsElement.style.display, 'none', 'controls are hidden' );
|
||||
assert.equal( controlsElement.style.display, 'none', 'controls are hidden' );
|
||||
|
||||
Reveal.configure({ controls: true });
|
||||
equal( controlsElement.style.display, 'block', 'controls are visible' );
|
||||
assert.equal( controlsElement.style.display, 'block', 'controls are visible' );
|
||||
});
|
||||
|
||||
test( 'Progress', function() {
|
||||
QUnit.test( 'Progress', function( assert ) {
|
||||
var progressElement = document.querySelector( '.reveal>.progress' );
|
||||
|
||||
Reveal.configure({ progress: false });
|
||||
equal( progressElement.style.display, 'none', 'progress are hidden' );
|
||||
assert.equal( progressElement.style.display, 'none', 'progress are hidden' );
|
||||
|
||||
Reveal.configure({ progress: true });
|
||||
equal( progressElement.style.display, 'block', 'progress are visible' );
|
||||
assert.equal( progressElement.style.display, 'block', 'progress are visible' );
|
||||
});
|
||||
|
||||
test( 'Loop', function() {
|
||||
QUnit.test( 'Loop', function( assert ) {
|
||||
Reveal.configure({ loop: true });
|
||||
|
||||
Reveal.slide( 0, 0 );
|
||||
|
||||
Reveal.left();
|
||||
notEqual( Reveal.getIndices().h, 0, 'looped from start to end' );
|
||||
assert.notEqual( Reveal.getIndices().h, 0, 'looped from start to end' );
|
||||
|
||||
Reveal.right();
|
||||
equal( Reveal.getIndices().h, 0, 'looped from end to start' );
|
||||
assert.equal( Reveal.getIndices().h, 0, 'looped from end to start' );
|
||||
|
||||
Reveal.configure({ loop: false });
|
||||
});
|
||||
@@ -499,34 +518,34 @@ Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Lazy-Loading' );
|
||||
|
||||
test( 'img with data-src', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal section img[src]' ).length, 1, 'Image source has been set' );
|
||||
QUnit.test( 'img with data-src', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal section img[src]' ).length, 1, 'Image source has been set' );
|
||||
});
|
||||
|
||||
test( 'video with data-src', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal section video[src]' ).length, 1, 'Video source has been set' );
|
||||
QUnit.test( 'video with data-src', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal section video[src]' ).length, 1, 'Video source has been set' );
|
||||
});
|
||||
|
||||
test( 'audio with data-src', function() {
|
||||
strictEqual( document.querySelectorAll( '.reveal section audio[src]' ).length, 1, 'Audio source has been set' );
|
||||
QUnit.test( 'audio with data-src', function( assert ) {
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal section audio[src]' ).length, 1, 'Audio source has been set' );
|
||||
});
|
||||
|
||||
test( 'iframe with data-src', function() {
|
||||
QUnit.test( 'iframe with data-src', function( assert ) {
|
||||
Reveal.slide( 0, 0 );
|
||||
strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
|
||||
Reveal.slide( 2, 1 );
|
||||
strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 1, 'Iframe source is set' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 1, 'Iframe source is set' );
|
||||
Reveal.slide( 2, 2 );
|
||||
strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
|
||||
assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
|
||||
});
|
||||
|
||||
test( 'background images', function() {
|
||||
QUnit.test( 'background images', function( assert ) {
|
||||
var imageSource1 = Reveal.getSlide( 0 ).getAttribute( 'data-background-image' );
|
||||
var imageSource2 = Reveal.getSlide( 1, 0 ).getAttribute( 'data-background' );
|
||||
|
||||
// check that the images are applied to the background elements
|
||||
ok( Reveal.getSlideBackground( 0 ).style.backgroundImage.indexOf( imageSource1 ) !== -1, 'data-background-image worked' );
|
||||
ok( Reveal.getSlideBackground( 1, 0 ).style.backgroundImage.indexOf( imageSource2 ) !== -1, 'data-background worked' );
|
||||
assert.ok( Reveal.getSlideBackground( 0 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource1 ) !== -1, 'data-background-image worked' );
|
||||
assert.ok( Reveal.getSlideBackground( 1, 0 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource2 ) !== -1, 'data-background worked' );
|
||||
});
|
||||
|
||||
|
||||
@@ -535,11 +554,13 @@ Reveal.addEventListener( 'ready', function() {
|
||||
|
||||
QUnit.module( 'Events' );
|
||||
|
||||
asyncTest( 'slidechanged', function() {
|
||||
expect( 3 );
|
||||
QUnit.test( 'slidechanged', function( assert ) {
|
||||
assert.expect( 3 );
|
||||
var done = assert.async( 3 );
|
||||
|
||||
var _onEvent = function( event ) {
|
||||
ok( true, 'event fired' );
|
||||
assert.ok( true, 'event fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'slidechanged', _onEvent );
|
||||
@@ -550,17 +571,17 @@ Reveal.addEventListener( 'ready', function() {
|
||||
Reveal.slide( 3, 0 ); // should trigger
|
||||
Reveal.next(); // should do nothing
|
||||
|
||||
start();
|
||||
|
||||
Reveal.removeEventListener( 'slidechanged', _onEvent );
|
||||
|
||||
});
|
||||
|
||||
asyncTest( 'paused', function() {
|
||||
expect( 1 );
|
||||
QUnit.test( 'paused', function( assert ) {
|
||||
assert.expect( 1 );
|
||||
var done = assert.async();
|
||||
|
||||
var _onEvent = function( event ) {
|
||||
ok( true, 'event fired' );
|
||||
assert.ok( true, 'event fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'paused', _onEvent );
|
||||
@@ -568,16 +589,16 @@ Reveal.addEventListener( 'ready', function() {
|
||||
Reveal.togglePause();
|
||||
Reveal.togglePause();
|
||||
|
||||
start();
|
||||
|
||||
Reveal.removeEventListener( 'paused', _onEvent );
|
||||
});
|
||||
|
||||
asyncTest( 'resumed', function() {
|
||||
expect( 1 );
|
||||
QUnit.test( 'resumed', function( assert ) {
|
||||
assert.expect( 1 );
|
||||
var done = assert.async();
|
||||
|
||||
var _onEvent = function( event ) {
|
||||
ok( true, 'event fired' );
|
||||
assert.ok( true, 'event fired' );
|
||||
done();
|
||||
}
|
||||
|
||||
Reveal.addEventListener( 'resumed', _onEvent );
|
||||
@@ -585,13 +606,9 @@ Reveal.addEventListener( 'ready', function() {
|
||||
Reveal.togglePause();
|
||||
Reveal.togglePause();
|
||||
|
||||
start();
|
||||
|
||||
Reveal.removeEventListener( 'resumed', _onEvent );
|
||||
});
|
||||
|
||||
|
||||
} );
|
||||
|
||||
Reveal.initialize();
|
||||
|
||||
|
Reference in New Issue
Block a user