Merge remote-tracking branch 'upstream/master'
# Conflicts: # README.md
This commit is contained in:
8
.codespellrc
Normal file
8
.codespellrc
Normal 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 =
|
||||
23
.github/workflows/spellcheck.yml
vendored
Normal file
23
.github/workflows/spellcheck.yml
vendored
Normal 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
|
||||
@@ -1,4 +1,4 @@
|
||||
name: tests
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
- push
|
||||
31
README.md
31
README.md
@@ -1,3 +1,32 @@
|
||||
# presentations
|
||||
|
||||
<p align="center">
|
||||
<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>
|
||||
<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://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 beautiful presentations for free. Check out the live demo at [revealjs.com](https://revealjs.com/).
|
||||
|
||||
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/).
|
||||
|
||||
---
|
||||
|
||||
Want to create reveal.js presentation in a graphical editor? Try <https://slides.com>. It's made by the same people behind reveal.js.
|
||||
|
||||
---
|
||||
|
||||
### 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)
|
||||
|
||||
---
|
||||
<div align="center">
|
||||
MIT licensed | Copyright © 2011-2024 Hakim El Hattab, https://hakim.se
|
||||
</div>
|
||||
|
||||
|
||||
275
css/reveal.scss
275
css/reveal.scss
@@ -18,7 +18,7 @@ html.reveal-full-page {
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
height: calc( var(--vh, 1vh) * 100 );
|
||||
height: 100svh;
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,16 @@ html.reveal-full-page {
|
||||
color: #000;
|
||||
|
||||
--r-controls-spacing: 12px;
|
||||
--r-overlay-header-height: 40px;
|
||||
--r-overlay-margin: 0px;
|
||||
--r-overlay-padding: 6px;
|
||||
--r-overlay-gap: 5px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px), (max-height: 768px) {
|
||||
.reveal-viewport {
|
||||
--r-overlay-header-height: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
// Force the presentation to cover the full viewport when we
|
||||
@@ -999,7 +1009,7 @@ $controlsArrowAngleActive: 36deg;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 95px 25px rgba(0,0,0,0.2);
|
||||
|
||||
-webkit-transform: translateZ(-90px) rotateX( 65deg );
|
||||
transform: translateZ(-90px) rotateX( 65deg );
|
||||
}
|
||||
|
||||
.reveal.page .slides>section.stack {
|
||||
@@ -1318,12 +1328,6 @@ $controlsArrowAngleActive: 36deg;
|
||||
perspective-origin: 50% 50%;
|
||||
perspective: 700px;
|
||||
|
||||
.slides {
|
||||
// Fixes overview rendering errors in FF48+, not applied to
|
||||
// other browsers since it degrades performance
|
||||
-moz-transform-style: preserve-3d;
|
||||
}
|
||||
|
||||
.slides section {
|
||||
height: 100%;
|
||||
top: 0 !important;
|
||||
@@ -1335,9 +1339,12 @@ $controlsArrowAngleActive: 36deg;
|
||||
}
|
||||
.slides section:hover,
|
||||
.slides section.present {
|
||||
outline: 10px solid rgba(150,150,150,0.4);
|
||||
outline: 10px solid rgba(150,150,150,0.6);
|
||||
outline-offset: 10px;
|
||||
}
|
||||
.slides section.present {
|
||||
outline: 10px solid var(--r-link-color);
|
||||
}
|
||||
.slides section .fragment {
|
||||
opacity: 1;
|
||||
transition: none;
|
||||
@@ -1356,10 +1363,6 @@ $controlsArrowAngleActive: 36deg;
|
||||
|
||||
.backgrounds {
|
||||
perspective: inherit;
|
||||
|
||||
// Fixes overview rendering errors in FF48+, not applied to
|
||||
// other browsers since it degrades performance
|
||||
-moz-transform-style: preserve-3d;
|
||||
}
|
||||
|
||||
.backgrounds .slide-background {
|
||||
@@ -1439,22 +1442,106 @@ $controlsArrowAngleActive: 36deg;
|
||||
* OVERLAY FOR LINK PREVIEWS AND HELP
|
||||
*********************************************/
|
||||
|
||||
$overlayHeaderHeight: 40px;
|
||||
$overlayHeaderPadding: 5px;
|
||||
|
||||
.reveal > .overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1000;
|
||||
background: rgba( 0, 0, 0, 0.95 );
|
||||
backdrop-filter: blur( 6px );
|
||||
transition: all 0.3s ease;
|
||||
@keyframes fade-in {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.reveal > .overlay .spinner {
|
||||
@keyframes scale-up {
|
||||
from { transform: scale( 0.95 ); }
|
||||
to { transform: scale( 1 ); }
|
||||
}
|
||||
|
||||
.reveal [data-preview-image],
|
||||
.reveal [data-preview-video],
|
||||
.reveal [data-preview-link]:not(a):not([data-preview-link=false]) {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
|
||||
.r-overlay {
|
||||
position: absolute;
|
||||
top: var(--r-overlay-margin);
|
||||
right: var(--r-overlay-margin);
|
||||
bottom: var(--r-overlay-margin);
|
||||
left: var(--r-overlay-margin);
|
||||
border-radius: min( var(--r-overlay-margin), 6px );
|
||||
z-index: 99;
|
||||
background: rgba( 0, 0, 0, 0.95 );
|
||||
backdrop-filter: blur( 10px );
|
||||
transition: all 0.3s ease;
|
||||
color: #fff;
|
||||
animation: fade-in 0.3s ease;
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.r-overlay-viewport {
|
||||
position: absolute;
|
||||
top: var(--r-overlay-padding);
|
||||
right: var(--r-overlay-padding);
|
||||
bottom: var(--r-overlay-padding);
|
||||
left: var(--r-overlay-padding);
|
||||
gap: var(--r-overlay-gap);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.r-overlay-header {
|
||||
display: flex;
|
||||
z-index: 2;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: var(--r-overlay-header-height);
|
||||
gap: 6px;
|
||||
}
|
||||
.r-overlay-header .r-overlay-button {
|
||||
all: unset;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: var(--r-overlay-header-height);
|
||||
min-height: var(--r-overlay-header-height);
|
||||
padding: 0 calc(var(--r-overlay-header-height) / 4);
|
||||
opacity: 1;
|
||||
border-radius: 6px;
|
||||
font-size: 18px;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.r-overlay-header .r-overlay-button:hover {
|
||||
opacity: 1;
|
||||
background-color: rgba( 255, 255, 255, 0.15 );
|
||||
}
|
||||
.r-overlay-header .icon {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
background-position: 50% 50%;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.r-overlay-close .icon {
|
||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTIuODU0IDIuODU0YS41LjUgMCAwIDAtLjcwOC0uNzA4TDcuNSA2Ljc5MyAyLjg1NCAyLjE0NmEuNS41IDAgMSAwLS43MDguNzA4TDYuNzkzIDcuNWwtNC42NDcgNC42NDZhLjUuNSAwIDAgMCAuNzA4LjcwOEw3LjUgOC4yMDdsNC42NDYgNC42NDdhLjUuNSAwIDAgMCAuNzA4LS43MDhMOC4yMDcgNy41bDQuNjQ3LTQuNjQ2WiIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+);
|
||||
}
|
||||
.r-overlay-external .icon {
|
||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMyAyYTEgMSAwIDAgMC0xIDF2OWExIDEgMCAwIDAgMSAxaDlhMSAxIDAgMCAwIDEtMVY4LjVhLjUuNSAwIDAgMC0xIDBWMTJIM1YzaDMuNWEuNS41IDAgMCAwIDAtMUgzWm05Ljg1NC4xNDZhLjUuNSAwIDAgMSAuMTQ2LjM1MVY1LjVhLjUuNSAwIDAgMS0xIDBWMy43MDdMNi44NTQgOC44NTRhLjUuNSAwIDEgMS0uNzA4LS43MDhMMTEuMjkzIDNIOS41YS41LjUgMCAwIDEgMC0xaDNhLjQ5OS40OTkgMCAwIDEgLjM1NC4xNDZaIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=);
|
||||
}
|
||||
|
||||
.r-overlay-content {
|
||||
position: relative;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
flex-grow: 1;
|
||||
background-color: rgba(20, 20, 20, 0.8);
|
||||
animation: scale-up 0.5s cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
}
|
||||
|
||||
.r-overlay-spinner {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 50%;
|
||||
@@ -1465,60 +1552,12 @@ $overlayHeaderPadding: 5px;
|
||||
z-index: 10;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhIAAgAPMAAJmZmf%2F%2F%2F6%2Bvr8nJybW1tcDAwOjo6Nvb26ioqKOjo7Ozs%2FLy8vz8%2FAAAAAAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2FhpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh%2BQQJCgAAACwAAAAAIAAgAAAE5xDISWlhperN52JLhSSdRgwVo1ICQZRUsiwHpTJT4iowNS8vyW2icCF6k8HMMBkCEDskxTBDAZwuAkkqIfxIQyhBQBFvAQSDITM5VDW6XNE4KagNh6Bgwe60smQUB3d4Rz1ZBApnFASDd0hihh12BkE9kjAJVlycXIg7CQIFA6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YJvpJivxNaGmLHT0VnOgSYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ%2FV%2FnmOM82XiHRLYKhKP1oZmADdEAAAh%2BQQJCgAAACwAAAAAIAAgAAAE6hDISWlZpOrNp1lGNRSdRpDUolIGw5RUYhhHukqFu8DsrEyqnWThGvAmhVlteBvojpTDDBUEIFwMFBRAmBkSgOrBFZogCASwBDEY%2FCZSg7GSE0gSCjQBMVG023xWBhklAnoEdhQEfyNqMIcKjhRsjEdnezB%2BA4k8gTwJhFuiW4dokXiloUepBAp5qaKpp6%2BHo7aWW54wl7obvEe0kRuoplCGepwSx2jJvqHEmGt6whJpGpfJCHmOoNHKaHx61WiSR92E4lbFoq%2BB6QDtuetcaBPnW6%2BO7wDHpIiK9SaVK5GgV543tzjgGcghAgAh%2BQQJCgAAACwAAAAAIAAgAAAE7hDISSkxpOrN5zFHNWRdhSiVoVLHspRUMoyUakyEe8PTPCATW9A14E0UvuAKMNAZKYUZCiBMuBakSQKG8G2FzUWox2AUtAQFcBKlVQoLgQReZhQlCIJesQXI5B0CBnUMOxMCenoCfTCEWBsJColTMANldx15BGs8B5wlCZ9Po6OJkwmRpnqkqnuSrayqfKmqpLajoiW5HJq7FL1Gr2mMMcKUMIiJgIemy7xZtJsTmsM4xHiKv5KMCXqfyUCJEonXPN2rAOIAmsfB3uPoAK%2B%2BG%2Bw48edZPK%2BM6hLJpQg484enXIdQFSS1u6UhksENEQAAIfkECQoAAAAsAAAAACAAIAAABOcQyEmpGKLqzWcZRVUQnZYg1aBSh2GUVEIQ2aQOE%2BG%2BcD4ntpWkZQj1JIiZIogDFFyHI0UxQwFugMSOFIPJftfVAEoZLBbcLEFhlQiqGp1Vd140AUklUN3eCA51C1EWMzMCezCBBmkxVIVHBWd3HHl9JQOIJSdSnJ0TDKChCwUJjoWMPaGqDKannasMo6WnM562R5YluZRwur0wpgqZE7NKUm%2BFNRPIhjBJxKZteWuIBMN4zRMIVIhffcgojwCF117i4nlLnY5ztRLsnOk%2BaV%2BoJY7V7m76PdkS4trKcdg0Zc0tTcKkRAAAIfkECQoAAAAsAAAAACAAIAAABO4QyEkpKqjqzScpRaVkXZWQEximw1BSCUEIlDohrft6cpKCk5xid5MNJTaAIkekKGQkWyKHkvhKsR7ARmitkAYDYRIbUQRQjWBwJRzChi9CRlBcY1UN4g0%2FVNB0AlcvcAYHRyZPdEQFYV8ccwR5HWxEJ02YmRMLnJ1xCYp0Y5idpQuhopmmC2KgojKasUQDk5BNAwwMOh2RtRq5uQuPZKGIJQIGwAwGf6I0JXMpC8C7kXWDBINFMxS4DKMAWVWAGYsAdNqW5uaRxkSKJOZKaU3tPOBZ4DuK2LATgJhkPJMgTwKCdFjyPHEnKxFCDhEAACH5BAkKAAAALAAAAAAgACAAAATzEMhJaVKp6s2nIkolIJ2WkBShpkVRWqqQrhLSEu9MZJKK9y1ZrqYK9WiClmvoUaF8gIQSNeF1Er4MNFn4SRSDARWroAIETg1iVwuHjYB1kYc1mwruwXKC9gmsJXliGxc%2BXiUCby9ydh1sOSdMkpMTBpaXBzsfhoc5l58Gm5yToAaZhaOUqjkDgCWNHAULCwOLaTmzswadEqggQwgHuQsHIoZCHQMMQgQGubVEcxOPFAcMDAYUA85eWARmfSRQCdcMe0zeP1AAygwLlJtPNAAL19DARdPzBOWSm1brJBi45soRAWQAAkrQIykShQ9wVhHCwCQCACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiRMDjI0Fd30%2FiI2UA5GSS5UDj2l6NoqgOgN4gksEBgYFf0FDqKgHnyZ9OX8HrgYHdHpcHQULXAS2qKpENRg7eAMLC7kTBaixUYFkKAzWAAnLC7FLVxLWDBLKCwaKTULgEwbLA4hJtOkSBNqITT3xEgfLpBtzE%2FjiuL04RGEBgwWhShRgQExHBAAh%2BQQJCgAAACwAAAAAIAAgAAAE7xDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfZiCqGk5dTESJeaOAlClzsJsqwiJwiqnFrb2nS9kmIcgEsjQydLiIlHehhpejaIjzh9eomSjZR%2BipslWIRLAgMDOR2DOqKogTB9pCUJBagDBXR6XB0EBkIIsaRsGGMMAxoDBgYHTKJiUYEGDAzHC9EACcUGkIgFzgwZ0QsSBcXHiQvOwgDdEwfFs0sDzt4S6BK4xYjkDOzn0unFeBzOBijIm1Dgmg5YFQwsCMjp1oJ8LyIAACH5BAkKAAAALAAAAAAgACAAAATwEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GGl6NoiPOH16iZKNlH6KmyWFOggHhEEvAwwMA0N9GBsEC6amhnVcEwavDAazGwIDaH1ipaYLBUTCGgQDA8NdHz0FpqgTBwsLqAbWAAnIA4FWKdMLGdYGEgraigbT0OITBcg5QwPT4xLrROZL6AuQAPUS7bxLpoWidY0JtxLHKhwwMJBTHgPKdEQAACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GAULDJCRiXo1CpGXDJOUjY%2BYip9DhToJA4RBLwMLCwVDfRgbBAaqqoZ1XBMHswsHtxtFaH1iqaoGNgAIxRpbFAgfPQSqpbgGBqUD1wBXeCYp1AYZ19JJOYgH1KwA4UBvQwXUBxPqVD9L3sbp2BNk2xvvFPJd%2BMFCN6HAAIKgNggY0KtEBAAh%2BQQJCgAAACwAAAAAIAAgAAAE6BDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfYIDMaAFdTESJeaEDAIMxYFqrOUaNW4E4ObYcCXaiBVEgULe0NJaxxtYksjh2NLkZISgDgJhHthkpU4mW6blRiYmZOlh4JWkDqILwUGBnE6TYEbCgevr0N1gH4At7gHiRpFaLNrrq8HNgAJA70AWxQIH1%2BvsYMDAzZQPC9VCNkDWUhGkuE5PxJNwiUK4UfLzOlD4WvzAHaoG9nxPi5d%2BjYUqfAhhykOFwJWiAAAIfkECQoAAAAsAAAAACAAIAAABPAQyElpUqnqzaciSoVkXVUMFaFSwlpOCcMYlErAavhOMnNLNo8KsZsMZItJEIDIFSkLGQoQTNhIsFehRww2CQLKF0tYGKYSg%2BygsZIuNqJksKgbfgIGepNo2cIUB3V1B3IvNiBYNQaDSTtfhhx0CwVPI0UJe0%2Bbm4g5VgcGoqOcnjmjqDSdnhgEoamcsZuXO1aWQy8KAwOAuTYYGwi7w5h%2BKr0SJ8MFihpNbx%2B4Erq7BYBuzsdiH1jCAzoSfl0rVirNbRXlBBlLX%2BBP0XJLAPGzTkAuAOqb0WT5AH7OcdCm5B8TgRwSRKIHQtaLCwg1RAAAOwAAAAAAAAAAAA%3D%3D);
|
||||
|
||||
visibility: visible;
|
||||
opacity: 0.6;
|
||||
transition: all 0.3s ease;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.reveal > .overlay header {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: $overlayHeaderPadding;
|
||||
z-index: 2;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.reveal > .overlay header a {
|
||||
display: inline-block;
|
||||
width: $overlayHeaderHeight;
|
||||
height: $overlayHeaderHeight;
|
||||
line-height: 36px;
|
||||
padding: 0 10px;
|
||||
float: right;
|
||||
opacity: 0.6;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.reveal > .overlay header a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.reveal > .overlay header a .icon {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
background-position: 50% 50%;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.reveal > .overlay header a.close .icon {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABkklEQVRYR8WX4VHDMAxG6wnoJrABZQPYBCaBTWAD2g1gE5gg6OOsXuxIlr40d81dfrSJ9V4c2VLK7spHuTJ/5wpM07QXuXc5X0opX2tEJcadjHuV80li/FgxTIEK/5QBCICBD6xEhSMGHgQPgBgLiYVAB1dpSqKDawxTohFw4JSEA3clzgIBPCURwE2JucBR7rhPJJv5OpJwDX+SfDjgx1wACQeJG1aChP9K/IMmdZ8DtESV1WyP3Bt4MwM6sj4NMxMYiqUWHQu4KYA/SYkIjOsm3BXYWMKFDwU2khjCQ4ELJUJ4SmClRArOCmSXGuKma0fYD5CbzHxFpCSGAhfAVSSUGDUk2BWZaff2g6GE15BsBQ9nwmpIGDiyHQddwNTMKkbZaf9fajXQca1EX44puJZUsnY0ObGmITE3GVLCbEhQUjGVt146j6oasWN+49Vph2w1pZ5EansNZqKBm1txbU57iRRcZ86RWMDdWtBJUHBHwoQPi1GV+JCbntmvok7iTX4/Up9mgyTc/FJYDTcndgH/AA5A/CHsyEkVAAAAAElFTkSuQmCC);
|
||||
}
|
||||
.reveal > .overlay header a.external .icon {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAcElEQVRYR+2WSQoAIQwEzf8f7XiOMkUQxUPlGkM3hVmiQfQR9GYnH1SsAQlI4DiBqkCMoNb9y2e90IAEJPAcgdznU9+engMaeJ7Azh5Y1U67gAho4DqBqmB1buAf0MB1AlVBek83ZPkmJMGc1wAR+AAqod/B97TRpQAAAABJRU5ErkJggg==);
|
||||
}
|
||||
|
||||
.reveal > .overlay .viewport {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
top: $overlayHeaderHeight + $overlayHeaderPadding*2;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-preview .viewport iframe {
|
||||
// Preview overlay
|
||||
.r-overlay-preview .r-overlay-content iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
@@ -1530,12 +1569,43 @@ $overlayHeaderPadding: 5px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-preview.loaded .viewport iframe {
|
||||
.r-overlay-preview[data-state="loaded"] iframe {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-preview.loaded .viewport-inner {
|
||||
.r-overlay-preview .r-overlay-content img,
|
||||
.r-overlay-preview .r-overlay-content video {
|
||||
position: absolute;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
object-fit: scale-down;
|
||||
}
|
||||
|
||||
.r-overlay-preview[data-preview-fit="none"] img,
|
||||
.r-overlay-preview[data-preview-fit="none"] video {
|
||||
object-fit: none;
|
||||
}
|
||||
|
||||
.r-overlay-preview[data-preview-fit="scale-down"] img,
|
||||
.r-overlay-preview[data-preview-fit="scale-down"] video {
|
||||
object-fit: scale-down;
|
||||
}
|
||||
|
||||
.r-overlay-preview[data-preview-fit="contain"] img,
|
||||
.r-overlay-preview[data-preview-fit="contain"] video {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.r-overlay-preview[data-preview-fit="cover"] img,
|
||||
.r-overlay-preview[data-preview-fit="cover"] video {
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.r-overlay-preview[data-state="loaded"] .r-overlay-content-inner {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
left: 0;
|
||||
@@ -1544,52 +1614,59 @@ $overlayHeaderPadding: 5px;
|
||||
text-align: center;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
.reveal > .overlay.overlay-preview .x-frame-error {
|
||||
.r-overlay-preview .r-overlay-error {
|
||||
font-size: 18px;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.r-overlay-preview .x-frame-error {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease 0.3s;
|
||||
}
|
||||
.reveal > .overlay.overlay-preview.loaded .x-frame-error {
|
||||
.r-overlay-preview[data-state="loaded"] .x-frame-error {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-preview.loaded .spinner {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: scale(0.2);
|
||||
.r-overlay-preview[data-state="loading"] .r-overlay-spinner {
|
||||
opacity: 0.6;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-help .viewport {
|
||||
// Help overlay
|
||||
.r-overlay-help .r-overlay-content {
|
||||
overflow: auto;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner {
|
||||
width: 600px;
|
||||
.r-overlay-help-content {
|
||||
max-width: 560px;
|
||||
padding: 20px 0;
|
||||
margin: auto;
|
||||
padding: 20px 20px 80px 20px;
|
||||
text-align: center;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner .title {
|
||||
.r-overlay-help-content .title {
|
||||
font-size: 20px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table {
|
||||
/* Specificity battle with reveal.js theme table styles */
|
||||
.r-overlay-help .r-overlay-help-content table {
|
||||
border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
font-size: 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table th,
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table td {
|
||||
width: 200px;
|
||||
.r-overlay-help .r-overlay-help-content table th,
|
||||
.r-overlay-help .r-overlay-help-content table td {
|
||||
width: 240px;
|
||||
padding: 14px;
|
||||
border: 1px solid #fff;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table th {
|
||||
.r-overlay-help .r-overlay-help-content table th {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
@@ -1905,7 +1982,7 @@ $notesWidthPercent: 25%;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.overlay,
|
||||
.r-overlay,
|
||||
.pause-overlay {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
@import "../template/settings";
|
||||
// ---------------------------------------------
|
||||
|
||||
|
||||
|
||||
// Include theme-specific fonts
|
||||
@import url(./fonts/league-gothic/league-gothic.css);
|
||||
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
|
||||
|
||||
$systemFontsSansSerif: -apple-system,
|
||||
BlinkMacSystemFont,
|
||||
avenir next,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// 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";
|
||||
|
||||
|
||||
19
demo.html
19
demo.html
@@ -197,6 +197,25 @@
|
||||
</script>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Lightbox</h2>
|
||||
Turn any element into a <a href="https://revealjs.com/lightbox/">lightbox</a> using <strong>data‑preview‑image</strong> & <strong>data‑preview‑video</strong>.
|
||||
<div class="r-hstack" style="gap: 2rem;">
|
||||
<div>
|
||||
<pre style="font-size: 12px; width: 100%"><code class="html" data-trim>
|
||||
<img src="image.png" data-preview-image="image.png">
|
||||
</code></pre>
|
||||
<img src="https://static.slid.es/logo/v2/slides-symbol-1024x1024.png" height="100" data-preview-image>
|
||||
</div>
|
||||
<div>
|
||||
<pre style="font-size: 12px; width: 100%"><code class="html" data-trim>
|
||||
<img src="video.png" data-preview-video="video.mp4">
|
||||
</code></pre>
|
||||
<img src="https://static.slid.es/site/homepage/v1/homepage-video-editor.png" height="100" data-preview-video="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p>Add the <code>r-fit-text</code> class to auto-size text</p>
|
||||
<h2 class="r-fit-text">FIT TEXT</h2>
|
||||
|
||||
4
dist/reveal.css
vendored
4
dist/reveal.css
vendored
File diff suppressed because one or more lines are too long
4
dist/reveal.esm.js
vendored
4
dist/reveal.esm.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.esm.js.map
vendored
2
dist/reveal.esm.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/reveal.js
vendored
4
dist/reveal.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js.map
vendored
2
dist/reveal.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/theme/dracula.css
vendored
2
dist/theme/dracula.css
vendored
@@ -2,6 +2,8 @@
|
||||
* Dracula Dark theme for reveal.js.
|
||||
* Based on https://draculatheme.com
|
||||
*/
|
||||
@import url(./fonts/league-gothic/league-gothic.css);
|
||||
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
|
||||
/**
|
||||
* Dracula colors by Zeno Rocha
|
||||
* https://draculatheme.com/contribute
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<h2>Same background twice (2/2)</h2>
|
||||
</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">
|
||||
<section data-background-video="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://static.slid.es/site/homepage/v1/homepage-video-editor.webm">
|
||||
<h2>Video background</h2>
|
||||
</section>
|
||||
|
||||
|
||||
144
examples/lightbox.html
Normal file
144
examples/lightbox.html
Normal 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>
|
||||
@@ -121,7 +121,7 @@
|
||||
<!-- Images -->
|
||||
<section data-markdown>
|
||||
<script type="text/template">
|
||||

|
||||

|
||||
</script>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Content 3.2
|
||||
|
||||
## External 3.3 (Image)
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## External 3.4 (Math)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<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">
|
||||
<section data-background-video-muted data-background-video="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://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>
|
||||
|
||||
22
gulpfile.js
22
gulpfile.js
@@ -1,3 +1,4 @@
|
||||
const fs = require('fs');
|
||||
const pkg = require('./package.json')
|
||||
const glob = require('glob')
|
||||
const yargs = require('yargs')
|
||||
@@ -274,22 +275,23 @@ gulp.task('default', gulp.series(gulp.parallel('js', 'css', 'plugins'), 'test'))
|
||||
|
||||
gulp.task('build', gulp.parallel('js', 'css', 'plugins'))
|
||||
|
||||
gulp.task('package', gulp.series(() =>
|
||||
gulp.task('package', gulp.series(async () => {
|
||||
|
||||
gulp.src(
|
||||
[
|
||||
let dirs = [
|
||||
'./index.html',
|
||||
'./dist/**',
|
||||
'./lib/**',
|
||||
'./images/**',
|
||||
'./plugin/**',
|
||||
'./**/*.md'
|
||||
],
|
||||
{ base: './' }
|
||||
)
|
||||
'./*/*.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()));
|
||||
|
||||
@@ -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
|
||||
@@ -74,7 +77,7 @@ export default {
|
||||
// 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 'focused', we will only capture keyboard events
|
||||
// for embedded decks when they are in focus
|
||||
|
||||
@@ -178,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
|
||||
@@ -471,7 +455,7 @@ export default class AutoAnimate {
|
||||
|
||||
// Text
|
||||
this.findAutoAnimateMatches( pairs, fromSlide, toSlide, textNodes, node => {
|
||||
return node.nodeName + ':::' + node.innerText;
|
||||
return node.nodeName + ':::' + node.textContent.trim();
|
||||
} );
|
||||
|
||||
// Media
|
||||
@@ -481,7 +465,7 @@ 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 => {
|
||||
|
||||
@@ -358,15 +358,17 @@ export default class Backgrounds {
|
||||
|
||||
}
|
||||
|
||||
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 );
|
||||
|
||||
|
||||
12
js/controllers/controls.js
vendored
12
js/controllers/controls.js
vendored
@@ -66,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 );
|
||||
@@ -146,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' ); } );
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class JumpToSlide {
|
||||
let query = this.jumpInput.value.trim( '' );
|
||||
let indices;
|
||||
|
||||
// When slide numbers are formatted to be a single linear mumber
|
||||
// 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 ) ) {
|
||||
|
||||
@@ -190,6 +190,10 @@ export default class Keyboard {
|
||||
}
|
||||
}
|
||||
|
||||
if( this.Reveal.isOverlayOpen() && !["Escape", "f", "c", "b", "."].includes(event.key) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( this.Reveal.isPaused() && resumeKeyCodes.indexOf( keyCode ) === -1 ) {
|
||||
return false;
|
||||
}
|
||||
@@ -363,6 +367,10 @@ export default class Keyboard {
|
||||
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();
|
||||
@@ -391,6 +399,12 @@ export default class Keyboard {
|
||||
event.preventDefault && event.preventDefault();
|
||||
}
|
||||
|
||||
// Enter to exit overview mode
|
||||
else if (keyCode === 13 && this.Reveal.overview.isActive()) {
|
||||
this.Reveal.overview.deactivate();
|
||||
event.preventDefault && event.preventDefault();
|
||||
}
|
||||
|
||||
// If auto-sliding is enabled we need to cue up
|
||||
// another timeout
|
||||
this.Reveal.cueAutoSlide();
|
||||
|
||||
389
js/controllers/overlay.js
Normal file
389
js/controllers/overlay.js
Normal file
@@ -0,0 +1,389 @@
|
||||
/**
|
||||
* 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.iframeTriggerSelector = null;
|
||||
this.mediaTriggerSelector = '[data-preview-image], [data-preview-video]';
|
||||
|
||||
this.stateProps = ['previewIframe', 'previewImage', 'previewVideo', 'previewFit'];
|
||||
this.state = {};
|
||||
|
||||
}
|
||||
|
||||
update() {
|
||||
|
||||
// Enable link previews globally
|
||||
if( this.Reveal.getConfig().previewLinks ) {
|
||||
this.iframeTriggerSelector = '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.iframeTriggerSelector = '[data-preview-link]:not([data-preview-link=false])';
|
||||
}
|
||||
|
||||
const hasLinkPreviews = this.Reveal.getSlidesElement().querySelectorAll( this.iframeTriggerSelector ).length > 0;
|
||||
const hasMediaPreviews = this.Reveal.getSlidesElement().querySelectorAll( this.mediaTriggerSelector ).length > 0;
|
||||
|
||||
// Only add the listener when there are previewable elements in the slides
|
||||
if( hasLinkPreviews || 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 lightbox that previews the target URL.
|
||||
*
|
||||
* @param {string} url - url for lightbox iframe src
|
||||
*/
|
||||
previewIframe( 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: 'previewiframe', data: { url } });
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a lightbox 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 {string} [fitMode] - the fit mode to use for the preview
|
||||
*/
|
||||
previewMedia( url, mediaType, fitMode ) {
|
||||
|
||||
if( mediaType !== 'image' && mediaType !== 'video' ) {
|
||||
console.warn( 'Please specify a valid media type to preview (image|video)' );
|
||||
return;
|
||||
}
|
||||
|
||||
this.close();
|
||||
|
||||
fitMode = fitMode || '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 );
|
||||
|
||||
this.Reveal.dispatchEvent({ type: 'previewimage', data: { url } });
|
||||
|
||||
}
|
||||
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 );
|
||||
|
||||
this.Reveal.dispatchEvent({ type: 'previewvideo', data: { url } });
|
||||
|
||||
}
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
previewImage( url, fitMode ) {
|
||||
|
||||
this.previewMedia( url, 'image', fitMode );
|
||||
|
||||
}
|
||||
|
||||
previewVideo( url, fitMode ) {
|
||||
|
||||
this.previewMedia( url, 'video', fitMode );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 ) {
|
||||
|
||||
// Ignore the incoming state if none of the preview related
|
||||
// props have changed
|
||||
if( this.stateProps.every( key => this.state[ key ] === state[ key ] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if( state.previewIframe ) {
|
||||
this.previewIframe( state.previewIframe );
|
||||
}
|
||||
else if( state.previewImage ) {
|
||||
this.previewImage( state.previewImage, state.previewFit );
|
||||
}
|
||||
else if( state.previewVideo ) {
|
||||
this.previewVideo( state.previewVideo, state.previewFit );
|
||||
}
|
||||
else {
|
||||
this.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onSlidesClicked( event ) {
|
||||
|
||||
const target = event.target;
|
||||
|
||||
const linkTarget = target.closest( this.iframeTriggerSelector );
|
||||
const mediaTarget = target.closest( this.mediaTriggerSelector );
|
||||
|
||||
// Was an iframe lightbox trigger clicked?
|
||||
if( linkTarget ) {
|
||||
if( event.metaKey || event.shiftKey || event.altKey ) {
|
||||
// Let the browser handle meta keys naturally so users can cmd+click
|
||||
return;
|
||||
}
|
||||
let url = linkTarget.getAttribute( 'href' ) || linkTarget.getAttribute( 'data-preview-link' );
|
||||
if( url ) {
|
||||
this.previewIframe( url );
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
// Was a media lightbox trigger clicked?
|
||||
else if( mediaTarget ) {
|
||||
if( mediaTarget.hasAttribute( 'data-preview-image' ) ) {
|
||||
let url = mediaTarget.dataset.previewImage || mediaTarget.getAttribute( 'src' );
|
||||
if( url ) {
|
||||
this.previewImage( url, mediaTarget.dataset.previewFit );
|
||||
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.previewVideo( url, mediaTarget.dataset.previewFit );
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
destroy() {
|
||||
|
||||
this.close();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -449,6 +449,10 @@ export default class ScrollView {
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -119,14 +119,14 @@ export default class SlideContent {
|
||||
}
|
||||
}
|
||||
// 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;
|
||||
}
|
||||
|
||||
@@ -280,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 => {
|
||||
@@ -306,6 +308,9 @@ export default class SlideContent {
|
||||
|
||||
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 } );
|
||||
@@ -337,6 +342,10 @@ export default class SlideContent {
|
||||
}
|
||||
} );
|
||||
|
||||
// Don't play iframe content in the speaker view since we can't
|
||||
// guarantee that it's muted
|
||||
if( !isSpeakerNotesWindow ) {
|
||||
|
||||
// Normal iframes
|
||||
queryAll( element, 'iframe[src]' ).forEach( el => {
|
||||
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
|
||||
@@ -363,6 +372,8 @@ export default class SlideContent {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts playing an embedded video/audio element after
|
||||
* it has finished loading.
|
||||
|
||||
217
js/reveal.js
217
js/reveal.js
@@ -13,6 +13,7 @@ import Controls from './controllers/controls.js'
|
||||
import Progress from './controllers/progress.js'
|
||||
import Pointer from './controllers/pointer.js'
|
||||
import Plugins from './controllers/plugins.js'
|
||||
import Overlay from './controllers/overlay.js'
|
||||
import Touch from './controllers/touch.js'
|
||||
import Focus from './controllers/focus.js'
|
||||
import Notes from './controllers/notes.js'
|
||||
@@ -28,7 +29,7 @@ import {
|
||||
} from './utils/constants.js'
|
||||
|
||||
// The reveal.js version
|
||||
export const VERSION = '5.1.0';
|
||||
export const VERSION = '5.2.1';
|
||||
|
||||
/**
|
||||
* reveal.js
|
||||
@@ -119,6 +120,7 @@ export default function( revealElement, options ) {
|
||||
progress = new Progress( Reveal ),
|
||||
pointer = new Pointer( Reveal ),
|
||||
plugins = new Plugins( Reveal ),
|
||||
overlay = new Overlay( Reveal ),
|
||||
focus = new Focus( Reveal ),
|
||||
touch = new Touch( Reveal ),
|
||||
notes = new Notes( Reveal );
|
||||
@@ -130,6 +132,8 @@ export default function( revealElement, options ) {
|
||||
|
||||
if( !revealElement ) throw 'Unable to find presentation root (<div class="reveal">).';
|
||||
|
||||
if( initialized ) throw 'Reveal.js has already been initialized.';
|
||||
|
||||
initialized = true;
|
||||
|
||||
// Cache references to key DOM elements
|
||||
@@ -508,16 +512,6 @@ export default function( revealElement, options ) {
|
||||
resume();
|
||||
}
|
||||
|
||||
// Iframe link previews
|
||||
if( config.previewLinks ) {
|
||||
enablePreviewLinks();
|
||||
disablePreviewLinks( '[data-preview-link=false]' );
|
||||
}
|
||||
else {
|
||||
disablePreviewLinks();
|
||||
enablePreviewLinks( '[data-preview-link]:not([data-preview-link=false])' );
|
||||
}
|
||||
|
||||
// Reset all changes made by auto-animations
|
||||
autoAnimate.reset();
|
||||
|
||||
@@ -620,11 +614,11 @@ export default function( revealElement, options ) {
|
||||
|
||||
removeEventListeners();
|
||||
cancelAutoSlide();
|
||||
disablePreviewLinks();
|
||||
|
||||
// Destroy controllers
|
||||
notes.destroy();
|
||||
focus.destroy();
|
||||
overlay.destroy();
|
||||
plugins.destroy();
|
||||
pointer.destroy();
|
||||
controls.destroy();
|
||||
@@ -774,164 +768,6 @@ export default function( revealElement, options ) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind preview frame links.
|
||||
*
|
||||
* @param {string} [selector=a] - selector for anchors
|
||||
*/
|
||||
function enablePreviewLinks( selector = 'a' ) {
|
||||
|
||||
Array.from( dom.wrapper.querySelectorAll( selector ) ).forEach( element => {
|
||||
if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) {
|
||||
element.addEventListener( 'click', onPreviewLinkClicked, false );
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Unbind preview frame links.
|
||||
*/
|
||||
function disablePreviewLinks( selector = 'a' ) {
|
||||
|
||||
Array.from( dom.wrapper.querySelectorAll( selector ) ).forEach( element => {
|
||||
if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) {
|
||||
element.removeEventListener( 'click', onPreviewLinkClicked, false );
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a preview window for the target URL.
|
||||
*
|
||||
* @param {string} url - url for preview iframe src
|
||||
*/
|
||||
function showPreview( url ) {
|
||||
|
||||
closeOverlay();
|
||||
|
||||
dom.overlay = document.createElement( 'div' );
|
||||
dom.overlay.classList.add( 'overlay' );
|
||||
dom.overlay.classList.add( 'overlay-preview' );
|
||||
dom.wrapper.appendChild( dom.overlay );
|
||||
|
||||
dom.overlay.innerHTML =
|
||||
`<header>
|
||||
<a class="close" href="#"><span class="icon"></span></a>
|
||||
<a class="external" href="${url}" target="_blank"><span class="icon"></span></a>
|
||||
</header>
|
||||
<div class="spinner"></div>
|
||||
<div class="viewport">
|
||||
<iframe src="${url}"></iframe>
|
||||
<small class="viewport-inner">
|
||||
<span class="x-frame-error">Unable to load iframe. This is likely due to the site's policy (x-frame-options).</span>
|
||||
</small>
|
||||
</div>`;
|
||||
|
||||
dom.overlay.querySelector( 'iframe' ).addEventListener( 'load', event => {
|
||||
dom.overlay.classList.add( 'loaded' );
|
||||
}, false );
|
||||
|
||||
dom.overlay.querySelector( '.close' ).addEventListener( 'click', event => {
|
||||
closeOverlay();
|
||||
event.preventDefault();
|
||||
}, false );
|
||||
|
||||
dom.overlay.querySelector( '.external' ).addEventListener( 'click', event => {
|
||||
closeOverlay();
|
||||
}, false );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
function toggleHelp( override ){
|
||||
|
||||
if( typeof override === 'boolean' ) {
|
||||
override ? showHelp() : closeOverlay();
|
||||
}
|
||||
else {
|
||||
if( dom.overlay ) {
|
||||
closeOverlay();
|
||||
}
|
||||
else {
|
||||
showHelp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens an overlay window with help material.
|
||||
*/
|
||||
function showHelp() {
|
||||
|
||||
if( config.help ) {
|
||||
|
||||
closeOverlay();
|
||||
|
||||
dom.overlay = document.createElement( 'div' );
|
||||
dom.overlay.classList.add( 'overlay' );
|
||||
dom.overlay.classList.add( 'overlay-help' );
|
||||
dom.wrapper.appendChild( dom.overlay );
|
||||
|
||||
let html = '<p class="title">Keyboard Shortcuts</p><br/>';
|
||||
|
||||
let shortcuts = keyboard.getShortcuts(),
|
||||
bindings = 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>';
|
||||
|
||||
dom.overlay.innerHTML = `
|
||||
<header>
|
||||
<a class="close" href="#"><span class="icon"></span></a>
|
||||
</header>
|
||||
<div class="viewport">
|
||||
<div class="viewport-inner">${html}</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
dom.overlay.querySelector( '.close' ).addEventListener( 'click', event => {
|
||||
closeOverlay();
|
||||
event.preventDefault();
|
||||
}, false );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes any currently open overlay.
|
||||
*/
|
||||
function closeOverlay() {
|
||||
|
||||
if( dom.overlay ) {
|
||||
dom.overlay.parentNode.removeChild( dom.overlay );
|
||||
dom.overlay = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies JavaScript-controlled layout rules to the
|
||||
* presentation.
|
||||
@@ -1688,6 +1524,7 @@ export default function( revealElement, options ) {
|
||||
|
||||
notes.update();
|
||||
notes.updateVisibility();
|
||||
overlay.update();
|
||||
backgrounds.update( true );
|
||||
slideNumber.update();
|
||||
slideContent.formatEmbeddedContent();
|
||||
@@ -2373,7 +2210,8 @@ export default function( revealElement, options ) {
|
||||
indexv: indices.v,
|
||||
indexf: indices.f,
|
||||
paused: isPaused(),
|
||||
overview: overview.isActive()
|
||||
overview: overview.isActive(),
|
||||
...overlay.getState()
|
||||
};
|
||||
|
||||
}
|
||||
@@ -2399,6 +2237,8 @@ export default function( revealElement, options ) {
|
||||
if( typeof overviewFlag === 'boolean' && overviewFlag !== overview.isActive() ) {
|
||||
overview.toggle( overviewFlag );
|
||||
}
|
||||
|
||||
overlay.setState( state );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2803,24 +2643,6 @@ export default function( revealElement, options ) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles clicks on links that are set to preview in the
|
||||
* iframe overlay.
|
||||
*
|
||||
* @param {object} event
|
||||
*/
|
||||
function onPreviewLinkClicked( event ) {
|
||||
|
||||
if( event.currentTarget && event.currentTarget.hasAttribute( 'href' ) ) {
|
||||
let url = event.currentTarget.getAttribute( 'href' );
|
||||
if( url ) {
|
||||
showPreview( url );
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles click on the auto-sliding controls element.
|
||||
*
|
||||
@@ -2899,7 +2721,7 @@ export default function( revealElement, options ) {
|
||||
availableFragments: fragments.availableRoutes.bind( fragments ),
|
||||
|
||||
// Toggles a help overlay with keyboard shortcuts
|
||||
toggleHelp,
|
||||
toggleHelp: overlay.toggleHelp.bind( overlay ),
|
||||
|
||||
// Toggles the overview mode on/off
|
||||
toggleOverview: overview.toggle.bind( overview ),
|
||||
@@ -2929,7 +2751,7 @@ export default function( revealElement, options ) {
|
||||
isSpeakerNotes: notes.isSpeakerNotesWindow.bind( notes ),
|
||||
isOverview: overview.isActive.bind( overview ),
|
||||
isFocused: focus.isFocused.bind( focus ),
|
||||
|
||||
isOverlayOpen: overlay.isOpen.bind( overlay ),
|
||||
isScrollView: scrollView.isActive.bind( scrollView ),
|
||||
isPrintView: printView.isActive.bind( printView ),
|
||||
|
||||
@@ -2944,9 +2766,13 @@ export default function( revealElement, options ) {
|
||||
startEmbeddedContent: () => slideContent.startEmbeddedContent( currentSlide ),
|
||||
stopEmbeddedContent: () => slideContent.stopEmbeddedContent( currentSlide, { unloadIframes: false } ),
|
||||
|
||||
// Preview management
|
||||
showPreview,
|
||||
hidePreview: closeOverlay,
|
||||
// Lightbox previews
|
||||
previewIframe: overlay.previewIframe.bind( overlay ),
|
||||
previewImage: overlay.previewImage.bind( overlay ),
|
||||
previewVideo: overlay.previewVideo.bind( overlay ),
|
||||
|
||||
showPreview: overlay.previewIframe.bind( overlay ), // deprecated in favor of showIframeLightbox
|
||||
hidePreview: overlay.close.bind( overlay ),
|
||||
|
||||
// Adds or removes all internal event listeners
|
||||
addEventListeners,
|
||||
@@ -3060,13 +2886,14 @@ export default function( revealElement, options ) {
|
||||
controls,
|
||||
location,
|
||||
overview,
|
||||
keyboard,
|
||||
fragments,
|
||||
backgrounds,
|
||||
slideContent,
|
||||
slideNumber,
|
||||
|
||||
onUserInput,
|
||||
closeOverlay,
|
||||
closeOverlay: overlay.close.bind( overlay ),
|
||||
updateSlidesVisibility,
|
||||
layoutSlideContents,
|
||||
transformSlides,
|
||||
|
||||
135
package-lock.json
generated
135
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "reveal.js",
|
||||
"version": "5.1.0",
|
||||
"version": "5.2.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "reveal.js",
|
||||
"version": "5.1.0",
|
||||
"version": "5.2.0",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.23.2",
|
||||
@@ -65,13 +65,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
"version": "7.22.13",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
|
||||
"integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
|
||||
"version": "7.26.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
|
||||
"integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/highlight": "^7.22.13",
|
||||
"chalk": "^2.4.2"
|
||||
"@babel/helper-validator-identifier": "^7.25.9",
|
||||
"js-tokens": "^4.0.0",
|
||||
"picocolors": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -414,18 +415,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-string-parser": {
|
||||
"version": "7.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
|
||||
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
|
||||
"integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-validator-identifier": {
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
|
||||
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
|
||||
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -455,38 +456,26 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helpers": {
|
||||
"version": "7.23.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz",
|
||||
"integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==",
|
||||
"version": "7.26.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz",
|
||||
"integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.22.15",
|
||||
"@babel/traverse": "^7.23.2",
|
||||
"@babel/types": "^7.23.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/highlight": {
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
|
||||
"integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
"chalk": "^2.4.2",
|
||||
"js-tokens": "^4.0.0"
|
||||
"@babel/template": "^7.26.9",
|
||||
"@babel/types": "^7.26.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
|
||||
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
|
||||
"version": "7.26.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz",
|
||||
"integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.26.10"
|
||||
},
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
},
|
||||
@@ -1660,9 +1649,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.23.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz",
|
||||
"integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==",
|
||||
"version": "7.26.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz",
|
||||
"integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
@@ -1672,14 +1661,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/template": {
|
||||
"version": "7.22.15",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
|
||||
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
|
||||
"version": "7.26.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz",
|
||||
"integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.22.13",
|
||||
"@babel/parser": "^7.22.15",
|
||||
"@babel/types": "^7.22.15"
|
||||
"@babel/code-frame": "^7.26.2",
|
||||
"@babel/parser": "^7.26.9",
|
||||
"@babel/types": "^7.26.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -1707,14 +1696,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
|
||||
"integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
|
||||
"version": "7.26.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz",
|
||||
"integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@babel/helper-string-parser": "^7.22.5",
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
"to-fast-properties": "^2.0.0"
|
||||
"@babel/helper-string-parser": "^7.25.9",
|
||||
"@babel/helper-validator-identifier": "^7.25.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -2493,15 +2481,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-terser/node_modules/serialize-javascript": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
|
||||
"integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"randombytes": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/pluginutils": {
|
||||
"version": "5.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz",
|
||||
@@ -3842,9 +3821,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
@@ -5482,9 +5461,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/gulp-eslint/node_modules/cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"version": "6.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz",
|
||||
"integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"nice-try": "^1.0.4",
|
||||
@@ -6885,9 +6864,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||
"version": "3.3.8",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
|
||||
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -8137,6 +8116,15 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/serialize-javascript": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
|
||||
"integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"randombytes": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/serve-index": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
|
||||
@@ -8752,15 +8740,6 @@
|
||||
"node": ">=0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/to-fast-properties": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||
"integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "reveal.js",
|
||||
"version": "5.1.0",
|
||||
"version": "5.2.1",
|
||||
"description": "The HTML Presentation Framework",
|
||||
"homepage": "https://revealjs.com",
|
||||
"subdomain": "revealjs",
|
||||
|
||||
@@ -52,7 +52,7 @@ const Plugin = {
|
||||
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,"<").replace(/>/g, '>' );
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export const KaTeX = () => {
|
||||
{left: '\\(', right: '\\)', display: false},
|
||||
{left: '\\[', right: '\\]', display: true}
|
||||
],
|
||||
ignoredTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
||||
ignoredTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
|
||||
}
|
||||
|
||||
const loadCss = src => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const t=()=>{let t,e={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre"]},skipStartupTypeset:!0};return{id:"mathjax2",init:function(a){t=a;let n=t.getConfig().mathjax2||t.getConfig().math||{},i={...e,...n},s=(i.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js")+"?config="+(i.config||"TeX-AMS_HTML-full");i.tex2jax={...e.tex2jax,...n.tex2jax},i.mathjax=i.config=null,function(t,e){let a=document.querySelector("head"),n=document.createElement("script");n.type="text/javascript",n.src=t;let i=()=>{"function"==typeof e&&(e.call(),e=null)};n.onload=i,n.onreadystatechange=()=>{"loaded"===this.readyState&&i()},a.appendChild(n)}(s,(function(){MathJax.Hub.Config(i),MathJax.Hub.Queue(["Typeset",MathJax.Hub,t.getRevealElement()]),MathJax.Hub.Queue(t.layout),t.on("slidechanged",(function(t){MathJax.Hub.Queue(["Typeset",MathJax.Hub,t.currentSlide])}))}))}}},e=t;
|
||||
const t=()=>{let t,e={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre","code"]},skipStartupTypeset:!0};return{id:"mathjax2",init:function(a){t=a;let n=t.getConfig().mathjax2||t.getConfig().math||{},i={...e,...n},s=(i.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js")+"?config="+(i.config||"TeX-AMS_HTML-full");i.tex2jax={...e.tex2jax,...n.tex2jax},i.mathjax=i.config=null,function(t,e){let a=document.querySelector("head"),n=document.createElement("script");n.type="text/javascript",n.src=t;let i=()=>{"function"==typeof e&&(e.call(),e=null)};n.onload=i,n.onreadystatechange=()=>{"loaded"===this.readyState&&i()},a.appendChild(n)}(s,(function(){MathJax.Hub.Config(i),MathJax.Hub.Queue(["Typeset",MathJax.Hub,t.getRevealElement()]),MathJax.Hub.Queue(t.layout),t.on("slidechanged",(function(t){MathJax.Hub.Queue(["Typeset",MathJax.Hub,t.currentSlide])}))}))}}},e=t;
|
||||
/*!
|
||||
* This plugin is a wrapper for the MathJax2,
|
||||
* MathJax3 and KaTeX typesetter plugins.
|
||||
*/
|
||||
var a=Plugin=Object.assign(e(),{KaTeX:()=>{let t,e={version:"latest",delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredTags:["script","noscript","style","textarea","pre"]};const a=t=>new Promise(((e,a)=>{const n=document.createElement("script");n.type="text/javascript",n.onload=e,n.onerror=a,n.src=t,document.head.append(n)}));return{id:"katex",init:function(n){t=n;let i=t.getConfig().katex||{},s={...e,...i};const{local:l,version:o,extensions:r,...c}=s;let d=s.local||"https://cdn.jsdelivr.net/npm/katex",p=s.local?"":"@"+s.version,u=d+p+"/dist/katex.min.css",h=d+p+"/dist/contrib/mhchem.min.js",x=d+p+"/dist/contrib/auto-render.min.js",m=[d+p+"/dist/katex.min.js"];s.extensions&&s.extensions.includes("mhchem")&&m.push(h),m.push(x);const f=()=>{renderMathInElement(n.getSlidesElement(),c),t.layout()};(t=>{let e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)})(u),async function(t){for(const e of t)await a(e)}(m).then((()=>{t.isReady()?f():t.on("ready",f.bind(this))}))}}},MathJax2:t,MathJax3:()=>{let t,e={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then((()=>{t.layout()}))}}};return{id:"mathjax3",init:function(a){t=a;let n=t.getConfig().mathjax3||{},i={...e,...n};i.tex={...e.tex,...n.tex},i.options={...e.options,...n.options},i.startup={...e.startup,...n.startup};let s=i.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";i.mathjax=null,window.MathJax=i,function(t,e){let a=document.createElement("script");a.type="text/javascript",a.id="MathJax-script",a.src=t,a.async=!0,a.onload=()=>{"function"==typeof e&&(e.call(),e=null)},document.head.appendChild(a)}(s,(function(){t.addEventListener("slidechanged",(function(t){MathJax.typeset()}))}))}}}});export{a as default};
|
||||
var a=Plugin=Object.assign(e(),{KaTeX:()=>{let t,e={version:"latest",delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredTags:["script","noscript","style","textarea","pre","code"]};const a=t=>new Promise(((e,a)=>{const n=document.createElement("script");n.type="text/javascript",n.onload=e,n.onerror=a,n.src=t,document.head.append(n)}));return{id:"katex",init:function(n){t=n;let i=t.getConfig().katex||{},s={...e,...i};const{local:o,version:l,extensions:r,...c}=s;let d=s.local||"https://cdn.jsdelivr.net/npm/katex",p=s.local?"":"@"+s.version,u=d+p+"/dist/katex.min.css",h=d+p+"/dist/contrib/mhchem.min.js",x=d+p+"/dist/contrib/auto-render.min.js",m=[d+p+"/dist/katex.min.js"];s.extensions&&s.extensions.includes("mhchem")&&m.push(h),m.push(x);const f=()=>{renderMathInElement(n.getSlidesElement(),c),t.layout()};(t=>{let e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)})(u),async function(t){for(const e of t)await a(e)}(m).then((()=>{t.isReady()?f():t.on("ready",f.bind(this))}))}}},MathJax2:t,MathJax3:()=>{let t,e={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then((()=>{t.layout()}))}}};return{id:"mathjax3",init:function(a){t=a;let n=t.getConfig().mathjax3||{},i={...e,...n};i.tex={...e.tex,...n.tex},i.options={...e.options,...n.options},i.startup={...e.startup,...n.startup};let s=i.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";i.mathjax=null,window.MathJax=i,function(t,e){let a=document.createElement("script");a.type="text/javascript",a.id="MathJax-script",a.src=t,a.async=!0,a.onload=()=>{"function"==typeof e&&(e.call(),e=null)},document.head.appendChild(a)}(s,(function(){t.addEventListener("slidechanged",(function(t){MathJax.typeset()}))}))}}}});export{a as default};
|
||||
|
||||
@@ -1 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RevealMath=e()}(this,(function(){"use strict";const t=()=>{let t,e={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre"]},skipStartupTypeset:!0};return{id:"mathjax2",init:function(n){t=n;let a=t.getConfig().mathjax2||t.getConfig().math||{},i={...e,...a},s=(i.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js")+"?config="+(i.config||"TeX-AMS_HTML-full");i.tex2jax={...e.tex2jax,...a.tex2jax},i.mathjax=i.config=null,function(t,e){let n=document.querySelector("head"),a=document.createElement("script");a.type="text/javascript",a.src=t;let i=()=>{"function"==typeof e&&(e.call(),e=null)};a.onload=i,a.onreadystatechange=()=>{"loaded"===this.readyState&&i()},n.appendChild(a)}(s,(function(){MathJax.Hub.Config(i),MathJax.Hub.Queue(["Typeset",MathJax.Hub,t.getRevealElement()]),MathJax.Hub.Queue(t.layout),t.on("slidechanged",(function(t){MathJax.Hub.Queue(["Typeset",MathJax.Hub,t.currentSlide])}))}))}}},e=t;return Plugin=Object.assign(e(),{KaTeX:()=>{let t,e={version:"latest",delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredTags:["script","noscript","style","textarea","pre"]};const n=t=>new Promise(((e,n)=>{const a=document.createElement("script");a.type="text/javascript",a.onload=e,a.onerror=n,a.src=t,document.head.append(a)}));return{id:"katex",init:function(a){t=a;let i=t.getConfig().katex||{},s={...e,...i};const{local:o,version:l,extensions:r,...c}=s;let d=s.local||"https://cdn.jsdelivr.net/npm/katex",u=s.local?"":"@"+s.version,p=d+u+"/dist/katex.min.css",h=d+u+"/dist/contrib/mhchem.min.js",x=d+u+"/dist/contrib/auto-render.min.js",m=[d+u+"/dist/katex.min.js"];s.extensions&&s.extensions.includes("mhchem")&&m.push(h),m.push(x);const f=()=>{renderMathInElement(a.getSlidesElement(),c),t.layout()};(t=>{let e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)})(p),async function(t){for(const e of t)await n(e)}(m).then((()=>{t.isReady()?f():t.on("ready",f.bind(this))}))}}},MathJax2:t,MathJax3:()=>{let t,e={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then((()=>{t.layout()}))}}};return{id:"mathjax3",init:function(n){t=n;let a=t.getConfig().mathjax3||{},i={...e,...a};i.tex={...e.tex,...a.tex},i.options={...e.options,...a.options},i.startup={...e.startup,...a.startup};let s=i.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";i.mathjax=null,window.MathJax=i,function(t,e){let n=document.createElement("script");n.type="text/javascript",n.id="MathJax-script",n.src=t,n.async=!0,n.onload=()=>{"function"==typeof e&&(e.call(),e=null)},document.head.appendChild(n)}(s,(function(){t.addEventListener("slidechanged",(function(t){MathJax.typeset()}))}))}}}})}));
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RevealMath=e()}(this,(function(){"use strict";const t=()=>{let t,e={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre","code"]},skipStartupTypeset:!0};return{id:"mathjax2",init:function(n){t=n;let a=t.getConfig().mathjax2||t.getConfig().math||{},i={...e,...a},s=(i.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js")+"?config="+(i.config||"TeX-AMS_HTML-full");i.tex2jax={...e.tex2jax,...a.tex2jax},i.mathjax=i.config=null,function(t,e){let n=document.querySelector("head"),a=document.createElement("script");a.type="text/javascript",a.src=t;let i=()=>{"function"==typeof e&&(e.call(),e=null)};a.onload=i,a.onreadystatechange=()=>{"loaded"===this.readyState&&i()},n.appendChild(a)}(s,(function(){MathJax.Hub.Config(i),MathJax.Hub.Queue(["Typeset",MathJax.Hub,t.getRevealElement()]),MathJax.Hub.Queue(t.layout),t.on("slidechanged",(function(t){MathJax.Hub.Queue(["Typeset",MathJax.Hub,t.currentSlide])}))}))}}},e=t;return Plugin=Object.assign(e(),{KaTeX:()=>{let t,e={version:"latest",delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredTags:["script","noscript","style","textarea","pre","code"]};const n=t=>new Promise(((e,n)=>{const a=document.createElement("script");a.type="text/javascript",a.onload=e,a.onerror=n,a.src=t,document.head.append(a)}));return{id:"katex",init:function(a){t=a;let i=t.getConfig().katex||{},s={...e,...i};const{local:o,version:l,extensions:c,...r}=s;let d=s.local||"https://cdn.jsdelivr.net/npm/katex",u=s.local?"":"@"+s.version,p=d+u+"/dist/katex.min.css",h=d+u+"/dist/contrib/mhchem.min.js",x=d+u+"/dist/contrib/auto-render.min.js",m=[d+u+"/dist/katex.min.js"];s.extensions&&s.extensions.includes("mhchem")&&m.push(h),m.push(x);const f=()=>{renderMathInElement(a.getSlidesElement(),r),t.layout()};(t=>{let e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)})(p),async function(t){for(const e of t)await n(e)}(m).then((()=>{t.isReady()?f():t.on("ready",f.bind(this))}))}}},MathJax2:t,MathJax3:()=>{let t,e={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then((()=>{t.layout()}))}}};return{id:"mathjax3",init:function(n){t=n;let a=t.getConfig().mathjax3||{},i={...e,...a};i.tex={...e.tex,...a.tex},i.options={...e.options,...a.options},i.startup={...e.startup,...a.startup};let s=i.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";i.mathjax=null,window.MathJax=i,function(t,e){let n=document.createElement("script");n.type="text/javascript",n.id="MathJax-script",n.src=t,n.async=!0,n.onload=()=>{"function"==typeof e&&(e.call(),e=null)},document.head.appendChild(n)}(s,(function(){t.addEventListener("slidechanged",(function(t){MathJax.typeset()}))}))}}}})}));
|
||||
|
||||
@@ -13,7 +13,7 @@ export const MathJax2 = () => {
|
||||
messageStyle: 'none',
|
||||
tex2jax: {
|
||||
inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ],
|
||||
skipTags: [ 'script', 'noscript', 'style', 'textarea', 'pre' ]
|
||||
skipTags: [ 'script', 'noscript', 'style', 'textarea', 'pre', 'code' ]
|
||||
},
|
||||
skipStartupTypeset: true
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ export const MathJax3 = () => {
|
||||
inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ]
|
||||
},
|
||||
options: {
|
||||
skipHtmlTags: [ 'script', 'noscript', 'style', 'textarea', 'pre' ]
|
||||
skipHtmlTags: [ 'script', 'noscript', 'style', 'textarea', 'pre', 'code' ]
|
||||
},
|
||||
startup: {
|
||||
ready: () => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -209,6 +209,10 @@ const Plugin = () => {
|
||||
deck.on( 'overviewshown', post );
|
||||
deck.on( 'paused', post );
|
||||
deck.on( 'resumed', post );
|
||||
deck.on( 'previewiframe', post );
|
||||
deck.on( 'previewimage', post );
|
||||
deck.on( 'previewvideo', post );
|
||||
deck.on( 'closeoverlay', post );
|
||||
|
||||
// Post the initial state
|
||||
post();
|
||||
@@ -229,7 +233,7 @@ const Plugin = () => {
|
||||
openSpeakerWindow();
|
||||
}
|
||||
else {
|
||||
// Keep listening for speaker view hearbeats. If we receive a
|
||||
// Keep listening for speaker view heartbeats. If we receive a
|
||||
// heartbeat from an orphaned window, reconnect it. This ensures
|
||||
// that we remain connected to the notes even if the presentation
|
||||
// is reloaded.
|
||||
|
||||
@@ -414,14 +414,24 @@
|
||||
}
|
||||
// Messages sent by the reveal.js inside of the current slide preview
|
||||
else if( data && data.namespace === 'reveal' ) {
|
||||
const supportedEvents = [
|
||||
'slidechanged',
|
||||
'fragmentshown',
|
||||
'fragmenthidden',
|
||||
'paused',
|
||||
'resumed',
|
||||
'previewiframe',
|
||||
'previewimage',
|
||||
'previewvideo',
|
||||
'closeoverlay'
|
||||
];
|
||||
|
||||
if( /ready/.test( data.eventName ) ) {
|
||||
// Send a message back to notify that the handshake is complete
|
||||
window.opener.postMessage( JSON.stringify({ namespace: 'reveal-notes', type: 'connected'} ), '*' );
|
||||
}
|
||||
else if( /slidechanged|fragmentshown|fragmenthidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {
|
||||
|
||||
else if( supportedEvents.includes( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {
|
||||
dispatchStateToMainWindow( data.state );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,9 +504,12 @@
|
||||
notes.classList.add( 'hidden' );
|
||||
}
|
||||
|
||||
// Don't show lightboxes in the upcoming slide
|
||||
const { previewVideo, previewImage, previewIframe, ...upcomingState } = data.state;
|
||||
|
||||
// Update the note slides
|
||||
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
|
||||
upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
|
||||
upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ upcomingState ] }), '*' );
|
||||
upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );
|
||||
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ var zoom = (function(){
|
||||
}
|
||||
|
||||
/**
|
||||
* Pan the document when the mosue cursor approaches the edges
|
||||
* Pan the document when the mouse cursor approaches the edges
|
||||
* of the window.
|
||||
*/
|
||||
function pan() {
|
||||
|
||||
@@ -110,21 +110,6 @@
|
||||
Reveal.configure({ autoAnimate: true });
|
||||
});
|
||||
|
||||
QUnit.test( 'Carries forward matching fragment visibility', assert => {
|
||||
Reveal.slide(4);
|
||||
assert.ok( !slides[5].h1.classList.contains( 'visible' ) )
|
||||
Reveal.next();
|
||||
Reveal.next();
|
||||
Reveal.next();
|
||||
assert.ok( slides[5].h1.classList.contains( 'visible' ) )
|
||||
assert.ok( slides[5].h2.classList.contains( 'visible' ) )
|
||||
assert.ok( !slides[5].h3.classList.contains( 'visible' ) )
|
||||
Reveal.next();
|
||||
assert.ok( slides[5].h3.classList.contains( 'visible' ) )
|
||||
Reveal.next();
|
||||
assert.ok( slides[6].slide === Reveal.getCurrentSlide() )
|
||||
});
|
||||
|
||||
QUnit.test( 'Slide specific data-auto-animate-duration', assert => {
|
||||
assert.timeout( 400 );
|
||||
assert.expect( 1 );
|
||||
|
||||
Reference in New Issue
Block a user