1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-09-08 21:50:48 +02:00

Compare commits

...

533 Commits

Author SHA1 Message Date
Hakim El Hattab
c69adfb022 add lightbox to reveal.js state, enables syncing with speaker view #3771 2025-03-24 15:34:51 +01:00
Hakim El Hattab
47ee25dd19 build assets 2025-03-20 13:58:22 +01:00
Hakim El Hattab
94716f9e51 add support for data-preview-link on any element type (prev only a) 2025-03-20 13:52:28 +01:00
Hakim El Hattab
b3fd27d071 prevent default keyboard shortcuts while overlay is open #3766 #3767 2025-03-20 11:38:20 +01:00
Hakim El Hattab
edb69c840c update version to 5.2.0 2025-03-19 12:03:33 +01:00
Hakim El Hattab
f11812e0a2 fix theme css conflict 2025-03-19 11:59:39 +01:00
Hakim El Hattab
d5d292f70a config tweak for lightbox demo 2025-03-19 11:29:36 +01:00
Hakim El Hattab
a7b4bb4946 fix css help overlay css conflict 2025-03-19 11:11:35 +01:00
Hakim El Hattab
659472f8a4 rebuild math plugin 2025-03-19 10:53:35 +01:00
Hakim El Hattab
2ac0566941 dont restart background video when it hasn't changed (fixes #3633) 2025-03-19 10:33:13 +01:00
Hakim El Hattab
657543ac96 rename actions 2025-03-19 10:16:05 +01:00
Hakim El Hattab
e7456847c6 spelling fix 2025-03-19 10:14:10 +01:00
Hakim El Hattab
255d55ab8f Merge pull request #3602 from yarikoptic/enh-codespell
codespell: add config + workflow and make it fix some typos it finds
2025-03-19 10:11:48 +01:00
Hakim El Hattab
60401a2740 npm audit fix 2025-03-19 10:02:56 +01:00
Hakim El Hattab
9c6bd42939 Merge pull request #3744 from KlavierCat/fix-security-vulnerability
fix: bump 2 deps to patch security vulnerabilities
2025-03-19 10:02:18 +01:00
Hakim El Hattab
36daed927e update readme 2025-03-14 08:46:56 +01:00
Hakim El Hattab
2059d388f7 dispatch event when showing lightbox or help overlay 2025-02-20 10:30:31 +01:00
Hakim El Hattab
fe67bad092 .overlay -> .r-overlay to reduce risk of conflict, move overlay up to viewport level 2025-02-17 19:59:40 +01:00
Hakim El Hattab
9af726b606 brief transition for overlay 2025-02-17 19:08:43 +01:00
Hakim El Hattab
0950590300 more flexible styling system for overlays 2025-02-05 15:57:14 +01:00
Hakim El Hattab
087eed8dc3 overlay mode refactoring 2025-02-05 14:38:53 +01:00
KlavierCat
8f19e13ab1 fix: bump 2 deps to patch security vulnerabilities 2025-01-31 15:55:28 +00:00
Hakim El Hattab
1b2c39a86e add support image/video lightbox via data-preview-image/video, move overlay into standalone controller 2025-01-31 16:10:15 +01:00
Hakim El Hattab
0524ae855d further refinements to overlay styles 2025-01-29 15:19:47 +01:00
Hakim El Hattab
3ceac9402d remove outdated ff bug fix 2025-01-29 14:34:29 +01:00
Hakim El Hattab
6cebb771ee switch to dvh for reveal.js height, fixes issue with presentations not covering fullviewport in ios 2025-01-24 09:16:36 +01:00
Hakim El Hattab
31ba65ce86 refactored overlays; new icons and reduced selector specificity 2025-01-24 09:15:47 +01:00
Hakim El Hattab
983c6248f7 update controls comment to match other prop descriptions 2025-01-13 13:16:02 +01:00
Hakim El Hattab
6527f4d912 Merge pull request #3716 from gpotter2/controls-for-speaker
Add 'controlsOnlyForSpeaker' option
2025-01-13 13:13:30 +01:00
gpotter2
3751715414 Add controls: 'speaker-only' option 2025-01-11 16:41:06 +01:00
Hakim El Hattab
e15cf92ccd update specs for 6dea2a5094 2024-11-28 14:53:25 +01:00
Hakim El Hattab
6dea2a5094 auto-animate no longer skips matching fragments on adjacent slides 2024-11-28 14:44:01 +01:00
Hakim El Hattab
0d02d8a303 default mathjax config now ignores code tags 2024-11-18 08:26:23 +01:00
Hakim El Hattab
fe4a6e82b0 fix last slide not triggering slidechange in scroll view (closes #3715) 2024-11-11 16:05:34 +01:00
Hakim El Hattab
5a275f223b don't parse math equations in code blocks 2024-11-11 15:35:16 +01:00
Hakim El Hattab
f979ff68e9 fix bug where hiding all except 1 slide in a stack caused controls to break 2024-10-29 15:39:27 +01:00
Hakim El Hattab
a6417ae747 Merge pull request #3701 from dennybiasiolli/fixing-gulp-package
gulp package: fixing encoding before piping to zip
2024-10-29 13:21:51 +01:00
Denny Biasiolli
c9ad332057 gulp package: fixing encoding after updating to gulp 5
Took inspiration from this issue: https://github.com/sindresorhus/gulp-zip/issues/123
2024-10-26 14:00:00 +02:00
Hakim El Hattab
16ac4b0067 prevent double-initialization #3696 2024-10-25 10:27:54 +02:00
Hakim El Hattab
96ca819770 fix gulp package #3693 2024-10-25 09:57:14 +02:00
Hakim El Hattab
95946b4ec6 autoplay muted background videos in speaker view #1037 2024-10-21 14:27:51 +02:00
Hakim El Hattab
8d7b03c886 fix two npm audit warnings 2024-10-11 14:58:40 +02:00
Hakim El Hattab
b8bb94f788 upgrade to gulp 5.0, latest sass, & node-qunit-puppeteer #3608 2024-10-11 14:50:22 +02:00
Hakim El Hattab
8e58d1b7db scroll demo tweak 2024-10-11 13:40:54 +02:00
Hakim El Hattab
669cc25e55 Merge pull request #3685 from lechten/extend-search-API
Extend search API
2024-09-30 10:41:34 +02:00
Jens Lechtenbörger
2dcbf2745e Extend search API
Previously, only openSearch() was exported.  For symmetry, add
closeSearch().  For convenience, also add toggleSearch().
2024-09-29 12:48:39 +02:00
Hakim El Hattab
472535065c only destroy if reveal instance is ready, don't proceed with initialization after destroy is called, tests #3593 2024-05-15 11:15:31 +02:00
Hakim El Hattab
7cab93baab Merge pull request #3620 from wainuiomata/typos
Fix typo in jsdoc: presentation
2024-05-15 10:30:39 +02:00
Hakim El Hattab
15d9b650a5 Merge pull request #3618 from wainuiomata/regex-redundant-escape
Fix escape before comma in regex is redundant
2024-05-15 10:30:23 +02:00
Rob van der Linde
ab760babb7 Fix typo in jsdoc: presentation 2024-04-30 19:41:47 +12:00
Rob van der Linde
2d273bf06c Fix escape before comma in regex is redundant
There are various other commas in the same regex that aren't escaped.

This one doesn't need escaping either.
2024-04-30 19:35:39 +12:00
Hakim El Hattab
6b8c64ffa8 5.1.0 2024-04-11 08:45:27 +02:00
Hakim El Hattab
dab6ef6b38 Merge pull request #3603 from lechten/fix-help
Re-add question mark for help
2024-04-09 09:19:20 +02:00
Jens Lechtenbörger
092a34bf0c Re-add question mark for help 2024-04-01 16:12:15 +02:00
Yaroslav Halchenko
e0bc3f764d [DATALAD RUNCMD] run codespell throughout fixing typos automagically
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
2024-03-29 14:49:42 -04:00
Yaroslav Halchenko
091fede288 [DATALAD RUNCMD] Do interactive fixing of leftover ambigous typos
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./plugin/zoom/plugin.js plugin/notes/plugin.js",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
2024-03-29 14:49:40 -04:00
Yaroslav Halchenko
e8ddb101de Adjust codespell config to minimize false positives etc 2024-03-29 14:48:02 -04:00
Yaroslav Halchenko
f9cf4f5cfe Add rudimentary codespell config 2024-03-29 14:44:08 -04:00
Yaroslav Halchenko
1cc02565b0 Add github action to codespell master on push and PRs 2024-03-29 14:44:08 -04:00
Hakim El Hattab
6410c756ea auto-animate demo tweak 2024-03-25 09:10:26 +01:00
Hakim El Hattab
62297e6259 nil check slides before running auto-animate transition #3592 2024-03-25 09:01:53 +01:00
Hakim El Hattab
ade53094b9 Merge pull request #3598 from alifeee/fix/r-stack-chrome
Fix `r-stack` overflow behaviour on Chromium browsers
2024-03-25 08:52:32 +01:00
alifeee
164254655b update build 2024-03-24 23:13:36 +00:00
alifeee
e2344787c4 fix r-stack with grid-template-rows: 100%; 2024-03-24 23:11:22 +00:00
Hakim El Hattab
334abff10f Merge pull request #3595 from jokester/mathjax3-fix-for-multiple-instances 2024-03-23 12:27:59 +01:00
Wang Guan
19c1bca1e4 MathJax3: allow non-singleton Reveal instance 2024-03-23 17:22:23 +09:00
Hakim El Hattab
0799c8f674 fix exception when destroying uninitialized reveal instance (closes #3593) 2024-03-22 14:29:35 +01:00
Hakim El Hattab
924bdb6305 fix vertical swipe navigation not blocking page scrolling in embedded decks 2024-03-19 09:09:44 +01:00
Hakim El Hattab
d4e5c39fe4 Merge pull request #3588 from NatKarmios/notes-error-catch
Fix error when the notes plugin receives a non-string message
2024-03-15 09:02:32 +01:00
Nat Karmios
2fb4b46307 Notes: don't error on non-string message 2024-03-14 18:18:33 +00:00
Hakim El Hattab
488c5c8f94 fix rtl prev/next navigation on slides with fragments 2024-03-13 15:15:59 +01:00
Hakim El Hattab
421da63750 fix previous bg video playing in background 2024-03-12 10:54:28 +01:00
Hakim El Hattab
62b1ea302c don't start video bgs if autoPlayMedia config is set to false 2024-03-11 14:20:01 +01:00
Hakim El Hattab
76ec60a137 fix issue when disabling autoPlay config flag at runtime 2024-03-11 13:24:27 +01:00
Hakim El Hattab
1748a55ece don't restart media when it's already playing #2882 2024-03-11 11:24:00 +01:00
Hakim El Hattab
a29a9c71ae allow same background video to continue playing across multiple slides #3189 #2882
Co-authored-by: Chi Vong <chivongv@gmail.com>
2024-03-08 14:02:26 +01:00
Hakim El Hattab
6ef138b61f dont prevent swipe navigation on video backgrounds #3584 2024-03-07 10:26:01 +01:00
Hakim El Hattab
63e0a37a88 fix broken backwards navigation in rtl mode 2024-03-06 10:55:09 +01:00
Hakim El Hattab
2927be34d8 new .enter-fullscreen class lets you add shortcuts to fullscreen mode 2024-02-28 11:08:56 +01:00
Hakim El Hattab
9d4b4362e9 5.0.5 2024-02-26 11:17:44 +01:00
Hakim El Hattab
8efd7af37c fix fragment events not firing in scroll view + add tests #3580 2024-02-26 10:54:16 +01:00
Hakim El Hattab
66fa4350e1 indentation tweak 2024-02-26 10:53:34 +01:00
Hakim El Hattab
f149d1f7ca Merge pull request #3570 from gchriz/toggleHelp
add F1 key to toggleHelp for non-english keyboards
2024-02-06 09:51:42 +01:00
Christian Ziemski
0951ce2b4f add F1 key to toggleHelp for non-english keyyboards 2024-02-05 16:56:45 +01:00
Hakim El Hattab
18ec38a6b1 tweaks for #3568 2024-02-05 11:27:57 +01:00
Hakim El Hattab
67b5ec1773 Merge pull request #3568 from bouzidanas/master
fix vertical stack background not working in scroll view
2024-02-05 11:14:13 +01:00
Anas Bouzid
50580c37c2 add comment for background fix 2024-02-04 22:16:42 -06:00
Anas Bouzid
ec4eeab478 fix selector constant 2024-02-04 21:59:46 -06:00
Anas Bouzid
4e353b207d remove console logs 2024-02-04 21:49:24 -06:00
Anas Bouzid
608e0eefcd fix selector constant 2024-02-04 21:32:55 -06:00
Anas Bouzid
aa31cab9e3 fix slide backgrounds being replaced by global background 2024-02-04 21:26:06 -06:00
Anas Bouzid
28aee42e8e update build 2024-02-04 19:35:35 -06:00
Anas Bouzid
ebca26e1f9 update build 2024-02-04 19:23:37 -06:00
Anas Bouzid
d61b375bf8 add logs to scrollview.js 2024-02-04 19:17:06 -06:00
Anas Bouzid
dcc21516dd Merge pull request #1 from hakimel/master
update repo
2024-02-04 18:37:16 -06:00
Hakim El Hattab
16f6633014 fix xss issue reported by @realansgar, regression from 3dade61176 2024-01-30 14:14:40 +01:00
Hakim El Hattab
5d131cea20 add support for keyboard navigation in scroll view #3515 2024-01-10 14:13:54 +01:00
Hakim El Hattab
52480157a1 2024 2024-01-09 11:38:35 +01:00
Hakim El Hattab
5ee1f729bd fix missing backgrounds when scroll view is actived responsively (fixes #3554) 2023-12-22 13:18:06 +01:00
Hakim El Hattab
0e21a2a791 rebuild 2023-12-15 09:03:32 +01:00
Hakim El Hattab
767a67ee00 Merge pull request #3548 from hackmdio/fix/xss-on-data-background-video-attribute
fix: use `setAttribute` instead of `innerHTML` to prevent XSS
2023-12-15 08:56:55 +01:00
Michael Wang
89ab00a4a1 fix: use setAttribute instead of innerHTML to prevent xss 2023-12-15 13:59:27 +08:00
Hakim El Hattab
993b8f302a fix pause/help overlay position in scroll mode (closes #3542) 2023-12-06 14:26:02 +01:00
Hakim El Hattab
d5896c968b fix broken mobile scroll view navigation where there were fragments starting at an index above 1 #3540 2023-11-30 19:05:37 +01:00
Hakim El Hattab
bf285afcf2 fix exception when navigating decks on mobile browsers #3539 2023-11-30 08:41:32 +01:00
Hakim El Hattab
9d491c6d2f fix notes in pdf print view #3535 2023-11-24 10:42:41 +01:00
Hakim El Hattab
a88f38dec0 Merge pull request #3533 from t-fritsch/bump-5.0.2-version-in-build-files
bump 5.0.2 version in build files
2023-11-23 14:13:15 +01:00
Hakim El Hattab
20d9eaf496 search plugin; search for whole phrase #2331 #3532 2023-11-23 14:08:39 +01:00
Hakim El Hattab
339dc709da search plugin; allow searching for any character (was alphanum) #2331 #3532 2023-11-23 14:03:47 +01:00
Thomas Fritsch
f33e9d7662 bump 5.0.2 version in build files 2023-11-20 10:46:33 +01:00
Hakim El Hattab
bbd0d3e4f7 fix exception when stepping backwards through code highlights #3524 2023-11-13 11:26:29 +01:00
Hakim El Hattab
3d7d3152a4 jump-to-slide; add support for 'h.v' format, adapat to match slide number format #3501 2023-11-13 10:08:36 +01:00
Hakim El Hattab
bddeb70f4e 5.0.2 2023-11-09 09:05:58 +01:00
Hakim El Hattab
1e1e228680 fix issue where background of a future vertical slide is briefly visible ahead of time #3520 2023-11-09 09:02:29 +01:00
Hakim El Hattab
11680561e9 nil check for deck in md plugin #3517 2023-11-06 18:10:53 +01:00
Hakim El Hattab
9d1c7e21b6 md plugin api works even if deck isn't available #3517 2023-11-06 10:59:12 +01:00
Hakim El Hattab
010f06c339 fix speaker view bug, bump version to 5.0.1 #3512 2023-10-30 07:37:05 +01:00
Hakim El Hattab
eee0a4ff24 scroll example deck tweaks 2023-10-29 21:31:25 +01:00
Hakim El Hattab
d14084d4a4 rebuild after deps update 2023-10-29 19:53:52 +01:00
Hakim El Hattab
30eddd95ed Merge pull request #3507 from Mister-Hope/deps
chore: bump deps
2023-10-29 19:52:27 +01:00
Hakim El Hattab
b6a3ea82e1 Merge pull request #3506 from Mister-Hope/typos
chore: fix typos
2023-10-29 19:43:38 +01:00
Hakim El Hattab
b2d0a3f70c Merge pull request #3505 from Mister-Hope/moon
chore: remove deprecated css declarations
2023-10-29 19:43:18 +01:00
Mr.Hope
73d3f3432f chore: bump deps 2023-10-28 18:49:41 +08:00
Mr.Hope
09b22cee6c chore: remove deprecated css declarations 2023-10-28 18:42:08 +08:00
Mr.Hope
97d73bd3dc chore: fix typos 2023-10-28 18:40:24 +08:00
Hakim El Hattab
790fd8c29a mute video in scroll demo 2023-10-27 14:57:55 +02:00
Hakim El Hattab
2518301d3e 5.0 2023-10-27 14:50:14 +02:00
Hakim El Hattab
89bf44ba92 remove legacy mousewheel listeners #3489 2023-10-27 10:35:37 +02:00
Hakim El Hattab
adfa3462cc Merge pull request #3489 from quochuy/mousewheelevents
Support to 'wheel' event listener
2023-10-27 09:43:13 +02:00
Hakim El Hattab
68efdf6b03 Merge branch 'master' into mousewheelevents 2023-10-27 09:42:32 +02:00
Hakim El Hattab
cc640a21d3 not important 2023-10-25 21:33:36 +02:00
Hakim El Hattab
c594f9c6ec not so important 2023-10-25 21:30:53 +02:00
Hakim El Hattab
942be4ee42 fix scroll view activation in tests 2023-10-25 14:13:51 +02:00
Hakim El Hattab
c23964274c reader mode -> scroll view, auto-enable below 435px width 2023-10-25 13:58:06 +02:00
Hakim El Hattab
e46bad392a fix scroll snapping in reader mode compact layout 2023-10-25 13:08:41 +02:00
Hakim El Hattab
ff252c984f reader mode now works for embedded decks 2023-10-25 11:32:40 +02:00
Hakim El Hattab
0072845828 ? keyboard shortcut should not trigger when focus is on an editable element fixes #2645 2023-10-25 11:04:53 +02:00
Hakim El Hattab
5b537aa8f8 fix slide numbers not visible in pdf exports 2023-10-24 10:19:59 +02:00
Hakim El Hattab
aa5c03c234 reader mode remembers scroll position when reloading 2023-10-23 13:08:17 +02:00
Hakim El Hattab
ff3244af7a reader mode refactoring 2023-10-23 11:24:50 +02:00
Hakim El Hattab
49c0030392 improved reader progress bar visuals in high density 2023-10-20 21:02:04 +02:00
Hakim El Hattab
51acc830f9 major cleanup of reader mode code 2023-10-20 20:23:31 +02:00
Hakim El Hattab
cc9a36dc25 massive reader mode refactor; adds support for auto-animate + snapping for fragments 2023-10-20 10:18:34 +02:00
Hakim El Hattab
a9031821ef add scroll snap points for reader mode scroll triggers 2023-10-18 11:16:06 +02:00
Hakim El Hattab
c1d64ad8d0 audit fix 2023-10-17 14:03:27 +02:00
Hakim El Hattab
57ce5a5e3d === 2023-10-17 14:03:00 +02:00
Hakim El Hattab
c4e322ce79 don't show reader scroll bar when there is no overflow, reader style tweaks 2023-10-17 13:59:11 +02:00
Hakim El Hattab
836967d8ab prevent extra page at end when printing to pdf, reader mode styling tweaks 2023-10-13 16:02:55 +02:00
Hakim El Hattab
28ef437a89 rebuild assets 2023-10-12 14:05:42 +02:00
Hakim El Hattab
c80b685a88 Merge pull request #3482 from hakimel/feature/reader-mode
Add reader mode
2023-10-12 14:04:44 +02:00
Hakim El Hattab
7108476911 Merge branch 'master' into feature/reader-mode 2023-10-12 14:04:36 +02:00
Hakim El Hattab
b8b55b8d4c readerScrollBar -> readerScrollbar 2023-10-12 14:03:28 +02:00
Hakim El Hattab
a7d0916f28 reader mode accessibility, bug fixes 2023-10-12 13:58:10 +02:00
Hakim El Hattab
198cbc4ace reader mode tweaks 2023-10-12 13:39:44 +02:00
Hakim El Hattab
d802789c4d more accurate scroll trigger positioning in progress bar 2023-10-12 11:09:47 +02:00
Hakim El Hattab
c1b1745200 audit fix 2023-10-11 10:43:15 +02:00
Hakim El Hattab
980b902a9d disable overview while in reader mode 2023-10-11 10:42:47 +02:00
Hakim El Hattab
be5d811914 convert sass controls spacing to css var, full height reader progress bar 2023-10-11 10:01:32 +02:00
Hakim El Hattab
122642fdea reader progress theming, automatically invert based on slide bg 2023-10-11 09:51:03 +02:00
Hakim El Hattab
09f36adc70 mobile tweaks 2023-10-11 08:24:06 +02:00
Hakim El Hattab
2c5a83c945 refactoring 2023-10-10 14:47:08 +02:00
Hakim El Hattab
a6abd0423e finishing touches on reader mode progress bar 2023-10-10 13:34:33 +02:00
Hakim El Hattab
234799114a reader mode progress bar can be dragged to scroll 2023-10-10 11:16:31 +02:00
Hakim El Hattab
f80ee3b917 reader mode progress bar 2023-10-10 10:24:02 +02:00
Hakim El Hattab
1871824fae reader mode; named deeplink support, stay on same slide when reader mode is turned on/off 2023-10-06 11:37:58 +02:00
Hakim El Hattab
1f1ca3a887 refactoring 2023-10-06 10:07:19 +02:00
Hakim El Hattab
d84aa3472e reader mode tests 2023-10-06 09:52:21 +02:00
Hakim El Hattab
ab52d334df add support for responsively activating reader mode via 2023-10-06 09:14:23 +02:00
NGUYEN DINH Quoc-Huy
42a1844d27 Support to 'wheel' event listener 2023-10-06 15:03:32 +11:00
Hakim El Hattab
899a45dff6 update api method name 2023-10-05 14:24:13 +02:00
Hakim El Hattab
3db2340df3 fix issues with active slide logic in reader mode, foundational work for auto-animate support 2023-10-05 14:06:06 +02:00
Hakim El Hattab
88fbfc5751 fix incorrect unit for slide-width/height css variable #1263 2023-09-26 10:20:29 -04:00
Hakim El Hattab
c856fa9db1 dispatch slidechange events in reader mode 2023-09-25 12:32:46 +02:00
Hakim El Hattab
4c9cc89566 refactoring, remove unused layout 2023-09-22 10:31:34 +02:00
Hakim El Hattab
97f2e184c1 fix preload bug 2023-09-21 14:15:46 +02:00
Hakim El Hattab
e49e89a557 reader mode supports scroll snapping, sticky pages with scroll triggers are always full height 2023-09-21 13:35:49 +02:00
Hakim El Hattab
f0950ba9ae rename 'mode' config value to 'view' 2023-09-20 16:11:31 +02:00
Hakim El Hattab
0861b07618 revamped reader mode sticky logic, add option for fullscreen pages 2023-09-20 15:00:15 +02:00
Hakim El Hattab
5de7da7692 reader mode can be turned off without reload, add Reveal.toggleReader() 2023-09-19 11:52:54 +02:00
Hakim El Hattab
db2523db27 add support for aside element notes inside of fragments (fixes #3478) 2023-09-19 09:29:53 +02:00
Hakim El Hattab
eb01f8f3a5 Merge pull request #3477 from skyboyer/3476-data-notes-does-not-work-on-slide-level
Notes plugin: notes from data-notes attribute were not shown
2023-09-19 09:20:19 +02:00
Yevhen Kozlov
cd948d4136 Notes plugin: notes from data-notes attribute were not shown 2023-09-17 23:29:31 +02:00
Hakim El Hattab
07a6cf1249 fix empty slide bug when all slides in a stack are hidden via data-visibility 2023-09-15 13:48:26 +02:00
Hakim El Hattab
4da6f6b30f refactoring, fix preload distance 2023-09-14 15:17:28 +02:00
Hakim El Hattab
eaf5f61318 reader mode; deeplink support, presentation scaling, scroll trigger fixes 2023-09-14 15:03:23 +02:00
Hakim El Hattab
0f27ef40fb revert demo changes to index.html 2023-09-14 13:19:33 +02:00
Hakim El Hattab
f26d31570e separate reader mode into individual controller, add scroll triggers for fragments 2023-09-14 13:00:31 +02:00
Hakim El Hattab
a4b7f9dff7 4.6.1, remove log 2023-09-13 12:23:36 +02:00
Hakim El Hattab
6aa1eae796 foundation for reader mode, activate via 'mode=reader/print' config param 2023-09-12 17:00:56 +02:00
Hakim El Hattab
487cc860f8 fix alpha overlap during scrolled code highlight transitions 2023-09-12 10:35:37 +02:00
Hakim El Hattab
c5307462b0 4.6.0 2023-09-12 09:16:24 +02:00
Hakim El Hattab
fc16cc8b11 add test deck with 500 slides 2023-09-11 10:22:21 +02:00
Hakim El Hattab
03fe25c1f6 Merge pull request #3464 from t-fritsch/fix-dracula-theme-li-marker-colors
fix dracula li markers
2023-09-04 08:53:40 +02:00
Thomas Fritsch
81ea116292 refactor dracula theme sass code 2023-09-02 12:21:54 +02:00
Thomas Fritsch
3a830dd98f fix dracula theme li numbering 2023-09-02 12:19:59 +02:00
Thomas Fritsch
777e2a2d05 fix dracula li markers
replace :before pseudo elements with :marker selector

allows to have different marker based on the level of nesting (as in other themes : disc, square, circle)
2023-09-02 12:03:11 +02:00
Hakim El Hattab
680cf5edb8 add start/stopEmbeddedMedia API methods for controlling playback of video/audio/iframes 2023-08-25 08:51:52 +02:00
Hakim El Hattab
edf6638065 Merge pull request #3457 from t-fritsch/fix-print-font-for-code-blocks
fix code blocks font when printing pdf
2023-08-24 11:32:27 +02:00
Thomas Fritsch
a1d0cdffc4 fix code blocks font when printing pdf
fixes #2867
2023-08-24 11:11:05 +02:00
Hakim El Hattab
064b3c3aa5 Merge pull request #3450 from gildasio/master
Fix dracula's theme list-style on sub-items
2023-08-24 08:29:59 +02:00
Hakim El Hattab
2ab0689aa3 Merge pull request #3456 from menotti/master-1
Update demo.html
2023-08-24 08:27:09 +02:00
Ricardo Menotti
75c0be853c Update demo.html
switch themes keep current slide
2023-08-23 21:49:36 -03:00
Hakim El Hattab
ccbaffc975 build md plugin #3454 2023-08-23 10:22:58 +02:00
Hakim El Hattab
bae6de87ec Merge pull request #3454 from JankariTech/refactor-vars-and-equality
Refactored var to let or const, used strict equality operator
2023-08-22 13:43:56 +02:00
Prarup Gurung
9babaa005f Refactored var to let or const, strict equality 2023-08-22 17:05:12 +05:45
Hakim El Hattab
af1cd9d6a4 Merge pull request #3453 from JankariTech/fixVariablesTypos
fix typos in variable names
2023-08-22 10:14:58 +02:00
Artur Neumann
a3f71b4a9b fix typos in variable names 2023-08-22 13:56:46 +05:45
Gildasio Junior
58881061ab Fix dracula's theme list-style on sub-items 2023-08-16 15:34:57 -03:00
Hakim El Hattab
e1c180565e Merge pull request #3445 from t-fritsch/fix-scss-watch-tasks
fix scss watch tasks broken on syntax error
2023-08-09 15:17:25 +02:00
Hakim El Hattab
b8d97d2537 Merge pull request #3446 from t-fritsch/speed-up-livereload
speed up livereload
2023-08-09 15:12:36 +02:00
Thomas Fritsch
74a5dac34f speed up livereload
connect.reload needs a stream of files to fire, but this stream is irrelevant here and slows refresh time a lot (from ~2ms to 2000ms here)
2023-08-06 22:52:03 +02:00
Thomas Fritsch
f2b0316a91 fix scss watch tasks broken on syntax error
when there is a syntax error in a sass file (theme or core) the npm start command used to hang, forcing the user to stop and restart the task to compile again.
this fix allows to keep the start-task watching/compiling even when there is an error :
- the error is displayed in terminal
- the rest of gulp tasks are not called (no reload in the browser)
- the user can edit the scss files to try a fix without the need to stop/restart the `npm start` command
2023-08-06 18:39:14 +02:00
Hakim El Hattab
92ee97fbfe update markdown default notes separator to ignore inline occurances of 'notes:', closes #1915, closes #2762 2023-08-06 14:02:55 +02:00
Hakim El Hattab
da5682ce51 move markdown default options to top level #3443 2023-08-06 13:55:00 +02:00
Hakim El Hattab
f4e1a8ef50 Merge pull request #3443 from t-fritsch/allow-markdown-default-options-override
adds ability to override markdown plugin default options
2023-08-06 13:50:11 +02:00
Hakim El Hattab
b66121e32b Merge pull request #3444 from t-fritsch/allow-link-to-nested-element-id
add support for links to the id of an element nested inside slide
2023-08-06 13:41:23 +02:00
Hakim El Hattab
bddf79873b Merge pull request #3442 from t-fritsch/allow-theme-subfolders
allow theme subfolders
2023-08-06 13:33:11 +02:00
Hakim El Hattab
ae703c372c Merge pull request #3441 from t-fritsch/fix-livereload-with-root-param
fixes livereload when using root CLI param
2023-08-06 13:27:12 +02:00
Thomas Fritsch
3d1eabba0f build 2023-08-05 16:47:52 +02:00
Thomas Fritsch
27ff199627 add support for links to the id of an element nested inside slide
fixes hakimel/reveal.js#3231
2023-08-05 16:24:22 +02:00
Thomas Fritsch
31174cbaba adds ability to override markdown default options
```js
Reveal.initialize({
    markdown: {
        defaultOptions: {
            verticalSeparator: '\n--\n`,
        }
    }
})
2023-08-05 00:14:15 +02:00
t-fritsch
ba20abf0c3 allow theme subfolders
allows custom themes to import files from subfolders inside the `css/theme/source` folder.

in `css/theme/source/custom-theme.scss` we can now do
```scss
@import `custom-theme/controls`
@import `custom-theme/headings`
...
```
2023-08-03 22:38:03 +02:00
t-fritsch
2dd27b37c6 ignore node_modules for livereload
may allow perf boost
2023-08-03 22:31:07 +02:00
t-fritsch
82d63e0296 fixes livereload when using root CLI param 2023-08-03 22:23:58 +02:00
Hakim El Hattab
c8a7f26229 fix issue where fragment-evel autoslide timing was when multiple fragments share the same index 2023-08-03 16:00:00 +02:00
Hakim El Hattab
12f5ba4c9d auto-slide duration falls back on global setting instead of looking at first fragment 2023-06-16 12:11:46 +02:00
Hakim El Hattab
227f90fa00 fix code block auto-animate bug that caused unmatched lines to appear without fading in 2023-05-31 09:07:10 +02:00
Hakim El Hattab
0d699ec7f5 Merge pull request #3409 from flowolf/add-code-line-offset-to-markdown
[Markdown plugin] add line number offset for code sections to markdown
2023-05-15 14:14:30 +02:00
Florian Klien
bf749ee1da add tests 2023-05-12 15:45:29 +02:00
Florian Klien
0b44308754 add ln-start-from for code sections to markdown 2023-05-12 14:22:00 +02:00
Hakim El Hattab
0301ce58ab 4.5.0 2023-04-13 13:50:05 +02:00
Hakim El Hattab
724c4fee27 build latest css 2023-03-08 09:34:15 +07:00
Hakim El Hattab
006b348e6b reduce fragment style specificity, add custom class to reset fragment styles #2927 2023-03-07 10:22:52 +07:00
Hakim El Hattab
0c9bdeab70 Merge pull request #3358 from azat-archive/markdown-fix
Correctly strip leading white-space from markdown
2023-02-27 02:10:23 +01:00
Hakim El Hattab
cd019514f3 rename high contrast themes, dont change anything else compared to black/white themes #3310 2023-02-22 10:21:31 +07:00
Peter Kehl
1bfc699045 Black & White compact themes with verbatim headers. (#3310) 2023-02-22 04:05:29 +01:00
Hakim El Hattab
2cacfc1394 remove commented out config 2023-02-22 10:02:17 +07:00
Elliot" Constantin H
dcae8a4dc9 Fix overview spacing for disabled auto layout (#3291)
* Fix overlap in overview when config.disableLayout === true

* run gulp js
after commit 9193e5cd5d

---------

Co-authored-by: Hakim El Hattab <hakim.elhattab@gmail.com>
2023-02-22 04:01:21 +01:00
Hakim El Hattab
7de6ccb65b add sortFragmentsOnSync option, makes it possible to avoid unwanted sorting in editing environments like slides.com 2023-02-16 09:48:48 +07:00
Martino
ea6b7197c7 Add RFC3986-compliant URL format encoding
Fixes https://github.com/hakimel/reveal.js/issues/3315
2023-02-13 10:02:15 +01:00
John Kristensen
ae652a8e4e Correctly strip leading white-space from markdown
If the markdown contains something that is indented by more that the
`leadingTabs`/`leadingWs` then extra white space is incorrectly removed.
ie the following example:

```
    <section data-markdown>
    some text
       indented text
          more indented text
    </section>
```

would result in the following markdown:

```
some text
   indented text
  more indented text
```

We can work around this problem by using a function to generate the
replace value.
2023-02-02 13:27:52 +01:00
Hakim El Hattab
b1a9842b2f Merge pull request #3356 from deining/fix/typos
Fixes typos
2023-01-25 14:17:50 +01:00
Andreas Deininger
32a16295c3 Fixes typos 2023-01-25 14:13:31 +01:00
hakimel
447fefd31c scope print styles to .reveal #3348 2023-01-23 12:12:28 +01:00
Hakim El Hattab
6510916b9f Merge pull request #3257 from sojinsamuel/patch-1
Missing lang attribute
2023-01-18 10:50:34 +01:00
Hakim El Hattab
9c95411dfa Merge pull request #3268 from sashashura/patch-1
GitHub Workflows security hardening
2023-01-18 10:48:46 +01:00
hakimel
e0ef8db54b fix security alerts by upgrading glob-parent #3343 2023-01-18 10:45:25 +01:00
hakimel
4a1b91a9c8 jump to slide tweak 2023-01-18 10:40:33 +01:00
hakimel
3301d3036e fix incorrect condition for jump-to-slide 2023-01-17 10:56:45 +01:00
hakimel
fb1fecd754 enforce a min length on jump to slide search queries 2023-01-17 10:30:35 +01:00
hakimel
60769db4ee better selection color contrast for black theme 2023-01-17 09:52:10 +01:00
hakimel
efcc86273b jump-to-slide is 1-indexed, falls back on word search 2023-01-17 09:49:49 +01:00
hakimel
b648a56009 update hljs 10 > 11.7, fix perf issue in demo presentation caused by auto lang detection 2023-01-17 09:12:00 +01:00
hakimel
282680e163 delay slide jumps a few ms 2023-01-16 14:43:50 +01:00
hakimel
79e9fdf13f add jump-to-slide to help overlay, style tweaks 2023-01-16 12:33:37 +01:00
hakimel
d146c1ddc1 adds jump-to-slide, press G to activate 2023-01-16 11:41:19 +01:00
hakimel
a815c7d269 spec updates 2023-01-10 10:24:49 +01:00
hakimel
2eb6d1e71c audit fix 2023-01-10 10:09:48 +01:00
hakimel
6378df47c0 run tests in node 14 2023-01-10 09:48:11 +01:00
hakimel
9f629a9d38 only test one node version 2023-01-09 15:20:31 +01:00
hakimel
df355eca3a 2023 2023-01-09 14:31:46 +01:00
Hakim El Hattab
4fe3946cb4 Merge pull request #3305 from lolmaus/patch-1
Gulp livereload: include subfolders to watch for changes in html and md
2022-12-07 11:27:14 +01:00
Hakim El Hattab
7fbe03946f Merge pull request #3324 from iiska/theme-dracula
Add theme 'dracula'
2022-12-07 11:24:36 +01:00
Juhamatti Niemelä
7a613a4507 Add theme 'dracula'
New theme using color palette from [Dracula](https://draculatheme.com/)
dark editor theme available for quite a number of different
applications.
2022-11-19 20:29:59 +02:00
hakimel
9f1f7789bf roll back unintended change to index content 2022-11-17 09:39:00 +01:00
Andrey Mikhaylov (lolmaus)
8492b82d12 Gulp livereload: include subfolders to watch for changes in html and md
Currently it's only watching for changes to `.html` and `.md` files located in the root of the project. I was frustrated when livereload stopped working for me: turns out it was because I put my content into subfolders.
2022-10-24 14:06:31 +03:00
hakimel
f6f657b627 4.4.0 2022-10-17 09:46:41 +02:00
hakimel
fb68f1c389 fix getAttribute exception in notes plugin #3285 2022-10-17 08:51:44 +02:00
Hakim El Hattab
468132320d remove doppler 2022-09-24 11:39:12 +02:00
hakimel
c1c4145240 fix merge error, closes #3277 2022-09-14 14:14:42 +02:00
hakimel
8a97ad58b0 prevent extra \n at end of single notes #3010 2022-09-05 11:10:32 +02:00
hakimel
01efcf2d92 merge support for multiple notes on same slide 2022-09-05 10:47:47 +02:00
Alex
a092499981 Update js.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-08-31 08:16:04 +01:00
hakimel
b23d15c430 fix issue were auto-animate could interfere with inherited line-height 2022-08-14 19:55:24 +02:00
hakimel
a0e48602d3 fix issue with past/future vertical slides remaining visible in Safari 15.4 (closes #3164) 2022-08-13 19:38:54 +02:00
Sam
b5fb6da46e Missing lang attribute
The lang attribute does not default to English. It defaults to an unknown, which is an accessibility issue.
2022-08-12 11:49:15 +05:30
hakimel
e219184f37 update browserlist from '> 0.5%, IE 11, not dead' to '> 2%, not dead' #2985 2022-08-08 07:58:18 +02:00
Hakim El Hattab
039972c730 tweak slides mention 2022-05-31 12:34:38 +02:00
hakimel
5a031c07b6 fix issues with overflowing fit-text when exporting to pdf #3191 #3120 2022-05-31 11:50:26 +02:00
Hakim El Hattab
a3f4caf179 Merge pull request #3191 from chivongv/fix-pdf-long-r-fit-text
fix: truncated long r-fit-text on pdf
2022-05-31 10:41:24 +02:00
Hakim El Hattab
0d5b69d551 Merge pull request #3210 from eltociear/patch-1
Fix typo in plugin.js
2022-05-20 14:32:36 +02:00
Ikko Ashimine
a8e9d8cc8a Fix typo in plugin.js
withing -> within
2022-05-19 12:42:45 +09:00
hakimel
3dade61176 notes plugin only listens for same-origin postmessages to prevent xss 2022-05-12 22:07:48 +02:00
hakimel
4b6ac46cde new attempt at speaker view xss fix 2022-05-12 14:53:40 +02:00
hakimel
0ca389721c add support for 'data-background-gradient' #2510
Co-authored-by: Giacomo Zinetti <giacomo.zinetti@giko.it>
2022-05-02 14:49:21 +02:00
hakimel
eada286ca0 fix issue where auto-animate did not work when jumping three or more slides (i.e. longer than the view distance) 2022-04-28 13:38:30 +02:00
hakimel
286d5ef561 made data-background attribute work with .webp #3200 2022-04-25 08:45:43 +02:00
Chi Vong
f319b246db fix: truncated long r-fit-text on pdf 2022-04-10 11:29:06 +02:00
Hakim El Hattab
9415ad5d7f update link 2022-04-06 13:15:08 +02:00
hakimel
1767e76cdc fix issue with #3182 when slide numbers are disabled 2022-04-04 15:33:44 +02:00
Hakim El Hattab
fca5b33530 Merge pull request #3182 from chivongv/fix-pdf-page-numbering
fix: pdf page numbering for fragment group
2022-04-04 15:25:25 +02:00
Hakim El Hattab
25ed8f2c47 Merge branch 'master' into fix-pdf-page-numbering 2022-04-04 15:25:14 +02:00
hakimel
914b2aea83 fix inconsistent fragment visibility in looping presentations #3123 2022-04-04 15:11:57 +02:00
Chi Vong
953aaad83a fix: pdf page numbering for fragment group 2022-04-02 18:59:46 +02:00
hakimel
e281b3234e always use css transforms for presentation scaling (zoom has too many quirks even if it is slightly sharper on ldpi displays) 2022-03-31 11:19:55 +02:00
hakimel
918ee5610a update lock file 2022-03-21 10:47:50 +01:00
hakimel
3fcf0db96e 4.3.1 2022-03-21 10:39:51 +01:00
hakimel
0247ae7582 notes plugin allows messsages from current/upcoming slide windows 2022-03-21 10:36:22 +01:00
hakimel
31407082eb fix #3154 2022-03-21 09:59:49 +01:00
Hakim El Hattab
db4aa0c2e7 Merge pull request #3019 from dabrahams/patch-3
Correct a comment
2022-03-21 09:41:05 +01:00
Hakim El Hattab
85fbfb26fd Merge pull request #3020 from dabrahams/patch-4
Call me crazy, but this seems like a typo
2022-03-21 09:40:31 +01:00
Hakim El Hattab
e3fb1655ad Merge pull request #3135 from dutts/patch-2
Removed incorrect possessive apostrophe
2022-03-21 09:39:27 +01:00
hakimel
bdcc2bd9dd fix vertical slide link in demo #3155 2022-03-21 09:38:31 +01:00
hakimel
f4cadb9b0e dont run full build + tests for package task #3156 2022-03-21 09:35:30 +01:00
Hakim El Hattab
d80a8d638c Merge pull request #3156 from dennybiasiolli/fix-gulp-package
gulp: fixing base path for 'package' task
2022-03-21 09:31:06 +01:00
Hakim El Hattab
57e5d102d5 Merge pull request #3157 from eric-wieser/patch-1
RevealMath.MathJax3: Allow the skipHtmlTags option to be overriden
2022-03-21 09:25:39 +01:00
Hakim El Hattab
41d5a12011 Merge pull request #3165 from CommanderRoot/rm-deprecated-substr
replace deprecated String.prototype.substr()
2022-03-21 09:23:10 +01:00
hakimel
3077ddbd09 recover support for running speaker view from file:// protocol #3158 2022-03-21 09:19:48 +01:00
Tobias Speicher
a5d1b68800 replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-20 16:17:42 +01:00
Eric Wieser
470aa76894 Allow the skipHtmlTags option to be overriden
The previous logic here was backwards, and did not allow the user to override `options` in the mathjax config structure.
This makes it match how the `startup` and `tex` fields are merged.
2022-03-16 16:26:27 +00:00
Denny Biasiolli
1b3b83273c gulp: fixing base path for 'package' task 2022-03-16 15:51:31 +01:00
hakimel
37861335a2 add getSlidePath API method, update URL tests to work with new replaceState throttle 2022-03-09 11:10:26 +01:00
hakimel
2a239aedca debounce messages from notes -> main window, fixes #3147 2022-03-09 10:25:30 +01:00
hakimel
fc861fca50 throttle calls to replaceState to fix security error when navigating quickly in Safari #3147 2022-03-09 09:44:31 +01:00
hakimel
853764bc8c 4.3.0 2022-02-28 10:03:16 +01:00
hakimel
e325cea6b7 dependency update 2022-02-28 09:57:50 +01:00
hakimel
ffd533c40d 4.2.2 2022-02-28 09:49:40 +01:00
hakimel
c83c68500f rebuild notes plugin when html changes 2022-02-28 09:19:58 +01:00
Hakim El Hattab
c47bf217be Merge pull request #3137 from r0hanSH/fix_dom_xss
Fix DOM XSS
2022-02-28 09:17:34 +01:00
r0hanSH
32cdd3b187 Fix DOM XSS 2022-02-26 17:16:18 +05:30
hakimel
e33c3c72f9 the speaker view presentation URL can be overridden via (needed for reveal.js docs) 2022-02-25 09:42:44 +01:00
Richard D
ac46f773ee Removed incorrect possessive apostrophe 2022-02-24 12:52:52 +00:00
hakimel
5e12c6aeb7 additional cleanup when destroying #1145 2022-02-21 14:28:11 +01:00
hakimel
1e0cbe6779 reveal.js can now be uninitialized by calling Reveal.destroy() #1145 #3134 2022-02-21 13:41:36 +01:00
hakimel
ff20051861 fiv out of sync speaker view after presentation reloads #2822 #3032 2022-02-10 13:28:47 +01:00
hakimel
6b535328c0 note about changes to speaker view requiring plugin rebuild 2022-02-02 09:06:47 +01:00
Hakim El Hattab
19f04bcbcb add sponsor 2022-01-28 09:17:18 +01:00
hakimel
61055ed02b revert accidental change to demo.html 2022-01-19 18:08:08 +01:00
hakimel
f7c59649fe include sourcemaps in dist #3082 2022-01-11 13:24:24 +01:00
hakimel
dbb1d5ed19 2022 2022-01-03 12:38:51 +01:00
Hakim El Hattab
38b32c6619 update readme 2021-12-20 15:08:31 +01:00
Hakim El Hattab
66ac898b54 update readme 2021-12-20 15:02:19 +01:00
Hakim El Hattab
753a844d83 update link 2021-12-20 08:44:39 +01:00
Hakim El Hattab
1a525a7e14 update readme 2021-12-17 11:29:59 +01:00
Hakim El Hattab
9e0badff61 revamp readme, add sponsors 2021-12-17 11:18:46 +01:00
hakimel
a9277f9d46 reset transform in fullscreen mode #3080 2021-12-08 14:04:40 +01:00
hakimel
b7d65be051 fix fullscreen issues; correct size in Safari, auto-focus presentation when entering fullscreen #3080 2021-12-08 10:45:36 +01:00
Hakim El Hattab
c804611343 dark mode logo 2021-12-06 12:35:52 +01:00
hakimel
79a1674021 4.2.1 2021-12-06 12:11:39 +01:00
hakimel
9e583b8df4 fix intermittent issue with partially disappearing slides in scaled down presentations in Chrome 2021-11-24 13:30:20 +01:00
hakimel
74c0fbb6a2 fix read issue that caused double navigations fixes #3079 2021-11-24 11:30:12 +01:00
hakimel
c5d549810e refactor #3078 2021-11-24 11:07:11 +01:00
hakimel
ec32d44085 remove comment 2021-11-24 10:57:20 +01:00
Hakim El Hattab
bded1f5d39 Merge pull request #3078 from vanch3d/video
Fixing background video not playing on certain small factor devices (android)
2021-11-24 10:56:43 +01:00
Hakim El Hattab
2d050a88e2 Merge pull request #3075 from cashcat/patch1
fix npm start -- --host=0.0.0.0 unuseful
2021-11-24 10:27:02 +01:00
vanch3d
907ec735f8 rebuilt dist files (reveal.js only) 2021-11-23 09:47:32 +00:00
vanch3d
bcf83153d7 adding type to the video source tag 2021-11-23 09:42:22 +00:00
cashcat
13d0f086cc fix npm start -- --host=0.0.0.0 unuseful 2021-11-21 12:23:28 +08:00
hakimel
c79f4b5a4f fix issue with deck-wide backgroudns in pdf exports + fix #2865 2021-11-16 14:10:29 +01:00
hakimel
cc582c6ed5 update css for dart sass compatibility 2021-11-16 09:50:48 +01:00
hakimel
bed1329672 update contribution guidelines 2021-11-15 09:50:46 +01:00
hakimel
6371351d10 4.2.0 2021-11-12 12:11:10 +01:00
hakimel
2921e05554 4.2.0 2021-11-12 12:09:06 +01:00
hakimel
7f376c501a copy 2021-11-12 10:48:31 +01:00
hakimel
ceed5edc78 roll back unintended changes to default template 2021-11-11 15:13:31 +01:00
hakimel
4e8a1b3802 fix issue with internal links 2021-11-11 08:16:28 +01:00
hakimel
ad46e6293c upgrade highlight.js line number plugin, adds support for line number offsets #3050 2021-11-10 21:41:13 +01:00
hakimel
bc94d9598e roll back unintended change to build 2021-11-10 21:14:05 +01:00
hakimel
a6c0f3efac refactor hash parsing, fixes issue with autoplaying media not starting from internal links on mobile devices 2021-11-10 20:08:37 +01:00
hakimel
35b67a9f5b katex math rendering; fix broken 2477 delimiter, compatibility with external markdown #2559 2021-11-10 10:20:25 +01:00
hakimel
1ce77db3d0 tweak browser targets 2021-10-28 14:23:19 +02:00
hakimel
0ea4193001 add @burgerga's math plugin with MathJax2, MathJax3 and KaTeX support #2559 2021-10-28 13:41:57 +02:00
hakimel
810d80bc3c revert changes to md test #3027 2021-10-08 11:08:42 +02:00
hakimel
6b15e6c1ff Merge branch '3025-windows-test-fix' of https://github.com/Vandivier/reveal.js 2021-10-08 10:55:42 +02:00
hakimel
92a0d47237 syntax tweak 2021-10-08 10:30:05 +02:00
hakimel
ea14d4a08a beforeHighlight callback 2021-10-08 10:22:55 +02:00
Jens Lechtenbörger
62a85d55f8 Add generated files 2021-10-06 17:51:11 +02:00
Vandivier
7b82d12675 fix: deck 2 horizontal separator
fix for windows
line ending difference caused failure
now simple.md content mirror deck1
2021-10-05 17:01:24 -04:00
Vandivier
001129c993 chore: lock update 2021-10-05 16:49:14 -04:00
Vandivier
dda3e4b4f2 fix: host fix for windows 2021-10-05 16:48:46 -04:00
Asvin Goel
d93cba5581 var -> let 2021-10-04 12:48:42 +02:00
Asvin Goel
cc1da8aee6 Remove accidentally added tab 2021-10-04 12:19:06 +02:00
Asvin Goel
ca9ce4b592 Allow users to register additional languages via callback 2021-10-04 12:16:00 +02:00
Dave Abrahams
42d5dcab98 Call me crazy, but this seems like a typo 2021-09-28 17:38:08 -07:00
Dave Abrahams
c78e28682d Correct a comment 2021-09-28 12:33:01 -07:00
hakimel
05e57dea66 fix issue with loading base64 images #2978 2021-09-28 13:02:16 +02:00
Hakim El Hattab
0da9821e90 fix spec 2021-09-20 09:06:57 +02:00
Hakim El Hattab
cb454b0540 'slidechange' -> 'beforeslidechange' (closes #3003) 2021-09-20 09:00:17 +02:00
Jens Lechtenbörger
f9ce61e34a Support multiple aside notes elements per slide
So far, multiple notes per slide are only supported if they are
attached to fragments (without fragments, only the first aside notes
element on a slide is displayed).  With this commit, the contents of
all notes on a slide are displayed (except for fragments with notes,
for which, as before, only each fragment's first/single note is
displayed).
2021-09-16 11:56:52 +02:00
Hakim El Hattab
ad50dd513f add 'slidechange' event that can prevent navigation #3003 2021-09-16 11:15:41 +02:00
Hakim El Hattab
2aed592d1f fix last slide shortcut in looped presentations #3007 2021-09-16 10:43:40 +02:00
Hakim El Hattab
5f22d6c3da upgrade sass 2021-09-16 10:43:40 +02:00
Hakim El Hattab
6727cd6ecb fix bug that prevented first-last slide looping in linear navigation mode (closes #3009) 2021-09-16 10:43:40 +02:00
Hakim El Hattab
abe9abbed7 Merge pull request #3006 from dabrahams/patch-2
Fix copy/paste-o
2021-09-10 08:51:50 +02:00
Hakim El Hattab
dd79e7fabb Merge pull request #3005 from dabrahams/patch-1
Update comments about markdown slide separators
2021-09-10 08:51:30 +02:00
Dave Abrahams
d717c2302d Fix copy/paste-o 2021-09-09 17:22:54 -07:00
Dave Abrahams
6dd141811d Update comments about markdown slide separators
They might have been correct once upon a time, but apparently not since "---" became the default.
2021-09-09 16:49:19 -07:00
Hakim El Hattab
647c04cffe cdn video url in demo 2021-09-09 10:25:42 +02:00
Hakim El Hattab
90bbe8be4f new shortcuts; alt+arrow key skips fragments, shift+arrow key jumps to last slide in the given direction #1105 2021-09-06 13:02:58 +02:00
Hakim El Hattab
a3e8162eb1 fix unmatched h3 in test 2021-09-06 11:15:46 +02:00
Daniel Skogly
bc5ca9a452 Fix unmatched h3-tags 2021-09-06 11:14:38 +02:00
Hakim El Hattab
01d8d669bc check for slides container too #2217 2021-08-27 09:48:53 +02:00
Hakim El Hattab
e237fea99a better error message when '.reveal' root node is missing #2217 2021-08-27 09:40:33 +02:00
Hakim El Hattab
b18f12d964 Merge branch 'dev' of github.com:hakimel/reveal.js 2021-07-09 08:22:24 +02:00
Hakim El Hattab
0dbe29b53e Merge pull request #2982 from nicojs/feature/fix-code-fragments
fix(highlight): allow pre fragments
2021-07-09 08:21:21 +02:00
Nico Jansen
9ca5068eee Update whitespaces 2021-07-06 22:05:20 +02:00
Nico Jansen
28509e0c39 fix test 2021-07-06 18:34:52 +02:00
Nico Jansen
4d443826ab Update build output for highlightjs 2021-07-06 18:28:07 +02:00
Nico Jansen
20d7c87a2f fix(highlight): allow pre fragments 2021-07-06 18:19:10 +02:00
Hakim El Hattab
ade234576e 4.1.3 - accidentally published a local change to npm -_- 2021-06-09 14:38:57 +02:00
Hakim El Hattab
a453ac08a8 4.1.2 2021-06-09 14:14:55 +02:00
Hakim El Hattab
aab4c0c3cc fix issue with parsing markdown notes inside of non-markdown slide #2970 2021-06-09 14:09:17 +02:00
Hakim El Hattab
1be851658f Merge pull request #2968 from blairmacintyre/css-qualifiers
prepend --r- to global style variables
2021-06-08 09:18:57 +02:00
Blair MacIntyre
76a81939a7 prepend --r- to global style variables
When embedding reveal in a website, this will help avoid global variable conflicts with other frameworks that use global styles via variables.
2021-06-04 07:40:40 -04:00
Hakim El Hattab
c27e3b5ff2 add data-auto-animate-id to auto-animate examples #2896 2021-05-27 10:01:16 +02:00
Hakim El Hattab
31c65975b2 Merge pull request #2896 from coffeenotfound/feature-auto-animate-restart
Implement auto-animate id and restart
2021-05-27 09:54:46 +02:00
Hakim El Hattab
83648bb9eb recompile assets 2021-05-27 09:46:32 +02:00
Hakim El Hattab
c2fd760f8f replace deprecated hljs.highlightBlock calls, fix #2958 2021-05-21 09:13:40 +02:00
Hakim El Hattab
48024a1137 4.1.1 2021-05-20 19:12:45 +02:00
Hakim El Hattab
ac410debf6 rebuild assets 2021-05-20 18:42:31 +02:00
Hakim El Hattab
e852e53792 npm run build no longer executes tests 2021-05-19 22:30:28 +02:00
Hakim El Hattab
6fa4f16cdb roll back yargs 2021-05-19 22:25:12 +02:00
Hakim El Hattab
395356a0b1 update deps & drop node/gulp-sass in order to support node 16 #2959 2021-05-19 21:48:42 +02:00
Hakim El Hattab
56772afa32 update dependencies 2021-05-17 10:05:36 +02:00
Hakim El Hattab
632cc78873 fix errors when no markdown options are provided #2956 2021-05-17 10:02:12 +02:00
Hakim El Hattab
2c115b887a Merge pull request #2956 from ryzokuken/plugin-markdown
markdown plugin improvements
2021-05-17 09:54:24 +02:00
Hakim El Hattab
03126c509e Merge branch 'dev' into plugin-markdown 2021-05-17 09:54:01 +02:00
Ujjwal Sharma
00acc730f0 add animateLists option to markdown plugin
Add an "animateLists" option to the markdown plugin that animates all
lists by default.
2021-05-13 20:03:09 +05:30
Ujjwal Sharma
6884741b94 improve renderer option handling
Don't waste time constructing a renderer then override it if one is
passed into the options object.
2021-05-13 19:58:45 +05:30
Hakim El Hattab
7daea4957b remove debug code 2021-05-05 11:13:32 +02:00
Hakim El Hattab
892c752a4b merge #2843 with minor tweaks 2021-05-05 11:02:02 +02:00
Hakim El Hattab
48598cb547 Merge pull request #2901 from sacproj/showPreview
Expose preview management functions
2021-05-05 10:05:55 +02:00
Hakim El Hattab
2e344825f8 update (c) year 2021-05-05 10:05:33 +02:00
Hakim El Hattab
2beb336cdb fix typo #2949 (thanks @SeanKilleen) 2021-05-05 10:00:28 +02:00
Hakim El Hattab
74f3c4b455 fix typo #2949 (thanks @SeanKilleen) 2021-05-05 09:59:41 +02:00
Hakim El Hattab
236d3e3722 tidy up code for #2940 2021-04-28 09:03:27 +02:00
Hakim El Hattab
a112712f12 Merge pull request #2940 from cmeessen/fix_multiple_data-background
Fix: multiple image-urls in data-background-image
2021-04-28 08:55:30 +02:00
cmeessen
5d8d673117 Add missing semicolons 2021-04-23 10:15:40 +00:00
Hakim El Hattab
f5faeba9f3 update dependencies 2021-04-23 11:05:31 +02:00
Hakim El Hattab
6d735ddaf8 stop playing media inside of fragments when the fragment is hidden 2021-04-23 10:56:18 +02:00
Christian Meeßen
8347a2de58 Allow multiple data-background 2021-04-23 08:55:36 +00:00
Hakim El Hattab
444d127053 Merge pull request #2933 from csachs/hasDarkBackgroundNamedColor
Use computed background style if colorToRgb fails (fixes #2635)
2021-04-14 13:20:42 +02:00
Hakim El Hattab
be110fad11 prevent accidental swipe gestures when scrubbing video/audio timelines 2021-04-12 11:17:06 +02:00
Christian Sachs
d1f6e6cce9 use computed background style if colorToRgb fails
fixes #2635
2021-04-11 13:25:36 +02:00
Hakim El Hattab
cf8e64bd85 update lockfile 2021-03-08 13:46:04 +01:00
Stéphane Este-Gracias
2d050f83c1 Expose preview management functions 2021-02-13 01:20:37 +01:00
Stéphane Este-Gracias
9c83edbf13 Expose showPreview 2021-02-13 00:23:50 +01:00
Hakim El Hattab
290c251c7e fix default md slide separator not working #2850 2021-02-10 10:34:25 +01:00
Jan Katzer
cec99c5261 Implement auto-animate id and restart 2021-02-07 18:41:16 +01:00
Hakim El Hattab
90a0d2d449 typo 2021-02-04 15:25:46 +01:00
Hakim El Hattab
1de653a95a reduce tab size in code blocks from 8 to 2 2021-02-04 14:17:27 +01:00
Hakim El Hattab
95592293ae remove unused style ids 2021-02-04 14:15:35 +01:00
Hakim El Hattab
2e805c9193 fix bug where slide-spcific background transitions were overruled by global transition setting 2021-01-08 15:03:33 +01:00
Jeroen Hermans
acafabf023 Merge branch 'dev' into jh/print-optimize 2020-12-20 17:44:20 +01:00
Hakim El Hattab
f576b98fbd rerun r-fit-text based on printed slide size, fixes overflow when printing to PDF #2865 2020-12-17 08:49:51 +01:00
Hakim El Hattab
49d043c0c2 Merge pull request #2836 from lechten/fix-progress-click
Fix target for click on progress bar
2020-11-30 18:41:10 +01:00
Hakim El Hattab
c47ac2cfbd Merge pull request #2858 from famura/fix_typo
Fixed path to themes in demo.html
2020-11-30 18:35:37 +01:00
Fabio Muratore
26f5fa0c12 Fixed path to themes in demo.html 2020-11-30 15:43:09 +01:00
Hakim El Hattab
1e70d9fe46 upgrade to node-sass 5.0 (adds support for node 15.x) #2841 2020-11-25 15:06:29 +01:00
Jeroen Hermans
e57ff233a4 Group background reads and writes 2020-11-16 09:47:58 +01:00
Jeroen Hermans
10f02ece99 Group pdf setup reads and writes 2020-11-16 09:47:19 +01:00
Jeroen Hermans
33c4c1c5d2 Batch print DOM updates 2020-11-15 22:29:50 +01:00
Jeroen Hermans
49f78535d1 Use const in print controller 2020-11-15 22:29:23 +01:00
Jeroen Hermans
957f928c70 Prevent layout thrashing by scroll height 2020-11-15 22:29:23 +01:00
Jeroen Hermans
3d701edc71 Limit slide number DOM mutations 2020-11-15 22:01:50 +01:00
Jeroen Hermans
aaa7c02b5c Prevent layout thrashing by status text 2020-11-15 21:54:05 +01:00
Jeroen Hermans
75480b5bf4 Remove unused argument 2020-11-15 21:46:33 +01:00
Jens Lechtenbörger
d2dff6a821 Fix target for click on progress bar
The progress bar shows how many slides have been passed in total.
However, when clicking on the progress bar, the target slide is
computed among the subset of /horizontal/ slides.  Thus, when the new
slide is displayed, the progress bar has usually changed to a point
that is unrelated to the clicked one, which I find surprising.

With this change, the target slide is computed from the number of
total slides.  Thus, after a click on the progress bar, the resulting
progress is close to the clicked point, which seems more natural to
me.
2020-11-08 17:39:04 +01:00
Hakim El Hattab
0582f57517 add fit-text to demo 2020-10-12 11:51:04 +02:00
Hakim El Hattab
ffadcc8502 v4.1.0 2020-10-12 11:38:26 +02:00
Hakim El Hattab
e09437f4fa escape HTML entities in code parsed from markdown, fixes #2744 2020-09-09 11:42:34 +02:00
Hakim El Hattab
676936e33d revert debug change to index.html 2020-09-09 10:32:20 +02:00
Hakim El Hattab
4d62dcc674 Merge branch 'master' of github.com:hakimel/reveal.js into dev 2020-09-09 10:26:42 +02:00
Hakim El Hattab
17bfa62579 Merge pull request #2746 from ebriand/patch-1
Fix URL to pdf-export documentation
2020-09-09 10:24:40 +02:00
Hakim El Hattab
5f7c945dee Merge pull request #2752 from michaelmior/css-paths
Start relative paths in CSS with ./
2020-09-09 10:24:04 +02:00
Hakim El Hattab
b13c7b41a0 Merge pull request #2767 from rschmehl/patch-1
Update README.md
2020-09-09 10:21:48 +02:00
Hakim El Hattab
5676ef79d7 Merge pull request #2771 from timgates42/bugfix_typo_transition
docs: Fix simple typo, transiition -> transition
2020-09-09 10:20:40 +02:00
Tim Gates
2c121d22ac docs: Fix simple typo, transiition -> transition
There is a small typo in js/controllers/autoanimate.js.

Should read `transition` rather than `transiition`.
2020-09-08 08:02:34 +10:00
Roland Schmehl
aa62bd424b Update README.md
Fixed broken URL
2020-09-06 12:08:25 +02:00
Hakim El Hattab
faa8b56e2a dependency upgrades 2020-08-19 10:33:36 +02:00
Hakim El Hattab
80d96b4f82 upgrade rollup-plugin-terser to fix npm warning #2751 2020-08-19 10:17:50 +02:00
Michael Mior
a150d0c5dd Start relative paths in CSS with ./ 2020-08-18 12:49:49 -04:00
Hakim El Hattab
3a99a7b70a shuffle now applies to vertical slides as well 2020-08-17 14:42:27 +02:00
Eric Briand
b05e530f21 Fix URL to pdf-export documentation 2020-08-04 10:06:20 +02:00
Sven Kraus
9aa6a029c3 add newly built version to 2020-07-29 15:43:21 +02:00
Sven Kraus
3535536444 use native CSS vars from exposer 2020-07-29 13:31:29 +02:00
Hakim El Hattab
2bfe705e6a include /css and /js in npm package #2712 2020-06-30 21:10:09 +02:00
Hakim El Hattab
9ff27cfbc9 bg videos remain muted on mobile, otherwise broken when navigating with swipe gestures 2020-06-16 11:20:15 +02:00
Hakim El Hattab
2fccb77405 add 'playsinline' to all inline videos, dont mute background videos on mobile 2020-06-16 10:27:09 +02:00
Hakim El Hattab
cd2a792416 allow images inside of h/vstacks to be proportionally downsized 2020-06-09 13:31:21 +02:00
Hakim El Hattab
be460814ac correct scope for fit-text selector 2020-06-09 10:32:56 +02:00
Hakim El Hattab
aa6677911c fit-text helper now triggers lazyily when slide enters view distance 2020-06-09 10:28:01 +02:00
Hakim El Hattab
f231c53b9c Merge branch 'master' of github.com:hakimel/reveal.js into dev 2020-06-09 09:18:40 +02:00
Hakim El Hattab
15815efe05 npm run build now uses default gulp task 2020-06-09 09:18:27 +02:00
Hakim El Hattab
1b6a3b1e6f add support for auto-sized big text via r-fit-text 2020-06-05 13:17:43 +02:00
Hakim El Hattab
66cbd66fb6 fix slide numbering issue with uncounted horizontal slides (fixes #2675) 2020-06-05 11:47:46 +02:00
Hakim El Hattab
37d8337411 add support for wrapping code in script tempalte to avoid html parser #2684 2020-06-05 10:47:31 +02:00
Hakim El Hattab
6772518c5a Merge branch 'master' of github.com:hakimel/reveal.js into dev 2020-06-05 10:21:33 +02:00
Hakim El Hattab
f014952673 update math example to use 4.0 plugin syntax 2020-06-05 10:14:47 +02:00
Hakim El Hattab
166af89353 all themes now have contrasting text colors based on slide bg 2020-06-05 10:03:07 +02:00
Hakim El Hattab
ac79c7cd8b leave the progress bar empty if there's < 2 slides 2020-06-05 09:37:44 +02:00
Hakim El Hattab
d272628f58 add support for data-visibility=hidden 2020-06-02 13:47:34 +02:00
Hakim El Hattab
c91074761a don't write '#/' to url on first slide, remove history api feature detection 2020-06-02 09:08:00 +02:00
Hakim El Hattab
7ebade7248 remove 20px vertical padding on slide sections 2020-06-02 08:46:24 +02:00
Hakim El Hattab
61624aeafb 🤦 2020-06-01 16:07:49 +02:00
Hakim El Hattab
cd5c9c5b9d build js 2020-06-01 16:02:55 +02:00
Hakim El Hattab
942304d862 add --slide-width/height css variables 2020-06-01 16:00:54 +02:00
Hakim El Hattab
bd19860b4d 4.0.2 2020-05-29 12:10:28 +02:00
Hakim El Hattab
5169fb2d00 link logo in demo deck to revealjs.com 2020-05-29 12:07:04 +02:00
Hakim El Hattab
1569a4afba remove overzealous pdf resets 2020-05-29 10:14:31 +02:00
Hakim El Hattab
9f90f32e26 recompile css 2020-05-28 22:28:54 +02:00
Hakim El Hattab
bee213c470 tweaks for pdf print sheet 2020-05-28 22:28:36 +02:00
Hakim El Hattab
0bc614cf3d npmignore gulpfile and contributing.md 2020-05-28 22:28:14 +02:00
Hakim El Hattab
2255c60254 fix progress bar direction in rtl mode 2020-05-27 19:46:49 +02:00
Hakim El Hattab
e4e2bc9562 link logo image to revealjs.com 2020-05-27 15:57:37 +02:00
Hakim El Hattab
e1abd3d5c7 Merge pull request #2679 from conao3/add-link
Add link for README badge
2020-05-27 15:55:52 +02:00
Hakim El Hattab
a65e96fbc6 serve demo assets from cdn, logo on first slide in demo.html 2020-05-27 15:51:05 +02:00
conao3
1728c9793c add link for badge 2020-05-27 22:37:08 +09:00
Hakim El Hattab
eb026f79b4 Reveal.configure() now works pre-initialization 2020-05-27 15:34:12 +02:00
Hakim El Hattab
5e4c5c33a9 export the highlight.js instance 2020-05-27 15:25:26 +02:00
Hakim El Hattab
0c9c9d55f3 add Reveal.isReady to pre-initialized API 2020-05-27 13:15:26 +02:00
Hakim El Hattab
fc62af9d5b rollup cache for all js bunling, improves subsequent build time by 50% 2020-05-27 09:06:31 +02:00
Hakim El Hattab
b1e5db0ec9 data-autoslide attribute takes precedence over video duration 2020-05-26 10:56:02 +02:00
Hakim El Hattab
b7487b8b4f polyfill element.closest for ie11 2020-05-26 10:45:05 +02:00
Hakim El Hattab
e6244a57b5 fix polyfills, add ie11 support 2020-05-26 09:47:01 +02:00
Hakim El Hattab
b074050a6d 4.0.1, remove date from built files 2020-05-25 16:21:41 +02:00
Hakim El Hattab
8680fb3804 Merge pull request #2671 from s-l-lee/fix-notes-printing
Fix slide notes printing
2020-05-21 19:52:48 +02:00
Lee Sheng Long
fc4294365b update dist/reveal bundles 2020-05-22 00:03:14 +10:00
Lee Sheng Long
4e839b3d78 fix slide notes printing 2020-05-21 23:56:23 +10:00
Hakim El Hattab
9f477f7d59 Merge branch 'master' of github.com:hakimel/reveal.js into dev 2020-05-20 22:08:38 +02:00
Hakim El Hattab
55c7b44006 add slides to readme 2020-05-20 22:08:26 +02:00
Hakim El Hattab
35db006c02 fix overlapping ids when auto-animating multiple presentations in same window 2020-05-20 19:14:45 +02:00
Hakim El Hattab
cd5161ffe9 initial work for hstack and vstack 2020-05-20 14:33:52 +02:00
Hakim El Hattab
f0b67ad6ea 4.0.0 2020-05-20 12:09:03 +02:00
Hakim El Hattab
38eda3aada fix livereload 2020-05-20 12:08:57 +02:00
Hakim El Hattab
df61f9e1fa progress bar width set via scale instead of width for perf 2020-05-20 10:42:55 +02:00
Hakim El Hattab
5e49cbdcf7 link fix 2020-05-19 20:36:05 +02:00
Hakim El Hattab
8b3f57b3d1 Merge pull request #2666 from RealCyGuy/patch-1
fixed links
2020-05-19 20:35:07 +02:00
Cyrus
07db41831f fixed links 2020-05-19 11:31:25 -07:00
Hakim El Hattab
a1f03cb337 Reveal.VERSION is now available prior to initialization #2651 2020-05-19 20:27:45 +02:00
Hakim El Hattab
feb43ffdc9 rollup cache saves 1s per js build 2020-05-19 19:04:46 +02:00
Hakim El Hattab
84b52984cd update dependencies 2020-05-19 18:44:40 +02:00
Hakim El Hattab
4f2293378b reveal.netlify.app -> revealjs.com 2020-05-19 18:27:00 +02:00
134 changed files with 18270 additions and 9879 deletions

8
.codespellrc Normal file
View File

@@ -0,0 +1,8 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git*,package-lock.json,*.css,.codespellrc
check-hidden = true
# Ignore super long lines -- must be minimized etc, acronyms
# and some near hit variables
ignore-regex = ^.{120,}|\b(currentY|FOM)\b
# ignore-words-list =

View File

@@ -1,10 +1,9 @@
## Contributing
Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**.
Please keep the [issue tracker](https://github.com/hakimel/reveal.js/issues) limited to **bug reports**.
### Personal Support
If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js).
### General Questions and Support
If you have questions about how to use reveal.js the best place to ask is in the [Discussions](https://github.com/hakimel/reveal.js/discussions). Anything that isn't a bug report should be posted as a dicussion instead.
### Bug Reports
@@ -12,11 +11,10 @@ When reporting a bug make sure to include information about which browser and op
### Pull Requests
- Should be submitted from a feature/topic branch (not your master)
- Should follow the coding style of the file you work in, most importantly:
- Tabs to indent
- Single-quoted strings
- Should be made towards the **dev branch**
- Should be submitted from a feature/topic branch (not your master)
### Plugins

View File

@@ -1,24 +0,0 @@
name: tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 13.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

23
.github/workflows/spellcheck.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
# Codespell configuration is within .codespellrc
---
name: Spellcheck
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2

31
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Tests
on:
- push
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18
- 20
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: npm test
env:
CI: true

3
.gitignore vendored
View File

@@ -8,5 +8,4 @@ out/
log/*.log
tmp/**
node_modules/
.sass-cache
dist/*.map
.sass-cache

View File

@@ -1,7 +1,5 @@
/test
/examples
/css
/js
.github
.gulpfile
.sass-cache
.sass-cache
gulpfile.js

View File

@@ -1,4 +1,4 @@
Copyright (C) 2020 Hakim El Hattab, http://hakim.se, and reveal.js contributors
Copyright (C) 2011-2024 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

View File

@@ -1,23 +1,30 @@
<p align="center">
<img src="https://hakim-static.s3.amazonaws.com/reveal-js/logo/v1/reveal-black-text.svg" alt="reveal.js" width="450">
<a href="https://revealjs.com">
<img src="https://hakim-static.s3.amazonaws.com/reveal-js/logo/v1/reveal-black-text-sticker.png" alt="reveal.js" width="500">
</a>
<br><br>
<img src="https://github.com/hakimel/reveal.js/workflows/tests/badge.svg">
<img src="https://s3.amazonaws.com/static.slid.es/images/slides-github-banner-320x40.png?1" alt="Slides" width="160" height="20"></a>
<a href="https://github.com/hakimel/reveal.js/actions"><img src="https://github.com/hakimel/reveal.js/workflows/tests/badge.svg"></a>
<a href="https://slides.com/"><img src="https://s3.amazonaws.com/static.slid.es/images/slides-github-banner-320x40.png?1" alt="Slides" width="160" height="20"></a>
</p>
reveal.js is an open source HTML presentation framework. It enables anyone with a web browser to create fully featured and beautiful presentations for free. [Check out the live demo](https://revealjs.com/).
reveal.js is an open source HTML presentation framework. It enables anyone with a web browser to create beautiful presentations for free. Check out the live demo at [revealjs.com](https://revealjs.com/).
The framework comes with a broad range of features including [nested slides](https://revealjs.netlify.app/vertical-slides/), [Markdown support](https://revealjs.netlify.app/markdown/), [Auto-Animate](https://revealjs.netlify.app/auto-animate/), [PDF export](https://revealjs.netlify.app/pdf-export/), [speaker notes](https://revealjs.netlify.app/speaker-view/), [LaTeX support](https://revealjs.netlify.app/math/), [syntax highlighted code](https://revealjs.netlify.app/code/) and much more.
The framework comes with a powerful feature set including [nested slides](https://revealjs.com/vertical-slides/), [Markdown support](https://revealjs.com/markdown/), [Auto-Animate](https://revealjs.com/auto-animate/), [PDF export](https://revealjs.com/pdf-export/), [speaker notes](https://revealjs.com/speaker-view/), [LaTeX typesetting](https://revealjs.com/math/), [syntax highlighted code](https://revealjs.com/code/) and an [extensive API](https://revealjs.com/api/).
<h1>
<a href="https://revealjs.netlify.app/installation" style="font-size: 3em;">Get Started</a>
</h1>
---
## Documentation
The full reveal.js documentation is available at [revealjs.com](https://revealjs.netlify.app).
Want to create reveal.js presentation in a graphical editor? Try <https://slides.com>. It's made by the same people behind reveal.js.
## License
---
MIT licensed
### Getting started
- 🚀 [Install reveal.js](https://revealjs.com/installation)
- 👀 [View the demo presentation](https://revealjs.com/demo)
- 📖 [Read the documentation](https://revealjs.com/markup/)
- 🖌 [Try the visual editor for reveal.js at Slides.com](https://slides.com/)
- 🎬 [Watch the reveal.js video course (paid)](https://revealjs.com/course)
Copyright (C) 2011-2020 Hakim El Hattab, https://hakim.se
---
<div align="center">
MIT licensed | Copyright © 2011-2024 Hakim El Hattab, https://hakim.se
</div>

View File

@@ -16,9 +16,16 @@
box-sizing: border-box;
}
// Text that auto-fits its container
.reveal .r-fit-text {
display: inline-block; // https://github.com/rikschennink/fitty#performance
white-space: nowrap;
}
// Stack multiple elements on top of each other
.reveal .r-stack {
display: grid;
grid-template-rows: 100%;
}
.reveal .r-stack > * {
@@ -30,20 +37,34 @@
.reveal .r-vstack,
.reveal .r-hstack {
display: flex;
img, video {
min-width: 0;
min-height: 0;
object-fit: contain;
}
}
.reveal .r-vstack {
flex-direction: column;
align-items: center;
justify-content: center;
}
.reveal .r-hstack {
flex-direction: row;
}
.reveal .items-center {
align-items: center;
justify-content: center;
}
.reveal .justify-center {
justify-content: center;
}
// Naming based on tailwindcss
.reveal .items-stretch { align-items: stretch; }
.reveal .items-start { align-items: flex-start; }
.reveal .items-center { align-items: center; }
.reveal .items-end { align-items: flex-end; }
.reveal .justify-between { justify-content: space-between; }
.reveal .justify-around { justify-content: space-around; }
.reveal .justify-start { justify-content: flex-start; }
.reveal .justify-center { justify-content: center; }
.reveal .justify-end { justify-content: flex-end; }

View File

@@ -1,42 +1,30 @@
/* Default Print Stylesheet Template
by Rob Glazebrook of CSSnewbie.com
Last Updated: June 4, 2008
Feel free (nay, compelled) to edit, append, and
manipulate this file as you see fit. */
@media print {
html:not(.print-pdf) {
background: #fff;
overflow: visible;
width: auto;
height: auto;
overflow: visible;
body {
background: #fff;
font-size: 20pt;
width: auto;
height: auto;
border: 0;
margin: 0 5%;
margin: 0;
padding: 0;
overflow: visible;
float: none !important;
}
}
html:not(.print-pdf) .reveal {
background: #fff;
font-size: 20pt;
.nestedarrow,
.controls,
.fork-reveal,
.share-reveal,
.state-background,
.reveal .progress,
.reveal .backgrounds,
.reveal .slide-number {
.progress,
.backgrounds,
.slide-number {
display: none !important;
}
body, p, td, li {
p, td, li {
font-size: 20pt!important;
color: #000;
}
@@ -49,7 +37,6 @@
letter-spacing: normal;
}
/* Need to reduce the size of the fonts for printing */
h1 { font-size: 28pt !important; }
h2 { font-size: 24pt !important; }
h3 { font-size: 22pt !important; }
@@ -74,18 +61,19 @@
margin: 0;
text-align: left !important;
}
.reveal pre,
.reveal table {
pre,
table {
margin-left: 0;
margin-right: 0;
}
.reveal pre code {
pre code {
padding: 20px;
}
.reveal blockquote {
blockquote {
margin: 20px 0;
}
.reveal .slides {
.slides {
position: static !important;
width: auto !important;
height: auto !important;
@@ -106,7 +94,7 @@
perspective-origin: 50% 50%;
}
.reveal .slides section {
.slides section {
visibility: visible !important;
position: static !important;
width: auto !important;
@@ -129,19 +117,24 @@
transform: none !important;
transition: none !important;
}
.reveal .slides section.stack {
.slides section.stack {
padding: 0 !important;
}
.reveal section:last-of-type {
.slides section:last-of-type {
page-break-after: avoid !important;
}
.reveal section .fragment {
.slides section .fragment {
opacity: 1 !important;
visibility: visible !important;
transform: none !important;
}
.reveal section img {
.r-fit-text {
white-space: normal !important;
}
section img {
display: block;
margin: 15px 0px;
background: rgba(255,255,255,1);
@@ -149,11 +142,11 @@
box-shadow: none;
}
.reveal section small {
section small {
font-size: 0.8em;
}
.reveal .hljs {
.hljs {
max-height: 100%;
white-space: pre-wrap;
word-wrap: break-word;
@@ -161,11 +154,11 @@
font-size: 15pt;
}
.reveal .hljs .hljs-ln-numbers {
.hljs .hljs-ln-numbers {
white-space: nowrap;
}
.reveal .hljs td {
.hljs td {
font-size: inherit !important;
color: inherit !important;
}

View File

@@ -2,10 +2,10 @@
* This stylesheet is used to print reveal.js
* presentations to PDF.
*
* https://revealjs.netlify.app/pdf-export/
* https://revealjs.com/pdf-export/
*/
html.print-pdf {
html.reveal-print {
* {
-webkit-print-color-adjust: exact;
}
@@ -30,30 +30,14 @@ html.print-pdf {
.reveal .progress,
.reveal .playback,
.reveal.overview,
.fork-reveal,
.share-reveal,
.state-background {
display: none !important;
}
h1, h2, h3, h4, h5, h6 {
text-shadow: 0 0 0 #000 !important;
}
.reveal pre code {
overflow: hidden !important;
font-family: Courier, 'Courier New', monospace !important;
}
ul, ol, div, p {
visibility: visible;
position: static;
width: auto;
height: auto;
display: block;
overflow: visible;
margin: auto;
}
.reveal {
width: auto !important;
height: auto !important;
@@ -86,6 +70,10 @@ html.print-pdf {
page-break-after: always;
}
.reveal .slides .pdf-page:last-of-type {
page-break-after: avoid;
}
.reveal .slides section {
visibility: visible !important;
display: block !important;
@@ -115,12 +103,10 @@ html.print-pdf {
box-shadow: none;
}
.reveal .roll {
overflow: visible;
line-height: 1em;
}
/* Slide backgrounds are placed inside of their slide when exporting to PDF */
.reveal .backgrounds {
display: none;
}
.reveal .slide-background {
display: block !important;
position: absolute;
@@ -163,6 +149,7 @@ html.print-pdf {
display: block;
position: absolute;
font-size: 14px;
visibility: visible;
}
/* This accessibility tool is not useful in PDF and breaks it visually */

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
## 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 installed before proceeding: https://revealjs.netlify.app/installation/#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 installed before proceeding: https://revealjs.com/installation/#full-setup
## Creating a Theme

View File

@@ -6,6 +6,7 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
@@ -13,7 +14,7 @@
// Include theme-specific fonts
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
@@ -23,17 +24,22 @@ $headingColor: #333;
$headingTextShadow: none;
$backgroundColor: #f7f3de;
$linkColor: #8b743d;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
$selectionBackgroundColor: rgba(79, 64, 28, 0.99);
$heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
$overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240;
// Background generator
@mixin bodyBackground() {
@include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) );
}
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);
// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// ---------------------------------------------

View File

@@ -0,0 +1,50 @@
/**
* Black compact & high contrast reveal.js theme, with headers not in capitals.
*
* By Peter Kehl. Based on black.(s)css by Hakim El Hattab, http://hakim.se
*
* - Keep the source similar to black.css - for easy comparison.
* - $mainFontSize controls code blocks, too (although under some ratio).
*/
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
// Include theme-specific fonts
@import url(./fonts/source-sans-pro/source-sans-pro.css);
// Override theme settings (see ../template/settings.scss)
$backgroundColor: #000000;
$mainColor: #fff;
$headingColor: #fff;
$mainFontSize: 42px;
$mainFont: 'Source Sans Pro', Helvetica, sans-serif;
$headingFont: 'Source Sans Pro', Helvetica, sans-serif;
$headingTextShadow: none;
$headingLetterSpacing: normal;
$headingTextTransform: uppercase;
$headingFontWeight: 600;
$linkColor: #42affa;
$linkColorHover: color.scale( $linkColor, $lightness: 15% );
$selectionBackgroundColor: color.scale( $linkColor, $lightness: 25% );
$heading1Size: 2.5em;
$heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;
// Change text colors against light slide backgrounds
@include light-bg-text-color(#000);
// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------

View File

@@ -6,13 +6,14 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
// Include theme-specific fonts
@import url(fonts/source-sans-pro/source-sans-pro.css);
@import url(./fonts/source-sans-pro/source-sans-pro.css);
// Override theme settings (see ../template/settings.scss)
@@ -29,21 +30,18 @@ $headingLetterSpacing: normal;
$headingTextTransform: uppercase;
$headingFontWeight: 600;
$linkColor: #42affa;
$linkColorHover: lighten( $linkColor, 15% );
$selectionBackgroundColor: lighten( $linkColor, 25% );
$linkColorHover: color.scale( $linkColor, $lightness: 15% );
$selectionBackgroundColor: rgba( $linkColor, 0.75 );
$heading1Size: 2.5em;
$heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;
section.has-light-background {
&, h1, h2, h3, h4, h5, h6 {
color: #222;
}
}
// Change text colors against light slide backgrounds
@include light-bg-text-color(#222);
// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// ---------------------------------------------

View File

@@ -10,7 +10,8 @@
*
*/
// Default mixins and settings -----------------
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
@@ -40,12 +41,15 @@ $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b
// Links
$linkColor: $blood;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
// Text selection
$selectionBackgroundColor: $blood;
$selectionColor: #fff;
// Change text colors against dark slide backgrounds
@include light-bg-text-color(#222);
// Theme template ------------------------------
@import "../template/theme";
@@ -58,6 +62,12 @@ $selectionColor: #fff;
text-shadow: 1px 1px $coal;
}
section.has-light-background {
p, h1, h2, h3, h4 {
text-shadow: none;
}
}
.reveal h1,
.reveal h2,
.reveal h3,

View File

@@ -0,0 +1,106 @@
/**
* Dracula Dark theme for reveal.js.
* Based on https://draculatheme.com
*/
// Default mixins and settings -----------------
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
// Include theme-specific fonts
$systemFontsSansSerif: -apple-system,
BlinkMacSystemFont,
avenir next,
avenir,
segoe ui,
helvetica neue,
helvetica,
Cantarell,
Ubuntu,
roboto,
noto,
arial,
sans-serif;
$systemFontsMono: Menlo,
Consolas,
Monaco,
Liberation Mono,
Lucida Console,
monospace;
/**
* Dracula colors by Zeno Rocha
* https://draculatheme.com/contribute
*/
html * {
color-profile: sRGB;
rendering-intent: auto;
}
$background: #282A36;
$foreground: #F8F8F2;
$selection: #44475A;
$comment: #6272A4;
$red: #FF5555;
$orange: #FFB86C;
$yellow: #F1FA8C;
$green: #50FA7B;
$purple: #BD93F9;
$cyan: #8BE9FD;
$pink: #FF79C6;
// Override theme settings (see ../template/settings.scss)
$mainColor: $foreground;
$headingColor: $purple;
$headingTextShadow: none;
$headingTextTransform: none;
$backgroundColor: $background;
$linkColor: $pink;
$linkColorHover: $cyan;
$selectionBackgroundColor: $selection;
$inlineCodeColor: $green;
$listBulletColor: $cyan;
$mainFont: $systemFontsSansSerif;
$codeFont: "Fira Code", $systemFontsMono;
// Change text colors against light slide backgrounds
@include light-bg-text-color($background);
// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// Define additional color effects based on Dracula spec
// https://spec.draculatheme.com/
:root {
--r-bold-color: #{$orange};
--r-italic-color: #{$yellow};
--r-inline-code-color: #{$inlineCodeColor};
--r-list-bullet-color: #{$listBulletColor};
}
.reveal {
strong, b {
color: var(--r-bold-color);
}
em, i, blockquote {
color: var(--r-italic-color);
}
code {
color: var(--r-inline-code-color);
}
// Dracula colored list bullets and numbers
ul, ol {
li::marker {
color: var(--r-list-bullet-color);
}
}
}

View File

@@ -15,7 +15,7 @@
// Include theme-specific fonts
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
// Override theme settings (see ../template/settings.scss)
@@ -27,8 +27,10 @@ $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b
@include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) );
}
// Change text colors against light slide backgrounds
@include light-bg-text-color(#222);
// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// ---------------------------------------------

View File

@@ -5,6 +5,7 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
@@ -12,16 +13,12 @@
// Include theme-specific fonts
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
/**
* Solarized colors by Ethan Schoonover
*/
html * {
color-profile: sRGB;
rendering-intent: auto;
}
// Solarized colors
$base03: #002b36;
@@ -47,10 +44,11 @@ $headingColor: $base2;
$headingTextShadow: none;
$backgroundColor: $base03;
$linkColor: $blue;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
$selectionBackgroundColor: $magenta;
// Change text colors against light slide backgrounds
@include light-bg-text-color(#222);
// Theme template ------------------------------
@import "../template/theme";

View File

@@ -6,6 +6,7 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
@@ -21,13 +22,16 @@ $backgroundColor: #111;
$mainFont: 'Open Sans', sans-serif;
$linkColor: #e7ad52;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
$headingFont: 'Montserrat', Impact, sans-serif;
$headingTextShadow: none;
$headingLetterSpacing: -0.03em;
$headingTextTransform: none;
$selectionBackgroundColor: #e7ad52;
// Change text colors against light slide backgrounds
@include light-bg-text-color(#222);
// Theme template ------------------------------
@import "../template/theme";

View File

@@ -7,6 +7,7 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
@@ -22,13 +23,19 @@ $headingTextShadow: none;
$headingTextTransform: none;
$backgroundColor: #F0F1EB;
$linkColor: #51483D;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
$selectionBackgroundColor: #26351C;
$overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240;
.reveal a {
line-height: 1.3em;
}
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);
// Theme template ------------------------------
@import "../template/theme";

View File

@@ -8,6 +8,7 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
@@ -28,14 +29,14 @@ $headingTextShadow: none;
$headingTextTransform: none;
$backgroundColor: #fff;
$linkColor: #00008B;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
$selectionBackgroundColor: rgba(0, 0, 0, 0.99);
section.has-dark-background {
&, h1, h2, h3, h4, h5, h6 {
color: #fff;
}
}
$overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240;
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);
// Theme template ------------------------------

View File

@@ -6,6 +6,7 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
@@ -26,9 +27,12 @@ $headingLetterSpacing: -0.08em;
$headingTextShadow: none;
$backgroundColor: #f7fbfc;
$linkColor: #3b759e;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
$selectionBackgroundColor: #134674;
$overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240;
// Fix links so they are not cut off
.reveal a {
line-height: 1.3em;
@@ -39,6 +43,9 @@ $selectionBackgroundColor: #134674;
@include radial-gradient( #add9e4, #f7fbfc );
}
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);
// Theme template ------------------------------

View File

@@ -5,6 +5,7 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
@@ -12,7 +13,7 @@
// Include theme-specific fonts
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
@@ -48,9 +49,12 @@ $headingColor: $base01;
$headingTextShadow: none;
$backgroundColor: $base3;
$linkColor: $blue;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
$selectionBackgroundColor: $magenta;
$overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240;
// Background generator
// @mixin bodyBackground() {
// @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) );

View File

@@ -0,0 +1,53 @@
/**
* White compact & high contrast reveal.js theme, with headers not in capitals.
*
* By Peter Kehl. Based on white.(s)css by Hakim El Hattab, http://hakim.se
*
* - Keep the source similar to black.css - for easy comparison.
* - $mainFontSize controls code blocks, too (although under some ratio).
*/
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
// Include theme-specific fonts
@import url(./fonts/source-sans-pro/source-sans-pro.css);
// Override theme settings (see ../template/settings.scss)
$backgroundColor: #fff;
$mainColor: #000;
$headingColor: #000;
$mainFontSize: 42px;
$mainFont: 'Source Sans Pro', Helvetica, sans-serif;
$headingFont: 'Source Sans Pro', Helvetica, sans-serif;
$headingTextShadow: none;
$headingLetterSpacing: normal;
$headingTextTransform: uppercase;
$headingFontWeight: 600;
$linkColor: #2a76dd;
$linkColorHover: color.scale( $linkColor, $lightness: 15% );
$selectionBackgroundColor: color.scale( $linkColor, $lightness: 25% );
$heading1Size: 2.5em;
$heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;
$overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240;
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);
// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------

View File

@@ -6,13 +6,14 @@
// Default mixins and settings -----------------
@use "sass:color";
@import "../template/mixins";
@import "../template/settings";
// ---------------------------------------------
// Include theme-specific fonts
@import url(fonts/source-sans-pro/source-sans-pro.css);
@import url(./fonts/source-sans-pro/source-sans-pro.css);
// Override theme settings (see ../template/settings.scss)
@@ -29,21 +30,21 @@ $headingLetterSpacing: normal;
$headingTextTransform: uppercase;
$headingFontWeight: 600;
$linkColor: #2a76dd;
$linkColorHover: lighten( $linkColor, 15% );
$selectionBackgroundColor: lighten( $linkColor, 25% );
$linkColorHover: color.scale( $linkColor, $lightness: 15% );
$selectionBackgroundColor: color.scale( $linkColor, $lightness: 25% );
$heading1Size: 2.5em;
$heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;
section.has-dark-background {
&, h1, h2, h3, h4, h5, h6 {
color: #fff;
}
}
$overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240;
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);
// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// ---------------------------------------------

View File

@@ -1,27 +1,32 @@
// Exposes theme's variables for easy re-use in CSS for plugin authors
// Exposes theme's variables for easy reuse in CSS for plugin authors
@use "sass:color";
:root {
--background-color: #{$backgroundColor};
--main-font: #{$mainFont};
--main-font-size: #{$mainFontSize};
--main-color: #{$mainColor};
--block-margin: #{$blockMargin};
--heading-margin: #{$headingMargin};
--heading-font: #{$headingFont};
--heading-color: #{$headingColor};
--heading-line-height: #{$headingLineHeight};
--heading-letter-spacing: #{$headingLetterSpacing};
--heading-text-transform: #{$headingTextTransform};
--heading-text-shadow: #{$headingTextShadow};
--heading-font-weight: #{$headingFontWeight};
--heading1-text-shadow: #{$heading1TextShadow};
--heading1-size: #{$heading1Size};
--heading2-size: #{$heading2Size};
--heading3-size: #{$heading3Size};
--heading4-size: #{$heading4Size};
--code-font: #{$codeFont};
--link-color: #{$linkColor};
--link-color-hover: #{$linkColorHover};
--selection-background-color: #{$selectionBackgroundColor};
--selection-color: #{$selectionColor};
--r-background-color: #{$backgroundColor};
--r-main-font: #{$mainFont};
--r-main-font-size: #{$mainFontSize};
--r-main-color: #{$mainColor};
--r-block-margin: #{$blockMargin};
--r-heading-margin: #{$headingMargin};
--r-heading-font: #{$headingFont};
--r-heading-color: #{$headingColor};
--r-heading-line-height: #{$headingLineHeight};
--r-heading-letter-spacing: #{$headingLetterSpacing};
--r-heading-text-transform: #{$headingTextTransform};
--r-heading-text-shadow: #{$headingTextShadow};
--r-heading-font-weight: #{$headingFontWeight};
--r-heading1-text-shadow: #{$heading1TextShadow};
--r-heading1-size: #{$heading1Size};
--r-heading2-size: #{$heading2Size};
--r-heading3-size: #{$heading3Size};
--r-heading4-size: #{$heading4Size};
--r-code-font: #{$codeFont};
--r-link-color: #{$linkColor};
--r-link-color-dark: #{color.scale( $linkColor, $lightness: -15% )};
--r-link-color-hover: #{$linkColorHover};
--r-selection-background-color: #{$selectionBackgroundColor};
--r-selection-color: #{$selectionColor};
--r-overlay-element-bg-color: #{$overlayElementBgColor};
--r-overlay-element-fg-color: #{$overlayElementFgColor};
}

View File

@@ -26,4 +26,20 @@
background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
background: radial-gradient( center, $type cover, $inner 0%, $outer 100% );
}
@mixin light-bg-text-color( $color ) {
section.has-light-background {
&, h1, h2, h3, h4, h5, h6 {
color: $color;
}
}
}
@mixin dark-bg-text-color( $color ) {
section.has-dark-background {
&, h1, h2, h3, h4, h5, h6 {
color: $color;
}
}
}

View File

@@ -1,3 +1,5 @@
@use "sass:color";
// Base settings for all themes that can optionally be
// overridden by the super-theme
@@ -32,12 +34,17 @@ $codeFont: monospace;
// Links and actions
$linkColor: #13DAEC;
$linkColorHover: lighten( $linkColor, 20% );
$linkColorHover: color.scale( $linkColor, $lightness: 20% );
// Text selection
$selectionBackgroundColor: #FF5E99;
$selectionColor: #fff;
// Colors used for UI elements that are overlaid on top of
// the presentation
$overlayElementBgColor: 240, 240, 240;
$overlayElementFgColor: 0, 0, 0;
// Generates the presentation background, can be overridden
// to return a background image or gradient
@mixin bodyBackground() {

View File

@@ -8,25 +8,25 @@
.reveal-viewport {
@include bodyBackground();
background-color: $backgroundColor;
background-color: var(--r-background-color);
}
.reveal {
font-family: $mainFont;
font-size: $mainFontSize;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: $mainColor;
color: var(--r-main-color);
}
.reveal ::selection {
color: $selectionColor;
background: $selectionBackgroundColor;
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: $selectionColor;
background: $selectionBackgroundColor;
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
@@ -46,27 +46,27 @@
.reveal h4,
.reveal h5,
.reveal h6 {
margin: $headingMargin;
color: $headingColor;
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: $headingFont;
font-weight: $headingFontWeight;
line-height: $headingLineHeight;
letter-spacing: $headingLetterSpacing;
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: $headingTextTransform;
text-shadow: $headingTextShadow;
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {font-size: $heading1Size; }
.reveal h2 {font-size: $heading2Size; }
.reveal h3 {font-size: $heading3Size; }
.reveal h4 {font-size: $heading4Size; }
.reveal h1 {font-size: var(--r-heading1-size); }
.reveal h2 {font-size: var(--r-heading2-size); }
.reveal h3 {font-size: var(--r-heading3-size); }
.reveal h4 {font-size: var(--r-heading4-size); }
.reveal h1 {
text-shadow: $heading1TextShadow;
text-shadow: var(--r-heading1-text-shadow);
}
@@ -75,10 +75,20 @@
*********************************************/
.reveal p {
margin: $blockMargin 0;
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
@@ -140,7 +150,7 @@
display: block;
position: relative;
width: 70%;
margin: $blockMargin auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
@@ -160,11 +170,11 @@
display: block;
position: relative;
width: 90%;
margin: $blockMargin auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: $codeFont;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
@@ -173,8 +183,9 @@
}
.reveal code {
font-family: $codeFont;
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
@@ -185,6 +196,14 @@
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
@@ -238,7 +257,7 @@
}
.reveal img {
margin: $blockMargin 0;
margin: var(--r-block-margin) 0;
}
@@ -247,19 +266,20 @@
*********************************************/
.reveal a {
color: $linkColor;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease;
}
.reveal a:hover {
color: $linkColorHover;
color: var(--r-link-color-hover);
text-shadow: none;
border: none;
}
.reveal .roll span:after {
color: #fff;
background: darken( $linkColor, 15% );
background: var(--r-link-color-dark);
}
@@ -268,7 +288,7 @@
*********************************************/
.reveal .r-frame {
border: 4px solid $mainColor;
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
@@ -277,7 +297,7 @@
}
.reveal a:hover .r-frame {
border-color: $linkColor;
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
@@ -287,7 +307,7 @@
*********************************************/
.reveal .controls {
color: $linkColor;
color: var(--r-link-color);
}
@@ -297,17 +317,14 @@
.reveal .progress {
background: rgba(0,0,0,0.2);
color: $linkColor;
color: var(--r-link-color);
}
.reveal .progress span {
transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: $backgroundColor;
background-color: var(--r-background-color);
}
}

121
demo.html
View File

@@ -19,7 +19,7 @@
<link rel="stylesheet" href="dist/theme/black.css" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css" id="highlight-theme">
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
@@ -29,7 +29,9 @@
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>Reveal.js</h1>
<a href="https://revealjs.com">
<img src="https://static.slid.es/reveal/logo-v1/reveal-white-text.svg" alt="reveal.js logo" style="height: 180px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
</a>
<h3>The HTML Presentation Framework</h3>
<p>
<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>
@@ -50,8 +52,8 @@
<p>Slides can be nested inside of each other.</p>
<p>Use the <em>Space</em> key to navigate through all slides.</p>
<br>
<a href="#" class="navigate-down">
<img class="r-frame" style="background: rgba(255,255,255,0.1);" width="178" height="238" data-src="https://s3.amazonaws.com/hakim-static/reveal-js/arrow.png" alt="Down arrow">
<a href="#/2/1" class="navigate-down">
<img class="r-frame" style="background: rgba(255,255,255,0.1);" width="178" height="238" data-src="https://static.slid.es/reveal/arrow.png" alt="Down arrow">
</a>
</section>
<section>
@@ -63,7 +65,7 @@
<p>That's it, time to go back up.</p>
<br>
<a href="#/2">
<img class="r-frame" style="background: rgba(255,255,255,0.1); transform: rotate(180deg);" width="178" height="238" data-src="https://s3.amazonaws.com/hakim-static/reveal-js/arrow.png" alt="Up arrow">
<img class="r-frame" style="background: rgba(255,255,255,0.1); transform: rotate(180deg);" width="178" height="238" data-src="https://static.slid.es/reveal/arrow.png" alt="Up arrow">
</a>
</section>
</section>
@@ -75,9 +77,16 @@
</p>
</section>
<section data-visibility="hidden">
<h2>Hidden Slides</h2>
<p>
This slide is visible in the source, but hidden when the presentation is viewed. You can show all hidden slides by setting the `showHiddenSlides` config option to `true`.
</p>
</section>
<section data-auto-animate>
<h2 data-id="code-title">Pretty Code</h2>
<pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers>
<pre data-id="code-animation"><code class="hljs javascript" data-trim data-line-numbers>
import React, { useState } from 'react';
function Example() {
@@ -92,20 +101,20 @@
</section>
<section data-auto-animate>
<h2 data-id="code-title">With animations</h2>
<pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers="|4,8-11|17|22-24">
<h2 data-id="code-title">With Animations</h2>
<pre data-id="code-animation"><code class="hljs javascript" data-trim data-line-numbers="|4,8-11|17|22-24"><script type="text/template">
import React, { useState } from 'react';
function Example() {
const [count, setCount] = useState(0);
return (
&lt;div&gt;
&lt;p&gt;You clicked {count} times&lt;/p&gt;
&lt;button onClick={() =&gt; setCount(count + 1)}&gt;
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
&lt;/button&gt;
&lt;/div&gt;
</button>
</div>
);
}
@@ -113,15 +122,15 @@
const [count, setCount] = useState(0);
return (
&lt;div&gt;
&lt;p&gt;You clicked {count} times&lt;/p&gt;
&lt;button onClick={() =&gt; setCount(count + 1)}&gt;
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
&lt;/button&gt;
&lt;/div&gt;
</button>
</div>
);
}
</code></pre>
</script></code></pre>
</section>
<section>
@@ -139,7 +148,7 @@
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h2>Auto-Animate</h2>
<p>Automatically animate matching elements across slides with <a href="https://revealjs.netlify.app/auto-animate/">Auto-Animate</a>.</p>
<p>Automatically animate matching elements across slides with <a href="https://revealjs.com/auto-animate/">Auto-Animate</a>.</p>
<div class="r-hstack justify-center">
<div data-id="box1" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
<div data-id="box2" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
@@ -156,9 +165,9 @@
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<div class="r-stack">
<div data-id="box1" style="background: cyan; width: 300px; height: 300px; border-radius: 200px;"></div>
<div data-id="box2" style="background: magenta; width: 200px; height: 200px; border-radius: 200px;"></div>
<div data-id="box3" style="background: yellow; width: 100px; height: 100px; border-radius: 200px;"></div>
<div data-id="box1" style="background: cyan; width: 300px; height: 300px;"></div>
<div data-id="box2" style="background: magenta; width: 200px; height: 200px;"></div>
<div data-id="box3" style="background: yellow; width: 100px; height: 100px;"></div>
</div>
<h2 style="margin-top: 20px;">Auto-Animate</h2>
</section>
@@ -172,22 +181,27 @@
<section data-markdown>
<script type="text/template">
## Markdown support
## Markdown Support
Write content using inline or external Markdown.
Instructions and more info available in the [readme](https://revealjs.netlify.app/markdown/).
Instructions and more info available in the [docs](https://revealjs.com/markdown/).
```[]
```html []
<section data-markdown>
## Markdown support
## Markdown Support
Write content using inline or external Markdown.
Instructions and more info available in the [readme](https://revealjs.netlify.app/markdown/).
Instructions and more info available in the [docs](https://revealjs.com/markdown/).
</section>
```
</script>
</section>
<section>
<p>Add the <code>r-fit-text</code> class to auto-size text</p>
<h2 class="r-fit-text">FIT TEXT</h2>
</section>
<section>
<section id="fragments">
<h2>Fragments</h2>
@@ -235,17 +249,17 @@
<p>
reveal.js comes with a few themes built in: <br>
<!-- Hacks to swap themes after the page has loaded. Not flexible and only intended for the reveal.js demo deck. -->
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/black.css'); return false;">Black (default)</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/white.css'); return false;">White</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/league.css'); return false;">League</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/sky.css'); return false;">Sky</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/beige.css'); return false;">Beige</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/simple.css'); return false;">Simple</a> <br>
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/serif.css'); return false;">Serif</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/blood.css'); return false;">Blood</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/night.css'); return false;">Night</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/moon.css'); return false;">Moon</a> -
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/solarized.css'); return false;">Solarized</a>
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/black.css'); return false;">Black (default)</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/white.css'); return false;">White</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/league.css'); return false;">League</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/sky.css'); return false;">Sky</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/beige.css'); return false;">Beige</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/simple.css'); return false;">Simple</a> <br>
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/serif.css'); return false;">Serif</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/blood.css'); return false;">Blood</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/night.css'); return false;">Night</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/moon.css'); return false;">Moon</a> -
<a href="#/themes" onclick="document.getElementById('theme').setAttribute('href','dist/theme/solarized.css'); return false;">Solarized</a>
</p>
</section>
@@ -256,18 +270,23 @@
Set <code>data-background="#dddddd"</code> on a slide to change the background color. All CSS color formats are supported.
</p>
<a href="#" class="navigate-down">
<img class="r-frame" style="background: rgba(255,255,255,0.1);" width="178" height="238" data-src="https://s3.amazonaws.com/hakim-static/reveal-js/arrow.png" alt="Down arrow">
<img class="r-frame" style="background: rgba(255,255,255,0.1);" width="178" height="238" data-src="https://static.slid.es/reveal/arrow.png" alt="Down arrow">
</a>
</section>
<section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png">
<section data-background-gradient="linear-gradient(to bottom, #283b95, #17b2c3)">
<h2>Gradient Backgrounds</h2>
<pre><code class="hljs html wrap">&lt;section data-background-gradient=
"linear-gradient(to bottom, #ddd, #191919)"&gt;</code></pre>
</section>
<section data-background="https://static.slid.es/reveal/image-placeholder.png">
<h2>Image Backgrounds</h2>
<pre><code class="hljs html">&lt;section data-background="image.png"&gt;</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">
<section data-background="https://static.slid.es/reveal/image-placeholder.png" data-background-repeat="repeat" data-background-size="100px">
<h2>Tiled Backgrounds</h2>
<pre><code class="hljs html" style="word-wrap: break-word;">&lt;section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"&gt;</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">
<section data-background-video="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4" 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 html" style="word-wrap: break-word;">&lt;section data-background-video="video.mp4,video.webm"&gt;</code></pre>
@@ -371,7 +390,7 @@
<section>
<h2>Speaker View</h2>
<p>There's a <a href="https://revealjs.netlify.app/speaker-view/">speaker view</a>. It includes a timer, preview of the upcoming slide as well as your speaker notes.</p>
<p>There's a <a href="https://revealjs.com/speaker-view/">speaker view</a>. It includes a timer, preview of the upcoming slide as well as your speaker notes.</p>
<p>Press the <em>S</em> key to try it out.</p>
<aside class="notes">
@@ -381,7 +400,7 @@
<section>
<h2>Export to PDF</h2>
<p>Presentations can be <a href="https://revealjs.netlify.app/pdf-export/">exported to PDF</a>, here's an example:</p>
<p>Presentations can be <a href="https://revealjs.com/pdf-export/">exported to PDF</a>, here's an example:</p>
<iframe data-src="https://www.slideshare.net/slideshow/embed_code/42840540" width="445" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:3px solid #666; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe>
</section>
@@ -417,10 +436,10 @@ Reveal.on( 'customevent', function() {
<h2>Much more</h2>
<ul>
<li>Right-to-left support</li>
<li><a href="https://revealjs.netlify.app/api/">Extensive JavaScript API</a></li>
<li><a href="https://revealjs.netlify.app/auto-slide/">Auto-progression</a></li>
<li><a href="https://revealjs.netlify.app/backgrounds/#parallax-background">Parallax backgrounds</a></li>
<li><a href="https://revealjs.netlify.app/keyboard/">Custom keyboard bindings</a></li>
<li><a href="https://revealjs.com/api/">Extensive JavaScript API</a></li>
<li><a href="https://revealjs.com/auto-slide/">Auto-progression</a></li>
<li><a href="https://revealjs.com/backgrounds/#parallax-background">Parallax backgrounds</a></li>
<li><a href="https://revealjs.com/keyboard/">Custom keyboard bindings</a></li>
</ul>
</section>
@@ -445,14 +464,14 @@ Reveal.on( 'customevent', function() {
<script>
// Also available as an ES module, see:
// https://revealjs.netlify.app/initialization/
// https://revealjs.com/initialization/
Reveal.initialize({
controls: true,
progress: true,
center: true,
hash: true,
// Learn about plugins: https://revealjs.netlify.app/plugins/
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ]
});

17
dist/reveal.css vendored

File diff suppressed because one or more lines are too long

14
dist/reveal.esm.js vendored

File diff suppressed because one or more lines are too long

1
dist/reveal.esm.js.map vendored Normal file

File diff suppressed because one or more lines are too long

14
dist/reveal.js vendored

File diff suppressed because one or more lines are too long

1
dist/reveal.js.map vendored Normal file

File diff suppressed because one or more lines are too long

294
dist/theme/beige.css vendored
View File

@@ -3,66 +3,79 @@
*
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #f7f3de;
--main-font: Lato, sans-serif;
--main-font-size: 40px;
--main-color: #333;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: League Gothic, Impact, sans-serif;
--heading-color: #333;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: uppercase;
--heading-text-shadow: none;
--heading-font-weight: normal;
--heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #8b743d;
--link-color-hover: #c0a86e;
--selection-background-color: rgba(79, 64, 28, 0.99);
--selection-color: #fff; }
--r-background-color: #f7f3de;
--r-main-font: Lato, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #333;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: League Gothic, Impact, sans-serif;
--r-heading-color: #333;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #8b743d;
--r-link-color-dark: rgb(118.15, 98.6, 51.85);
--r-link-color-hover: rgb(179.36, 150.84, 82.64);
--r-selection-background-color: rgba(79, 64, 28, 0.99);
--r-selection-color: #fff;
--r-overlay-element-bg-color: 0, 0, 0;
--r-overlay-element-fg-color: 240, 240, 240;
}
.reveal-viewport {
background: #f7f2d3;
background: -moz-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, white), color-stop(100%, #f7f2d3));
background: -webkit-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background: -o-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background: -ms-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background: radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
background-color: #f7f3de; }
background: rgb(247, 242, 211);
background: -moz-radial-gradient(center, circle cover, rgb(255, 255, 255) 0%, rgb(247, 242, 211) 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, rgb(255, 255, 255)), color-stop(100%, rgb(247, 242, 211)));
background: -webkit-radial-gradient(center, circle cover, rgb(255, 255, 255) 0%, rgb(247, 242, 211) 100%);
background: -o-radial-gradient(center, circle cover, rgb(255, 255, 255) 0%, rgb(247, 242, 211) 100%);
background: -ms-radial-gradient(center, circle cover, rgb(255, 255, 255) 0%, rgb(247, 242, 211) 100%);
background: radial-gradient(center, circle cover, rgb(255, 255, 255) 0%, rgb(247, 242, 211) 100%);
background-color: var(--r-background-color);
}
.reveal {
font-family: "Lato", sans-serif;
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #333; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: rgba(79, 64, 28, 0.99);
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: rgba(79, 64, 28, 0.99);
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -73,220 +86,281 @@
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #333;
font-family: "League Gothic", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15); }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #8b743d;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #c0a86e;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #564826; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #333;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #8b743d;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #8b743d; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #8b743d; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #f7f3de; } }
background-color: var(--r-background-color);
}
}

362
dist/theme/black-contrast.css vendored Normal file
View File

@@ -0,0 +1,362 @@
/**
* Black compact & high contrast reveal.js theme, with headers not in capitals.
*
* By Peter Kehl. Based on black.(s)css by Hakim El Hattab, http://hakim.se
*
* - Keep the source similar to black.css - for easy comparison.
* - $mainFontSize controls code blocks, too (although under some ratio).
*/
@import url(./fonts/source-sans-pro/source-sans-pro.css);
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #000;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--r-background-color: #000000;
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
--r-main-font-size: 42px;
--r-main-color: #fff;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
--r-heading-color: #fff;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: 600;
--r-heading1-text-shadow: none;
--r-heading1-size: 2.5em;
--r-heading2-size: 1.6em;
--r-heading3-size: 1.3em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #42affa;
--r-link-color-dark: rgb(19.8216494845, 155.4536082474, 248.7783505155);
--r-link-color-hover: rgb(94.35, 187, 250.75);
--r-selection-background-color: rgb(113.25, 195, 251.25);
--r-selection-color: #fff;
--r-overlay-element-bg-color: 240, 240, 240;
--r-overlay-element-fg-color: 0, 0, 0;
}
.reveal-viewport {
background: #000000;
background-color: var(--r-background-color);
}
.reveal {
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: var(--r-main-color);
}
.reveal ::selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit;
}
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold;
}
.reveal em {
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px;
}
.reveal dt {
font-weight: bold;
}
.reveal dd {
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block;
}
.reveal q {
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0;
}
.reveal table th {
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid;
}
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top;
}
.reveal small * {
vertical-align: top;
}
.reveal img {
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: var(--r-link-color);
text-decoration: none;
transition: color 0.15s ease;
}
.reveal a:hover {
color: var(--r-link-color-hover);
text-shadow: none;
border: none;
}
.reveal .roll span:after {
color: #fff;
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: var(--r-background-color);
}
}

279
dist/theme/black.css vendored
View File

@@ -3,62 +3,72 @@
*
* By Hakim El Hattab, http://hakim.se
*/
@import url(fonts/source-sans-pro/source-sans-pro.css);
@import url(./fonts/source-sans-pro/source-sans-pro.css);
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #222; }
color: #222;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #191919;
--main-font: Source Sans Pro, Helvetica, sans-serif;
--main-font-size: 42px;
--main-color: #fff;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: Source Sans Pro, Helvetica, sans-serif;
--heading-color: #fff;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: uppercase;
--heading-text-shadow: none;
--heading-font-weight: 600;
--heading1-text-shadow: none;
--heading1-size: 2.5em;
--heading2-size: 1.6em;
--heading3-size: 1.3em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #42affa;
--link-color-hover: #8dcffc;
--selection-background-color: #bee4fd;
--selection-color: #fff; }
--r-background-color: #191919;
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
--r-main-font-size: 42px;
--r-main-color: #fff;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
--r-heading-color: #fff;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: 600;
--r-heading1-text-shadow: none;
--r-heading1-size: 2.5em;
--r-heading2-size: 1.6em;
--r-heading3-size: 1.3em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #42affa;
--r-link-color-dark: rgb(19.8216494845, 155.4536082474, 248.7783505155);
--r-link-color-hover: rgb(94.35, 187, 250.75);
--r-selection-background-color: rgba(66, 175, 250, 0.75);
--r-selection-color: #fff;
--r-overlay-element-bg-color: 240, 240, 240;
--r-overlay-element-fg-color: 0, 0, 0;
}
.reveal-viewport {
background: #191919;
background-color: #191919; }
background-color: var(--r-background-color);
}
.reveal {
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-size: 42px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #fff; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #bee4fd;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #bee4fd;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -69,220 +79,281 @@ section.has-light-background, section.has-light-background h1, section.has-light
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #fff;
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-weight: 600;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 2.5em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 1.6em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.3em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: none; }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #42affa;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #8dcffc;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #068de9; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #42affa;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #42affa; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #42affa; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #191919; } }
background-color: var(--r-background-color);
}
}

295
dist/theme/blood.css vendored
View File

@@ -10,58 +10,71 @@
*
*/
@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic);
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #222;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #222;
--main-font: Ubuntu, sans-serif;
--main-font-size: 40px;
--main-color: #eee;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: Ubuntu, sans-serif;
--heading-color: #eee;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: uppercase;
--heading-text-shadow: 2px 2px 2px #222;
--heading-font-weight: normal;
--heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #a23;
--link-color-hover: #dd5566;
--selection-background-color: #a23;
--selection-color: #fff; }
--r-background-color: #222;
--r-main-font: Ubuntu, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #eee;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Ubuntu, sans-serif;
--r-heading-color: #eee;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: 2px 2px 2px #222;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #a23;
--r-link-color-dark: rgb(144.5, 28.9, 43.35);
--r-link-color-hover: rgb(214.2, 51, 71.4);
--r-selection-background-color: #a23;
--r-selection-color: #fff;
--r-overlay-element-bg-color: 240, 240, 240;
--r-overlay-element-fg-color: 0, 0, 0;
}
.reveal-viewport {
background: #222;
background-color: #222; }
background-color: var(--r-background-color);
}
.reveal {
font-family: Ubuntu, "sans-serif";
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #eee; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #a23;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #a23;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -72,227 +85,292 @@
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #eee;
font-family: Ubuntu, "sans-serif";
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: 2px 2px 2px #222;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15); }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #a23;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #dd5566;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #6a1520; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #eee;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #a23;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #a23; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #a23; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #222; } }
background-color: var(--r-background-color);
}
}
.reveal p {
font-weight: 300;
text-shadow: 1px 1px #222; }
text-shadow: 1px 1px #222;
}
section.has-light-background p, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4 {
text-shadow: none;
}
.reveal h1,
.reveal h2,
@@ -300,12 +378,15 @@
.reveal h4,
.reveal h5,
.reveal h6 {
font-weight: 700; }
font-weight: 700;
}
.reveal p code {
background-color: #23241f;
display: inline-block;
border-radius: 7px; }
border-radius: 7px;
}
.reveal small code {
vertical-align: baseline; }
vertical-align: baseline;
}

385
dist/theme/dracula.css vendored Normal file
View File

@@ -0,0 +1,385 @@
/**
* Dracula Dark theme for reveal.js.
* Based on https://draculatheme.com
*/
/**
* Dracula colors by Zeno Rocha
* https://draculatheme.com/contribute
*/
html * {
color-profile: sRGB;
rendering-intent: auto;
}
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #282A36;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--r-background-color: #282A36;
--r-main-font: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #F8F8F2;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: League Gothic, Impact, sans-serif;
--r-heading-color: #BD93F9;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: none;
--r-heading-text-shadow: none;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: none;
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: Fira Code, Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
--r-link-color: #FF79C6;
--r-link-color-dark: rgb(255, 64.6, 174.0089552239);
--r-link-color-hover: #8BE9FD;
--r-selection-background-color: #44475A;
--r-selection-color: #fff;
--r-overlay-element-bg-color: 240, 240, 240;
--r-overlay-element-fg-color: 0, 0, 0;
}
.reveal-viewport {
background: #282A36;
background-color: var(--r-background-color);
}
.reveal {
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: var(--r-main-color);
}
.reveal ::selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit;
}
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold;
}
.reveal em {
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px;
}
.reveal dt {
font-weight: bold;
}
.reveal dd {
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block;
}
.reveal q {
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0;
}
.reveal table th {
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid;
}
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top;
}
.reveal small * {
vertical-align: top;
}
.reveal img {
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: var(--r-link-color);
text-decoration: none;
transition: color 0.15s ease;
}
.reveal a:hover {
color: var(--r-link-color-hover);
text-shadow: none;
border: none;
}
.reveal .roll span:after {
color: #fff;
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: var(--r-background-color);
}
}
:root {
--r-bold-color: #FFB86C;
--r-italic-color: #F1FA8C;
--r-inline-code-color: #50FA7B;
--r-list-bullet-color: #8BE9FD;
}
.reveal strong, .reveal b {
color: var(--r-bold-color);
}
.reveal em, .reveal i, .reveal blockquote {
color: var(--r-italic-color);
}
.reveal code {
color: var(--r-inline-code-color);
}
.reveal ul li::marker, .reveal ol li::marker {
color: var(--r-list-bullet-color);
}

View File

@@ -1,10 +1,10 @@
@font-face {
font-family: 'League Gothic';
src: url('league-gothic.eot');
src: url('league-gothic.eot?#iefix') format('embedded-opentype'),
url('league-gothic.woff') format('woff'),
url('league-gothic.ttf') format('truetype');
src: url('./league-gothic.eot');
src: url('./league-gothic.eot?#iefix') format('embedded-opentype'),
url('./league-gothic.woff') format('woff'),
url('./league-gothic.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
}

View File

@@ -1,39 +1,39 @@
@font-face {
font-family: 'Source Sans Pro';
src: url('source-sans-pro-regular.eot');
src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'),
url('source-sans-pro-regular.woff') format('woff'),
url('source-sans-pro-regular.ttf') format('truetype');
src: url('./source-sans-pro-regular.eot');
src: url('./source-sans-pro-regular.eot?#iefix') format('embedded-opentype'),
url('./source-sans-pro-regular.woff') format('woff'),
url('./source-sans-pro-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Source Sans Pro';
src: url('source-sans-pro-italic.eot');
src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'),
url('source-sans-pro-italic.woff') format('woff'),
url('source-sans-pro-italic.ttf') format('truetype');
src: url('./source-sans-pro-italic.eot');
src: url('./source-sans-pro-italic.eot?#iefix') format('embedded-opentype'),
url('./source-sans-pro-italic.woff') format('woff'),
url('./source-sans-pro-italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Source Sans Pro';
src: url('source-sans-pro-semibold.eot');
src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'),
url('source-sans-pro-semibold.woff') format('woff'),
url('source-sans-pro-semibold.ttf') format('truetype');
src: url('./source-sans-pro-semibold.eot');
src: url('./source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'),
url('./source-sans-pro-semibold.woff') format('woff'),
url('./source-sans-pro-semibold.ttf') format('truetype');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'Source Sans Pro';
src: url('source-sans-pro-semibolditalic.eot');
src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'),
url('source-sans-pro-semibolditalic.woff') format('woff'),
url('source-sans-pro-semibolditalic.ttf') format('truetype');
src: url('./source-sans-pro-semibolditalic.eot');
src: url('./source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'),
url('./source-sans-pro-semibolditalic.woff') format('woff'),
url('./source-sans-pro-semibolditalic.ttf') format('truetype');
font-weight: 600;
font-style: italic;
}
}

294
dist/theme/league.css vendored
View File

@@ -5,66 +5,79 @@
*
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #222;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #2b2b2b;
--main-font: Lato, sans-serif;
--main-font-size: 40px;
--main-color: #eee;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: League Gothic, Impact, sans-serif;
--heading-color: #eee;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: uppercase;
--heading-text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
--heading-font-weight: normal;
--heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #13DAEC;
--link-color-hover: #71e9f4;
--selection-background-color: #FF5E99;
--selection-color: #fff; }
--r-background-color: #2b2b2b;
--r-main-font: Lato, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #eee;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: League Gothic, Impact, sans-serif;
--r-heading-color: #eee;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
--r-heading-font-weight: normal;
--r-heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #13DAEC;
--r-link-color-dark: rgb(16.15, 185.3, 200.6);
--r-link-color-hover: rgb(66.2, 225.4, 239.8);
--r-selection-background-color: #FF5E99;
--r-selection-color: #fff;
--r-overlay-element-bg-color: 240, 240, 240;
--r-overlay-element-fg-color: 0, 0, 0;
}
.reveal-viewport {
background: #1c1e20;
background: -moz-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #555a5f), color-stop(100%, #1c1e20));
background: -webkit-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background: -o-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background: -ms-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background: radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
background-color: #2b2b2b; }
background: rgb(28, 30, 32);
background: -moz-radial-gradient(center, circle cover, rgb(85, 90, 95) 0%, rgb(28, 30, 32) 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, rgb(85, 90, 95)), color-stop(100%, rgb(28, 30, 32)));
background: -webkit-radial-gradient(center, circle cover, rgb(85, 90, 95) 0%, rgb(28, 30, 32) 100%);
background: -o-radial-gradient(center, circle cover, rgb(85, 90, 95) 0%, rgb(28, 30, 32) 100%);
background: -ms-radial-gradient(center, circle cover, rgb(85, 90, 95) 0%, rgb(28, 30, 32) 100%);
background: radial-gradient(center, circle cover, rgb(85, 90, 95) 0%, rgb(28, 30, 32) 100%);
background-color: var(--r-background-color);
}
.reveal {
font-family: "Lato", sans-serif;
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #eee; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #FF5E99;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #FF5E99;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -75,220 +88,281 @@
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #eee;
font-family: "League Gothic", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15); }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #13DAEC;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #71e9f4;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #0d99a5; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #eee;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #13DAEC;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #13DAEC; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #13DAEC; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #2b2b2b; } }
background-color: var(--r-background-color);
}
}

282
dist/theme/moon.css vendored
View File

@@ -2,67 +2,76 @@
* Solarized Dark theme for reveal.js.
* Author: Achim Staebler
*/
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
/**
* Solarized colors by Ethan Schoonover
*/
html * {
color-profile: sRGB;
rendering-intent: auto; }
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #222;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #002b36;
--main-font: Lato, sans-serif;
--main-font-size: 40px;
--main-color: #93a1a1;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: League Gothic, Impact, sans-serif;
--heading-color: #eee8d5;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: uppercase;
--heading-text-shadow: none;
--heading-font-weight: normal;
--heading1-text-shadow: none;
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #268bd2;
--link-color-hover: #78b9e6;
--selection-background-color: #d33682;
--selection-color: #fff; }
--r-background-color: #002b36;
--r-main-font: Lato, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #93a1a1;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: League Gothic, Impact, sans-serif;
--r-heading-color: #eee8d5;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: none;
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #268bd2;
--r-link-color-dark: rgb(32.3, 118.15, 178.5);
--r-link-color-hover: rgb(77.5161290323, 162.8774193548, 222.8838709677);
--r-selection-background-color: #d33682;
--r-selection-color: #fff;
--r-overlay-element-bg-color: 240, 240, 240;
--r-overlay-element-fg-color: 0, 0, 0;
}
.reveal-viewport {
background: #002b36;
background-color: #002b36; }
background-color: var(--r-background-color);
}
.reveal {
font-family: "Lato", sans-serif;
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #93a1a1; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #d33682;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #d33682;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -73,220 +82,281 @@ html * {
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #eee8d5;
font-family: "League Gothic", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: none; }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #268bd2;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #78b9e6;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #1a6091; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #93a1a1;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #268bd2;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #268bd2; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #268bd2; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #002b36; } }
background-color: var(--r-background-color);
}
}

278
dist/theme/night.css vendored
View File

@@ -5,58 +5,71 @@
*/
@import url(https://fonts.googleapis.com/css?family=Montserrat:700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
color: #222;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #111;
--main-font: Open Sans, sans-serif;
--main-font-size: 40px;
--main-color: #eee;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: Montserrat, Impact, sans-serif;
--heading-color: #eee;
--heading-line-height: 1.2;
--heading-letter-spacing: -0.03em;
--heading-text-transform: none;
--heading-text-shadow: none;
--heading-font-weight: normal;
--heading1-text-shadow: none;
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #e7ad52;
--link-color-hover: #f3d7ac;
--selection-background-color: #e7ad52;
--selection-color: #fff; }
--r-background-color: #111;
--r-main-font: Open Sans, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #eee;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Montserrat, Impact, sans-serif;
--r-heading-color: #eee;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: -0.03em;
--r-heading-text-transform: none;
--r-heading-text-shadow: none;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: none;
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #e7ad52;
--r-link-color-dark: rgb(225.2802030457, 153.4573604061, 40.7697969543);
--r-link-color-hover: rgb(235.8, 189.4, 116.6);
--r-selection-background-color: #e7ad52;
--r-selection-color: #fff;
--r-overlay-element-bg-color: 240, 240, 240;
--r-overlay-element-fg-color: 0, 0, 0;
}
.reveal-viewport {
background: #111;
background-color: #111; }
background-color: var(--r-background-color);
}
.reveal {
font-family: "Open Sans", sans-serif;
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #eee; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #e7ad52;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #e7ad52;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -67,220 +80,281 @@
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #eee;
font-family: "Montserrat", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: -0.03em;
text-transform: none;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: none; }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #e7ad52;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #f3d7ac;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #d08a1d; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #eee;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #e7ad52;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #e7ad52; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #e7ad52; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #111; } }
background-color: var(--r-background-color);
}
}

281
dist/theme/serif.css vendored
View File

@@ -5,60 +5,74 @@
* This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
*/
.reveal a {
line-height: 1.3em; }
line-height: 1.3em;
}
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #F0F1EB;
--main-font: Palatino Linotype, Book Antiqua, Palatino, FreeSerif, serif;
--main-font-size: 40px;
--main-color: #000;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: Palatino Linotype, Book Antiqua, Palatino, FreeSerif, serif;
--heading-color: #383D3D;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: none;
--heading-text-shadow: none;
--heading-font-weight: normal;
--heading1-text-shadow: none;
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #51483D;
--link-color-hover: #8b7c69;
--selection-background-color: #26351C;
--selection-color: #fff; }
--r-background-color: #F0F1EB;
--r-main-font: Palatino Linotype, Book Antiqua, Palatino, FreeSerif, serif;
--r-main-font-size: 40px;
--r-main-color: #000;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Palatino Linotype, Book Antiqua, Palatino, FreeSerif, serif;
--r-heading-color: #383D3D;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: none;
--r-heading-text-shadow: none;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: none;
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #51483D;
--r-link-color-dark: rgb(68.85, 61.2, 51.85);
--r-link-color-hover: rgb(122.9830985915, 109.3183098592, 92.6169014085);
--r-selection-background-color: #26351C;
--r-selection-color: #fff;
--r-overlay-element-bg-color: 0, 0, 0;
--r-overlay-element-fg-color: 240, 240, 240;
}
.reveal-viewport {
background: #F0F1EB;
background-color: #F0F1EB; }
background-color: var(--r-background-color);
}
.reveal {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #000; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #26351C;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #26351C;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -69,220 +83,281 @@
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #383D3D;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: none;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: none; }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #51483D;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #8b7c69;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #25211c; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #000;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #51483D;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #51483D; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #51483D; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #F0F1EB; } }
background-color: var(--r-background-color);
}
}

277
dist/theme/simple.css vendored
View File

@@ -8,60 +8,70 @@
@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff; }
color: #fff;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #fff;
--main-font: Lato, sans-serif;
--main-font-size: 40px;
--main-color: #000;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: News Cycle, Impact, sans-serif;
--heading-color: #000;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: none;
--heading-text-shadow: none;
--heading-font-weight: normal;
--heading1-text-shadow: none;
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #00008B;
--link-color-hover: #0000f1;
--selection-background-color: rgba(0, 0, 0, 0.99);
--selection-color: #fff; }
--r-background-color: #fff;
--r-main-font: Lato, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #000;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: News Cycle, Impact, sans-serif;
--r-heading-color: #000;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: none;
--r-heading-text-shadow: none;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: none;
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #00008B;
--r-link-color-dark: rgb(0, 0, 118.15);
--r-link-color-hover: rgb(0, 0, 213.2);
--r-selection-background-color: rgba(0, 0, 0, 0.99);
--r-selection-color: #fff;
--r-overlay-element-bg-color: 0, 0, 0;
--r-overlay-element-fg-color: 240, 240, 240;
}
.reveal-viewport {
background: #fff;
background-color: #fff; }
background-color: var(--r-background-color);
}
.reveal {
font-family: "Lato", sans-serif;
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #000; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: rgba(0, 0, 0, 0.99);
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: rgba(0, 0, 0, 0.99);
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -72,220 +82,281 @@ section.has-dark-background, section.has-dark-background h1, section.has-dark-ba
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #000;
font-family: "News Cycle", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: none;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: none; }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #00008B;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #0000f1;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #00003f; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #000;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #00008B;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #00008B; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #00008B; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #fff; } }
background-color: var(--r-background-color);
}
}

281
dist/theme/sky.css vendored
View File

@@ -6,35 +6,44 @@
@import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
.reveal a {
line-height: 1.3em; }
line-height: 1.3em;
}
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #f7fbfc;
--main-font: Open Sans, sans-serif;
--main-font-size: 40px;
--main-color: #333;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: Quicksand, sans-serif;
--heading-color: #333;
--heading-line-height: 1.2;
--heading-letter-spacing: -0.08em;
--heading-text-transform: uppercase;
--heading-text-shadow: none;
--heading-font-weight: normal;
--heading1-text-shadow: none;
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #3b759e;
--link-color-hover: #74a7cb;
--selection-background-color: #134674;
--selection-color: #fff; }
--r-background-color: #f7fbfc;
--r-main-font: Open Sans, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #333;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Quicksand, sans-serif;
--r-heading-color: #333;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: -0.08em;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: none;
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #3b759e;
--r-link-color-dark: rgb(50.15, 99.45, 134.3);
--r-link-color-hover: rgb(84.330875576, 146.9815668203, 191.269124424);
--r-selection-background-color: #134674;
--r-selection-color: #fff;
--r-overlay-element-bg-color: 0, 0, 0;
--r-overlay-element-fg-color: 240, 240, 240;
}
.reveal-viewport {
background: #add9e4;
@@ -44,28 +53,33 @@
background: -o-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);
background: -ms-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);
background: radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);
background-color: #f7fbfc; }
background-color: var(--r-background-color);
}
.reveal {
font-family: "Open Sans", sans-serif;
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #333; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #134674;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #134674;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -76,220 +90,281 @@
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #333;
font-family: "Quicksand", sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: -0.08em;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: none; }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #3b759e;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #74a7cb;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #264c66; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #333;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #3b759e;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #3b759e; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #3b759e; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #f7fbfc; } }
background-color: var(--r-background-color);
}
}

View File

@@ -2,67 +2,77 @@
* Solarized Light theme for reveal.js.
* Author: Achim Staebler
*/
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
/**
* Solarized colors by Ethan Schoonover
*/
html * {
color-profile: sRGB;
rendering-intent: auto; }
rendering-intent: auto;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #fdf6e3;
--main-font: Lato, sans-serif;
--main-font-size: 40px;
--main-color: #657b83;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: League Gothic, Impact, sans-serif;
--heading-color: #586e75;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: uppercase;
--heading-text-shadow: none;
--heading-font-weight: normal;
--heading1-text-shadow: none;
--heading1-size: 3.77em;
--heading2-size: 2.11em;
--heading3-size: 1.55em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #268bd2;
--link-color-hover: #78b9e6;
--selection-background-color: #d33682;
--selection-color: #fff; }
--r-background-color: #fdf6e3;
--r-main-font: Lato, sans-serif;
--r-main-font-size: 40px;
--r-main-color: #657b83;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: League Gothic, Impact, sans-serif;
--r-heading-color: #586e75;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: normal;
--r-heading1-text-shadow: none;
--r-heading1-size: 3.77em;
--r-heading2-size: 2.11em;
--r-heading3-size: 1.55em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #268bd2;
--r-link-color-dark: rgb(32.3, 118.15, 178.5);
--r-link-color-hover: rgb(77.5161290323, 162.8774193548, 222.8838709677);
--r-selection-background-color: #d33682;
--r-selection-color: #fff;
--r-overlay-element-bg-color: 0, 0, 0;
--r-overlay-element-fg-color: 240, 240, 240;
}
.reveal-viewport {
background: #fdf6e3;
background-color: #fdf6e3; }
background-color: var(--r-background-color);
}
.reveal {
font-family: "Lato", sans-serif;
font-size: 40px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #657b83; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #d33682;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #d33682;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -73,220 +83,281 @@ html * {
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #586e75;
font-family: "League Gothic", Impact, sans-serif;
font-weight: normal;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 3.77em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 2.11em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.55em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: none; }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #268bd2;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #78b9e6;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #1a6091; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #657b83;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #268bd2;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #268bd2; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #268bd2; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #fdf6e3; } }
background-color: var(--r-background-color);
}
}

362
dist/theme/white-contrast.css vendored Normal file
View File

@@ -0,0 +1,362 @@
/**
* White compact & high contrast reveal.js theme, with headers not in capitals.
*
* By Peter Kehl. Based on white.(s)css by Hakim El Hattab, http://hakim.se
*
* - Keep the source similar to black.css - for easy comparison.
* - $mainFontSize controls code blocks, too (although under some ratio).
*/
@import url(./fonts/source-sans-pro/source-sans-pro.css);
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--r-background-color: #fff;
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
--r-main-font-size: 42px;
--r-main-color: #000;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
--r-heading-color: #000;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: 600;
--r-heading1-text-shadow: none;
--r-heading1-size: 2.5em;
--r-heading2-size: 1.6em;
--r-heading3-size: 1.3em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #2a76dd;
--r-link-color-dark: rgb(30.7720647773, 99.5566801619, 192.7779352227);
--r-link-color-hover: rgb(73.95, 138.55, 226.1);
--r-selection-background-color: rgb(95.25, 152.25, 229.5);
--r-selection-color: #fff;
--r-overlay-element-bg-color: 0, 0, 0;
--r-overlay-element-fg-color: 240, 240, 240;
}
.reveal-viewport {
background: #fff;
background-color: var(--r-background-color);
}
.reveal {
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: var(--r-main-color);
}
.reveal ::selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit;
}
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold;
}
.reveal em {
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px;
}
.reveal dt {
font-weight: bold;
}
.reveal dd {
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block;
}
.reveal q {
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0;
}
.reveal table th {
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid;
}
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top;
}
.reveal small * {
vertical-align: top;
}
.reveal img {
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: var(--r-link-color);
text-decoration: none;
transition: color 0.15s ease;
}
.reveal a:hover {
color: var(--r-link-color-hover);
text-shadow: none;
border: none;
}
.reveal .roll span:after {
color: #fff;
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: var(--r-background-color);
}
}

279
dist/theme/white.css vendored
View File

@@ -3,62 +3,72 @@
*
* By Hakim El Hattab, http://hakim.se
*/
@import url(fonts/source-sans-pro/source-sans-pro.css);
@import url(./fonts/source-sans-pro/source-sans-pro.css);
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff; }
color: #fff;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--background-color: #fff;
--main-font: Source Sans Pro, Helvetica, sans-serif;
--main-font-size: 42px;
--main-color: #222;
--block-margin: 20px;
--heading-margin: 0 0 20px 0;
--heading-font: Source Sans Pro, Helvetica, sans-serif;
--heading-color: #222;
--heading-line-height: 1.2;
--heading-letter-spacing: normal;
--heading-text-transform: uppercase;
--heading-text-shadow: none;
--heading-font-weight: 600;
--heading1-text-shadow: none;
--heading1-size: 2.5em;
--heading2-size: 1.6em;
--heading3-size: 1.3em;
--heading4-size: 1em;
--code-font: monospace;
--link-color: #2a76dd;
--link-color-hover: #6ca0e8;
--selection-background-color: #98bdef;
--selection-color: #fff; }
--r-background-color: #fff;
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
--r-main-font-size: 42px;
--r-main-color: #222;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
--r-heading-color: #222;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: uppercase;
--r-heading-text-shadow: none;
--r-heading-font-weight: 600;
--r-heading1-text-shadow: none;
--r-heading1-size: 2.5em;
--r-heading2-size: 1.6em;
--r-heading3-size: 1.3em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #2a76dd;
--r-link-color-dark: rgb(30.7720647773, 99.5566801619, 192.7779352227);
--r-link-color-hover: rgb(73.95, 138.55, 226.1);
--r-selection-background-color: rgb(95.25, 152.25, 229.5);
--r-selection-color: #fff;
--r-overlay-element-bg-color: 0, 0, 0;
--r-overlay-element-fg-color: 240, 240, 240;
}
.reveal-viewport {
background: #fff;
background-color: #fff; }
background-color: var(--r-background-color);
}
.reveal {
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-size: 42px;
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: #222; }
color: var(--r-main-color);
}
.reveal ::selection {
color: #fff;
background: #98bdef;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: #fff;
background: #98bdef;
text-shadow: none; }
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit; }
font-weight: inherit;
}
/*********************************************
* HEADERS
@@ -69,220 +79,281 @@ section.has-dark-background, section.has-dark-background h1, section.has-dark-ba
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #222;
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-weight: 600;
line-height: 1.2;
letter-spacing: normal;
text-transform: uppercase;
text-shadow: none;
word-wrap: break-word; }
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: 2.5em; }
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: 1.6em; }
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: 1.3em; }
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: 1em; }
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: none; }
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold; }
font-weight: bold;
}
.reveal em {
font-style: italic; }
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal; }
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc; }
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square; }
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle; }
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
margin-left: 40px;
}
.reveal dt {
font-weight: bold; }
font-weight: bold;
}
.reveal dd {
margin-left: 40px; }
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
display: inline-block;
}
.reveal q {
font-style: italic; }
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: 20px auto;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: monospace;
text-transform: none; }
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
.reveal table th {
font-weight: bold; }
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
border-bottom: 1px solid;
}
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none; }
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller; }
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller; }
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
vertical-align: top;
}
.reveal small * {
vertical-align: top; }
vertical-align: top;
}
.reveal img {
margin: 20px 0; }
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #2a76dd;
color: var(--r-link-color);
text-decoration: none;
transition: color .15s ease; }
transition: color 0.15s ease;
}
.reveal a:hover {
color: #6ca0e8;
color: var(--r-link-color-hover);
text-shadow: none;
border: none; }
border: none;
}
.reveal .roll span:after {
color: #fff;
background: #1a53a1; }
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid #222;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all .15s linear; }
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: #2a76dd;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: #2a76dd; }
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: #2a76dd; }
.reveal .progress span {
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: #fff; } }
background-color: var(--r-background-color);
}
}

View File

@@ -0,0 +1,360 @@
/**
* White compact & high contrast reveal.js theme, with headers not in capitals.
*
* By Peter Kehl. Based on white.(s)css by Hakim El Hattab, http://hakim.se
*
* - Keep the source similar to black.css - for easy comparison.
* - $mainFontSize controls code blocks, too (although under some ratio).
*/
@import url(./fonts/source-sans-pro/source-sans-pro.css);
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff;
}
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--r-background-color: #fff;
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
--r-main-font-size: 25px;
--r-main-color: #000;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
--r-heading-color: #000;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: none;
--r-heading-text-shadow: none;
--r-heading-font-weight: 450;
--r-heading1-text-shadow: none;
--r-heading1-size: 2.5em;
--r-heading2-size: 1.6em;
--r-heading3-size: 1.3em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #2a76dd;
--r-link-color-dark: #1a53a1;
--r-link-color-hover: #6ca0e8;
--r-selection-background-color: #98bdef;
--r-selection-color: #fff;
}
.reveal-viewport {
background: #fff;
background-color: var(--r-background-color);
}
.reveal {
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: var(--r-main-color);
}
.reveal ::selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit;
}
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: var(--r-heading-margin);
color: var(--r-heading-color);
font-family: var(--r-heading-font);
font-weight: var(--r-heading-font-weight);
line-height: var(--r-heading-line-height);
letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
}
.reveal h1 {
font-size: var(--r-heading1-size);
}
.reveal h2 {
font-size: var(--r-heading2-size);
}
.reveal h3 {
font-size: var(--r-heading3-size);
}
.reveal h4 {
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: var(--r-block-margin) 0;
line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold;
}
.reveal em {
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em;
}
.reveal ol {
list-style-type: decimal;
}
.reveal ul {
list-style-type: disc;
}
.reveal ul ul {
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px;
}
.reveal dt {
font-weight: bold;
}
.reveal dd {
margin-left: 40px;
}
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: var(--r-block-margin) auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block;
}
.reveal q {
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
}
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0;
}
.reveal table th {
font-weight: bold;
}
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid;
}
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top;
}
.reveal small * {
vertical-align: top;
}
.reveal img {
margin: var(--r-block-margin) 0;
}
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: var(--r-link-color);
text-decoration: none;
transition: color 0.15s ease;
}
.reveal a:hover {
color: var(--r-link-color-hover);
text-shadow: none;
border: none;
}
.reveal .roll span:after {
color: #fff;
background: var(--r-link-color-dark);
}
/*********************************************
* Frame helper
*********************************************/
.reveal .r-frame {
border: 4px solid var(--r-main-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
.reveal a .r-frame {
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: var(--r-background-color);
}
}

526
examples/500-slides.html Normal file
View File

@@ -0,0 +1,526 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - 500 slides</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="../dist/reveal.css">
<link rel="stylesheet" href="../dist/theme/black.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section><h1>1</h1></section>
<section><h1>2</h1></section>
<section><h1>3</h1></section>
<section><h1>4</h1></section>
<section><h1>5</h1></section>
<section><h1>6</h1></section>
<section><h1>7</h1></section>
<section><h1>8</h1></section>
<section><h1>9</h1></section>
<section><h1>10</h1></section>
<section><h1>11</h1></section>
<section><h1>12</h1></section>
<section><h1>13</h1></section>
<section><h1>14</h1></section>
<section><h1>15</h1></section>
<section><h1>16</h1></section>
<section><h1>17</h1></section>
<section><h1>18</h1></section>
<section><h1>19</h1></section>
<section><h1>20</h1></section>
<section><h1>21</h1></section>
<section><h1>22</h1></section>
<section><h1>23</h1></section>
<section><h1>24</h1></section>
<section><h1>25</h1></section>
<section><h1>26</h1></section>
<section><h1>27</h1></section>
<section><h1>28</h1></section>
<section><h1>29</h1></section>
<section><h1>30</h1></section>
<section><h1>31</h1></section>
<section><h1>32</h1></section>
<section><h1>33</h1></section>
<section><h1>34</h1></section>
<section><h1>35</h1></section>
<section><h1>36</h1></section>
<section><h1>37</h1></section>
<section><h1>38</h1></section>
<section><h1>39</h1></section>
<section><h1>40</h1></section>
<section><h1>41</h1></section>
<section><h1>42</h1></section>
<section><h1>43</h1></section>
<section><h1>44</h1></section>
<section><h1>45</h1></section>
<section><h1>46</h1></section>
<section><h1>47</h1></section>
<section><h1>48</h1></section>
<section><h1>49</h1></section>
<section><h1>50</h1></section>
<section><h1>51</h1></section>
<section><h1>52</h1></section>
<section><h1>53</h1></section>
<section><h1>54</h1></section>
<section><h1>55</h1></section>
<section><h1>56</h1></section>
<section><h1>57</h1></section>
<section><h1>58</h1></section>
<section><h1>59</h1></section>
<section><h1>60</h1></section>
<section><h1>61</h1></section>
<section><h1>62</h1></section>
<section><h1>63</h1></section>
<section><h1>64</h1></section>
<section><h1>65</h1></section>
<section><h1>66</h1></section>
<section><h1>67</h1></section>
<section><h1>68</h1></section>
<section><h1>69</h1></section>
<section><h1>70</h1></section>
<section><h1>71</h1></section>
<section><h1>72</h1></section>
<section><h1>73</h1></section>
<section><h1>74</h1></section>
<section><h1>75</h1></section>
<section><h1>76</h1></section>
<section><h1>77</h1></section>
<section><h1>78</h1></section>
<section><h1>79</h1></section>
<section><h1>80</h1></section>
<section><h1>81</h1></section>
<section><h1>82</h1></section>
<section><h1>83</h1></section>
<section><h1>84</h1></section>
<section><h1>85</h1></section>
<section><h1>86</h1></section>
<section><h1>87</h1></section>
<section><h1>88</h1></section>
<section><h1>89</h1></section>
<section><h1>90</h1></section>
<section><h1>91</h1></section>
<section><h1>92</h1></section>
<section><h1>93</h1></section>
<section><h1>94</h1></section>
<section><h1>95</h1></section>
<section><h1>96</h1></section>
<section><h1>97</h1></section>
<section><h1>98</h1></section>
<section><h1>99</h1></section>
<section><h1>100</h1></section>
<section><h1>101</h1></section>
<section><h1>102</h1></section>
<section><h1>103</h1></section>
<section><h1>104</h1></section>
<section><h1>105</h1></section>
<section><h1>106</h1></section>
<section><h1>107</h1></section>
<section><h1>108</h1></section>
<section><h1>109</h1></section>
<section><h1>110</h1></section>
<section><h1>111</h1></section>
<section><h1>112</h1></section>
<section><h1>113</h1></section>
<section><h1>114</h1></section>
<section><h1>115</h1></section>
<section><h1>116</h1></section>
<section><h1>117</h1></section>
<section><h1>118</h1></section>
<section><h1>119</h1></section>
<section><h1>120</h1></section>
<section><h1>121</h1></section>
<section><h1>122</h1></section>
<section><h1>123</h1></section>
<section><h1>124</h1></section>
<section><h1>125</h1></section>
<section><h1>126</h1></section>
<section><h1>127</h1></section>
<section><h1>128</h1></section>
<section><h1>129</h1></section>
<section><h1>130</h1></section>
<section><h1>131</h1></section>
<section><h1>132</h1></section>
<section><h1>133</h1></section>
<section><h1>134</h1></section>
<section><h1>135</h1></section>
<section><h1>136</h1></section>
<section><h1>137</h1></section>
<section><h1>138</h1></section>
<section><h1>139</h1></section>
<section><h1>140</h1></section>
<section><h1>141</h1></section>
<section><h1>142</h1></section>
<section><h1>143</h1></section>
<section><h1>144</h1></section>
<section><h1>145</h1></section>
<section><h1>146</h1></section>
<section><h1>147</h1></section>
<section><h1>148</h1></section>
<section><h1>149</h1></section>
<section><h1>150</h1></section>
<section><h1>151</h1></section>
<section><h1>152</h1></section>
<section><h1>153</h1></section>
<section><h1>154</h1></section>
<section><h1>155</h1></section>
<section><h1>156</h1></section>
<section><h1>157</h1></section>
<section><h1>158</h1></section>
<section><h1>159</h1></section>
<section><h1>160</h1></section>
<section><h1>161</h1></section>
<section><h1>162</h1></section>
<section><h1>163</h1></section>
<section><h1>164</h1></section>
<section><h1>165</h1></section>
<section><h1>166</h1></section>
<section><h1>167</h1></section>
<section><h1>168</h1></section>
<section><h1>169</h1></section>
<section><h1>170</h1></section>
<section><h1>171</h1></section>
<section><h1>172</h1></section>
<section><h1>173</h1></section>
<section><h1>174</h1></section>
<section><h1>175</h1></section>
<section><h1>176</h1></section>
<section><h1>177</h1></section>
<section><h1>178</h1></section>
<section><h1>179</h1></section>
<section><h1>180</h1></section>
<section><h1>181</h1></section>
<section><h1>182</h1></section>
<section><h1>183</h1></section>
<section><h1>184</h1></section>
<section><h1>185</h1></section>
<section><h1>186</h1></section>
<section><h1>187</h1></section>
<section><h1>188</h1></section>
<section><h1>189</h1></section>
<section><h1>190</h1></section>
<section><h1>191</h1></section>
<section><h1>192</h1></section>
<section><h1>193</h1></section>
<section><h1>194</h1></section>
<section><h1>195</h1></section>
<section><h1>196</h1></section>
<section><h1>197</h1></section>
<section><h1>198</h1></section>
<section><h1>199</h1></section>
<section><h1>200</h1></section>
<section><h1>201</h1></section>
<section><h1>202</h1></section>
<section><h1>203</h1></section>
<section><h1>204</h1></section>
<section><h1>205</h1></section>
<section><h1>206</h1></section>
<section><h1>207</h1></section>
<section><h1>208</h1></section>
<section><h1>209</h1></section>
<section><h1>210</h1></section>
<section><h1>211</h1></section>
<section><h1>212</h1></section>
<section><h1>213</h1></section>
<section><h1>214</h1></section>
<section><h1>215</h1></section>
<section><h1>216</h1></section>
<section><h1>217</h1></section>
<section><h1>218</h1></section>
<section><h1>219</h1></section>
<section><h1>220</h1></section>
<section><h1>221</h1></section>
<section><h1>222</h1></section>
<section><h1>223</h1></section>
<section><h1>224</h1></section>
<section><h1>225</h1></section>
<section><h1>226</h1></section>
<section><h1>227</h1></section>
<section><h1>228</h1></section>
<section><h1>229</h1></section>
<section><h1>230</h1></section>
<section><h1>231</h1></section>
<section><h1>232</h1></section>
<section><h1>233</h1></section>
<section><h1>234</h1></section>
<section><h1>235</h1></section>
<section><h1>236</h1></section>
<section><h1>237</h1></section>
<section><h1>238</h1></section>
<section><h1>239</h1></section>
<section><h1>240</h1></section>
<section><h1>241</h1></section>
<section><h1>242</h1></section>
<section><h1>243</h1></section>
<section><h1>244</h1></section>
<section><h1>245</h1></section>
<section><h1>246</h1></section>
<section><h1>247</h1></section>
<section><h1>248</h1></section>
<section><h1>249</h1></section>
<section><h1>250</h1></section>
<section><h1>251</h1></section>
<section><h1>252</h1></section>
<section><h1>253</h1></section>
<section><h1>254</h1></section>
<section><h1>255</h1></section>
<section><h1>256</h1></section>
<section><h1>257</h1></section>
<section><h1>258</h1></section>
<section><h1>259</h1></section>
<section><h1>260</h1></section>
<section><h1>261</h1></section>
<section><h1>262</h1></section>
<section><h1>263</h1></section>
<section><h1>264</h1></section>
<section><h1>265</h1></section>
<section><h1>266</h1></section>
<section><h1>267</h1></section>
<section><h1>268</h1></section>
<section><h1>269</h1></section>
<section><h1>270</h1></section>
<section><h1>271</h1></section>
<section><h1>272</h1></section>
<section><h1>273</h1></section>
<section><h1>274</h1></section>
<section><h1>275</h1></section>
<section><h1>276</h1></section>
<section><h1>277</h1></section>
<section><h1>278</h1></section>
<section><h1>279</h1></section>
<section><h1>280</h1></section>
<section><h1>281</h1></section>
<section><h1>282</h1></section>
<section><h1>283</h1></section>
<section><h1>284</h1></section>
<section><h1>285</h1></section>
<section><h1>286</h1></section>
<section><h1>287</h1></section>
<section><h1>288</h1></section>
<section><h1>289</h1></section>
<section><h1>290</h1></section>
<section><h1>291</h1></section>
<section><h1>292</h1></section>
<section><h1>293</h1></section>
<section><h1>294</h1></section>
<section><h1>295</h1></section>
<section><h1>296</h1></section>
<section><h1>297</h1></section>
<section><h1>298</h1></section>
<section><h1>299</h1></section>
<section><h1>300</h1></section>
<section><h1>301</h1></section>
<section><h1>302</h1></section>
<section><h1>303</h1></section>
<section><h1>304</h1></section>
<section><h1>305</h1></section>
<section><h1>306</h1></section>
<section><h1>307</h1></section>
<section><h1>308</h1></section>
<section><h1>309</h1></section>
<section><h1>310</h1></section>
<section><h1>311</h1></section>
<section><h1>312</h1></section>
<section><h1>313</h1></section>
<section><h1>314</h1></section>
<section><h1>315</h1></section>
<section><h1>316</h1></section>
<section><h1>317</h1></section>
<section><h1>318</h1></section>
<section><h1>319</h1></section>
<section><h1>320</h1></section>
<section><h1>321</h1></section>
<section><h1>322</h1></section>
<section><h1>323</h1></section>
<section><h1>324</h1></section>
<section><h1>325</h1></section>
<section><h1>326</h1></section>
<section><h1>327</h1></section>
<section><h1>328</h1></section>
<section><h1>329</h1></section>
<section><h1>330</h1></section>
<section><h1>331</h1></section>
<section><h1>332</h1></section>
<section><h1>333</h1></section>
<section><h1>334</h1></section>
<section><h1>335</h1></section>
<section><h1>336</h1></section>
<section><h1>337</h1></section>
<section><h1>338</h1></section>
<section><h1>339</h1></section>
<section><h1>340</h1></section>
<section><h1>341</h1></section>
<section><h1>342</h1></section>
<section><h1>343</h1></section>
<section><h1>344</h1></section>
<section><h1>345</h1></section>
<section><h1>346</h1></section>
<section><h1>347</h1></section>
<section><h1>348</h1></section>
<section><h1>349</h1></section>
<section><h1>350</h1></section>
<section><h1>351</h1></section>
<section><h1>352</h1></section>
<section><h1>353</h1></section>
<section><h1>354</h1></section>
<section><h1>355</h1></section>
<section><h1>356</h1></section>
<section><h1>357</h1></section>
<section><h1>358</h1></section>
<section><h1>359</h1></section>
<section><h1>360</h1></section>
<section><h1>361</h1></section>
<section><h1>362</h1></section>
<section><h1>363</h1></section>
<section><h1>364</h1></section>
<section><h1>365</h1></section>
<section><h1>366</h1></section>
<section><h1>367</h1></section>
<section><h1>368</h1></section>
<section><h1>369</h1></section>
<section><h1>370</h1></section>
<section><h1>371</h1></section>
<section><h1>372</h1></section>
<section><h1>373</h1></section>
<section><h1>374</h1></section>
<section><h1>375</h1></section>
<section><h1>376</h1></section>
<section><h1>377</h1></section>
<section><h1>378</h1></section>
<section><h1>379</h1></section>
<section><h1>380</h1></section>
<section><h1>381</h1></section>
<section><h1>382</h1></section>
<section><h1>383</h1></section>
<section><h1>384</h1></section>
<section><h1>385</h1></section>
<section><h1>386</h1></section>
<section><h1>387</h1></section>
<section><h1>388</h1></section>
<section><h1>389</h1></section>
<section><h1>390</h1></section>
<section><h1>391</h1></section>
<section><h1>392</h1></section>
<section><h1>393</h1></section>
<section><h1>394</h1></section>
<section><h1>395</h1></section>
<section><h1>396</h1></section>
<section><h1>397</h1></section>
<section><h1>398</h1></section>
<section><h1>399</h1></section>
<section><h1>400</h1></section>
<section><h1>401</h1></section>
<section><h1>402</h1></section>
<section><h1>403</h1></section>
<section><h1>404</h1></section>
<section><h1>405</h1></section>
<section><h1>406</h1></section>
<section><h1>407</h1></section>
<section><h1>408</h1></section>
<section><h1>409</h1></section>
<section><h1>410</h1></section>
<section><h1>411</h1></section>
<section><h1>412</h1></section>
<section><h1>413</h1></section>
<section><h1>414</h1></section>
<section><h1>415</h1></section>
<section><h1>416</h1></section>
<section><h1>417</h1></section>
<section><h1>418</h1></section>
<section><h1>419</h1></section>
<section><h1>420</h1></section>
<section><h1>421</h1></section>
<section><h1>422</h1></section>
<section><h1>423</h1></section>
<section><h1>424</h1></section>
<section><h1>425</h1></section>
<section><h1>426</h1></section>
<section><h1>427</h1></section>
<section><h1>428</h1></section>
<section><h1>429</h1></section>
<section><h1>430</h1></section>
<section><h1>431</h1></section>
<section><h1>432</h1></section>
<section><h1>433</h1></section>
<section><h1>434</h1></section>
<section><h1>435</h1></section>
<section><h1>436</h1></section>
<section><h1>437</h1></section>
<section><h1>438</h1></section>
<section><h1>439</h1></section>
<section><h1>440</h1></section>
<section><h1>441</h1></section>
<section><h1>442</h1></section>
<section><h1>443</h1></section>
<section><h1>444</h1></section>
<section><h1>445</h1></section>
<section><h1>446</h1></section>
<section><h1>447</h1></section>
<section><h1>448</h1></section>
<section><h1>449</h1></section>
<section><h1>450</h1></section>
<section><h1>451</h1></section>
<section><h1>452</h1></section>
<section><h1>453</h1></section>
<section><h1>454</h1></section>
<section><h1>455</h1></section>
<section><h1>456</h1></section>
<section><h1>457</h1></section>
<section><h1>458</h1></section>
<section><h1>459</h1></section>
<section><h1>460</h1></section>
<section><h1>461</h1></section>
<section><h1>462</h1></section>
<section><h1>463</h1></section>
<section><h1>464</h1></section>
<section><h1>465</h1></section>
<section><h1>466</h1></section>
<section><h1>467</h1></section>
<section><h1>468</h1></section>
<section><h1>469</h1></section>
<section><h1>470</h1></section>
<section><h1>471</h1></section>
<section><h1>472</h1></section>
<section><h1>473</h1></section>
<section><h1>474</h1></section>
<section><h1>475</h1></section>
<section><h1>476</h1></section>
<section><h1>477</h1></section>
<section><h1>478</h1></section>
<section><h1>479</h1></section>
<section><h1>480</h1></section>
<section><h1>481</h1></section>
<section><h1>482</h1></section>
<section><h1>483</h1></section>
<section><h1>484</h1></section>
<section><h1>485</h1></section>
<section><h1>486</h1></section>
<section><h1>487</h1></section>
<section><h1>488</h1></section>
<section><h1>489</h1></section>
<section><h1>490</h1></section>
<section><h1>491</h1></section>
<section><h1>492</h1></section>
<section><h1>493</h1></section>
<section><h1>494</h1></section>
<section><h1>495</h1></section>
<section><h1>496</h1></section>
<section><h1>497</h1></section>
<section><h1>498</h1></section>
<section><h1>499</h1></section>
</div>
</div>
<script src="../dist/reveal.js"></script>
<script>
Reveal.initialize({
transition: 'linear'
});
</script>
</body>
</html>

View File

@@ -18,7 +18,6 @@
<div class="reveal">
<div class="slides">
<section data-auto-animate data-auto-animate-unmatched="fade">
<h3>Auto-Animate Example</h3>
<p>This will fade out</p>
@@ -126,7 +125,7 @@
</section>
<section data-auto-animate style="height: 600px">
<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 1</h2>
<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 1</h3>
<h2 data-id="title" style="margin-top: 260px;">Animate Anything</h2>
<div data-id="1" style="background: white; position: absolute; top: 150px; left: 16%; width: 60px; height: 60px;"></div>
<div data-id="2" style="background: white; position: absolute; top: 150px; left: 36%; width: 60px; height: 60px;"></div>
@@ -134,7 +133,7 @@
<div data-id="4" style="background: white; position: absolute; top: 150px; left: 76%; width: 60px; height: 60px;"></div>
</section>
<section data-auto-animate style="height: 600px">
<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 2</h2>
<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 2</h3>
<h2 data-id="title" style="margin-top: 500px">With Auto Animate</h2>
<div data-id="1" style="background: cyan; position: absolute; bottom: 190px; left: 16%; width: 60px; height: 60px;"></div>
<div data-id="2" style="background: magenta; position: absolute; bottom: 190px; left: 36%; width: 60px; height: 160px;"></div>
@@ -142,7 +141,7 @@
<div data-id="4" style="background: red; position: absolute; bottom: 190px; left: 76%; width: 60px; height: 360px;"></div>
</section>
<section data-auto-animate style="height: 600px">
<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 3</h2>
<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 3</h3>
<h2 data-id="title" style="margin-top: 500px; opacity: 0;">With Auto Animate</h2>
<div data-id="1" style="background: cyan; position: absolute; top: 50%; left: 50%; width: 400px; height: 400px; margin: -200px 0 0 -200px; border-radius: 400px;"></div>
<div data-id="2" style="background: magenta; position: absolute; top: 50%; left: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 400px;"></div>
@@ -150,7 +149,7 @@
<div data-id="4" style="background: red; position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 400px;"></div>
</section>
<section data-auto-animate style="height: 600px">
<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 3</h2>
<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 3</h3>
<h2 data-id="title" style="margin-top: 500px; opacity: 0;">With Auto Animate</h2>
<div data-id="1" style="background: red; position: absolute; top: 250px; left: 16%; width: 60px; height: 60px;"></div>
<div data-id="2" style="background: yellow; position: absolute; top: 250px; left: 36%; width: 60px; height: 60px;"></div>
@@ -158,6 +157,56 @@
<div data-id="4" style="background: cyan; position: absolute; top: 250px; left: 76%; width: 60px; height: 60px;"></div>
</section>
<section data-auto-animate data-auto-animate-id="a">
<h2>data-auto-animate-id="a"</h2>
<h3>A1</h3>
</section>
<section data-auto-animate data-auto-animate-id="a">
<h2>data-auto-animate-id="a"</h2>
<h3>A1</h3>
<h3>A2</h3>
</section>
<section data-auto-animate data-auto-animate-id="b">
<h2>data-auto-animate-id="b"</h2>
<h3>B1</h3>
</section>
<section data-auto-animate data-auto-animate-id="b">
<h2>data-auto-animate-id="b"</h2>
<h3>B1</h3>
<h3>B2</h3>
</section>
<section>
<section id="stacked-slide-1" data-auto-animate>
<a href="#/stacked-slide-1">Slide 1</a><br>
<a href="#/stacked-slide-2">Slide 2</a><br>
<a href="#/stacked-slide-3">Slide 3</a><br>
<a href="#/stacked-slide-4">Slide 4</a><br>
<div data-id="anim" style="background: indigo; padding: 8px; width: 50px; height: 50px; position: absolute; left: 0px;">A</div>
</section>
<section id="stacked-slide-2" data-auto-animate>
<a href="#/stacked-slide-1">Slide 1</a><br>
<a href="#/stacked-slide-2">Slide 2</a><br>
<a href="#/stacked-slide-3">Slide 3</a><br>
<a href="#/stacked-slide-4">Slide 4</a><br>
<div data-id="anim" style="background: indigo; padding: 8px; width: 50px; height: 50px; position: absolute; left: 25%;">A</div>
</section>
<section id="stacked-slide-3" data-auto-animate>
<a href="#/stacked-slide-1">Slide 1</a><br>
<a href="#/stacked-slide-2">Slide 2</a><br>
<a href="#/stacked-slide-3">Slide 3</a><br>
<a href="#/stacked-slide-4">Slide 4</a><br>
<div data-id="anim" style="background: indigo; padding: 8px; width: 50px; height: 50px; position: absolute; left: 50%;">A</div>
</section>
<section id="stacked-slide-4" data-auto-animate>
<a href="#/stacked-slide-1">Slide 1</a><br>
<a href="#/stacked-slide-2">Slide 2</a><br>
<a href="#/stacked-slide-3">Slide 3</a><br>
<a href="#/stacked-slide-4">Slide 4</a><br>
<div data-id="anim" style="background: indigo; padding: 8px; width: 50px; height: 50px; position: absolute; left: 75%;">A</div>
</section>
</section>
</div>
</div>

View File

@@ -126,7 +126,7 @@
<script>
// Full list of configuration options:
// https://revealjs.netlify.app/config/
// https://revealjs.revealjs.com/config/
Reveal.initialize({
center: true,

View File

@@ -22,11 +22,31 @@
<section>
<h2>Layout Helper Examples</h2>
<ul>
<li><a href="#/fit-text">Big Text</a></li>
<li><a href="#/stretch">Stretch</a></li>
<li><a href="#/stack">Stack</a></li>
<li><a href="#/hstack">HStack</a></li>
<li><a href="#/vstack">VStack</a></li>
</ul>
</section>
<section id="fit-text">
<h2>Fit Text</h2>
<p>Resizes text to be as large as possible within its container.</p>
<pre><code class="html" data-trim data-line-numbers>
<h2 class="r-fit-text">FIT</h2>
</code></pre>
</section>
<section>
<h2 class="r-fit-text">FIT</h2>
</section>
<section>
<h2 class="r-fit-text">HELLO WORLD</h2>
<h2 class="r-fit-text">BOTH THESE TITLES USE FIT-TEXT</h2>
</section>
<section id="stretch">
<h2>Stretch</h2>
<p>Makes an element as tall as possible while remaining within the slide bounds.</p>
@@ -57,6 +77,12 @@
<section>
<h2>Stack Example</h2>
<div class="r-stack">
<p class="fragment fade-in-then-out">One</p>
<p class="fragment fade-in-then-out">Two</p>
<p class="fragment fade-in-then-out">Three</p>
<p class="fragment fade-in-then-out">Four</p>
</div>
<div class="r-stack">
<img src="https://placekitten.com/450/300" width="450" height="300" class="fragment">
<img src="https://placekitten.com/300/450" width="300" height="450" class="fragment">
@@ -66,11 +92,53 @@
<section>
<h2>Stack Example</h2>
<p>One at a time.</p>
<p>fade-in-then-out fragments</p>
<div class="r-stack">
<img src="https://placekitten.com/450/300" width="450" height="300" class="fragment fade-out" data-fragment-index="0">
<img src="https://placekitten.com/300/450" width="300" height="450" class="fragment current-visible" data-fragment-index="0">
<img src="https://placekitten.com/400/400" width="400" height="400" class="fragment">
<img src="https://placekitten.com/450/300" width="450" height="300" class="fragment fade-in-then-out">
<img src="https://placekitten.com/300/450" width="300" height="450" class="fragment fade-in-then-out">
<img src="https://placekitten.com/400/400" width="400" height="400" class="fragment fade-in-then-out">
</div>
</section>
<section id="hstack">
<h2>HStack</h2>
<p>Stacks multiple elements horizontally.</p>
<pre><code class="html" data-trim data-line-numbers>
<div class="r-hstack">
&lt;img width="450" height="300" src="..."&gt;
&lt;img width="300" height="450" src="..."&gt;
&lt;img width="400" height="400" src="..."&gt;
</div>
</code></pre>
</section>
<section data-auto-animate>
<h2>HStack Example</h2>
<div class="r-hstack">
<p style="padding: 0.50em; background: #eee; margin: 0.25em">One</p>
<p style="padding: 0.75em; background: #eee; margin: 0.25em">Two</p>
<p style="padding: 1.00em; background: #eee; margin: 0.25em">Three</p>
</div>
</section>
<section id="vstack">
<h2>VStack</h2>
<p>Stacks multiple elements vertically.</p>
<pre><code class="html" data-trim data-line-numbers>
<div class="r-vstack">
&lt;img width="450" height="300" src="..."&gt;
&lt;img width="300" height="450" src="..."&gt;
&lt;img width="400" height="400" src="..."&gt;
</div>
</code></pre>
</section>
<section data-auto-animate>
<h2>VStack Example</h2>
<div class="r-vstack">
<p style="padding: 0.50em; background: #eee; margin: 0.25em">One</p>
<p style="padding: 0.75em; background: #eee; margin: 0.25em">Two</p>
<p style="padding: 1.00em; background: #eee; margin: 0.25em">Three</p>
</div>
</section>

View File

@@ -21,8 +21,8 @@
<!-- Use external markdown resource, separate slides by three newlines; vertical slides by two newlines -->
<section data-markdown="markdown.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
<!-- Slides are separated by three dashes (quick 'n dirty regular expression) -->
<section data-markdown data-separator="---">
<!-- Slides are separated by three dashes (the default) -->
<section data-markdown>
<script type="text/template">
## Demo 1
Slide 1
@@ -35,7 +35,7 @@
</script>
</section>
<!-- Slides are separated by newline + three dashes + newline, vertical slides identical but two dashes -->
<!-- Slides are separated by regexp matching newline + three dashes + newline, vertical slides identical but two dashes -->
<section data-markdown data-separator="^\n---\n$" data-separator-vertical="^\n--\n$">
<script type="text/template">
## Demo 2
@@ -53,8 +53,8 @@
</script>
</section>
<!-- No "extra" slides, since there are no separators defined (so they'll become horizontal rulers) -->
<section data-markdown>
<!-- No "extra" slides, since the separator can't be matched ("---" will become horizontal rulers) -->
<section data-markdown data-separator="$x">
<script type="text/template">
A
@@ -99,6 +99,25 @@
</script>
</section>
<!-- add optional line count offset, in this case 287 -->
<section data-markdown>
<script type="text/template">
## echo.c
```c [287: 2|4,6]
/* All of the options in this arg are valid, so handle them. */
p = arg + 1;
do {
if (*p == 'n')
nflag = 0;
if (*p == 'e')
eflag = '\\';
} while (*++p);
```
[source](https://git.busybox.net/busybox/tree/coreutils/echo.c?h=1_36_stable#n287)
</script>
</section>
<!-- Images -->
<section data-markdown>
<script type="text/template">
@@ -106,6 +125,16 @@
</script>
</section>
<!-- Math -->
<section data-markdown>
## The Lorenz Equations
`\[\begin{aligned}
\dot{x} &amp; = \sigma(y-x) \\
\dot{y} &amp; = \rho x - y - xz \\
\dot{z} &amp; = -\beta z + xy
\end{aligned} \]`
</section>
</div>
</div>
@@ -113,6 +142,7 @@
<script src="../plugin/markdown/markdown.js"></script>
<script src="../plugin/highlight/highlight.js"></script>
<script src="../plugin/notes/notes.js"></script>
<script src="../plugin/math/math.js"></script>
<script>
@@ -122,7 +152,7 @@
history: true,
center: true,
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes, RevealMath.KaTeX ]
});
</script>

View File

@@ -31,6 +31,11 @@ Content 3.1
Content 3.2
## External 3.3
## External 3.3 (Image)
![External Image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png)
## External 3.4 (Math)
`\[ J(\theta_0,\theta_1) = \sum_{i=0} \]`

View File

@@ -20,7 +20,7 @@
<section>
<h2>reveal.js Math Plugin</h2>
<p>A thin wrapper for MathJax</p>
<p>Render math with KaTeX, MathJax 2 or MathJax 3</p>
</section>
<section>
@@ -176,13 +176,13 @@
</div>
<script src="../dist/reveal.js"></script>
<script src="../plugin/math/math.js"></script>
<script>
Reveal.initialize({
history: true,
transition: 'linear',
math: {
// mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
mathjax2: {
config: 'TeX-AMS_HTML-full',
TeX: {
Macros: {
@@ -192,9 +192,13 @@
}
},
dependencies: [
{ src: '../plugin/math/math.js', async: true }
]
// There are three typesetters available
// RevealMath.MathJax2 (default)
// RevealMath.MathJax3
// RevealMath.KaTeX
//
// More info at https://revealjs.com/math/
plugins: [ RevealMath.MathJax2 ]
});
</script>

View File

@@ -31,11 +31,32 @@
<h2 style="color: #fff;">Iframe Background</h2>
</section>
<section>
<h2>Video</h2>
<video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" data-autoplay></video>
</section>
<section data-background-video="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4">
<h2>Background Video</h2>
</section>
<section>
<h2>Auto-playing audio</h2>
<audio src="assets/beeping.wav" data-autoplay></audio>
</section>
<section>
<h2>Audio inside slide fragments</h2>
<div class="fragment">
Beep 1
<audio src="assets/beeping.wav" data-autoplay></audio>
</div>
<div class="fragment">
Beep 2
<audio src="assets/beeping.wav" data-autoplay></audio>
</div>
</section>
<section>
<h2>Audio with controls</h2>
<audio src="assets/beeping.wav" controls></audio>
@@ -47,9 +68,7 @@
<script src="../dist/reveal.js"></script>
<script>
Reveal.initialize({
transition: 'linear'
});
Reveal.initialize({hash: true});
</script>
</body>

View File

@@ -0,0 +1,144 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - Ligthbox</title>
<link rel="stylesheet" href="../dist/reveal.css">
<link rel="stylesheet" href="../dist/theme/black.css" id="theme">
<style>
.reveal {
font-size: 24px;
}
.reveal figure {
margin: 0 0 1rem 0;
text-align: left;
}
.reveal figure img,
.reveal figure video {
margin: 0.25rem 0 0 0;
}
figcaption, a {
font-size: 16px;
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h2>Preview Overlays</h2>
<div class="r-hstack items-start">
<div class="r-vstack items-start">
<h5>Images</h5>
<figure>
<figcaption>Preview with default settings:</figcaption>
<img height="50" src="https://static.slid.es/images/alphabet/v1/a.png" data-preview-image>
</figure>
<figure>
<figcaption>Preview with data-preview-fit="contain"</figcaption>
<img height="50" src="https://static.slid.es/images/alphabet/v1/a.png" data-preview-image data-preview-fit="contain">
</figure>
<figure>
<figcaption>Preview with data-preview-fit="cover"</figcaption>
<img height="50" src="https://static.slid.es/images/alphabet/v1/a.png" data-preview-image data-preview-fit="cover">
</figure>
<figure>
<figcaption>Preview another image (c)</figcaption>
<img height="50" src="https://static.slid.es/images/alphabet/v1/b.png" data-preview-image="https://static.slid.es/images/alphabet/v1/c.png">
</figure>
<a href="#" data-preview-image="https://static.slid.es/images/alphabet/v1/x.png">
Preview image from a link.
</a>
</div>
<div style="width: 1px; height: 30vh; margin: 0 3rem;background-color: #999;"></div>
<div class="r-vstack items-start">
<h5>Videos</h5>
<figure>
<figcaption>Preview video</figcaption>
<img height="50" src="https://static.slid.es/images/alphabet/v1/x.png" data-preview-video="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4">
</figure>
<figure>
<figcaption>Preview video</figcaption>
<video height="50" src="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4" data-preview-video></video>
</figure>
<a href="#" data-preview-video="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4">
Preview video from a link.
</a>
</div>
<div style="width: 1px; height: 30vh; margin: 0 3rem;background-color: #999;"></div>
<div class="r-vstack items-start">
<h5>Iframes</h5>
<a href="https://hakim.se">https://hakim.se | data-preview-link</a>
<a data-preview-link href="https://hakim.se">https://hakim.se | data-preview-link</a>
<br />
<a data-preview-link="false" href="https://hakim.se">https://hakim.se | data-preview-link=false</a>
<br />
<figure>
<figcaption>Preview link from an image</figcaption>
<img height="50" src="https://static.slid.es/images/alphabet/v1/a.png" data-preview-link="https://hakim.se">
</figure>
</div>
</div>
</section>
<section style="text-align: left;">
<h2>Lightbox</h2>
<div class="r-hstack items-start justify-start">
<div class="r-vstack items-start">
<h5>Images</h5>
<figure>
<img height="100" src="https://static.slid.es/images/alphabet/v1/a.png" data-preview-image data-preview-fit="contain">
</figure>
</div>
<div style="width: 1px; height: 20vh; margin: 0 3rem;background-color: #222;"></div>
<div class="r-vstack items-start">
<h5>Videos</h5>
<figure>
<video height="100" src="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4" data-preview-video></video>
</figure>
</div>
<div style="width: 1px; height: 20vh; margin: 0 3rem;background-color: #222;"></div>
<div class="r-vstack items-start">
<h5>Iframes</h5>
<a style="font-size: 28px;" data-preview-link href="https://hakim.se">https://hakim.se</a>
</div>
</div>
</section>
</div>
</div>
<script src="../dist/reveal.js"></script>
<script>
Reveal.initialize({
previewLinks: false,
width: 1280,
height: 720
});
</script>
</body>
</html>

120
examples/scroll.html Normal file
View File

@@ -0,0 +1,120 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - Scroll View</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="../dist/reset.css">
<link rel="stylesheet" href="../dist/reveal.css">
<link rel="stylesheet" href="../dist/theme/black.css" id="theme">
<link rel="stylesheet" href="../plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section><h1>Scroll View</h1></section>
<section data-background="indigo">
<h2>Scroll triggered fragments</h2>
<ul>
<li class="fragment fade-left">Step one</li>
<li class="fragment fade-left">Step two</li>
<li class="fragment fade-left">Step three</li>
</ul>
</section>
<section data-background-color="#fff"><h2>Scrollbar inverts<br>based on slide bg</h2></section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<h2>Auto-Animate</h2>
<p>Scroll triggered auto-animations 😍</p>
<div class="r-hstack justify-center">
<div data-id="box1" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
<div data-id="box2" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
<div data-id="box3" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
</div>
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<div class="r-hstack justify-center">
<div data-id="box1" data-auto-animate-delay="0" style="background: cyan; width: 150px; height: 100px; margin: 10px;"></div>
<div data-id="box2" data-auto-animate-delay="0.1" style="background: magenta; width: 150px; height: 100px; margin: 10px;"></div>
<div data-id="box3" data-auto-animate-delay="0.2" style="background: yellow; width: 150px; height: 100px; margin: 10px;"></div>
</div>
<h2 style="margin-top: 20px;">Auto-Animate</h2>
</section>
<section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
<div class="r-stack">
<div data-id="box1" style="background: cyan; width: 300px; height: 300px; border-radius: 200px;"></div>
<div data-id="box2" style="background: magenta; width: 200px; height: 200px; border-radius: 200px;"></div>
<div data-id="box3" style="background: yellow; width: 100px; height: 100px; border-radius: 200px;"></div>
</div>
<h2 style="margin-top: 20px;">Auto-Animate</h2>
</section>
<section data-background-gradient="linear-gradient(to bottom, #283b95, #17b2c3)" id="gradient-bg">
<h2 data-id="code-title">Code highlights,<br />meet scroll triggers</h2>
<pre data-id="code-animation"><code class="hljs javascript" data-trim data-line-numbers="|4,8-11|17|22-24"><script type="text/template">
import React, { useState } from 'react';
function Example() {
const [count, setCount] = useState(0);
return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
</button>
</div>
);
}
function SecondExample() {
const [count, setCount] = useState(0);
return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
</button>
</div>
);
}
</script></code></pre>
</section>
<section class="stack">
<section data-background="https://static.slid.es/reveal/image-placeholder.png" id="image-bg">
<h2>Image Backgrounds</h2>
</section>
<section data-background-video-muted 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">
<div style="background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px;">
<h2>Video background</h2>
</div>
</section>
</section>
<section><h2>The end</h2></section>
</div>
</div>
<script src="../dist/reveal.js"></script>
<script src="../plugin/notes/notes.js"></script>
<script src="../plugin/markdown/markdown.js"></script>
<script src="../plugin/highlight/highlight.js"></script>
<script>
Reveal.initialize({
view: 'scroll',
hash: true,
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
});
</script>
</body>
</html>

View File

@@ -1,21 +1,20 @@
const fs = require('fs');
const pkg = require('./package.json')
const path = require('path')
const glob = require('glob')
const yargs = require('yargs')
const colors = require('colors')
const through = require('through2');
const qunit = require('node-qunit-puppeteer')
const {rollup} = require('rollup')
const {terser} = require('rollup-plugin-terser')
const babel = require('rollup-plugin-babel')
const terser = require('@rollup/plugin-terser')
const babel = require('@rollup/plugin-babel').default
const commonjs = require('@rollup/plugin-commonjs')
const resolve = require('@rollup/plugin-node-resolve')
const resolve = require('@rollup/plugin-node-resolve').default
const sass = require('sass')
const gulp = require('gulp')
const tap = require('gulp-tap')
const zip = require('gulp-zip')
const sass = require('gulp-sass')
const header = require('gulp-header')
const header = require('gulp-header-comment')
const eslint = require('gulp-eslint')
const minify = require('gulp-clean-css')
const connect = require('gulp-connect')
@@ -23,68 +22,79 @@ const autoprefixer = require('gulp-autoprefixer')
const root = yargs.argv.root || '.'
const port = yargs.argv.port || 8000
const host = yargs.argv.host || 'localhost'
const banner = `/*!
* reveal.js ${pkg.version} (${new Date().toDateString()})
* ${pkg.homepage}
* MIT licensed
*
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se
*/\n`
const cssLicense = `
reveal.js ${pkg.version}
${pkg.homepage}
MIT licensed
Copyright (C) 2011-2024 Hakim El Hattab, https://hakim.se
`;
const jsLicense = `/*!
* reveal.js ${pkg.version}
* ${pkg.homepage}
* MIT licensed
*
* Copyright (C) 2011-2024 Hakim El Hattab, https://hakim.se
*/\n`;
// Prevents warnings from opening too many test pages
process.setMaxListeners(20);
const babelConfig = {
exclude: 'node_modules/**',
babelHelpers: 'bundled',
ignore: ['node_modules'],
compact: false,
extensions: ['.js', '.html'],
plugins: ['transform-html-import-to-string'],
plugins: [
'transform-html-import-to-string'
],
presets: [[
'@babel/preset-env',
{
corejs: 3,
useBuiltIns: 'entry',
useBuiltIns: 'usage',
modules: false
}
]]
};
const rollupConfig = {
plugins: [
babel( babelConfig ),
resolve(),
commonjs(),
terser()
]
};
// Our ES module bundle only needs to support modern
// browser features
// Our ES module bundle only targets newer browsers with
// module support. Browsers are targeted explicitly instead
// of using the "esmodule: true" target since that leads to
// polyfilling older browsers and a larger bundle.
const babelConfigESM = JSON.parse( JSON.stringify( babelConfig ) );
babelConfigESM.presets[0][1].targets = { esmodules: true };
babelConfigESM.presets[0][1].targets = { browsers: [
'last 2 Chrome versions',
'last 2 Safari versions',
'last 2 iOS versions',
'last 2 Firefox versions',
'last 2 Edge versions',
] };
const rollupConfigESM = {
plugins: [
babel( babelConfigESM ),
resolve(),
commonjs(),
terser()
]
};
let cache = {};
// Creates a bundle with broad browser support, exposed
// as UMD
gulp.task('js-es5', () => {
return rollup({
cache: cache.umd,
input: 'js/index.js',
...rollupConfig
plugins: [
resolve(),
commonjs(),
babel( babelConfig ),
terser()
]
}).then( bundle => {
cache.umd = bundle.cache;
return bundle.write({
name: 'Reveal',
file: './dist/reveal.js',
format: 'umd',
banner: banner,
banner: jsLicense,
sourcemap: true
});
});
@@ -93,13 +103,20 @@ gulp.task('js-es5', () => {
// Creates an ES module bundle
gulp.task('js-es6', () => {
return rollup({
cache: cache.esm,
input: 'js/index.js',
...rollupConfigESM
plugins: [
resolve(),
commonjs(),
babel( babelConfigESM ),
terser()
]
}).then( bundle => {
cache.esm = bundle.cache;
return bundle.write({
file: './dist/reveal.esm.js',
format: 'es',
banner: banner,
banner: jsLicense,
sourcemap: true
});
});
@@ -118,9 +135,19 @@ gulp.task('plugins', () => {
{ name: 'RevealMath', input: './plugin/math/plugin.js', output: './plugin/math/math' },
].map( plugin => {
return rollup({
cache: cache[plugin.input],
input: plugin.input,
...rollupConfig
plugins: [
resolve(),
commonjs(),
babel({
...babelConfig,
ignore: [/node_modules\/(?!(highlight\.js|marked)\/).*/],
}),
terser()
]
}).then( bundle => {
cache[plugin.input] = bundle.cache;
bundle.write({
file: plugin.output + '.esm.js',
name: plugin.name,
@@ -136,15 +163,37 @@ gulp.task('plugins', () => {
} ));
})
// a custom pipeable step to transform Sass to CSS
function compileSass() {
return through.obj( ( vinylFile, encoding, callback ) => {
const transformedFile = vinylFile.clone();
sass.render({
silenceDeprecations: ['legacy-js-api'],
data: transformedFile.contents.toString(),
file: transformedFile.path,
}, ( err, result ) => {
if( err ) {
callback(err);
}
else {
transformedFile.extname = '.css';
transformedFile.contents = result.css;
callback( null, transformedFile );
}
});
});
}
gulp.task('css-themes', () => gulp.src(['./css/theme/source/*.{sass,scss}'])
.pipe(sass())
.pipe(compileSass())
.pipe(gulp.dest('./dist/theme')))
gulp.task('css-core', () => gulp.src(['css/reveal.scss'])
.pipe(sass())
.pipe(compileSass())
.pipe(autoprefixer())
.pipe(minify({compatibility: 'ie9'}))
.pipe(header(banner))
.pipe(header(cssLicense))
.pipe(gulp.dest('./dist')))
gulp.task('css', gulp.parallel('css-themes', 'css-core'))
@@ -154,7 +203,7 @@ gulp.task('qunit', () => {
let serverConfig = {
root,
port: 8009,
host: '0.0.0.0',
host: 'localhost',
name: 'test-server'
}
@@ -171,7 +220,7 @@ gulp.task('qunit', () => {
targetUrl: `http://${serverConfig.host}:${serverConfig.port}/${filename}`,
timeout: 20000,
redirectConsole: false,
puppeteerArgs: ['--allow-file-access-from-files']
puppeteerArgs: ['--allow-file-access-from-files', '--no-sandbox']
})
.then(result => {
if( result.stats.failed > 0 ) {
@@ -226,42 +275,57 @@ gulp.task('default', gulp.series(gulp.parallel('js', 'css', 'plugins'), 'test'))
gulp.task('build', gulp.parallel('js', 'css', 'plugins'))
gulp.task('package', gulp.series('default', () =>
gulp.task('package', gulp.series(async () => {
gulp.src([
let dirs = [
'./index.html',
'./dist/**',
'./lib/**',
'./images/**',
'./plugin/**',
'./**.md'
]).pipe(zip('reveal-js-presentation.zip')).pipe(gulp.dest('./'))
'./*/*.md'
];
))
if (fs.existsSync('./lib')) dirs.push('./lib/**');
if (fs.existsSync('./images')) dirs.push('./images/**');
if (fs.existsSync('./slides')) dirs.push('./slides/**');
return gulp.src( dirs, { base: './', encoding: false } )
.pipe(zip('reveal-js-presentation.zip')).pipe(gulp.dest('./'))
}))
gulp.task('reload', () => gulp.src(['index.html'])
.pipe(connect.reload()));
gulp.task('serve', () => {
connect.server({
root: root,
port: port,
host: '0.0.0.0',
host: host,
livereload: true
})
gulp.watch(['js/**'], gulp.series('js', 'test'))
const slidesRoot = root.endsWith('/') ? root : root + '/'
gulp.watch([
slidesRoot + '**/*.html',
slidesRoot + '**/*.md',
`!${slidesRoot}**/node_modules/**`, // ignore node_modules
], gulp.series('reload'))
gulp.watch(['plugin/**/plugin.js'], gulp.series('plugins'))
gulp.watch(['js/**'], gulp.series('js', 'reload', 'eslint'))
gulp.watch(['test/*.html'], gulp.series('test'))
gulp.watch(['plugin/**/plugin.js', 'plugin/**/*.html'], gulp.series('plugins', 'reload'))
gulp.watch([
'css/theme/source/*.{sass,scss}',
'css/theme/source/**/*.{sass,scss}',
'css/theme/template/*.{sass,scss}',
], gulp.series('css-themes'))
], gulp.series('css-themes', 'reload'))
gulp.watch([
'css/*.scss',
'css/print/*.{sass,scss,css}'
], gulp.series('css-core'))
], gulp.series('css-core', 'reload'))
})
gulp.watch(['test/*.html'], gulp.series('test'))
})

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
@@ -8,10 +8,10 @@
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/black.css" id="theme">
<link rel="stylesheet" href="dist/theme/black.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css" id="highlight-theme">
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
@@ -27,12 +27,12 @@
<script src="plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.netlify.app/initialization/
// - https://revealjs.netlify.app/config/
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.netlify.app/plugins/
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
});
</script>

View File

@@ -15,7 +15,10 @@ export default {
minScale: 0.2,
maxScale: 2.0,
// Display presentation control arrows
// Display presentation control arrows.
// - true: Display controls on all screens
// - false: Hide controls on all screens
// - "speaker-only": Only display controls in the speaker view
controls: true,
// Help the user learn the controls by providing hints, for example by
@@ -65,16 +68,19 @@ export default {
// Flags if we should monitor the hash and change slides accordingly
respondToHashChanges: true,
// Enable support for jump-to-slide navigation shortcuts
jumpToSlide: true,
// Push each slide change to the browser history. Implies `hash: true`
history: false,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Optional function that blocks keyboard events when retuning false
// Optional function that blocks keyboard events when returning false
//
// If you set this to 'foucsed', we will only capture keyboard events
// for embdedded decks when they are in focus
// If you set this to 'focused', we will only capture keyboard events
// for embedded decks when they are in focus
keyboardCondition: null,
// Disables the default reveal.js slide layout (scaling and centering)
@@ -146,7 +152,10 @@ export default {
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Global override for autolaying embedded media (video/audio/iframe)
// Flags if slides with data-visibility="hidden" should be kep visible
showHiddenSlides: false,
// Global override for autoplaying embedded media (video/audio/iframe)
// - null: Media will only autoplay if data-autoplay is present
// - true: All media will autoplay, regardless of individual setting
// - false: No media will autoplay, regardless of individual setting
@@ -250,6 +259,36 @@ export default {
parallaxBackgroundHorizontal: null,
parallaxBackgroundVertical: null,
// Can be used to initialize reveal.js in one of the following views:
// - print: Render the presentation so that it can be printed to PDF
// - scroll: Show the presentation as a tall scrollable page with scroll
// triggered animations
view: null,
// Adjusts the height of each slide in the scroll view.
// - full: Each slide is as tall as the viewport
// - compact: Slides are as small as possible, allowing multiple slides
// to be visible in parallel on tall devices
scrollLayout: 'full',
// Control how scroll snapping works in the scroll view.
// - false: No snapping, scrolling is continuous
// - proximity: Snap when close to a slide
// - mandatory: Always snap to the closest slide
//
// Only applies to presentations in scroll view.
scrollSnap: 'mandatory',
// Enables and configure the scroll view progress bar.
// - 'auto': Show the scrollbar while scrolling, hide while idle
// - true: Always show the scrollbar
// - false: Never show the scrollbar
scrollProgress: 'auto',
// Automatically activate the scroll view when we the viewport falls
// below the given width.
scrollActivationWidth: 435,
// The maximum number of pages a single slide can expand onto when printing
// to PDF, unlimited by default
pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY,
@@ -281,6 +320,10 @@ export default {
// Time before the cursor is hidden (in ms)
hideCursorTime: 5000,
// Should we automatically sort and set indices for fragments
// at each sync? (See Reveal.sync)
sortFragmentsOnSync: true,
// Script dependencies to load
dependencies: [],

View File

@@ -1,6 +1,9 @@
import { queryAll, extend, createStyleSheet } from '../utils/util.js'
import { queryAll, extend, createStyleSheet, matches, closest } from '../utils/util.js'
import { FRAGMENT_STYLE_REGEX } from '../utils/constants.js'
// Counter used to generate unique IDs for auto-animated elements
let autoAnimateCounter = 0;
/**
* Automatically animates matching elements across
* slides with the [data-auto-animate] attribute.
@@ -11,9 +14,6 @@ export default class AutoAnimate {
this.Reveal = Reveal;
// Counter used to generate unique IDs for auto-animated elements
this.autoAnimateCounter = 0;
}
/**
@@ -27,8 +27,19 @@ export default class AutoAnimate {
// Clean up after prior animations
this.reset();
// Ensure that both slides are auto-animate targets
if( fromSlide.hasAttribute( 'data-auto-animate' ) && toSlide.hasAttribute( 'data-auto-animate' ) ) {
let allSlides = this.Reveal.getSlides();
let toSlideIndex = allSlides.indexOf( toSlide );
let fromSlideIndex = allSlides.indexOf( fromSlide );
// Ensure that;
// 1. Both slides exist.
// 2. Both slides are auto-animate targets with the same
// data-auto-animate-id value (including null if absent on both).
// 3. data-auto-animate-restart isn't set on the physically latter
// slide (independent of slide direction).
if( fromSlide && toSlide && fromSlide.hasAttribute( 'data-auto-animate' ) && toSlide.hasAttribute( 'data-auto-animate' )
&& fromSlide.getAttribute( 'data-auto-animate-id' ) === toSlide.getAttribute( 'data-auto-animate-id' )
&& !( toSlideIndex > fromSlideIndex ? toSlide : fromSlide ).hasAttribute( 'data-auto-animate-restart' ) ) {
// Create a new auto-animate sheet
this.autoAnimateStyleSheet = this.autoAnimateStyleSheet || createStyleSheet();
@@ -40,14 +51,21 @@ export default class AutoAnimate {
toSlide.dataset.autoAnimate = 'pending';
// Flag the navigation direction, needed for fragment buildup
let allSlides = this.Reveal.getSlides();
animationOptions.slideDirection = allSlides.indexOf( toSlide ) > allSlides.indexOf( fromSlide ) ? 'forward' : 'backward';
animationOptions.slideDirection = toSlideIndex > fromSlideIndex ? 'forward' : 'backward';
// If the from-slide is hidden because it has moved outside
// the view distance, we need to temporarily show it while
// measuring
let fromSlideIsHidden = fromSlide.style.display === 'none';
if( fromSlideIsHidden ) fromSlide.style.display = this.Reveal.getConfig().display;
// Inject our auto-animate styles for this transition
let css = this.getAutoAnimatableElements( fromSlide, toSlide ).map( elements => {
return this.autoAnimateElements( elements.from, elements.to, elements.options || {}, animationOptions, this.autoAnimateCounter++ );
return this.autoAnimateElements( elements.from, elements.to, elements.options || {}, animationOptions, autoAnimateCounter++ );
} );
if( fromSlideIsHidden ) fromSlide.style.display = 'none';
// Animate unmatched elements, if enabled
if( toSlide.dataset.autoAnimateUnmatched !== 'false' && this.Reveal.getConfig().autoAnimateUnmatched === true ) {
@@ -63,7 +81,7 @@ export default class AutoAnimate {
// If there is a duration or delay set specifically for this
// element our unmatched elements should adhere to those
if( unmatchedOptions.duration !== animationOptions.duration || unmatchedOptions.delay !== animationOptions.delay ) {
id = 'unmatched-' + this.autoAnimateCounter++;
id = 'unmatched-' + autoAnimateCounter++;
css.push( `[data-auto-animate="running"] [data-auto-animate-target="${id}"] { transition: opacity ${unmatchedOptions.duration}s ease ${unmatchedOptions.delay}s; }` );
}
@@ -160,28 +178,12 @@ export default class AutoAnimate {
let fromProps = this.getAutoAnimatableProperties( 'from', from, elementOptions ),
toProps = this.getAutoAnimatableProperties( 'to', to, elementOptions );
// Maintain fragment visibility for matching elements when
// we're navigating forwards, this way the viewer won't need
// to step through the same fragments twice
if( to.classList.contains( 'fragment' ) ) {
// Don't auto-animate the opacity of fragments to avoid
// conflicts with fragment animations
delete toProps.styles['opacity'];
if( from.classList.contains( 'fragment' ) ) {
let fromFragmentStyle = ( from.className.match( FRAGMENT_STYLE_REGEX ) || [''] )[0];
let toFragmentStyle = ( to.className.match( FRAGMENT_STYLE_REGEX ) || [''] )[0];
// Only skip the fragment if the fragment animation style
// remains unchanged
if( fromFragmentStyle === toFragmentStyle && animationOptions.slideDirection === 'forward' ) {
to.classList.add( 'visible', 'disabled' );
}
}
}
// If translation and/or scaling are enabled, css transform
@@ -299,8 +301,8 @@ export default class AutoAnimate {
options = extend( options, inheritedOptions );
// Inherit options from parent elements
if( element.closest && element.parentNode ) {
let autoAnimatedParent = element.parentNode.closest( '[data-auto-animate-target]' );
if( element.parentNode ) {
let autoAnimatedParent = closest( element.parentNode, '[data-auto-animate-target]' );
if( autoAnimatedParent ) {
options = this.getAutoAnimateOptions( autoAnimatedParent, options );
}
@@ -384,7 +386,14 @@ export default class AutoAnimate {
value = { value: style.to, explicitValue: true };
}
else {
value = computedStyles[style.property];
// Use a unitless value for line-height so that it inherits properly
if( style.property === 'line-height' ) {
value = parseFloat( computedStyles['line-height'] ) / parseFloat( computedStyles['font-size'] );
}
if( isNaN(value) ) {
value = computedStyles[style.property];
}
}
if( value !== '' ) {
@@ -439,14 +448,14 @@ export default class AutoAnimate {
const textNodes = 'h1, h2, h3, h4, h5, h6, p, li';
const mediaNodes = 'img, video, iframe';
// Eplicit matches via data-id
// Explicit matches via data-id
this.findAutoAnimateMatches( pairs, fromSlide, toSlide, '[data-id]', node => {
return node.nodeName + ':::' + node.getAttribute( 'data-id' );
} );
// Text
this.findAutoAnimateMatches( pairs, fromSlide, toSlide, textNodes, node => {
return node.nodeName + ':::' + node.innerText;
return node.nodeName + ':::' + node.textContent.trim();
} );
// Media
@@ -456,18 +465,17 @@ export default class AutoAnimate {
// Code
this.findAutoAnimateMatches( pairs, fromSlide, toSlide, codeNodes, node => {
return node.nodeName + ':::' + node.innerText;
return node.nodeName + ':::' + node.textContent.trim();
} );
pairs.forEach( pair => {
// Disable scale transformations on text nodes, we transiition
// Disable scale transformations on text nodes, we transition
// each individual text property instead
if( pair.from.matches( textNodes ) ) {
if( matches( pair.from, textNodes ) ) {
pair.options = { scale: false };
}
// Animate individual lines of code
else if( pair.from.matches( codeNodes ) ) {
else if( matches( pair.from, codeNodes ) ) {
// Transition the code block's width and height instead of scaling
// to prevent its content from being squished
@@ -483,7 +491,7 @@ export default class AutoAnimate {
} );
// Line numbers
this.findAutoAnimateMatches( pairs, pair.from, pair.to, '.hljs .hljs-ln-line[data-line-number]', node => {
this.findAutoAnimateMatches( pairs, pair.from, pair.to, '.hljs .hljs-ln-numbers[data-line-number]', node => {
return node.getAttribute( 'data-line-number' );
}, {
scale: false,
@@ -552,14 +560,14 @@ export default class AutoAnimate {
// Retrieve the 'from' element
if( fromMatches[key] ) {
const pimaryIndex = toMatches[key].length - 1;
const primaryIndex = toMatches[key].length - 1;
const secondaryIndex = fromMatches[key].length - 1;
// If there are multiple identical from elements, retrieve
// the one at the same index as our to-element.
if( fromMatches[key][ pimaryIndex ] ) {
fromElement = fromMatches[key][ pimaryIndex ];
fromMatches[key][ pimaryIndex ] = null;
if( fromMatches[key][ primaryIndex ] ) {
fromElement = fromMatches[key][ primaryIndex ];
fromMatches[key][ primaryIndex ] = null;
}
// If there are no matching from-elements at the same index,
// use the last one.
@@ -587,7 +595,7 @@ export default class AutoAnimate {
* fading of unmatched elements is turned on, these elements
* will fade when going between auto-animate slides.
*
* Note that parents of auto-animate targets are NOT considerd
* Note that parents of auto-animate targets are NOT considered
* unmatched since fading them would break the auto-animation.
*
* @param {HTMLElement} rootElement
@@ -616,4 +624,4 @@ export default class AutoAnimate {
}
}
}

View File

@@ -27,8 +27,6 @@ export default class Backgrounds {
*/
create() {
let printMode = this.Reveal.isPrintingPDF();
// Clear prior backgrounds
this.element.innerHTML = '';
this.element.classList.add( 'no-transition' );
@@ -114,9 +112,25 @@ export default class Backgrounds {
*/
sync( slide ) {
let element = slide.slideBackgroundElement,
const element = slide.slideBackgroundElement,
contentElement = slide.slideBackgroundContentElement;
const data = {
background: slide.getAttribute( 'data-background' ),
backgroundSize: slide.getAttribute( 'data-background-size' ),
backgroundImage: slide.getAttribute( 'data-background-image' ),
backgroundVideo: slide.getAttribute( 'data-background-video' ),
backgroundIframe: slide.getAttribute( 'data-background-iframe' ),
backgroundColor: slide.getAttribute( 'data-background-color' ),
backgroundGradient: slide.getAttribute( 'data-background-gradient' ),
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
backgroundPosition: slide.getAttribute( 'data-background-position' ),
backgroundTransition: slide.getAttribute( 'data-background-transition' ),
backgroundOpacity: slide.getAttribute( 'data-background-opacity' ),
};
const dataPreload = slide.hasAttribute( 'data-preload' );
// Reset the prior background state in case this is not the
// initial sync
slide.classList.remove( 'has-dark-background' );
@@ -135,22 +149,9 @@ export default class Backgrounds {
contentElement.style.opacity = '';
contentElement.innerHTML = '';
let data = {
background: slide.getAttribute( 'data-background' ),
backgroundSize: slide.getAttribute( 'data-background-size' ),
backgroundImage: slide.getAttribute( 'data-background-image' ),
backgroundVideo: slide.getAttribute( 'data-background-video' ),
backgroundIframe: slide.getAttribute( 'data-background-iframe' ),
backgroundColor: slide.getAttribute( 'data-background-color' ),
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
backgroundPosition: slide.getAttribute( 'data-background-position' ),
backgroundTransition: slide.getAttribute( 'data-background-transition' ),
backgroundOpacity: slide.getAttribute( 'data-background-opacity' )
};
if( data.background ) {
// Auto-wrap image urls in url(...)
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test( data.background ) ) {
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp|webp)([?#\s]|$)/gi.test( data.background ) ) {
slide.setAttribute( 'data-background-image', data.background );
}
else {
@@ -161,13 +162,14 @@ export default class Backgrounds {
// Create a hash for this combination of background settings.
// This is used to determine when two slide backgrounds are
// the same.
if( data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo || data.backgroundIframe ) {
if( data.background || data.backgroundColor || data.backgroundGradient || data.backgroundImage || data.backgroundVideo || data.backgroundIframe ) {
element.setAttribute( 'data-background-hash', data.background +
data.backgroundSize +
data.backgroundImage +
data.backgroundVideo +
data.backgroundIframe +
data.backgroundColor +
data.backgroundGradient +
data.backgroundRepeat +
data.backgroundPosition +
data.backgroundTransition +
@@ -177,9 +179,10 @@ export default class Backgrounds {
// Additional and optional background properties
if( data.backgroundSize ) element.setAttribute( 'data-background-size', data.backgroundSize );
if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor;
if( data.backgroundGradient ) element.style.backgroundImage = data.backgroundGradient;
if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition );
if( slide.hasAttribute( 'data-preload' ) ) element.setAttribute( 'data-preload', '' );
if( dataPreload ) element.setAttribute( 'data-preload', '' );
// Background image options are set on the content wrapper
if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize;
@@ -187,13 +190,33 @@ export default class Backgrounds {
if( data.backgroundPosition ) contentElement.style.backgroundPosition = data.backgroundPosition;
if( data.backgroundOpacity ) contentElement.style.opacity = data.backgroundOpacity;
const contrastClass = this.getContrastClass( slide );
if( typeof contrastClass === 'string' ) {
slide.classList.add( contrastClass );
}
}
/**
* Returns a class name that can be applied to a slide to indicate
* if it has a light or dark background.
*
* @param {*} slide
*
* @returns {string|null}
*/
getContrastClass( slide ) {
const element = slide.slideBackgroundElement;
// If this slide has a background color, we add a class that
// signals if it is light or dark. If the slide has no background
// color, no class will be added
let contrastColor = data.backgroundColor;
let contrastColor = slide.getAttribute( 'data-background-color' );
// If no bg color was found, check the computed background
if( !contrastColor ) {
// If no bg color was found, or it cannot be converted by colorToRgb, check the computed background
if( !contrastColor || !colorToRgb( contrastColor ) ) {
let computedBackgroundStyle = window.getComputedStyle( element );
if( computedBackgroundStyle && computedBackgroundStyle.backgroundColor ) {
contrastColor = computedBackgroundStyle.backgroundColor;
@@ -201,21 +224,39 @@ export default class Backgrounds {
}
if( contrastColor ) {
let rgb = colorToRgb( contrastColor );
const rgb = colorToRgb( contrastColor );
// Ignore fully transparent backgrounds. Some browsers return
// rgba(0,0,0,0) when reading the computed background color of
// an element with no background
if( rgb && rgb.a !== 0 ) {
if( colorBrightness( contrastColor ) < 128 ) {
slide.classList.add( 'has-dark-background' );
return 'has-dark-background';
}
else {
slide.classList.add( 'has-light-background' );
return 'has-light-background';
}
}
}
return null;
}
/**
* Bubble the 'has-light-background'/'has-dark-background' classes.
*/
bubbleSlideContrastClassToElement( slide, target ) {
[ 'has-light-background', 'has-dark-background' ].forEach( classToBubble => {
if( slide.classList.contains( classToBubble ) ) {
target.classList.add( classToBubble );
}
else {
target.classList.remove( classToBubble );
}
}, this );
}
/**
@@ -227,14 +268,15 @@ export default class Backgrounds {
*/
update( includeAll = false ) {
let config = this.Reveal.getConfig();
let currentSlide = this.Reveal.getCurrentSlide();
let indices = this.Reveal.getIndices();
let currentBackground = null;
// Reverse past/future classes when in RTL mode
let horizontalPast = this.Reveal.getConfig().rtl ? 'future' : 'past',
horizontalFuture = this.Reveal.getConfig().rtl ? 'past' : 'future';
let horizontalPast = config.rtl ? 'future' : 'past',
horizontalFuture = config.rtl ? 'past' : 'future';
// Update the classes of all backgrounds to match the
// states of their slides (past/present/future)
@@ -260,10 +302,12 @@ export default class Backgrounds {
backgroundv.classList.remove( 'past', 'present', 'future' );
if( v < indices.v ) {
const indexv = typeof indices.v === 'number' ? indices.v : 0;
if( v < indexv ) {
backgroundv.classList.add( 'past' );
}
else if ( v > indices.v ) {
else if ( v > indexv ) {
backgroundv.classList.add( 'future' );
}
else {
@@ -278,15 +322,53 @@ export default class Backgrounds {
} );
// The previous background may refer to a DOM element that has
// been removed after a presentation is synced & bgs are recreated
if( this.previousBackground && !this.previousBackground.closest( 'body' ) ) {
this.previousBackground = null;
}
if( currentBackground && this.previousBackground ) {
// Don't transition between identical backgrounds. This
// prevents unwanted flicker.
let previousBackgroundHash = this.previousBackground.getAttribute( 'data-background-hash' );
let currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' );
if( currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== this.previousBackground ) {
this.element.classList.add( 'no-transition' );
// If multiple slides have the same background video, carry
// the <video> element forward so that it plays continuously
// across multiple slides
const currentVideo = currentBackground.querySelector( 'video' );
const previousVideo = this.previousBackground.querySelector( 'video' );
if( currentVideo && previousVideo ) {
const currentVideoParent = currentVideo.parentNode;
const previousVideoParent = previousVideo.parentNode;
// Swap the two videos
previousVideoParent.appendChild( currentVideo );
currentVideoParent.appendChild( previousVideo );
}
}
}
const backgroundChanged = currentBackground !== this.previousBackground;
// Stop content inside of previous backgrounds
if( this.previousBackground ) {
if( backgroundChanged && this.previousBackground ) {
this.Reveal.slideContent.stopEmbeddedContent( this.previousBackground, { unloadIframes: !this.Reveal.slideContent.shouldPreload( this.previousBackground ) } );
}
// Start content in the current background
if( currentBackground ) {
if( backgroundChanged && currentBackground ) {
this.Reveal.slideContent.startEmbeddedContent( currentBackground );
@@ -304,14 +386,6 @@ export default class Backgrounds {
}
// Don't transition between identical backgrounds. This
// prevents unwanted flicker.
let previousBackgroundHash = this.previousBackground ? this.previousBackground.getAttribute( 'data-background-hash' ) : null;
let currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' );
if( currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== this.previousBackground ) {
this.element.classList.add( 'no-transition' );
}
this.previousBackground = currentBackground;
}
@@ -319,20 +393,13 @@ export default class Backgrounds {
// If there's a background brightness flag for this slide,
// bubble it to the .reveal container
if( currentSlide ) {
[ 'has-light-background', 'has-dark-background' ].forEach( classToBubble => {
if( currentSlide.classList.contains( classToBubble ) ) {
this.Reveal.getRevealElement().classList.add( classToBubble );
}
else {
this.Reveal.getRevealElement().classList.remove( classToBubble );
}
}, this );
this.bubbleSlideContrastClassToElement( currentSlide, this.Reveal.getRevealElement() );
}
// Allow the first background to apply without transition
setTimeout( () => {
this.element.classList.remove( 'no-transition' );
}, 1 );
}, 10 );
}
@@ -394,4 +461,10 @@ export default class Backgrounds {
}
}
destroy() {
this.element.remove();
}
}

View File

@@ -1,4 +1,4 @@
import { queryAll } from '../utils/util.js'
import { queryAll, enterFullscreen } from '../utils/util.js'
import { isAndroid } from '../utils/device.js'
/**
@@ -12,6 +12,7 @@ import { isAndroid } from '../utils/device.js'
* - .navigate-left
* - .navigate-next
* - .navigate-prev
* - .enter-fullscreen
*/
export default class Controls {
@@ -25,6 +26,7 @@ export default class Controls {
this.onNavigateDownClicked = this.onNavigateDownClicked.bind( this );
this.onNavigatePrevClicked = this.onNavigatePrevClicked.bind( this );
this.onNavigateNextClicked = this.onNavigateNextClicked.bind( this );
this.onEnterFullscreen = this.onEnterFullscreen.bind( this );
}
@@ -50,6 +52,7 @@ export default class Controls {
this.controlsDown = queryAll( revealElement, '.navigate-down' );
this.controlsPrev = queryAll( revealElement, '.navigate-prev' );
this.controlsNext = queryAll( revealElement, '.navigate-next' );
this.controlsFullscreen = queryAll( revealElement, '.enter-fullscreen' );
// The left, right and down arrows in the standard reveal.js controls
this.controlsRightArrow = this.element.querySelector( '.navigate-right' );
@@ -63,7 +66,10 @@ export default class Controls {
*/
configure( config, oldConfig ) {
this.element.style.display = config.controls ? 'block' : 'none';
this.element.style.display = (
config.controls &&
(config.controls !== 'speaker-only' || this.Reveal.isSpeakerNotes())
) ? 'block' : 'none';
this.element.setAttribute( 'data-controls-layout', config.controlsLayout );
this.element.setAttribute( 'data-controls-back-arrows', config.controlsBackArrows );
@@ -89,6 +95,7 @@ export default class Controls {
this.controlsDown.forEach( el => el.addEventListener( eventName, this.onNavigateDownClicked, false ) );
this.controlsPrev.forEach( el => el.addEventListener( eventName, this.onNavigatePrevClicked, false ) );
this.controlsNext.forEach( el => el.addEventListener( eventName, this.onNavigateNextClicked, false ) );
this.controlsFullscreen.forEach( el => el.addEventListener( eventName, this.onEnterFullscreen, false ) );
} );
}
@@ -102,6 +109,7 @@ export default class Controls {
this.controlsDown.forEach( el => el.removeEventListener( eventName, this.onNavigateDownClicked, false ) );
this.controlsPrev.forEach( el => el.removeEventListener( eventName, this.onNavigatePrevClicked, false ) );
this.controlsNext.forEach( el => el.removeEventListener( eventName, this.onNavigateNextClicked, false ) );
this.controlsFullscreen.forEach( el => el.removeEventListener( eventName, this.onEnterFullscreen, false ) );
} );
}
@@ -141,9 +149,14 @@ export default class Controls {
if( fragmentsRoutes.prev ) this.controlsPrev.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );
if( fragmentsRoutes.next ) this.controlsNext.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );
const isVerticalStack = this.Reveal.isVerticalSlide( currentSlide );
const hasVerticalSiblings = isVerticalStack &&
currentSlide.parentElement &&
currentSlide.parentElement.querySelectorAll( ':scope > section' ).length > 1;
// Apply fragment decorators to directional buttons based on
// what slide axis they are in
if( this.Reveal.isVerticalSlide( currentSlide ) ) {
if( isVerticalStack && hasVerticalSiblings ) {
if( fragmentsRoutes.prev ) this.controlsUp.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );
if( fragmentsRoutes.next ) this.controlsDown.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );
}
@@ -188,6 +201,13 @@ export default class Controls {
}
}
destroy() {
this.unbind();
this.element.remove();
}
/**
* Event handlers for navigation control buttons.
*/
@@ -255,5 +275,13 @@ export default class Controls {
}
onEnterFullscreen( event ) {
const config = this.Reveal.getConfig();
const viewport = this.Reveal.getViewportElement();
enterFullscreen( config.embedded ? viewport : viewport.parentElement );
}
}

View File

@@ -1,3 +1,5 @@
import { closest } from '../utils/util.js'
/**
* Manages focus when a presentation is embedded. This
* helps us only capture keyboard from the presentation
@@ -77,6 +79,12 @@ export default class Focus {
}
destroy() {
this.Reveal.getRevealElement().classList.remove( 'focused' );
}
onRevealPointerDown( event ) {
this.focus();
@@ -85,7 +93,7 @@ export default class Focus {
onDocumentPointerDown( event ) {
let revealElement = event.target.closest( '.reveal' );
let revealElement = closest( event.target, '.reveal' );
if( !revealElement || revealElement !== this.Reveal.getRevealElement() ) {
this.blur();
}

View File

@@ -174,24 +174,23 @@ export default class Fragments {
*
* @return {{shown: array, hidden: array}}
*/
update( index, fragments ) {
update( index, fragments, slide = this.Reveal.getCurrentSlide() ) {
let changedFragments = {
shown: [],
hidden: []
};
let currentSlide = this.Reveal.getCurrentSlide();
if( currentSlide && this.Reveal.getConfig().fragments ) {
if( slide && this.Reveal.getConfig().fragments ) {
fragments = fragments || this.sort( currentSlide.querySelectorAll( '.fragment' ) );
fragments = fragments || this.sort( slide.querySelectorAll( '.fragment' ) );
if( fragments.length ) {
let maxIndex = 0;
if( typeof index !== 'number' ) {
let currentFragment = this.sort( currentSlide.querySelectorAll( '.fragment.visible' ) ).pop();
let currentFragment = this.sort( slide.querySelectorAll( '.fragment.visible' ) ).pop();
if( currentFragment ) {
index = parseInt( currentFragment.getAttribute( 'data-fragment-index' ) || 0, 10 );
}
@@ -235,6 +234,7 @@ export default class Fragments {
el.classList.remove( 'current-fragment' );
if( wasVisible ) {
this.Reveal.slideContent.stopEmbeddedContent( el );
changedFragments.hidden.push( el );
this.Reveal.dispatchEvent({
target: el,
@@ -251,12 +251,32 @@ export default class Fragments {
// the current fragment index.
index = typeof index === 'number' ? index : -1;
index = Math.max( Math.min( index, maxIndex ), -1 );
currentSlide.setAttribute( 'data-fragment', index );
slide.setAttribute( 'data-fragment', index );
}
}
if( changedFragments.hidden.length ) {
this.Reveal.dispatchEvent({
type: 'fragmenthidden',
data: {
fragment: changedFragments.hidden[0],
fragments: changedFragments.hidden
}
});
}
if( changedFragments.shown.length ) {
this.Reveal.dispatchEvent({
type: 'fragmentshown',
data: {
fragment: changedFragments.shown[0],
fragments: changedFragments.shown
}
});
}
return changedFragments;
}
@@ -311,26 +331,6 @@ export default class Fragments {
let changedFragments = this.update( index, fragments );
if( changedFragments.hidden.length ) {
this.Reveal.dispatchEvent({
type: 'fragmenthidden',
data: {
fragment: changedFragments.hidden[0],
fragments: changedFragments.hidden
}
});
}
if( changedFragments.shown.length ) {
this.Reveal.dispatchEvent({
type: 'fragmentshown',
data: {
fragment: changedFragments.shown[0],
fragments: changedFragments.shown
}
});
}
this.Reveal.controls.update();
this.Reveal.progress.update();

View File

@@ -0,0 +1,197 @@
import {
SLIDE_NUMBER_FORMAT_CURRENT,
SLIDE_NUMBER_FORMAT_CURRENT_SLASH_TOTAL
} from "../utils/constants";
/**
* Makes it possible to jump to a slide by entering its
* slide number or id.
*/
export default class JumpToSlide {
constructor( Reveal ) {
this.Reveal = Reveal;
this.onInput = this.onInput.bind( this );
this.onBlur = this.onBlur.bind( this );
this.onKeyDown = this.onKeyDown.bind( this );
}
render() {
this.element = document.createElement( 'div' );
this.element.className = 'jump-to-slide';
this.jumpInput = document.createElement( 'input' );
this.jumpInput.type = 'text';
this.jumpInput.className = 'jump-to-slide-input';
this.jumpInput.placeholder = 'Jump to slide';
this.jumpInput.addEventListener( 'input', this.onInput );
this.jumpInput.addEventListener( 'keydown', this.onKeyDown );
this.jumpInput.addEventListener( 'blur', this.onBlur );
this.element.appendChild( this.jumpInput );
}
show() {
this.indicesOnShow = this.Reveal.getIndices();
this.Reveal.getRevealElement().appendChild( this.element );
this.jumpInput.focus();
}
hide() {
if( this.isVisible() ) {
this.element.remove();
this.jumpInput.value = '';
clearTimeout( this.jumpTimeout );
delete this.jumpTimeout;
}
}
isVisible() {
return !!this.element.parentNode;
}
/**
* Parses the current input and jumps to the given slide.
*/
jump() {
clearTimeout( this.jumpTimeout );
delete this.jumpTimeout;
let query = this.jumpInput.value.trim( '' );
let indices;
// When slide numbers are formatted to be a single linear number
// (instead of showing a separate horizontal/vertical index) we
// use the same format for slide jumps
if( /^\d+$/.test( query ) ) {
const slideNumberFormat = this.Reveal.getConfig().slideNumber;
if( slideNumberFormat === SLIDE_NUMBER_FORMAT_CURRENT || slideNumberFormat === SLIDE_NUMBER_FORMAT_CURRENT_SLASH_TOTAL ) {
const slide = this.Reveal.getSlides()[ parseInt( query, 10 ) - 1 ];
if( slide ) {
indices = this.Reveal.getIndices( slide );
}
}
}
if( !indices ) {
// If the query uses "horizontal.vertical" format, convert to
// "horizontal/vertical" so that our URL parser can understand
if( /^\d+\.\d+$/.test( query ) ) {
query = query.replace( '.', '/' );
}
indices = this.Reveal.location.getIndicesFromHash( query, { oneBasedIndex: true } );
}
// Still no valid index? Fall back on a text search
if( !indices && /\S+/i.test( query ) && query.length > 1 ) {
indices = this.search( query );
}
if( indices && query !== '' ) {
this.Reveal.slide( indices.h, indices.v, indices.f );
return true;
}
else {
this.Reveal.slide( this.indicesOnShow.h, this.indicesOnShow.v, this.indicesOnShow.f );
return false;
}
}
jumpAfter( delay ) {
clearTimeout( this.jumpTimeout );
this.jumpTimeout = setTimeout( () => this.jump(), delay );
}
/**
* A lofi search that looks for the given query in all
* of our slides and returns the first match.
*/
search( query ) {
const regex = new RegExp( '\\b' + query.trim() + '\\b', 'i' );
const slide = this.Reveal.getSlides().find( ( slide ) => {
return regex.test( slide.innerText );
} );
if( slide ) {
return this.Reveal.getIndices( slide );
}
else {
return null;
}
}
/**
* Reverts back to the slide we were on when jump to slide was
* invoked.
*/
cancel() {
this.Reveal.slide( this.indicesOnShow.h, this.indicesOnShow.v, this.indicesOnShow.f );
this.hide();
}
confirm() {
this.jump();
this.hide();
}
destroy() {
this.jumpInput.removeEventListener( 'input', this.onInput );
this.jumpInput.removeEventListener( 'keydown', this.onKeyDown );
this.jumpInput.removeEventListener( 'blur', this.onBlur );
this.element.remove();
}
onKeyDown( event ) {
if( event.keyCode === 13 ) {
this.confirm();
}
else if( event.keyCode === 27 ) {
this.cancel();
event.stopImmediatePropagation();
}
}
onInput( event ) {
this.jumpAfter( 200 );
}
onBlur() {
setTimeout( () => this.hide(), 1 );
}
}

View File

@@ -17,7 +17,6 @@ export default class Keyboard {
this.bindings = {};
this.onDocumentKeyDown = this.onDocumentKeyDown.bind( this );
this.onDocumentKeyPress = this.onDocumentKeyPress.bind( this );
}
@@ -32,17 +31,18 @@ export default class Keyboard {
}
else {
this.shortcuts['N , SPACE'] = 'Next slide';
this.shortcuts['P'] = 'Previous slide';
this.shortcuts['P , Shift SPACE'] = 'Previous slide';
this.shortcuts['&#8592; , H'] = 'Navigate left';
this.shortcuts['&#8594; , L'] = 'Navigate right';
this.shortcuts['&#8593; , K'] = 'Navigate up';
this.shortcuts['&#8595; , J'] = 'Navigate down';
}
this.shortcuts['Home , Shift &#8592;'] = 'First slide';
this.shortcuts['End , Shift &#8594;'] = 'Last slide';
this.shortcuts['Alt + &#8592;/&#8593/&#8594;/&#8595;'] = 'Navigate without fragments';
this.shortcuts['Shift + &#8592;/&#8593/&#8594;/&#8595;'] = 'Jump to first/last slide';
this.shortcuts['B , .'] = 'Pause';
this.shortcuts['F'] = 'Fullscreen';
this.shortcuts['G'] = 'Jump to slide';
this.shortcuts['ESC, O'] = 'Slide overview';
}
@@ -53,7 +53,6 @@ export default class Keyboard {
bind() {
document.addEventListener( 'keydown', this.onDocumentKeyDown, false );
document.addEventListener( 'keypress', this.onDocumentKeyPress, false );
}
@@ -63,7 +62,6 @@ export default class Keyboard {
unbind() {
document.removeEventListener( 'keydown', this.onDocumentKeyDown, false );
document.removeEventListener( 'keypress', this.onDocumentKeyPress, false );
}
@@ -134,20 +132,6 @@ export default class Keyboard {
}
/**
* Handler for the document level 'keypress' event.
*
* @param {object} event
*/
onDocumentKeyPress( event ) {
// Check if the pressed key is question mark
if( event.shiftKey && event.charCode === 63 ) {
this.Reveal.toggleHelp();
}
}
/**
* Handler for the document level 'keydown' event.
*
@@ -182,13 +166,11 @@ export default class Keyboard {
let activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName );
let activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className);
// Whitelist specific modified + keycode combinations
let prevSlideShortcut = event.shiftKey && event.keyCode === 32;
let firstSlideShortcut = event.shiftKey && keyCode === 37;
let lastSlideShortcut = event.shiftKey && keyCode === 39;
// Whitelist certain modifiers for slide navigation shortcuts
let keyCodeUsesModifier = [32, 37, 38, 39, 40, 63, 78, 80, 191].indexOf( event.keyCode ) !== -1;
// Prevent all other events when a modifier is pressed
let unusedModifier = !prevSlideShortcut && !firstSlideShortcut && !lastSlideShortcut &&
let unusedModifier = !( keyCodeUsesModifier && event.shiftKey || event.altKey ) &&
( event.shiftKey || event.altKey || event.ctrlKey || event.metaKey );
// Disregard the event if there's a focused element or a
@@ -196,7 +178,7 @@ export default class Keyboard {
if( activeElementIsCE || activeElementIsInput || activeElementIsNotes || unusedModifier ) return;
// While paused only allow resume keyboard events; 'b', 'v', '.'
let resumeKeyCodes = [66,86,190,191];
let resumeKeyCodes = [66,86,190,191,112];
let key;
// Custom key bindings for togglePause should be able to resume
@@ -208,6 +190,10 @@ export default class Keyboard {
}
}
if( this.Reveal.isOverlayOpen() && !['Escape', 'f', 'c'].includes(event.key) ) {
return false;
}
if( this.Reveal.isPaused() && resumeKeyCodes.indexOf( keyCode ) === -1 ) {
return false;
}
@@ -277,52 +263,68 @@ export default class Keyboard {
// P, PAGE UP
if( keyCode === 80 || keyCode === 33 ) {
this.Reveal.prev();
this.Reveal.prev({skipFragments: event.altKey});
}
// N, PAGE DOWN
else if( keyCode === 78 || keyCode === 34 ) {
this.Reveal.next();
this.Reveal.next({skipFragments: event.altKey});
}
// H, LEFT
else if( keyCode === 72 || keyCode === 37 ) {
if( firstSlideShortcut ) {
if( event.shiftKey ) {
this.Reveal.slide( 0 );
}
else if( !this.Reveal.overview.isActive() && useLinearMode ) {
this.Reveal.prev();
if( config.rtl ) {
this.Reveal.next({skipFragments: event.altKey});
}
else {
this.Reveal.prev({skipFragments: event.altKey});
}
}
else {
this.Reveal.left();
this.Reveal.left({skipFragments: event.altKey});
}
}
// L, RIGHT
else if( keyCode === 76 || keyCode === 39 ) {
if( lastSlideShortcut ) {
this.Reveal.slide( Number.MAX_VALUE );
if( event.shiftKey ) {
this.Reveal.slide( this.Reveal.getHorizontalSlides().length - 1 );
}
else if( !this.Reveal.overview.isActive() && useLinearMode ) {
this.Reveal.next();
if( config.rtl ) {
this.Reveal.prev({skipFragments: event.altKey});
}
else {
this.Reveal.next({skipFragments: event.altKey});
}
}
else {
this.Reveal.right();
this.Reveal.right({skipFragments: event.altKey});
}
}
// K, UP
else if( keyCode === 75 || keyCode === 38 ) {
if( !this.Reveal.overview.isActive() && useLinearMode ) {
this.Reveal.prev();
if( event.shiftKey ) {
this.Reveal.slide( undefined, 0 );
}
else if( !this.Reveal.overview.isActive() && useLinearMode ) {
this.Reveal.prev({skipFragments: event.altKey});
}
else {
this.Reveal.up();
this.Reveal.up({skipFragments: event.altKey});
}
}
// J, DOWN
else if( keyCode === 74 || keyCode === 40 ) {
if( !this.Reveal.overview.isActive() && useLinearMode ) {
this.Reveal.next();
if( event.shiftKey ) {
this.Reveal.slide( undefined, Number.MAX_VALUE );
}
else if( !this.Reveal.overview.isActive() && useLinearMode ) {
this.Reveal.next({skipFragments: event.altKey});
}
else {
this.Reveal.down();
this.Reveal.down({skipFragments: event.altKey});
}
}
// HOME
@@ -331,7 +333,7 @@ export default class Keyboard {
}
// END
else if( keyCode === 35 ) {
this.Reveal.slide( Number.MAX_VALUE );
this.Reveal.slide( this.Reveal.getHorizontalSlides().length - 1 );
}
// SPACE
else if( keyCode === 32 ) {
@@ -339,14 +341,14 @@ export default class Keyboard {
this.Reveal.overview.deactivate();
}
if( event.shiftKey ) {
this.Reveal.prev();
this.Reveal.prev({skipFragments: event.altKey});
}
else {
this.Reveal.next();
this.Reveal.next({skipFragments: event.altKey});
}
}
// TWO-SPOT, SEMICOLON, B, V, PERIOD, LOGITECH PRESENTER TOOLS "BLACK SCREEN" BUTTON
else if( keyCode === 58 || keyCode === 59 || keyCode === 66 || keyCode === 86 || keyCode === 190 || keyCode === 191 ) {
else if( [58, 59, 66, 86, 190].includes( keyCode ) || ( keyCode === 191 && !event.shiftKey ) ) {
this.Reveal.togglePause();
}
// F
@@ -355,10 +357,28 @@ export default class Keyboard {
}
// A
else if( keyCode === 65 ) {
if ( config.autoSlideStoppable ) {
if( config.autoSlideStoppable ) {
this.Reveal.toggleAutoSlide( autoSlideWasPaused );
}
}
// G
else if( keyCode === 71 ) {
if( config.jumpToSlide ) {
this.Reveal.toggleJumpToSlide();
}
}
// C
else if( keyCode === 67 && this.Reveal.isOverlayOpen() ) {
this.Reveal.closeOverlay();
}
// ?
else if( ( keyCode === 63 || keyCode === 191 ) && event.shiftKey ) {
this.Reveal.toggleHelp();
}
// F1
else if( keyCode === 112 ) {
this.Reveal.toggleHelp();
}
else {
triggered = false;
}
@@ -385,4 +405,4 @@ export default class Keyboard {
}
}
}

View File

@@ -1,10 +1,12 @@
import { supportsHistoryAPI } from '../utils/device.js'
/**
* Reads and writes the URL based on reveal.js' current state.
*/
export default class Location {
// The minimum number of milliseconds that must pass between
// calls to history.replaceState
MAX_REPLACE_STATE_FREQUENCY = 1000
constructor( Reveal ) {
this.Reveal = Reveal;
@@ -12,6 +14,8 @@ export default class Location {
// Delays updates to the URL due to a Chrome thumbnailer bug
this.writeURLTimeout = 0;
this.replaceStateTimestamp = 0;
this.onWindowHashChange = this.onWindowHashChange.bind( this );
}
@@ -29,24 +33,23 @@ export default class Location {
}
/**
* Reads the current URL (hash) and navigates accordingly.
* Returns the slide indices for the given hash link.
*
* @param {string} [hash] the hash string that we want to
* find the indices for
*
* @returns slide indices or null
*/
readURL() {
let config = this.Reveal.getConfig();
let indices = this.Reveal.getIndices();
let currentSlide = this.Reveal.getCurrentSlide();
let hash = window.location.hash;
getIndicesFromHash( hash=window.location.hash, options={} ) {
// Attempt to parse the hash as either an index or name
let bits = hash.slice( 2 ).split( '/' ),
name = hash.replace( /#\/?/gi, '' );
let name = hash.replace( /^#\/?/, '' );
let bits = name.split( '/' );
// If the first bit is not fully numeric and there is a name we
// can assume that this is a named link
if( !/^[0-9]*$/.test( bits[0] ) && name.length ) {
let element;
let slide;
let f;
@@ -59,28 +62,19 @@ export default class Location {
// Ensure the named link is a valid HTML ID attribute
try {
element = document.getElementById( decodeURIComponent( name ) );
slide = document
.getElementById( decodeURIComponent( name ) )
.closest('.slides section');
}
catch ( error ) { }
// Ensure that we're not already on a slide with the same name
let isSameNameAsCurrentSlide = currentSlide ? currentSlide.getAttribute( 'id' ) === name : false;
if( element ) {
// If the slide exists and is not the current slide...
if ( !isSameNameAsCurrentSlide || typeof f !== 'undefined' ) {
// ...find the position of the named slide and navigate to it
let slideIndices = this.Reveal.getIndices( element );
this.Reveal.slide( slideIndices.h, slideIndices.v, f );
}
}
// If the slide doesn't exist, navigate to the current slide
else {
this.Reveal.slide( indices.h || 0, indices.v || 0 );
if( slide ) {
return { ...this.Reveal.getIndices( slide ), f };
}
}
else {
let hashIndexBase = config.hashOneBasedIndex ? 1 : 0;
const config = this.Reveal.getConfig();
let hashIndexBase = config.hashOneBasedIndex || options.oneBasedIndex ? 1 : 0;
// Read the index components of the hash
let h = ( parseInt( bits[0], 10 ) - hashIndexBase ) || 0,
@@ -94,10 +88,32 @@ export default class Location {
}
}
if( h !== indices.h || v !== indices.v || f !== undefined ) {
this.Reveal.slide( h, v, f );
return { h, v, f };
}
// The hash couldn't be parsed or no matching named link was found
return null
}
/**
* Reads the current URL (hash) and navigates accordingly.
*/
readURL() {
const currentIndices = this.Reveal.getIndices();
const newIndices = this.getIndicesFromHash();
if( newIndices ) {
if( ( newIndices.h !== currentIndices.h || newIndices.v !== currentIndices.v || newIndices.f !== undefined ) ) {
this.Reveal.slide( newIndices.h, newIndices.v, newIndices.f );
}
}
// If no new indices are available, we're trying to navigate to
// a slide hash that does not exist
else {
this.Reveal.slide( currentIndices.h || 0, currentIndices.v || 0 );
}
}
@@ -121,15 +137,24 @@ export default class Location {
this.writeURLTimeout = setTimeout( this.writeURL, delay );
}
else if( currentSlide ) {
let hash = this.getHash();
// If we're configured to push to history OR the history
// API is not avaialble.
if( config.history || supportsHistoryAPI === false ) {
window.location.hash = this.getHash();
// API is not available.
if( config.history ) {
window.location.hash = hash;
}
// If we're configured to reflect the current slide in the
// URL without pushing to history.
else if( config.hash ) {
window.history.replaceState( null, null, '#' + this.getHash() );
// If the hash is empty, don't add it to the URL
if( hash === '/' ) {
this.debouncedReplaceState( window.location.pathname + window.location.search );
}
else {
this.debouncedReplaceState( '#' + hash );
}
}
// UPDATE: The below nuking of all hash changes breaks
// anchors on pages where reveal.js is running. Removed
@@ -141,6 +166,27 @@ export default class Location {
// else {
// window.history.replaceState( null, null, window.location.pathname + window.location.search );
// }
}
}
replaceState( url ) {
window.history.replaceState( null, null, url );
this.replaceStateTimestamp = Date.now();
}
debouncedReplaceState( url ) {
clearTimeout( this.replaceStateTimeout );
if( Date.now() - this.replaceStateTimestamp > this.MAX_REPLACE_STATE_FREQUENCY ) {
this.replaceState( url );
}
else {
this.replaceStateTimeout = setTimeout( () => this.replaceState( url ), this.MAX_REPLACE_STATE_FREQUENCY );
}
}

View File

@@ -1,5 +1,5 @@
/**
* Handles the showing and
* Handles the showing of speaker notes
*/
export default class Notes {
@@ -38,10 +38,12 @@ export default class Notes {
*/
update() {
if( this.Reveal.getConfig().showNotes && this.element && this.Reveal.getCurrentSlide() && !this.Reveal.print.isPrintingPDF() ) {
if( this.Reveal.getConfig().showNotes &&
this.element && this.Reveal.getCurrentSlide() &&
!this.Reveal.isScrollView() &&
!this.Reveal.isPrintView()
) {
this.element.innerHTML = this.getSlideNotes() || '<span class="notes-placeholder">No notes on this slide.</span>';
}
}
@@ -54,7 +56,11 @@ export default class Notes {
*/
updateVisibility() {
if( this.Reveal.getConfig().showNotes && this.hasNotes() ) {
if( this.Reveal.getConfig().showNotes &&
this.hasNotes() &&
!this.Reveal.isScrollView() &&
!this.Reveal.isPrintView()
) {
this.Reveal.getRevealElement().classList.add( 'show-notes' );
}
else {
@@ -89,7 +95,7 @@ export default class Notes {
* Retrieves the speaker notes from a slide. Notes can be
* defined in two ways:
* 1. As a data-notes attribute on the slide <section>
* 2. As an <aside class="notes"> inside of the slide
* 2. With <aside class="notes"> elements inside the slide
*
* @param {HTMLElement} [slide=currentSlide]
* @return {(string|null)}
@@ -101,14 +107,20 @@ export default class Notes {
return slide.getAttribute( 'data-notes' );
}
// ... or using an <aside class="notes"> element
let notesElement = slide.querySelector( 'aside.notes' );
if( notesElement ) {
return notesElement.innerHTML;
// ... or using <aside class="notes"> elements
let notesElements = slide.querySelectorAll( 'aside.notes' );
if( notesElements ) {
return Array.from(notesElements).map( notesElement => notesElement.innerHTML ).join( '\n' );
}
return null;
}
destroy() {
this.element.remove();
}
}

366
js/controllers/overlay.js Normal file
View File

@@ -0,0 +1,366 @@
/**
* Handles the display of reveal.js' overlay elements used
* to preview iframes, images & videos.
*/
export default class Overlay {
constructor( Reveal ) {
this.Reveal = Reveal;
this.onSlidesClicked = this.onSlidesClicked.bind( this );
this.linkPreviewSelector = null;
this.mediaPreviewSelector = '[data-preview-image], [data-preview-video]';
this.state = {};
}
update() {
// Enable link previews globally
if( this.Reveal.getConfig().previewLinks ) {
this.linkPreviewSelector = 'a[href]:not([data-preview-link=false]), [data-preview-link]:not(a):not([data-preview-link=false])';
}
// Enable link previews for individual elements
else {
this.linkPreviewSelector = '[data-preview-link]:not([data-preview-link=false])';
}
this.hasLinkPreviews = this.Reveal.getSlidesElement().querySelectorAll( this.linkPreviewSelector ).length > 0;
this.hasMediaPreviews = this.Reveal.getSlidesElement().querySelectorAll( this.mediaPreviewSelector ).length > 0;
// Only add the listener when there are previewable elements in the slides
if( this.hasLinkPreviews || this.hasMediaPreviews ) {
this.Reveal.getSlidesElement().addEventListener( 'click', this.onSlidesClicked, false );
}
else {
this.Reveal.getSlidesElement().removeEventListener( 'click', this.onSlidesClicked, false );
}
}
createOverlay( className ) {
this.dom = document.createElement( 'div' );
this.dom.classList.add( 'r-overlay' );
this.dom.classList.add( className );
this.viewport = document.createElement( 'div' );
this.viewport.classList.add( 'r-overlay-viewport' );
this.dom.appendChild( this.viewport );
this.Reveal.getRevealElement().appendChild( this.dom );
}
/**
* Opens a preview window for the target URL.
*
* @param {string} url - url for preview iframe src
*/
showIframePreview( url ) {
this.close();
this.state.previewIframe = url;
this.createOverlay( 'r-overlay-preview' );
this.dom.dataset.state = 'loading';
this.viewport.innerHTML =
`<header class="r-overlay-header">
<a class="r-overlay-button r-overlay-external" href="${url}" target="_blank"><span class="icon"></span></a>
<button class="r-overlay-button r-overlay-close"><span class="icon"></span></button>
</header>
<div class="r-overlay-spinner"></div>
<div class="r-overlay-content">
<iframe src="${url}"></iframe>
<small class="r-overlay-content-inner">
<span class="r-overlay-error x-frame-error">Unable to load iframe. This is likely due to the site's policy (x-frame-options).</span>
</small>
</div>`;
this.dom.querySelector( 'iframe' ).addEventListener( 'load', event => {
this.dom.dataset.state = 'loaded';
}, false );
this.dom.querySelector( '.r-overlay-close' ).addEventListener( 'click', event => {
this.close();
event.preventDefault();
}, false );
this.dom.querySelector( '.r-overlay-external' ).addEventListener( 'click', event => {
this.close();
}, false );
this.Reveal.dispatchEvent({ type: 'showiframepreview', data: { url } });
}
/**
* Opens a preview window that provides a larger view of the
* given image/video.
*
* @param {string} url - url to the image/video to preview
* @param {image|video} mediaType
* @param {HTMLElement} [trigger] - the element that triggered
* the preview
*/
showMediaPreview( url, mediaType, trigger ) {
if( mediaType !== 'image' && mediaType !== 'video' ) {
console.warn( 'Please specify a valid media type to preview (image|video)' );
return;
}
this.close();
const fitMode = trigger ? trigger.dataset.previewFit || 'scale-down' : 'scale-down';
this.createOverlay( 'r-overlay-preview' );
this.dom.dataset.state = 'loading';
this.dom.dataset.previewFit = fitMode;
this.viewport.innerHTML =
`<header class="r-overlay-header">
<button class="r-overlay-button r-overlay-close">Esc <span class="icon"></span></button>
</header>
<div class="r-overlay-spinner"></div>
<div class="r-overlay-content"></div>`;
const contentElement = this.dom.querySelector( '.r-overlay-content' );
if( mediaType === 'image' ) {
this.state = { previewImage: url, previewFit: fitMode }
const img = document.createElement( 'img', {} );
img.src = url;
contentElement.appendChild( img );
img.addEventListener( 'load', () => {
this.dom.dataset.state = 'loaded';
}, false );
img.addEventListener( 'error', () => {
this.dom.dataset.state = 'error';
contentElement.innerHTML =
`<span class="r-overlay-error">Unable to load image.</span>`
}, false );
// Hide image overlays when clicking outside the overlay
this.dom.style.cursor = 'zoom-out';
this.dom.addEventListener( 'click', ( event ) => {
this.close();
}, false );
}
else if( mediaType === 'video' ) {
this.state = { previewVideo: url, previewFit: fitMode }
const video = document.createElement( 'video' );
video.autoplay = this.dom.dataset.previewAutoplay === 'false' ? false : true;
video.controls = this.dom.dataset.previewControls === 'false' ? false : true;
video.loop = this.dom.dataset.previewLoop === 'true' ? true : false;
video.muted = this.dom.dataset.previewMuted === 'true' ? true : false;
video.playsInline = true;
video.src = url;
contentElement.appendChild( video );
video.addEventListener( 'loadeddata', () => {
this.dom.dataset.state = 'loaded';
}, false );
video.addEventListener( 'error', () => {
this.dom.dataset.state = 'error';
contentElement.innerHTML =
`<span class="r-overlay-error">Unable to load video.</span>`;
}, false );
}
else {
throw new Error( 'Please specify a valid media type to preview' );
}
this.dom.querySelector( '.r-overlay-close' ).addEventListener( 'click', ( event ) => {
this.close();
event.preventDefault();
}, false );
this.Reveal.dispatchEvent({ type: 'showmediapreview', data: { mediaType, url, trigger } });
}
/**
* Open or close help overlay window.
*
* @param {Boolean} [override] Flag which overrides the
* toggle logic and forcibly sets the desired state. True means
* help is open, false means it's closed.
*/
toggleHelp( override ) {
if( typeof override === 'boolean' ) {
override ? this.showHelp() : this.close();
}
else {
if( this.dom ) {
this.close();
}
else {
this.showHelp();
}
}
}
/**
* Opens an overlay window with help material.
*/
showHelp() {
if( this.Reveal.getConfig().help ) {
this.close();
this.createOverlay( 'r-overlay-help' );
let html = '<p class="title">Keyboard Shortcuts</p>';
let shortcuts = this.Reveal.keyboard.getShortcuts(),
bindings = this.Reveal.keyboard.getBindings();
html += '<table><th>KEY</th><th>ACTION</th>';
for( let key in shortcuts ) {
html += `<tr><td>${key}</td><td>${shortcuts[ key ]}</td></tr>`;
}
// Add custom key bindings that have associated descriptions
for( let binding in bindings ) {
if( bindings[binding].key && bindings[binding].description ) {
html += `<tr><td>${bindings[binding].key}</td><td>${bindings[binding].description}</td></tr>`;
}
}
html += '</table>';
this.viewport.innerHTML = `
<header class="r-overlay-header">
<button class="r-overlay-button r-overlay-close">Esc <span class="icon"></span></button>
</header>
<div class="r-overlay-content">
<div class="r-overlay-help-content">${html}</div>
</div>
`;
this.dom.querySelector( '.r-overlay-close' ).addEventListener( 'click', event => {
this.close();
event.preventDefault();
}, false );
this.Reveal.dispatchEvent({ type: 'showhelp' });
}
}
isOpen() {
return !!this.dom;
}
/**
* Closes any currently open overlay.
*/
close() {
if( this.dom ) {
this.dom.remove();
this.dom = null;
this.state = {};
this.Reveal.dispatchEvent({ type: 'closeoverlay' });
return true;
}
return false;
}
getState() {
return this.state;
}
setState( state ) {
if( state.previewIframe ) {
this.showIframePreview( state.previewIframe );
}
else if( state.previewImage ) {
this.showMediaPreview( state.previewImage, 'image' );
}
else if( state.previewVideo ) {
this.showMediaPreview( state.previewVideo, 'video' );
}
else {
this.close();
}
}
onSlidesClicked( event ) {
const target = event.target;
const linkTarget = target.closest( this.linkPreviewSelector );
const mediaTarget = target.closest( this.mediaPreviewSelector );
// Was a link preview clicked?
if( linkTarget ) {
let url = linkTarget.getAttribute( 'href' ) || linkTarget.getAttribute( 'data-preview-link' );
if( url ) {
this.showIframePreview( url );
event.preventDefault();
}
}
// Was a media preview clicked?
else if( mediaTarget ) {
if( mediaTarget.hasAttribute( 'data-preview-image' ) ) {
let url = mediaTarget.dataset.previewImage || mediaTarget.getAttribute( 'src' );
if( url ) {
this.showMediaPreview( url, 'image', mediaTarget );
event.preventDefault();
}
}
else if( mediaTarget.hasAttribute( 'data-preview-video' ) ) {
let url = mediaTarget.dataset.previewVideo || mediaTarget.getAttribute( 'src' );
if( !url ) {
let source = mediaTarget.querySelector( 'source' );
if( source ) {
url = source.getAttribute( 'src' );
}
}
if( url ) {
this.showMediaPreview( url, 'video', mediaTarget );
event.preventDefault();
}
}
}
}
destroy() {
this.close();
}
}

View File

@@ -24,7 +24,7 @@ export default class Overview {
activate() {
// Only proceed if enabled in config
if( this.Reveal.getConfig().overview && !this.isActive() ) {
if( this.Reveal.getConfig().overview && !this.Reveal.isScrollView() && !this.isActive() ) {
this.active = true;

View File

@@ -12,7 +12,7 @@ export default class Plugins {
// Flags our current state (idle -> loading -> loaded)
this.state = 'idle';
// An id:instance map of currently registed plugins
// An id:instance map of currently registered plugins
this.registeredPlugins = {};
this.asyncDependencies = [];
@@ -171,7 +171,7 @@ export default class Plugins {
/**
* Registers a new plugin with this reveal.js instance.
*
* reveal.js waits for all regisered plugins to initialize
* reveal.js waits for all registered plugins to initialize
* before considering itself ready, as long as the plugin
* is registered before calling `Reveal.initialize()`.
*/
@@ -238,4 +238,17 @@ export default class Plugins {
}
destroy() {
Object.values( this.registeredPlugins ).forEach( plugin => {
if( typeof plugin.destroy === 'function' ) {
plugin.destroy();
}
} );
this.registeredPlugins = {};
this.asyncDependencies = [];
}
}

View File

@@ -27,12 +27,10 @@ export default class Pointer {
configure( config, oldConfig ) {
if( config.mouseWheel ) {
document.addEventListener( 'DOMMouseScroll', this.onDocumentMouseScroll, false ); // FF
document.addEventListener( 'mousewheel', this.onDocumentMouseScroll, false );
document.addEventListener( 'wheel', this.onDocumentMouseScroll, false );
}
else {
document.removeEventListener( 'DOMMouseScroll', this.onDocumentMouseScroll, false ); // FF
document.removeEventListener( 'mousewheel', this.onDocumentMouseScroll, false );
document.removeEventListener( 'wheel', this.onDocumentMouseScroll, false );
}
// Auto-hide the mouse pointer when its inactive
@@ -75,6 +73,16 @@ export default class Pointer {
}
destroy() {
this.showCursor();
document.removeEventListener( 'wheel', this.onDocumentMouseScroll, false );
document.removeEventListener( 'mousemove', this.onDocumentCursorActive, false );
document.removeEventListener( 'mousedown', this.onDocumentCursorActive, false );
}
/**
* Called whenever there is mouse input at the document level
* to determine if the cursor is active or not.
@@ -115,4 +123,4 @@ export default class Pointer {
}
}
}

View File

@@ -4,7 +4,7 @@ import { queryAll, createStyleSheet } from '../utils/util.js'
/**
* Setups up our presentation for printing/exporting to PDF.
*/
export default class Print {
export default class PrintView {
constructor( Reveal ) {
@@ -16,50 +16,69 @@ export default class Print {
* Configures the presentation for printing to a static
* PDF.
*/
setupPDF() {
async activate() {
let config = this.Reveal.getConfig();
const config = this.Reveal.getConfig();
const slides = queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR )
let slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight );
// Compute slide numbers now, before we start duplicating slides
const injectPageNumbers = config.slideNumber && /all|print/i.test( config.showSlideNumber );
const slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight );
// Dimensions of the PDF pages
let pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ),
const pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ),
pageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) );
// Dimensions of slides within the pages
let slideWidth = slideSize.width,
const slideWidth = slideSize.width,
slideHeight = slideSize.height;
await new Promise( requestAnimationFrame );
// Let the browser know what page size we want to print
createStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0px;}' );
// Limit the size of certain elements to the dimensions of the slide
createStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' );
document.documentElement.classList.add( 'print-pdf' );
document.documentElement.classList.add( 'reveal-print', 'print-pdf' );
document.body.style.width = pageWidth + 'px';
document.body.style.height = pageHeight + 'px';
const viewportElement = this.Reveal.getViewportElement();
let presentationBackground;
if( viewportElement ) {
const viewportStyles = window.getComputedStyle( viewportElement );
if( viewportStyles && viewportStyles.background ) {
presentationBackground = viewportStyles.background;
}
}
// Make sure stretch elements fit on slide
await new Promise( requestAnimationFrame );
this.Reveal.layoutSlideContents( slideWidth, slideHeight );
// Compute slide numbers now, before we start duplicating slides
let doingSlideNumbers = config.slideNumber && /all|print/i.test( config.showSlideNumber );
queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( function( slide ) {
slide.setAttribute( 'data-slide-number', this.Reveal.slideNumber.getSlideNumber( slide ) );
}, this );
// Batch scrollHeight access to prevent layout thrashing
await new Promise( requestAnimationFrame );
const slideScrollHeights = slides.map( slide => slide.scrollHeight );
const pages = [];
const pageContainer = slides[0].parentNode;
let slideNumber = 1;
// Slide and slide background layout
queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( function( slide ) {
slides.forEach( function( slide, index ) {
// Vertical stacks are not centred since their section
// children will be
if( slide.classList.contains( 'stack' ) === false ) {
// Center the slide inside of the page, giving the slide some margin
let left = ( pageWidth - slideWidth ) / 2,
top = ( pageHeight - slideHeight ) / 2;
let left = ( pageWidth - slideWidth ) / 2;
let top = ( pageHeight - slideHeight ) / 2;
let contentHeight = slide.scrollHeight;
const contentHeight = slideScrollHeights[ index ];
let numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );
// Adhere to configured pages per slide limit
@@ -72,10 +91,18 @@ export default class Print {
// Wrap the slide in a page element and hide its overflow
// so that no page ever flows onto another
let page = document.createElement( 'div' );
const page = document.createElement( 'div' );
pages.push( page );
page.className = 'pdf-page';
page.style.height = ( ( pageHeight + config.pdfPageHeightOffset ) * numberOfPages ) + 'px';
slide.parentNode.insertBefore( page, slide );
// Copy the presentation-wide background to each individual
// page when printing
if( presentationBackground ) {
page.style.background = presentationBackground;
}
page.appendChild( slide );
// Position the slide inside of the page
@@ -83,6 +110,8 @@ export default class Print {
slide.style.top = top + 'px';
slide.style.width = slideWidth + 'px';
this.Reveal.slideContent.layout( slide );
if( slide.slideBackgroundElement ) {
page.insertBefore( slide.slideBackgroundElement, slide );
}
@@ -91,19 +120,19 @@ export default class Print {
if( config.showNotes ) {
// Are there notes for this slide?
let notes = getSlideNotes( slide );
const notes = this.Reveal.getSlideNotes( slide );
if( notes ) {
let notesSpacing = 8;
let notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline';
let notesElement = document.createElement( 'div' );
const notesSpacing = 8;
const notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline';
const notesElement = document.createElement( 'div' );
notesElement.classList.add( 'speaker-notes' );
notesElement.classList.add( 'speaker-notes-pdf' );
notesElement.setAttribute( 'data-layout', notesLayout );
notesElement.innerHTML = notes;
if( notesLayout === 'separate-page' ) {
page.parentNode.insertBefore( notesElement, page.nextSibling );
pages.push( notesElement );
}
else {
notesElement.style.left = notesSpacing + 'px';
@@ -116,12 +145,12 @@ export default class Print {
}
// Inject slide numbers if `slideNumbers` are enabled
if( doingSlideNumbers ) {
let numberElement = document.createElement( 'div' );
// Inject page numbers if `slideNumbers` are enabled
if( injectPageNumbers ) {
const numberElement = document.createElement( 'div' );
numberElement.classList.add( 'slide-number' );
numberElement.classList.add( 'slide-number-pdf' );
numberElement.innerHTML = slide.getAttribute( 'data-slide-number' );
numberElement.innerHTML = slideNumber++;
page.appendChild( numberElement );
}
@@ -131,12 +160,11 @@ export default class Print {
// Each fragment 'group' is an array containing one or more
// fragments. Multiple fragments that appear at the same time
// are part of the same group.
let fragmentGroups = this.Reveal.fragments.sort( page.querySelectorAll( '.fragment' ), true );
const fragmentGroups = this.Reveal.fragments.sort( page.querySelectorAll( '.fragment' ), true );
let previousFragmentStep;
let previousPage;
fragmentGroups.forEach( function( fragments ) {
fragmentGroups.forEach( function( fragments, index ) {
// Remove 'current-fragment' from the previous group
if( previousFragmentStep ) {
@@ -151,11 +179,18 @@ export default class Print {
}, this );
// Create a separate page for the current fragment state
let clonedPage = page.cloneNode( true );
page.parentNode.insertBefore( clonedPage, ( previousPage || page ).nextSibling );
const clonedPage = page.cloneNode( true );
// Inject unique page numbers for fragments
if( injectPageNumbers ) {
const numberElement = clonedPage.querySelector( '.slide-number-pdf' );
const fragmentNumber = index + 1;
numberElement.innerHTML += '.' + fragmentNumber;
}
pages.push( clonedPage );
previousFragmentStep = fragments;
previousPage = clonedPage;
}, this );
@@ -178,17 +213,26 @@ export default class Print {
}, this );
await new Promise( requestAnimationFrame );
pages.forEach( page => pageContainer.appendChild( page ) );
// Re-run JS-based content layout after the slide is added to page DOM
this.Reveal.slideContent.layout( this.Reveal.getSlidesElement() );
// Notify subscribers that the PDF layout is good to go
this.Reveal.dispatchEvent({ type: 'pdf-ready' });
viewportElement.classList.remove( 'loading-scroll-mode' );
}
/**
* Checks if this instance is being used to print a PDF.
* Checks if the print mode is/should be activated.
*/
isPrintingPDF() {
isActive() {
return ( /print-pdf/gi ).test( window.location.search );
return this.Reveal.getConfig().view === 'print';
}

View File

@@ -55,7 +55,14 @@ export default class Progress {
// Update progress if enabled
if( this.Reveal.getConfig().progress && this.bar ) {
this.bar.style.width = this.Reveal.getProgress() * this.getMaxWidth() + 'px';
let scale = this.Reveal.getProgress();
// Don't fill the progress bar if there's only one slide
if( this.Reveal.getTotalSlides() < 2 ) {
scale = 0;
}
this.bar.style.transform = 'scaleX('+ scale +')';
}
@@ -81,16 +88,23 @@ export default class Progress {
event.preventDefault();
let slidesTotal = this.Reveal.getHorizontalSlides().length;
let slides = this.Reveal.getSlides();
let slidesTotal = slides.length;
let slideIndex = Math.floor( ( event.clientX / this.getMaxWidth() ) * slidesTotal );
if( this.Reveal.getConfig().rtl ) {
slideIndex = slidesTotal - slideIndex;
}
this.Reveal.slide( slideIndex );
let targetIndices = this.Reveal.getIndices(slides[slideIndex]);
this.Reveal.slide( targetIndices.h, targetIndices.v );
}
destroy() {
this.element.remove();
}
}

View File

@@ -0,0 +1,923 @@
import { HORIZONTAL_SLIDES_SELECTOR, HORIZONTAL_BACKGROUNDS_SELECTOR } from '../utils/constants.js'
import { queryAll } from '../utils/util.js'
const HIDE_SCROLLBAR_TIMEOUT = 500;
const MAX_PROGRESS_SPACING = 4;
const MIN_PROGRESS_SEGMENT_HEIGHT = 6;
const MIN_PLAYHEAD_HEIGHT = 8;
/**
* The scroll view lets you read a reveal.js presentation
* as a linear scrollable page.
*/
export default class ScrollView {
constructor( Reveal ) {
this.Reveal = Reveal;
this.active = false;
this.activatedCallbacks = [];
this.onScroll = this.onScroll.bind( this );
}
/**
* Activates the scroll view. This rearranges the presentation DOM
* by—among other things—wrapping each slide in a page element.
*/
activate() {
if( this.active ) return;
const stateBeforeActivation = this.Reveal.getState();
this.active = true;
// Store the full presentation HTML so that we can restore it
// when/if the scroll view is deactivated
this.slideHTMLBeforeActivation = this.Reveal.getSlidesElement().innerHTML;
const horizontalSlides = queryAll( this.Reveal.getRevealElement(), HORIZONTAL_SLIDES_SELECTOR );
const horizontalBackgrounds = queryAll( this.Reveal.getRevealElement(), HORIZONTAL_BACKGROUNDS_SELECTOR );
this.viewportElement.classList.add( 'loading-scroll-mode', 'reveal-scroll' );
let presentationBackground;
const viewportStyles = window.getComputedStyle( this.viewportElement );
if( viewportStyles && viewportStyles.background ) {
presentationBackground = viewportStyles.background;
}
const pageElements = [];
const pageContainer = horizontalSlides[0].parentNode;
let previousSlide;
// Creates a new page element and appends the given slide/bg
// to it.
const createPageElement = ( slide, h, v, isVertical ) => {
let contentContainer;
// If this slide is part of an auto-animation sequence, we
// group it under the same page element as the previous slide
if( previousSlide && this.Reveal.shouldAutoAnimateBetween( previousSlide, slide ) ) {
contentContainer = document.createElement( 'div' );
contentContainer.className = 'scroll-page-content scroll-auto-animate-page';
contentContainer.style.display = 'none';
previousSlide.closest( '.scroll-page-content' ).parentNode.appendChild( contentContainer );
}
else {
// Wrap the slide in a page element and hide its overflow
// so that no page ever flows onto another
const page = document.createElement( 'div' );
page.className = 'scroll-page';
pageElements.push( page );
// This transfers over the background of the vertical stack containing
// the slide if it exists. Otherwise, it uses the presentation-wide
// background.
if( isVertical && horizontalBackgrounds.length > h ) {
const slideBackground = horizontalBackgrounds[h];
const pageBackground = window.getComputedStyle( slideBackground );
if( pageBackground && pageBackground.background ) {
page.style.background = pageBackground.background;
}
else if( presentationBackground ) {
page.style.background = presentationBackground;
}
} else if( presentationBackground ) {
page.style.background = presentationBackground;
}
const stickyContainer = document.createElement( 'div' );
stickyContainer.className = 'scroll-page-sticky';
page.appendChild( stickyContainer );
contentContainer = document.createElement( 'div' );
contentContainer.className = 'scroll-page-content';
stickyContainer.appendChild( contentContainer );
}
contentContainer.appendChild( slide );
slide.classList.remove( 'past', 'future' );
slide.setAttribute( 'data-index-h', h );
slide.setAttribute( 'data-index-v', v );
if( slide.slideBackgroundElement ) {
slide.slideBackgroundElement.remove( 'past', 'future' );
contentContainer.insertBefore( slide.slideBackgroundElement, slide );
}
previousSlide = slide;
}
// Slide and slide background layout
horizontalSlides.forEach( ( horizontalSlide, h ) => {
if( this.Reveal.isVerticalStack( horizontalSlide ) ) {
horizontalSlide.querySelectorAll( 'section' ).forEach( ( verticalSlide, v ) => {
createPageElement( verticalSlide, h, v, true );
});
}
else {
createPageElement( horizontalSlide, h, 0 );
}
}, this );
this.createProgressBar();
// Remove leftover stacks
queryAll( this.Reveal.getRevealElement(), '.stack' ).forEach( stack => stack.remove() );
// Add our newly created pages to the DOM
pageElements.forEach( page => pageContainer.appendChild( page ) );
// Re-run JS-based content layout after the slide is added to page DOM
this.Reveal.slideContent.layout( this.Reveal.getSlidesElement() );
this.Reveal.layout();
this.Reveal.setState( stateBeforeActivation );
this.activatedCallbacks.forEach( callback => callback() );
this.activatedCallbacks = [];
this.restoreScrollPosition();
this.viewportElement.classList.remove( 'loading-scroll-mode' );
this.viewportElement.addEventListener( 'scroll', this.onScroll, { passive: true } );
}
/**
* Deactivates the scroll view and restores the standard slide-based
* presentation.
*/
deactivate() {
if( !this.active ) return;
const stateBeforeDeactivation = this.Reveal.getState();
this.active = false;
this.viewportElement.removeEventListener( 'scroll', this.onScroll );
this.viewportElement.classList.remove( 'reveal-scroll' );
this.removeProgressBar();
this.Reveal.getSlidesElement().innerHTML = this.slideHTMLBeforeActivation;
this.Reveal.sync();
this.Reveal.setState( stateBeforeDeactivation );
this.slideHTMLBeforeActivation = null;
}
toggle( override ) {
if( typeof override === 'boolean' ) {
override ? this.activate() : this.deactivate();
}
else {
this.isActive() ? this.deactivate() : this.activate();
}
}
/**
* Checks if the scroll view is currently active.
*/
isActive() {
return this.active;
}
/**
* Renders the progress bar component.
*/
createProgressBar() {
this.progressBar = document.createElement( 'div' );
this.progressBar.className = 'scrollbar';
this.progressBarInner = document.createElement( 'div' );
this.progressBarInner.className = 'scrollbar-inner';
this.progressBar.appendChild( this.progressBarInner );
this.progressBarPlayhead = document.createElement( 'div' );
this.progressBarPlayhead.className = 'scrollbar-playhead';
this.progressBarInner.appendChild( this.progressBarPlayhead );
this.viewportElement.insertBefore( this.progressBar, this.viewportElement.firstChild );
const handleDocumentMouseMove = ( event ) => {
let progress = ( event.clientY - this.progressBarInner.getBoundingClientRect().top ) / this.progressBarHeight;
progress = Math.max( Math.min( progress, 1 ), 0 );
this.viewportElement.scrollTop = progress * ( this.viewportElement.scrollHeight - this.viewportElement.offsetHeight );
};
const handleDocumentMouseUp = ( event ) => {
this.draggingProgressBar = false;
this.showProgressBar();
document.removeEventListener( 'mousemove', handleDocumentMouseMove );
document.removeEventListener( 'mouseup', handleDocumentMouseUp );
};
const handleMouseDown = ( event ) => {
event.preventDefault();
this.draggingProgressBar = true;
document.addEventListener( 'mousemove', handleDocumentMouseMove );
document.addEventListener( 'mouseup', handleDocumentMouseUp );
handleDocumentMouseMove( event );
};
this.progressBarInner.addEventListener( 'mousedown', handleMouseDown );
}
removeProgressBar() {
if( this.progressBar ) {
this.progressBar.remove();
this.progressBar = null;
}
}
layout() {
if( this.isActive() ) {
this.syncPages();
this.syncScrollPosition();
}
}
/**
* Updates our pages to match the latest configuration and
* presentation size.
*/
syncPages() {
const config = this.Reveal.getConfig();
const slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight );
const scale = this.Reveal.getScale();
const useCompactLayout = config.scrollLayout === 'compact';
const viewportHeight = this.viewportElement.offsetHeight;
const compactHeight = slideSize.height * scale;
const pageHeight = useCompactLayout ? compactHeight : viewportHeight;
// The height that needs to be scrolled between scroll triggers
this.scrollTriggerHeight = useCompactLayout ? compactHeight : viewportHeight;
this.viewportElement.style.setProperty( '--page-height', pageHeight + 'px' );
this.viewportElement.style.scrollSnapType = typeof config.scrollSnap === 'string' ? `y ${config.scrollSnap}` : '';
// This will hold all scroll triggers used to show/hide slides
this.slideTriggers = [];
const pageElements = Array.from( this.Reveal.getRevealElement().querySelectorAll( '.scroll-page' ) );
this.pages = pageElements.map( pageElement => {
const page = this.createPage({
pageElement,
slideElement: pageElement.querySelector( 'section' ),
stickyElement: pageElement.querySelector( '.scroll-page-sticky' ),
contentElement: pageElement.querySelector( '.scroll-page-content' ),
backgroundElement: pageElement.querySelector( '.slide-background' ),
autoAnimateElements: pageElement.querySelectorAll( '.scroll-auto-animate-page' ),
autoAnimatePages: []
});
page.pageElement.style.setProperty( '--slide-height', config.center === true ? 'auto' : slideSize.height + 'px' );
this.slideTriggers.push({
page: page,
activate: () => this.activatePage( page ),
deactivate: () => this.deactivatePage( page )
});
// Create scroll triggers that show/hide fragments
this.createFragmentTriggersForPage( page );
// Create scroll triggers for triggering auto-animate steps
if( page.autoAnimateElements.length > 0 ) {
this.createAutoAnimateTriggersForPage( page );
}
let totalScrollTriggerCount = Math.max( page.scrollTriggers.length - 1, 0 );
// Each auto-animate step may include its own scroll triggers
// for fragments, ensure we count those as well
totalScrollTriggerCount += page.autoAnimatePages.reduce( ( total, page ) => {
return total + Math.max( page.scrollTriggers.length - 1, 0 );
}, page.autoAnimatePages.length );
// Clean up from previous renders
page.pageElement.querySelectorAll( '.scroll-snap-point' ).forEach( el => el.remove() );
// Create snap points for all scroll triggers
// - Can't be absolute in FF
// - Can't be 0-height in Safari
// - Can't use snap-align on parent in Safari because then
// inner triggers won't work
for( let i = 0; i < totalScrollTriggerCount + 1; i++ ) {
const triggerStick = document.createElement( 'div' );
triggerStick.className = 'scroll-snap-point';
triggerStick.style.height = this.scrollTriggerHeight + 'px';
triggerStick.style.scrollSnapAlign = useCompactLayout ? 'center' : 'start';
page.pageElement.appendChild( triggerStick );
if( i === 0 ) {
triggerStick.style.marginTop = -this.scrollTriggerHeight + 'px';
}
}
// In the compact layout, only slides with scroll triggers cover the
// full viewport height. This helps avoid empty gaps before or after
// a sticky slide.
if( useCompactLayout && page.scrollTriggers.length > 0 ) {
page.pageHeight = viewportHeight;
page.pageElement.style.setProperty( '--page-height', viewportHeight + 'px' );
}
else {
page.pageHeight = pageHeight;
page.pageElement.style.removeProperty( '--page-height' );
}
// Add scroll padding based on how many scroll triggers we have
page.scrollPadding = this.scrollTriggerHeight * totalScrollTriggerCount;
// The total height including scrollable space
page.totalHeight = page.pageHeight + page.scrollPadding;
// This is used to pad the height of our page in CSS
page.pageElement.style.setProperty( '--page-scroll-padding', page.scrollPadding + 'px' );
// If this is a sticky page, stick it to the vertical center
if( totalScrollTriggerCount > 0 ) {
page.stickyElement.style.position = 'sticky';
page.stickyElement.style.top = Math.max( ( viewportHeight - page.pageHeight ) / 2, 0 ) + 'px';
}
else {
page.stickyElement.style.position = 'relative';
page.pageElement.style.scrollSnapAlign = page.pageHeight < viewportHeight ? 'center' : 'start';
}
return page;
} );
this.setTriggerRanges();
/*
console.log(this.slideTriggers.map( t => {
return {
range: `${t.range[0].toFixed(2)}-${t.range[1].toFixed(2)}`,
triggers: t.page.scrollTriggers.map( t => {
return `${t.range[0].toFixed(2)}-${t.range[1].toFixed(2)}`
}).join( ', ' ),
}
}))
*/
this.viewportElement.setAttribute( 'data-scrollbar', config.scrollProgress );
if( config.scrollProgress && this.totalScrollTriggerCount > 1 ) {
// Create the progress bar if it doesn't already exist
if( !this.progressBar ) this.createProgressBar();
this.syncProgressBar();
}
else {
this.removeProgressBar();
}
}
/**
* Calculates and sets the scroll range for all of our scroll
* triggers.
*/
setTriggerRanges() {
// Calculate the total number of scroll triggers
this.totalScrollTriggerCount = this.slideTriggers.reduce( ( total, trigger ) => {
return total + Math.max( trigger.page.scrollTriggers.length, 1 );
}, 0 );
let rangeStart = 0;
// Calculate the scroll range of each scroll trigger on a scale
// of 0-1
this.slideTriggers.forEach( ( trigger, i ) => {
trigger.range = [
rangeStart,
rangeStart + Math.max( trigger.page.scrollTriggers.length, 1 ) / this.totalScrollTriggerCount
];
const scrollTriggerSegmentSize = ( trigger.range[1] - trigger.range[0] ) / trigger.page.scrollTriggers.length;
// Set the range for each inner scroll trigger
trigger.page.scrollTriggers.forEach( ( scrollTrigger, i ) => {
scrollTrigger.range = [
rangeStart + i * scrollTriggerSegmentSize,
rangeStart + ( i + 1 ) * scrollTriggerSegmentSize
];
} );
rangeStart = trigger.range[1];
} );
// Ensure the last trigger extends to the end of the page, otherwise
// rounding errors can cause the last trigger to end at 0.999999...
this.slideTriggers[this.slideTriggers.length - 1].range[1] = 1;
}
/**
* Creates one scroll trigger for each fragments in the given page.
*
* @param {*} page
*/
createFragmentTriggersForPage( page, slideElement ) {
slideElement = slideElement || page.slideElement;
// Each fragment 'group' is an array containing one or more
// fragments. Multiple fragments that appear at the same time
// are part of the same group.
const fragmentGroups = this.Reveal.fragments.sort( slideElement.querySelectorAll( '.fragment' ), true );
// Create scroll triggers that show/hide fragments
if( fragmentGroups.length ) {
page.fragments = this.Reveal.fragments.sort( slideElement.querySelectorAll( '.fragment:not(.disabled)' ) );
page.scrollTriggers.push(
// Trigger for the initial state with no fragments visible
{
activate: () => {
this.Reveal.fragments.update( -1, page.fragments, slideElement );
}
}
);
// Triggers for each fragment group
fragmentGroups.forEach( ( fragments, i ) => {
page.scrollTriggers.push({
activate: () => {
this.Reveal.fragments.update( i, page.fragments, slideElement );
}
});
} );
}
return page.scrollTriggers.length;
}
/**
* Creates scroll triggers for the auto-animate steps in the
* given page.
*
* @param {*} page
*/
createAutoAnimateTriggersForPage( page ) {
if( page.autoAnimateElements.length > 0 ) {
// Triggers for each subsequent auto-animate slide
this.slideTriggers.push( ...Array.from( page.autoAnimateElements ).map( ( autoAnimateElement, i ) => {
let autoAnimatePage = this.createPage({
slideElement: autoAnimateElement.querySelector( 'section' ),
contentElement: autoAnimateElement,
backgroundElement: autoAnimateElement.querySelector( '.slide-background' )
});
// Create fragment scroll triggers for the auto-animate slide
this.createFragmentTriggersForPage( autoAnimatePage, autoAnimatePage.slideElement );
page.autoAnimatePages.push( autoAnimatePage );
// Return our slide trigger
return {
page: autoAnimatePage,
activate: () => this.activatePage( autoAnimatePage ),
deactivate: () => this.deactivatePage( autoAnimatePage )
};
}));
}
}
/**
* Helper method for creating a page definition and adding
* required fields. A "page" is a slide or auto-animate step.
*/
createPage( page ) {
page.scrollTriggers = [];
page.indexh = parseInt( page.slideElement.getAttribute( 'data-index-h' ), 10 );
page.indexv = parseInt( page.slideElement.getAttribute( 'data-index-v' ), 10 );
return page;
}
/**
* Rerenders progress bar segments so that they match the current
* reveal.js config and size.
*/
syncProgressBar() {
this.progressBarInner.querySelectorAll( '.scrollbar-slide' ).forEach( slide => slide.remove() );
const scrollHeight = this.viewportElement.scrollHeight;
const viewportHeight = this.viewportElement.offsetHeight;
const viewportHeightFactor = viewportHeight / scrollHeight;
this.progressBarHeight = this.progressBarInner.offsetHeight;
this.playheadHeight = Math.max( viewportHeightFactor * this.progressBarHeight, MIN_PLAYHEAD_HEIGHT );
this.progressBarScrollableHeight = this.progressBarHeight - this.playheadHeight;
const progressSegmentHeight = viewportHeight / scrollHeight * this.progressBarHeight;
const spacing = Math.min( progressSegmentHeight / 8, MAX_PROGRESS_SPACING );
this.progressBarPlayhead.style.height = this.playheadHeight - spacing + 'px';
// Don't show individual segments if they're too small
if( progressSegmentHeight > MIN_PROGRESS_SEGMENT_HEIGHT ) {
this.slideTriggers.forEach( slideTrigger => {
const { page } = slideTrigger;
// Visual representation of a slide
page.progressBarSlide = document.createElement( 'div' );
page.progressBarSlide.className = 'scrollbar-slide';
page.progressBarSlide.style.top = slideTrigger.range[0] * this.progressBarHeight + 'px';
page.progressBarSlide.style.height = ( slideTrigger.range[1] - slideTrigger.range[0] ) * this.progressBarHeight - spacing + 'px';
page.progressBarSlide.classList.toggle( 'has-triggers', page.scrollTriggers.length > 0 );
this.progressBarInner.appendChild( page.progressBarSlide );
// Visual representations of each scroll trigger
page.scrollTriggerElements = page.scrollTriggers.map( ( trigger, i ) => {
const triggerElement = document.createElement( 'div' );
triggerElement.className = 'scrollbar-trigger';
triggerElement.style.top = ( trigger.range[0] - slideTrigger.range[0] ) * this.progressBarHeight + 'px';
triggerElement.style.height = ( trigger.range[1] - trigger.range[0] ) * this.progressBarHeight - spacing + 'px';
page.progressBarSlide.appendChild( triggerElement );
if( i === 0 ) triggerElement.style.display = 'none';
return triggerElement;
} );
} );
}
else {
this.pages.forEach( page => page.progressBarSlide = null );
}
}
/**
* Reads the current scroll position and updates our active
* trigger states accordingly.
*/
syncScrollPosition() {
const viewportHeight = this.viewportElement.offsetHeight;
const viewportHeightFactor = viewportHeight / this.viewportElement.scrollHeight;
const scrollTop = this.viewportElement.scrollTop;
const scrollHeight = this.viewportElement.scrollHeight - viewportHeight
const scrollProgress = Math.max( Math.min( scrollTop / scrollHeight, 1 ), 0 );
const scrollProgressMid = Math.max( Math.min( ( scrollTop + viewportHeight / 2 ) / this.viewportElement.scrollHeight, 1 ), 0 );
let activePage;
this.slideTriggers.forEach( ( trigger ) => {
const { page } = trigger;
const shouldPreload = scrollProgress >= trigger.range[0] - viewportHeightFactor*2 &&
scrollProgress <= trigger.range[1] + viewportHeightFactor*2;
// Load slides that are within the preload range
if( shouldPreload && !page.loaded ) {
page.loaded = true;
this.Reveal.slideContent.load( page.slideElement );
}
else if( page.loaded ) {
page.loaded = false;
this.Reveal.slideContent.unload( page.slideElement );
}
// If we're within this trigger range, activate it
if( scrollProgress >= trigger.range[0] && scrollProgress <= trigger.range[1] ) {
this.activateTrigger( trigger );
activePage = trigger.page;
}
// .. otherwise deactivate
else if( trigger.active ) {
this.deactivateTrigger( trigger );
}
} );
// Each page can have its own scroll triggers, check if any of those
// need to be activated/deactivated
if( activePage ) {
activePage.scrollTriggers.forEach( ( trigger ) => {
if( scrollProgressMid >= trigger.range[0] && scrollProgressMid <= trigger.range[1] ) {
this.activateTrigger( trigger );
}
else if( trigger.active ) {
this.deactivateTrigger( trigger );
}
} );
}
// Update our visual progress indication
this.setProgressBarValue( scrollTop / ( this.viewportElement.scrollHeight - viewportHeight ) );
}
/**
* Moves the progress bar playhead to the specified position.
*
* @param {number} progress 0-1
*/
setProgressBarValue( progress ) {
if( this.progressBar ) {
this.progressBarPlayhead.style.transform = `translateY(${progress * this.progressBarScrollableHeight}px)`;
this.getAllPages()
.filter( page => page.progressBarSlide )
.forEach( ( page ) => {
page.progressBarSlide.classList.toggle( 'active', page.active === true );
page.scrollTriggers.forEach( ( trigger, i ) => {
page.scrollTriggerElements[i].classList.toggle( 'active', page.active === true && trigger.active === true );
} );
} );
this.showProgressBar();
}
}
/**
* Show the progress bar and, if configured, automatically hide
* it after a delay.
*/
showProgressBar() {
this.progressBar.classList.add( 'visible' );
clearTimeout( this.hideProgressBarTimeout );
if( this.Reveal.getConfig().scrollProgress === 'auto' && !this.draggingProgressBar ) {
this.hideProgressBarTimeout = setTimeout( () => {
if( this.progressBar ) {
this.progressBar.classList.remove( 'visible' );
}
}, HIDE_SCROLLBAR_TIMEOUT );
}
}
/**
* Scroll to the previous page.
*/
prev() {
this.viewportElement.scrollTop -= this.scrollTriggerHeight;
}
/**
* Scroll to the next page.
*/
next() {
this.viewportElement.scrollTop += this.scrollTriggerHeight;
}
/**
* Scrolls the given slide element into view.
*
* @param {HTMLElement} slideElement
*/
scrollToSlide( slideElement ) {
// If the scroll view isn't active yet, queue this action
if( !this.active ) {
this.activatedCallbacks.push( () => this.scrollToSlide( slideElement ) );
}
else {
// Find the trigger for this slide
const trigger = this.getScrollTriggerBySlide( slideElement );
if( trigger ) {
// Use the trigger's range to calculate the scroll position
this.viewportElement.scrollTop = trigger.range[0] * ( this.viewportElement.scrollHeight - this.viewportElement.offsetHeight );
}
}
}
/**
* Persists the current scroll position to session storage
* so that it can be restored.
*/
storeScrollPosition() {
clearTimeout( this.storeScrollPositionTimeout );
this.storeScrollPositionTimeout = setTimeout( () => {
sessionStorage.setItem( 'reveal-scroll-top', this.viewportElement.scrollTop );
sessionStorage.setItem( 'reveal-scroll-origin', location.origin + location.pathname );
this.storeScrollPositionTimeout = null;
}, 50 );
}
/**
* Restores the scroll position when a deck is reloader.
*/
restoreScrollPosition() {
const scrollPosition = sessionStorage.getItem( 'reveal-scroll-top' );
const scrollOrigin = sessionStorage.getItem( 'reveal-scroll-origin' );
if( scrollPosition && scrollOrigin === location.origin + location.pathname ) {
this.viewportElement.scrollTop = parseInt( scrollPosition, 10 );
}
}
/**
* Activates the given page and starts its embedded content
* if there is any.
*
* @param {object} page
*/
activatePage( page ) {
if( !page.active ) {
page.active = true;
const { slideElement, backgroundElement, contentElement, indexh, indexv } = page;
contentElement.style.display = 'block';
slideElement.classList.add( 'present' );
if( backgroundElement ) {
backgroundElement.classList.add( 'present' );
}
this.Reveal.setCurrentScrollPage( slideElement, indexh, indexv );
this.Reveal.backgrounds.bubbleSlideContrastClassToElement( slideElement, this.viewportElement );
// If this page is part of an auto-animation there will be one
// content element per auto-animated page. We need to show the
// current page and hide all others.
Array.from( contentElement.parentNode.querySelectorAll( '.scroll-page-content' ) ).forEach( sibling => {
if( sibling !== contentElement ) {
sibling.style.display = 'none';
}
});
}
}
/**
* Deactivates the page after it has been visible.
*
* @param {object} page
*/
deactivatePage( page ) {
if( page.active ) {
page.active = false;
if( page.slideElement ) page.slideElement.classList.remove( 'present' );
if( page.backgroundElement ) page.backgroundElement.classList.remove( 'present' );
}
}
activateTrigger( trigger ) {
if( !trigger.active ) {
trigger.active = true;
trigger.activate();
}
}
deactivateTrigger( trigger ) {
if( trigger.active ) {
trigger.active = false;
if( trigger.deactivate ) {
trigger.deactivate();
}
}
}
/**
* Retrieve a slide by its original h/v index (i.e. the indices the
* slide had before being linearized).
*
* @param {number} h
* @param {number} v
* @returns {HTMLElement}
*/
getSlideByIndices( h, v ) {
const page = this.getAllPages().find( page => {
return page.indexh === h && page.indexv === v;
} );
return page ? page.slideElement : null;
}
/**
* Retrieve a list of all scroll triggers for the given slide
* DOM element.
*
* @param {HTMLElement} slide
* @returns {Array}
*/
getScrollTriggerBySlide( slide ) {
return this.slideTriggers.find( trigger => trigger.page.slideElement === slide );
}
/**
* Get a list of all pages in the scroll view. This includes
* both top-level slides and auto-animate steps.
*
* @returns {Array}
*/
getAllPages() {
return this.pages.flatMap( page => [page, ...(page.autoAnimatePages || [])] );
}
onScroll() {
this.syncScrollPosition();
this.storeScrollPosition();
}
get viewportElement() {
return this.Reveal.getViewportElement();
}
}

View File

@@ -1,7 +1,8 @@
import { HORIZONTAL_SLIDES_SELECTOR, VERTICAL_SLIDES_SELECTOR } from '../utils/constants.js'
import { extend, queryAll, closestParent } from '../utils/util.js'
import { extend, queryAll, closest, getMimeTypeFromFile, encodeRFC3986URI } from '../utils/util.js'
import { isMobile } from '../utils/device.js'
import fitty from 'fitty';
/**
* Handles loading, unloading and playback of slide
* content such as images, videos and iframes.
@@ -24,6 +25,10 @@ export default class SlideContent {
*/
shouldPreload( element ) {
if( this.Reveal.isScrollView() ) {
return true;
}
// Prefer an explicit global preload setting
let preload = this.Reveal.getConfig().preloadIframes;
@@ -68,6 +73,11 @@ export default class SlideContent {
sources += 1;
} );
// Enable inline video playback in mobile Safari
if( isMobile && media.tagName === 'VIDEO' ) {
media.setAttribute( 'playsinline', '' );
}
// If we rewrote sources for this video/audio element, we need
// to manually tell it to load from its new origin
if( sources > 0 ) {
@@ -95,32 +105,52 @@ export default class SlideContent {
// Images
if( backgroundImage ) {
backgroundContent.style.backgroundImage = 'url('+ encodeURI( backgroundImage ) +')';
// base64
if( /^data:/.test( backgroundImage.trim() ) ) {
backgroundContent.style.backgroundImage = `url(${backgroundImage.trim()})`;
}
// URL(s)
else {
backgroundContent.style.backgroundImage = backgroundImage.split( ',' ).map( background => {
// Decode URL(s) that are already encoded first
let decoded = decodeURI(background.trim());
return `url(${encodeRFC3986URI(decoded)})`;
}).join( ',' );
}
}
// Videos
else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {
else if ( backgroundVideo ) {
let video = document.createElement( 'video' );
if( backgroundVideoLoop ) {
video.setAttribute( 'loop', '' );
}
if( backgroundVideoMuted ) {
if( backgroundVideoMuted || this.Reveal.isSpeakerNotes() ) {
video.muted = true;
}
// Inline video playback works (at least in Mobile Safari) as
// long as the video is muted and the `playsinline` attribute is
// present
// Enable inline playback in mobile Safari
//
// Mute is required for video to play when using
// swipe gestures to navigate since they don't
// count as direct user actions :'(
if( isMobile ) {
video.muted = true;
video.autoplay = true;
video.setAttribute( 'playsinline', '' );
}
// Support comma separated lists of video sources
backgroundVideo.split( ',' ).forEach( source => {
video.innerHTML += '<source src="'+ source +'">';
const sourceElement = document.createElement( 'source' );
sourceElement.setAttribute( 'src', source );
let type = getMimeTypeFromFile( source );
if( type ) {
sourceElement.setAttribute( 'type', type );
}
video.appendChild( sourceElement );
} );
backgroundContent.appendChild( video );
@@ -159,6 +189,27 @@ export default class SlideContent {
}
this.layout( slide );
}
/**
* Applies JS-dependent layout helpers for the scope.
*/
layout( scopeElement ) {
// Autosize text with the r-fit-text class based on the
// size of its container. This needs to happen after the
// slide is visible in order to measure the text.
Array.from( scopeElement.querySelectorAll( '.r-fit-text' ) ).forEach( element => {
fitty( element, {
minSize: 24,
maxSize: this.Reveal.getConfig().height * 0.8,
observeMutations: false,
observeWindow: false
} );
} );
}
/**
@@ -229,7 +280,9 @@ export default class SlideContent {
*/
startEmbeddedContent( element ) {
if( element && !this.Reveal.isSpeakerNotes() ) {
if( element ) {
const isSpeakerNotesWindow = this.Reveal.isSpeakerNotes();
// Restart GIFs
queryAll( element, 'img[src$=".gif"]' ).forEach( el => {
@@ -240,7 +293,7 @@ export default class SlideContent {
// HTML5 media elements
queryAll( element, 'video, audio' ).forEach( el => {
if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) {
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
return;
}
@@ -250,11 +303,14 @@ export default class SlideContent {
// If no global setting is available, fall back on the element's
// own autoplay setting
if( typeof autoplay !== 'boolean' ) {
autoplay = el.hasAttribute( 'data-autoplay' ) || !!closestParent( el, '.slide-background' );
autoplay = el.hasAttribute( 'data-autoplay' ) || !!closest( el, '.slide-background' );
}
if( autoplay && typeof el.play === 'function' ) {
// In the speaker view we only auto-play muted media
if( isSpeakerNotesWindow && !el.muted ) return;
// If the media is ready, start playback
if( el.readyState > 1 ) {
this.startEmbeddedMedia( { target: el } );
@@ -286,27 +342,33 @@ export default class SlideContent {
}
} );
// Normal iframes
queryAll( element, 'iframe[src]' ).forEach( el => {
if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) {
return;
}
// Don't play iframe content in the speaker view since we can't
// guarantee that it's muted
if( !isSpeakerNotesWindow ) {
this.startEmbeddedIframe( { target: el } );
} );
// Normal iframes
queryAll( element, 'iframe[src]' ).forEach( el => {
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
return;
}
// Lazy loading iframes
queryAll( element, 'iframe[data-src]' ).forEach( el => {
if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) {
return;
}
this.startEmbeddedIframe( { target: el } );
} );
if( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) {
el.removeEventListener( 'load', this.startEmbeddedIframe ); // remove first to avoid dupes
el.addEventListener( 'load', this.startEmbeddedIframe );
el.setAttribute( 'src', el.getAttribute( 'data-src' ) );
}
} );
// Lazy loading iframes
queryAll( element, 'iframe[data-src]' ).forEach( el => {
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
return;
}
if( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) {
el.removeEventListener( 'load', this.startEmbeddedIframe ); // remove first to avoid dupes
el.addEventListener( 'load', this.startEmbeddedIframe );
el.setAttribute( 'src', el.getAttribute( 'data-src' ) );
}
} );
}
}
@@ -320,12 +382,15 @@ export default class SlideContent {
*/
startEmbeddedMedia( event ) {
let isAttachedToDOM = !!closestParent( event.target, 'html' ),
isVisible = !!closestParent( event.target, '.present' );
let isAttachedToDOM = !!closest( event.target, 'html' ),
isVisible = !!closest( event.target, '.present' );
if( isAttachedToDOM && isVisible ) {
event.target.currentTime = 0;
event.target.play();
// Don't restart if media is already playing
if( event.target.paused || event.target.ended ) {
event.target.currentTime = 0;
event.target.play();
}
}
event.target.removeEventListener( 'loadeddata', this.startEmbeddedMedia );
@@ -344,8 +409,8 @@ export default class SlideContent {
if( iframe && iframe.contentWindow ) {
let isAttachedToDOM = !!closestParent( event.target, 'html' ),
isVisible = !!closestParent( event.target, '.present' );
let isAttachedToDOM = !!closest( event.target, 'html' ),
isVisible = !!closest( event.target, '.present' );
if( isAttachedToDOM && isVisible ) {
@@ -355,7 +420,7 @@ export default class SlideContent {
// If no global setting is available, fall back on the element's
// own autoplay setting
if( typeof autoplay !== 'boolean' ) {
autoplay = iframe.hasAttribute( 'data-autoplay' ) || !!closestParent( iframe, '.slide-background' );
autoplay = iframe.hasAttribute( 'data-autoplay' ) || !!closest( iframe, '.slide-background' );
}
// YouTube postMessage API
@@ -432,4 +497,4 @@ export default class SlideContent {
}
}
}

View File

@@ -1,3 +1,10 @@
import {
SLIDE_NUMBER_FORMAT_CURRENT,
SLIDE_NUMBER_FORMAT_CURRENT_SLASH_TOTAL,
SLIDE_NUMBER_FORMAT_HORIZONTAL_DOT_VERTICAL,
SLIDE_NUMBER_FORMAT_HORIZONTAL_SLASH_VERTICAL
} from "../utils/constants";
/**
* Handles the display of reveal.js' optional slide number.
*/
@@ -23,7 +30,7 @@ export default class SlideNumber {
configure( config, oldConfig ) {
let slideNumberDisplay = 'none';
if( config.slideNumber && !this.Reveal.isPrintingPDF() ) {
if( config.slideNumber && !this.Reveal.isPrintView() ) {
if( config.showSlideNumber === 'all' ) {
slideNumberDisplay = 'block';
}
@@ -56,7 +63,7 @@ export default class SlideNumber {
let config = this.Reveal.getConfig();
let value;
let format = 'h.v';
let format = SLIDE_NUMBER_FORMAT_HORIZONTAL_DOT_VERTICAL;
if ( typeof config.slideNumber === 'function' ) {
value = config.slideNumber( slide );
@@ -69,21 +76,24 @@ export default class SlideNumber {
// If there are ONLY vertical slides in this deck, always use
// a flattened slide number
if( !/c/.test( format ) && this.Reveal.getHorizontalSlides().length === 1 ) {
format = 'c';
format = SLIDE_NUMBER_FORMAT_CURRENT;
}
// Offset the current slide number by 1 to make it 1-indexed
let horizontalOffset = slide && slide.dataset.visibility === 'uncounted' ? 0 : 1;
value = [];
switch( format ) {
case 'c':
value.push( this.Reveal.getSlidePastCount( slide ) + 1 );
case SLIDE_NUMBER_FORMAT_CURRENT:
value.push( this.Reveal.getSlidePastCount( slide ) + horizontalOffset );
break;
case 'c/t':
value.push( this.Reveal.getSlidePastCount( slide ) + 1, '/', this.Reveal.getTotalSlides() );
case SLIDE_NUMBER_FORMAT_CURRENT_SLASH_TOTAL:
value.push( this.Reveal.getSlidePastCount( slide ) + horizontalOffset, '/', this.Reveal.getTotalSlides() );
break;
default:
let indices = this.Reveal.getIndices( slide );
value.push( indices.h + 1 );
let sep = format === 'h/v' ? '/' : '.';
value.push( indices.h + horizontalOffset );
let sep = format === SLIDE_NUMBER_FORMAT_HORIZONTAL_SLASH_VERTICAL ? '/' : '.';
if( this.Reveal.isVerticalSlide( slide ) ) value.push( sep, indices.v + 1 );
}
}
@@ -120,4 +130,10 @@ export default class SlideNumber {
}
destroy() {
this.element.remove();
}
}

View File

@@ -1,4 +1,5 @@
import { isAndroid } from '../utils/device.js'
import { matches } from '../utils/util.js'
const SWIPE_THRESHOLD = 40;
@@ -82,6 +83,9 @@ export default class Touch {
*/
isSwipePrevented( target ) {
// Prevent accidental swipes when scrubbing timelines
if( matches( target, 'video[controls], audio[controls]' ) ) return true;
while( target && typeof target.hasAttribute === 'function' ) {
if( target.hasAttribute( 'data-prevent-swipe' ) ) return true;
target = target.parentNode;
@@ -99,6 +103,8 @@ export default class Touch {
*/
onTouchStart( event ) {
this.touchCaptured = false;
if( this.isSwipePrevented( event.target ) ) return true;
this.touchStartX = event.touches[0].clientX;

View File

@@ -1,4 +1,4 @@
import Deck from './reveal.js'
import Deck, { VERSION } from './reveal.js'
/**
* Expose the Reveal class to the window. To create a
@@ -45,10 +45,14 @@ Reveal.initialize = options => {
* queuing up premature API calls and invoking all
* of them when Reveal.initialize is called.
*/
[ 'on', 'off', 'addEventListener', 'removeEventListener', 'registerPlugin' ].forEach( method => {
[ 'configure', 'on', 'off', 'addEventListener', 'removeEventListener', 'registerPlugin' ].forEach( method => {
Reveal[method] = ( ...args ) => {
enqueuedAPICalls.push( deck => deck[method].call( null, ...args ) );
}
} );
Reveal.isReady = () => false;
Reveal.VERSION = VERSION;
export default Reveal;

File diff suppressed because it is too large Load Diff

View File

@@ -29,9 +29,9 @@ export const colorToRgb = ( color ) => {
if( hex6 && hex6[1] ) {
hex6 = hex6[1];
return {
r: parseInt( hex6.substr( 0, 2 ), 16 ),
g: parseInt( hex6.substr( 2, 2 ), 16 ),
b: parseInt( hex6.substr( 4, 2 ), 16 )
r: parseInt( hex6.slice( 0, 2 ), 16 ),
g: parseInt( hex6.slice( 2, 4 ), 16 ),
b: parseInt( hex6.slice( 4, 6 ), 16 )
};
}
@@ -44,7 +44,7 @@ export const colorToRgb = ( color ) => {
};
}
let rgba = color.match( /^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i );
let rgba = color.match( /^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i );
if( rgba ) {
return {
r: parseInt( rgba[1], 10 ),

View File

@@ -2,9 +2,16 @@
export const SLIDES_SELECTOR = '.slides section';
export const HORIZONTAL_SLIDES_SELECTOR = '.slides>section';
export const VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section';
export const HORIZONTAL_BACKGROUNDS_SELECTOR = '.backgrounds>.slide-background';
// Methods that may not be invoked via the postMessage API
export const POST_MESSAGE_METHOD_BLACKLIST = /registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/;
export const POST_MESSAGE_METHOD_BLACKLIST = /registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener|showPreview/;
// Regex for retrieving the fragment style from a class attribute
export const FRAGMENT_STYLE_REGEX = /fade-(down|up|right|left|out|in-then-out|in-then-semi-out)|semi-fade-out|current-visible|shrink|grow/;
export const FRAGMENT_STYLE_REGEX = /fade-(down|up|right|left|out|in-then-out|in-then-semi-out)|semi-fade-out|current-visible|shrink|grow/;
// Slide number formats
export const SLIDE_NUMBER_FORMAT_HORIZONTAL_DOT_VERTICAL = 'h.v';
export const SLIDE_NUMBER_FORMAT_HORIZONTAL_SLASH_VERTICAL = 'h/v';
export const SLIDE_NUMBER_FORMAT_CURRENT = 'c';
export const SLIDE_NUMBER_FORMAT_CURRENT_SLASH_TOTAL = 'c/t';

View File

@@ -1,17 +1,8 @@
const UA = navigator.userAgent;
const testElement = document.createElement( 'div' );
export const isMobile = /(iphone|ipod|ipad|android)/gi.test( UA ) ||
( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 ); // iPadOS
export const isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );
export const isAndroid = /android/gi.test( UA );
// Flags if we should use zoom instead of transform to scale
// up slides. Zoom produces crisper results but has a lot of
// xbrowser quirks so we only use it in whitelisted browsers.
export const supportsZoom = 'zoom' in testElement.style && !isMobile &&
( isChrome || /Version\/[\d\.]+.*Safari/.test( UA ) );
export const supportsHistoryAPI = typeof window.history.replaceState === 'function' && !/PhantomJS/.test( UA );
export const isAndroid = /android/gi.test( UA );

View File

@@ -85,6 +85,23 @@ export const transformElement = ( element, transform ) => {
}
/**
* Element.matches with IE support.
*
* @param {HTMLElement} target The element to match
* @param {String} selector The CSS selector to match
* the element against
*
* @return {Boolean}
*/
export const matches = ( target, selector ) => {
let matchesMethod = target.matches || target.matchesSelector || target.msMatchesSelector;
return !!( matchesMethod && matchesMethod.call( target, selector ) );
}
/**
* Find the closest parent that matches the given
* selector.
@@ -96,25 +113,21 @@ export const transformElement = ( element, transform ) => {
* @return {HTMLElement} The matched parent or null
* if no matching parent was found
*/
export const closestParent = ( target, selector ) => {
export const closest = ( target, selector ) => {
let parent = target.parentNode;
// Native Element.closest
if( typeof target.closest === 'function' ) {
return target.closest( selector );
}
while( parent ) {
// There's some overhead doing this each time, we don't
// want to rewrite the element prototype but should still
// be enough to feature detect once at startup...
let matchesMethod = parent.matches || parent.matchesSelector || parent.msMatchesSelector;
// If we find a match, we're all set
if( matchesMethod && matchesMethod.call( parent, selector ) ) {
return parent;
// Polyfill
while( target ) {
if( matches( target, selector ) ) {
return target;
}
// Keep searching
parent = parent.parentNode;
target = target.parentNode;
}
return null;
@@ -266,4 +279,35 @@ export const getRemainingHeight = ( element, height = 0 ) => {
return height;
}
const fileExtensionToMimeMap = {
'mp4': 'video/mp4',
'm4a': 'video/mp4',
'ogv': 'video/ogg',
'mpeg': 'video/mpeg',
'webm': 'video/webm'
}
/**
* Guess the MIME type for common file formats.
*/
export const getMimeTypeFromFile = ( filename='' ) => {
return fileExtensionToMimeMap[filename.split('.').pop()]
}
/**
* Encodes a string for RFC3986-compliant URL format.
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI#encoding_for_rfc3986
*
* @param {string} url
*/
export const encodeRFC3986URI = ( url='' ) => {
return encodeURI(url)
.replace(/%5B/g, "[")
.replace(/%5D/g, "]")
.replace(
/[!'()*]/g,
(c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`
);
}

15035
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "reveal.js",
"version": "4.0.0-rc.1",
"version": "5.2.0",
"description": "The HTML Presentation Framework",
"homepage": "https://revealjs.com",
"subdomain": "revealjs",
@@ -22,7 +22,7 @@
"url": "git://github.com/hakimel/reveal.js.git"
},
"engines": {
"node": ">=10.0.0"
"node": ">=18.0.0"
},
"keywords": [
"reveal",
@@ -30,43 +30,53 @@
"presentation"
],
"devDependencies": {
"@babel/core": "^7.8.7",
"@babel/preset-env": "^7.8.7",
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-node-resolve": "^7.1.3",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-html-import-to-string": "0.0.1",
"@babel/core": "^7.23.2",
"@babel/eslint-parser": "^7.22.15",
"@babel/preset-env": "^7.23.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"babel-plugin-transform-html-import-to-string": "2.0.0",
"colors": "^1.4.0",
"core-js": "^3.6.5",
"glob": "^7.1.6",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-clean-css": "^4.2.0",
"core-js": "^3.33.1",
"fitty": "^2.3.7",
"glob": "^10.3.10",
"gulp": "^5.0.0",
"gulp-autoprefixer": "^8.0.0",
"gulp-clean-css": "^4.3.0",
"gulp-connect": "^5.7.0",
"gulp-eslint": "^6.0.0",
"gulp-header": "^2.0.9",
"gulp-sass": "^4.0.2",
"gulp-tap": "^2.0.0",
"gulp-zip": "^5.0.1",
"highlight.js": "^10.0.1",
"marked": "^1.0.0",
"node-qunit-puppeteer": "^2.0.1",
"qunit": "^2.9.3",
"rollup": "^2.6.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-terser": "^5.3.0",
"yargs": "^15.1.0"
"gulp-header-comment": "^0.10.0",
"gulp-zip": "^5.1.0",
"highlight.js": "^11.9.0",
"marked": "^4.3.0",
"node-qunit-puppeteer": "^2.2.0",
"through2": "^4.0.2",
"qunit": "^2.22.0",
"rollup": "^4.1.5",
"sass": "^1.79.4",
"yargs": "^17.7.2"
},
"browserslist": "> 0.5%, IE 11, not dead",
"overrides": {
"gulp-connect": {
"send": "0.19.0"
},
"gulp-header-comment": {
"moment": "2.30.1"
}
},
"browserslist": "> 2%, not dead",
"eslintConfig": {
"env": {
"browser": true,
"es6": true
},
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": true
"allowImportExportEverywhere": true,
"requireConfigFile": false
},
"globals": {
"module": false,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
import hljs from 'highlight.js'
import hljs from 'highlight.js';
/* highlightjs-line-numbers.js 2.8.0 | (C) 2018 Yauheni Pakala | MIT License | github.com/wcoder/highlightjs-line-numbers.js */
!function(r,o){"use strict";var e,i="hljs-ln",l="hljs-ln-line",h="hljs-ln-code",s="hljs-ln-numbers",c="hljs-ln-n",m="data-line-number",a=/\r\n|\r|\n/g;function u(e){for(var n=e.toString(),t=e.anchorNode;"TD"!==t.nodeName;)t=t.parentNode;for(var r=e.focusNode;"TD"!==r.nodeName;)r=r.parentNode;var o=parseInt(t.dataset.lineNumber),a=parseInt(r.dataset.lineNumber);if(o==a)return n;var i,l=t.textContent,s=r.textContent;for(a<o&&(i=o,o=a,a=i,i=l,l=s,s=i);0!==n.indexOf(l);)l=l.slice(1);for(;-1===n.lastIndexOf(s);)s=s.slice(0,-1);for(var c=l,u=function(e){for(var n=e;"TABLE"!==n.nodeName;)n=n.parentNode;return n}(t),d=o+1;d<a;++d){var f=p('.{0}[{1}="{2}"]',[h,m,d]);c+="\n"+u.querySelector(f).textContent}return c+="\n"+s}function n(e){try{var n=o.querySelectorAll("code.hljs,code.nohighlight");for(var t in n)n.hasOwnProperty(t)&&(n[t].classList.contains("nohljsln")||d(n[t],e))}catch(e){r.console.error("LineNumbers error: ",e)}}function d(e,n){if("object"==typeof e)e.innerHTML=f(e,n)}function f(e,n){var t,r,o=(t=e,{singleLine:function(e){return!!e.singleLine&&e.singleLine}(r=(r=n)||{}),startFrom:function(e,n){var t=1;isFinite(n.startFrom)&&(t=n.startFrom);var r=function(e,n){return e.hasAttribute(n)?e.getAttribute(n):null}(e,"data-ln-start-from");return null!==r&&(t=function(e,n){if(!e)return n;var t=Number(e);return isFinite(t)?t:n}(r,1)),t}(t,r)});return function e(n){var t=n.childNodes;for(var r in t){var o;t.hasOwnProperty(r)&&(o=t[r],0<(o.textContent.trim().match(a)||[]).length&&(0<o.childNodes.length?e(o):v(o.parentNode)))}}(e),function(e,n){var t=g(e);""===t[t.length-1].trim()&&t.pop();if(1<t.length||n.singleLine){for(var r="",o=0,a=t.length;o<a;o++)r+=p('<tr><td class="{0} {1}" {3}="{5}"><div class="{2}" {3}="{5}"></div></td><td class="{0} {4}" {3}="{5}">{6}</td></tr>',[l,s,c,m,h,o+n.startFrom,0<t[o].length?t[o]:" "]);return p('<table class="{0}">{1}</table>',[i,r])}return e}(e.innerHTML,o)}function v(e){var n=e.className;if(/hljs-/.test(n)){for(var t=g(e.innerHTML),r=0,o="";r<t.length;r++){o+=p('<span class="{0}">{1}</span>\n',[n,0<t[r].length?t[r]:" "])}e.innerHTML=o.trim()}}function g(e){return 0===e.length?[]:e.split(a)}function p(e,t){return e.replace(/\{(\d+)\}/g,function(e,n){return void 0!==t[n]?t[n]:e})}hljs?(hljs.initLineNumbersOnLoad=function(e){"interactive"===o.readyState||"complete"===o.readyState?n(e):r.addEventListener("DOMContentLoaded",function(){n(e)})},hljs.lineNumbersBlock=d,hljs.lineNumbersValue=function(e,n){if("string"!=typeof e)return;var t=document.createElement("code");return t.innerHTML=e,f(t,n)},(e=o.createElement("style")).type="text/css",e.innerHTML=p(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[i,c,m]),o.getElementsByTagName("head")[0].appendChild(e)):r.console.error("highlight.js not detected!"),document.addEventListener("copy",function(e){var n,t=window.getSelection();!function(e){for(var n=e;n;){if(n.className&&-1!==n.className.indexOf("hljs-ln-code"))return 1;n=n.parentNode}}(t.anchorNode)||(n=-1!==window.navigator.userAgent.indexOf("Edge")?u(t):t.toString(),e.clipboardData.setData("text/plain",n),e.preventDefault())})}(window,document);
/* highlightjs-line-numbers.js 2.6.0 | (C) 2018 Yauheni Pakala | MIT License | github.com/wcoder/highlightjs-line-numbers.js */
/* Edited by Hakim for reveal.js; removed async timeout */
!function(n,e){"use strict";function t(){var n=e.createElement("style");n.type="text/css",n.innerHTML=g(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[v,L,b]),e.getElementsByTagName("head")[0].appendChild(n)}function r(t){"interactive"===e.readyState||"complete"===e.readyState?i(t):n.addEventListener("DOMContentLoaded",function(){i(t)})}function i(t){try{var r=e.querySelectorAll("code.hljs,code.nohighlight");for(var i in r)r.hasOwnProperty(i)&&l(r[i],t)}catch(o){n.console.error("LineNumbers error: ",o)}}function l(n,e){"object"==typeof n&&f(function(){n.innerHTML=s(n,e)})}function o(n,e){if("string"==typeof n){var t=document.createElement("code");return t.innerHTML=n,s(t,e)}}function s(n,e){e=e||{singleLine:!1};var t=e.singleLine?0:1;return c(n),a(n.innerHTML,t)}function a(n,e){var t=u(n);if(""===t[t.length-1].trim()&&t.pop(),t.length>e){for(var r="",i=0,l=t.length;i<l;i++)r+=g('<tr><td class="{0}"><div class="{1} {2}" {3}="{5}"></div></td><td class="{4}"><div class="{1}">{6}</div></td></tr>',[j,m,L,b,p,i+1,t[i].length>0?t[i]:" "]);return g('<table class="{0}">{1}</table>',[v,r])}return n}function c(n){var e=n.childNodes;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];h(r.textContent)>0&&(r.childNodes.length>0?c(r):d(r.parentNode))}}function d(n){var e=n.className;if(/hljs-/.test(e)){for(var t=u(n.innerHTML),r=0,i="";r<t.length;r++){var l=t[r].length>0?t[r]:" ";i+=g('<span class="{0}">{1}</span>\n',[e,l])}n.innerHTML=i.trim()}}function u(n){return 0===n.length?[]:n.split(y)}function h(n){return(n.trim().match(y)||[]).length}function f(e){e()}function g(n,e){return n.replace(/\{(\d+)\}/g,function(n,t){return e[t]?e[t]:n})}var v="hljs-ln",m="hljs-ln-line",p="hljs-ln-code",j="hljs-ln-numbers",L="hljs-ln-n",b="data-line-number",y=/\r\n|\r|\n/g;hljs?(hljs.initLineNumbersOnLoad=r,hljs.lineNumbersBlock=l,hljs.lineNumbersValue=o,t()):n.console.error("highlight.js not detected!")}(window,document);
/*!
* reveal.js plugin that adds syntax highlight support.
@@ -16,8 +16,10 @@ const Plugin = {
HIGHLIGHT_LINE_DELIMITER: ',',
HIGHLIGHT_LINE_RANGE_DELIMITER: '-',
hljs,
/**
* Highlights code blocks withing the given deck.
* Highlights code blocks within the given deck.
*
* Note that this can be called multiple times if
* there are multiple presentations on one page.
@@ -27,33 +29,53 @@ const Plugin = {
init: function( reveal ) {
// Read the plugin config options and provide fallbacks
var config = reveal.getConfig().highlight || {};
let config = reveal.getConfig().highlight || {};
config.highlightOnLoad = typeof config.highlightOnLoad === 'boolean' ? config.highlightOnLoad : true;
config.escapeHTML = typeof config.escapeHTML === 'boolean' ? config.escapeHTML : true;
[].slice.call( reveal.getRevealElement().querySelectorAll( 'pre code' ) ).forEach( function( block ) {
Array.from( reveal.getRevealElement().querySelectorAll( 'pre code' ) ).forEach( block => {
block.parentNode.classList.add('code-wrapper');
// Code can optionally be wrapped in script template to avoid
// HTML being parsed by the browser (i.e. when you need to
// include <, > or & in your code).
let substitute = block.querySelector( 'script[type="text/template"]' );
if( substitute ) {
// textContent handles the HTML entity escapes for us
block.textContent = substitute.innerHTML;
}
// Trim whitespace if the "data-trim" attribute is present
if( block.hasAttribute( 'data-trim' ) && typeof block.innerHTML.trim === 'function' ) {
block.innerHTML = betterTrim( block );
}
// Escape HTML tags unless the "data-noescape" attrbute is present
// Escape HTML tags unless the "data-noescape" attribute is present
if( config.escapeHTML && !block.hasAttribute( 'data-noescape' )) {
block.innerHTML = block.innerHTML.replace( /</g,"&lt;").replace(/>/g, '&gt;' );
}
// Re-highlight when focus is lost (for contenteditable code)
block.addEventListener( 'focusout', function( event ) {
hljs.highlightBlock( event.currentTarget );
hljs.highlightElement( event.currentTarget );
}, false );
if( config.highlightOnLoad ) {
Plugin.highlightBlock( block );
}
} );
// Triggers a callback function before we trigger highlighting
if( typeof config.beforeHighlight === 'function' ) {
config.beforeHighlight( hljs );
}
// Run initial highlighting for all code
if( config.highlightOnLoad ) {
Array.from( reveal.getRevealElement().querySelectorAll( 'pre code' ) ).forEach( block => {
Plugin.highlightBlock( block );
} );
}
// If we're printing to PDF, scroll the code highlights of
// all blocks in the deck into view at once
reveal.on( 'pdf-ready', function() {
@@ -74,7 +96,7 @@ const Plugin = {
*/
highlightBlock: function( block ) {
hljs.highlightBlock( block );
hljs.highlightElement( block );
// Don't generate line numbers for empty code blocks
if( block.innerHTML.trim().length === 0 ) return;
@@ -84,7 +106,7 @@ const Plugin = {
var scrollState = { currentBlock: block };
// If there is at least one highlight step, generate
// If there is more than one highlight step, generate
// fragments
var highlightSteps = Plugin.deserializeHighlightSteps( block.getAttribute( 'data-line-numbers' ) );
if( highlightSteps.length > 1 ) {
@@ -116,11 +138,11 @@ const Plugin = {
// Scroll highlights into view as we step through them
fragmentBlock.addEventListener( 'visible', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock, scrollState ) );
fragmentBlock.addEventListener( 'hidden', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock.previousSibling, scrollState ) );
fragmentBlock.addEventListener( 'hidden', Plugin.scrollHighlightedLineIntoView.bind( Plugin, fragmentBlock.previousElementSibling, scrollState ) );
} );
block.removeAttribute( 'data-fragment-index' )
block.removeAttribute( 'data-fragment-index' );
block.setAttribute( 'data-line-numbers', Plugin.serializeHighlightSteps( [ highlightSteps[0] ] ) );
}

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More