Added Slides
12
.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
*.iws
|
||||||
|
*.eml
|
||||||
|
out/
|
||||||
|
.DS_Store
|
||||||
|
.svn
|
||||||
|
log/*.log
|
||||||
|
tmp/**
|
||||||
|
node_modules/
|
||||||
|
.sass-cache
|
||||||
|
OLD/
|
19
LICENSE
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright (C) 2011-2022 Hakim El Hattab, http://hakim.se, and reveal.js contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
65
README.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<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://s3.amazonaws.com/static.slid.es/images/slides-github-banner-320x40.png?1" alt="Slides" width="160" height="20"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
reveal.js is an open source HTML presentation framework. It enables anyone with a web browser to create 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/).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Sponsors
|
||||||
|
Hakim's open source work is supported by <a href="https://github.com/sponsors/hakimel">GitHub sponsors</a>. Special thanks to:
|
||||||
|
<div align="center">
|
||||||
|
<table>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://workos.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=revealjs&utm_source=github">
|
||||||
|
<div>
|
||||||
|
<img src="https://user-images.githubusercontent.com/629429/151508669-efb4c3b3-8fe3-45eb-8e47-e9510b5f0af1.svg" width="290" alt="WorkOS">
|
||||||
|
</div>
|
||||||
|
<b>Your app, enterprise-ready.</b>
|
||||||
|
<div>
|
||||||
|
<sub>Start selling to enterprise customers with just a few lines of code. Add Single Sign-On (and more) in minutes instead of months.</sup>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://www.doppler.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=revealjs&utm_source=github">
|
||||||
|
<div>
|
||||||
|
<img src="https://user-images.githubusercontent.com/629429/151510865-9fd454f1-fd8c-4df4-b227-a54b87313db4.png" width="290" alt="Doppler">
|
||||||
|
</div>
|
||||||
|
<b>All your environment variables, in one place</b>
|
||||||
|
<div>
|
||||||
|
<sub>Stop struggling with scattered API keys, hacking together home-brewed tools, and avoiding access controls. Keep your team and servers in sync with Doppler.</sup>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 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)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Online Editor
|
||||||
|
Want to create your presentation using a visual editor? Try the official reveal.js presentation platform for free at [Slides.com](https://slides.com). It's made by the same people behind reveal.js.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
<div align="center">
|
||||||
|
MIT licensed | Copyright © 2011-2022 Hakim El Hattab, https://hakim.se
|
||||||
|
</div>
|
69
css/layout.scss
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/**
|
||||||
|
* Layout helpers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Stretch an element vertically based on available space
|
||||||
|
.reveal .stretch,
|
||||||
|
.reveal .r-stretch {
|
||||||
|
max-width: none;
|
||||||
|
max-height: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre.stretch code,
|
||||||
|
.reveal pre.r-stretch code {
|
||||||
|
height: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Text that auto-fits its container
|
||||||
|
.reveal .r-fit-text {
|
||||||
|
display: inline-block; // https://github.com/rikschennink/fitty#performance
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stack multiple elements on top of each other
|
||||||
|
.reveal .r-stack {
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .r-stack > * {
|
||||||
|
grid-area: 1/1;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Horizontal and vertical stacks
|
||||||
|
.reveal .r-vstack,
|
||||||
|
.reveal .r-hstack {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
img, video {
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 0;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .r-vstack {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .r-hstack {
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Naming based on tailwindcss
|
||||||
|
.reveal .items-stretch { align-items: stretch; }
|
||||||
|
.reveal .items-start { align-items: flex-start; }
|
||||||
|
.reveal .items-center { align-items: center; }
|
||||||
|
.reveal .items-end { align-items: flex-end; }
|
||||||
|
|
||||||
|
.reveal .justify-between { justify-content: space-between; }
|
||||||
|
.reveal .justify-around { justify-content: space-around; }
|
||||||
|
.reveal .justify-start { justify-content: flex-start; }
|
||||||
|
.reveal .justify-center { justify-content: center; }
|
||||||
|
.reveal .justify-end { justify-content: flex-end; }
|
173
css/print/paper.scss
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
/* Default Print Stylesheet Template
|
||||||
|
by Rob Glazebrook of CSSnewbie.com
|
||||||
|
Last Updated: June 4, 2008
|
||||||
|
|
||||||
|
Feel free (nay, compelled) to edit, append, and
|
||||||
|
manipulate this file as you see fit. */
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
html:not(.print-pdf) {
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: #fff;
|
||||||
|
font-size: 20pt;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
border: 0;
|
||||||
|
margin: 0 5%;
|
||||||
|
padding: 0;
|
||||||
|
overflow: visible;
|
||||||
|
float: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nestedarrow,
|
||||||
|
.controls,
|
||||||
|
.fork-reveal,
|
||||||
|
.share-reveal,
|
||||||
|
.state-background,
|
||||||
|
.reveal .progress,
|
||||||
|
.reveal .backgrounds,
|
||||||
|
.reveal .slide-number {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body, p, td, li {
|
||||||
|
font-size: 20pt!important;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,h2,h3,h4,h5,h6 {
|
||||||
|
color: #000!important;
|
||||||
|
height: auto;
|
||||||
|
line-height: normal;
|
||||||
|
text-align: left;
|
||||||
|
letter-spacing: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Need to reduce the size of the fonts for printing */
|
||||||
|
h1 { font-size: 28pt !important; }
|
||||||
|
h2 { font-size: 24pt !important; }
|
||||||
|
h3 { font-size: 22pt !important; }
|
||||||
|
h4 { font-size: 22pt !important; font-variant: small-caps; }
|
||||||
|
h5 { font-size: 21pt !important; }
|
||||||
|
h6 { font-size: 20pt !important; font-style: italic; }
|
||||||
|
|
||||||
|
a:link,
|
||||||
|
a:visited {
|
||||||
|
color: #000 !important;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, ol, div, p {
|
||||||
|
visibility: visible;
|
||||||
|
position: static;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
overflow: visible;
|
||||||
|
margin: 0;
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
.reveal pre,
|
||||||
|
.reveal table {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
.reveal pre code {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.reveal blockquote {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
.reveal .slides {
|
||||||
|
position: static !important;
|
||||||
|
width: auto !important;
|
||||||
|
height: auto !important;
|
||||||
|
|
||||||
|
left: 0 !important;
|
||||||
|
top: 0 !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
margin-top: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
zoom: 1 !important;
|
||||||
|
transform: none !important;
|
||||||
|
|
||||||
|
overflow: visible !important;
|
||||||
|
display: block !important;
|
||||||
|
|
||||||
|
text-align: left !important;
|
||||||
|
perspective: none;
|
||||||
|
|
||||||
|
perspective-origin: 50% 50%;
|
||||||
|
}
|
||||||
|
.reveal .slides section {
|
||||||
|
visibility: visible !important;
|
||||||
|
position: static !important;
|
||||||
|
width: auto !important;
|
||||||
|
height: auto !important;
|
||||||
|
display: block !important;
|
||||||
|
overflow: visible !important;
|
||||||
|
|
||||||
|
left: 0 !important;
|
||||||
|
top: 0 !important;
|
||||||
|
margin-left: 0 !important;
|
||||||
|
margin-top: 0 !important;
|
||||||
|
padding: 60px 20px !important;
|
||||||
|
z-index: auto !important;
|
||||||
|
|
||||||
|
opacity: 1 !important;
|
||||||
|
|
||||||
|
page-break-after: always !important;
|
||||||
|
|
||||||
|
transform-style: flat !important;
|
||||||
|
transform: none !important;
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
.reveal .slides section.stack {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
.reveal section:last-of-type {
|
||||||
|
page-break-after: avoid !important;
|
||||||
|
}
|
||||||
|
.reveal section .fragment {
|
||||||
|
opacity: 1 !important;
|
||||||
|
visibility: visible !important;
|
||||||
|
|
||||||
|
transform: none !important;
|
||||||
|
}
|
||||||
|
.reveal section img {
|
||||||
|
display: block;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: rgba(255,255,255,1);
|
||||||
|
border: 1px solid #666;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal section small {
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .hljs {
|
||||||
|
max-height: 100%;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
word-break: break-word;
|
||||||
|
font-size: 15pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .hljs .hljs-ln-numbers {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .hljs td {
|
||||||
|
font-size: inherit !important;
|
||||||
|
color: inherit !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
156
css/print/pdf.scss
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
/**
|
||||||
|
* This stylesheet is used to print reveal.js
|
||||||
|
* presentations to PDF.
|
||||||
|
*
|
||||||
|
* https://revealjs.com/pdf-export/
|
||||||
|
*/
|
||||||
|
|
||||||
|
html.print-pdf {
|
||||||
|
* {
|
||||||
|
-webkit-print-color-adjust: exact;
|
||||||
|
}
|
||||||
|
|
||||||
|
& {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0 auto !important;
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
float: none !important;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove any elements not needed in print. */
|
||||||
|
.nestedarrow,
|
||||||
|
.reveal .controls,
|
||||||
|
.reveal .progress,
|
||||||
|
.reveal .playback,
|
||||||
|
.reveal.overview,
|
||||||
|
.state-background {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
overflow: hidden !important;
|
||||||
|
font-family: Courier, 'Courier New', monospace !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
width: auto !important;
|
||||||
|
height: auto !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
||||||
|
.reveal .slides {
|
||||||
|
position: static;
|
||||||
|
width: 100% !important;
|
||||||
|
height: auto !important;
|
||||||
|
zoom: 1 !important;
|
||||||
|
pointer-events: initial;
|
||||||
|
|
||||||
|
left: auto;
|
||||||
|
top: auto;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
|
||||||
|
overflow: visible;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
perspective: none;
|
||||||
|
perspective-origin: 50% 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides .pdf-page {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
page-break-after: always;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section {
|
||||||
|
visibility: visible !important;
|
||||||
|
display: block !important;
|
||||||
|
position: absolute !important;
|
||||||
|
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
min-height: 1px;
|
||||||
|
|
||||||
|
opacity: 1 !important;
|
||||||
|
|
||||||
|
transform-style: flat !important;
|
||||||
|
transform: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal section.stack {
|
||||||
|
position: relative !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
page-break-after: avoid !important;
|
||||||
|
height: auto !important;
|
||||||
|
min-height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Slide backgrounds are placed inside of their slide when exporting to PDF */
|
||||||
|
.reveal .backgrounds {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.reveal .slide-background {
|
||||||
|
display: block !important;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Display slide speaker notes when 'showNotes' is enabled */
|
||||||
|
.reveal.show-notes {
|
||||||
|
max-width: none;
|
||||||
|
max-height: none;
|
||||||
|
}
|
||||||
|
.reveal .speaker-notes-pdf {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
max-height: none;
|
||||||
|
top: auto;
|
||||||
|
right: auto;
|
||||||
|
bottom: auto;
|
||||||
|
left: auto;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Layout option which makes notes appear on a separate page */
|
||||||
|
.reveal .speaker-notes-pdf[data-layout="separate-page"] {
|
||||||
|
position: relative;
|
||||||
|
color: inherit;
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 20px;
|
||||||
|
page-break-after: always;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Display slide numbers when 'slideNumber' is enabled */
|
||||||
|
.reveal .slide-number-pdf {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This accessibility tool is not useful in PDF and breaks it visually */
|
||||||
|
.aria-status {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
1827
css/reveal.scss
Normal file
21
css/theme/README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
## Dependencies
|
||||||
|
|
||||||
|
Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment installed before proceeding: https://revealjs.com/installation/#full-setup
|
||||||
|
|
||||||
|
## Creating a Theme
|
||||||
|
|
||||||
|
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled from Sass to CSS (see the [gulpfile](https://github.com/hakimel/reveal.js/blob/master/gulpfile.js)) when you run `npm run build -- css-themes`.
|
||||||
|
|
||||||
|
Each theme file does four things in the following order:
|
||||||
|
|
||||||
|
1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)**
|
||||||
|
Shared utility functions.
|
||||||
|
|
||||||
|
2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)**
|
||||||
|
Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3.
|
||||||
|
|
||||||
|
3. **Override**
|
||||||
|
This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please.
|
||||||
|
|
||||||
|
4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)**
|
||||||
|
The template theme file which will generate final CSS output based on the currently defined variables.
|
41
css/theme/source/beige.scss
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* Beige theme for reveal.js.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@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);
|
||||||
|
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$mainColor: #333;
|
||||||
|
$headingColor: #333;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$backgroundColor: #f7f3de;
|
||||||
|
$linkColor: #8b743d;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
$selectionBackgroundColor: rgba(79, 64, 28, 0.99);
|
||||||
|
$heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
|
||||||
|
|
||||||
|
// Background generator
|
||||||
|
@mixin bodyBackground() {
|
||||||
|
@include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Change text colors against dark slide backgrounds
|
||||||
|
@include dark-bg-text-color(#fff);
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
46
css/theme/source/black.scss
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/**
|
||||||
|
* Black theme for reveal.js. This is the opposite of the 'white' theme.
|
||||||
|
*
|
||||||
|
* By Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@import "../template/settings";
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// Include theme-specific fonts
|
||||||
|
@import url(./fonts/source-sans-pro/source-sans-pro.css);
|
||||||
|
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$backgroundColor: #191919;
|
||||||
|
|
||||||
|
$mainColor: #fff;
|
||||||
|
$headingColor: #fff;
|
||||||
|
|
||||||
|
$mainFontSize: 42px;
|
||||||
|
$mainFont: 'Source Sans Pro', Helvetica, sans-serif;
|
||||||
|
$headingFont: 'Source Sans Pro', Helvetica, sans-serif;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$headingLetterSpacing: normal;
|
||||||
|
$headingTextTransform: uppercase;
|
||||||
|
$headingFontWeight: 600;
|
||||||
|
$linkColor: #42affa;
|
||||||
|
$linkColorHover: lighten( $linkColor, 15% );
|
||||||
|
$selectionBackgroundColor: lighten( $linkColor, 25% );
|
||||||
|
|
||||||
|
$heading1Size: 2.5em;
|
||||||
|
$heading2Size: 1.6em;
|
||||||
|
$heading3Size: 1.3em;
|
||||||
|
$heading4Size: 1.0em;
|
||||||
|
|
||||||
|
// Change text colors against light slide backgrounds
|
||||||
|
@include light-bg-text-color(#222);
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
87
css/theme/source/blood.scss
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/**
|
||||||
|
* Blood theme for reveal.js
|
||||||
|
* Author: Walther http://github.com/Walther
|
||||||
|
*
|
||||||
|
* Designed to be used with highlight.js theme
|
||||||
|
* "monokai_sublime.css" available from
|
||||||
|
* https://github.com/isagalaev/highlight.js/
|
||||||
|
*
|
||||||
|
* For other themes, change $codeBackground accordingly.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@import "../template/settings";
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
// Include theme-specific fonts
|
||||||
|
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic);
|
||||||
|
|
||||||
|
// Colors used in the theme
|
||||||
|
$blood: #a23;
|
||||||
|
$coal: #222;
|
||||||
|
$codeBackground: #23241f;
|
||||||
|
|
||||||
|
$backgroundColor: $coal;
|
||||||
|
|
||||||
|
// Main text
|
||||||
|
$mainFont: Ubuntu, 'sans-serif';
|
||||||
|
$mainColor: #eee;
|
||||||
|
|
||||||
|
// Headings
|
||||||
|
$headingFont: Ubuntu, 'sans-serif';
|
||||||
|
$headingTextShadow: 2px 2px 2px $coal;
|
||||||
|
|
||||||
|
// h1 shadow, borrowed humbly from
|
||||||
|
// (c) Default theme by Hakim El Hattab
|
||||||
|
$heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
|
||||||
|
|
||||||
|
// Links
|
||||||
|
$linkColor: $blood;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
|
||||||
|
// Text selection
|
||||||
|
$selectionBackgroundColor: $blood;
|
||||||
|
$selectionColor: #fff;
|
||||||
|
|
||||||
|
// Change text colors against dark slide backgrounds
|
||||||
|
@include light-bg-text-color(#222);
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
// some overrides after theme template import
|
||||||
|
|
||||||
|
.reveal p {
|
||||||
|
font-weight: 300;
|
||||||
|
text-shadow: 1px 1px $coal;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.has-light-background {
|
||||||
|
p, h1, h2, h3, h4 {
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal p code {
|
||||||
|
background-color: $codeBackground;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small code {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
36
css/theme/source/league.scss
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/**
|
||||||
|
* League theme for reveal.js.
|
||||||
|
*
|
||||||
|
* This was the default theme pre-3.0.0.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@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);
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2);
|
||||||
|
$heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
|
||||||
|
|
||||||
|
// Background generator
|
||||||
|
@mixin bodyBackground() {
|
||||||
|
@include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Change text colors against light slide backgrounds
|
||||||
|
@include light-bg-text-color(#222);
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
58
css/theme/source/moon.scss
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/**
|
||||||
|
* Solarized Dark theme for reveal.js.
|
||||||
|
* Author: Achim Staebler
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@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);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Solarized colors by Ethan Schoonover
|
||||||
|
*/
|
||||||
|
html * {
|
||||||
|
color-profile: sRGB;
|
||||||
|
rendering-intent: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Solarized colors
|
||||||
|
$base03: #002b36;
|
||||||
|
$base02: #073642;
|
||||||
|
$base01: #586e75;
|
||||||
|
$base00: #657b83;
|
||||||
|
$base0: #839496;
|
||||||
|
$base1: #93a1a1;
|
||||||
|
$base2: #eee8d5;
|
||||||
|
$base3: #fdf6e3;
|
||||||
|
$yellow: #b58900;
|
||||||
|
$orange: #cb4b16;
|
||||||
|
$red: #dc322f;
|
||||||
|
$magenta: #d33682;
|
||||||
|
$violet: #6c71c4;
|
||||||
|
$blue: #268bd2;
|
||||||
|
$cyan: #2aa198;
|
||||||
|
$green: #859900;
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$mainColor: $base1;
|
||||||
|
$headingColor: $base2;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$backgroundColor: $base03;
|
||||||
|
$linkColor: $blue;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
$selectionBackgroundColor: $magenta;
|
||||||
|
|
||||||
|
// Change text colors against light slide backgrounds
|
||||||
|
@include light-bg-text-color(#222);
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
37
css/theme/source/night.scss
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* Black theme for reveal.js.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@import "../template/settings";
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// Include theme-specific fonts
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Montserrat:700);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
|
||||||
|
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$backgroundColor: #111;
|
||||||
|
|
||||||
|
$mainFont: 'Open Sans', sans-serif;
|
||||||
|
$linkColor: #e7ad52;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
$headingFont: 'Montserrat', Impact, sans-serif;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$headingLetterSpacing: -0.03em;
|
||||||
|
$headingTextTransform: none;
|
||||||
|
$selectionBackgroundColor: #e7ad52;
|
||||||
|
|
||||||
|
// Change text colors against light slide backgrounds
|
||||||
|
@include light-bg-text-color(#222);
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
38
css/theme/source/serif.scss
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* A simple theme for reveal.js presentations, similar
|
||||||
|
* to the default theme. The accent color is brown.
|
||||||
|
*
|
||||||
|
* This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@import "../template/settings";
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
|
||||||
|
$mainColor: #000;
|
||||||
|
$headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
|
||||||
|
$headingColor: #383D3D;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$headingTextTransform: none;
|
||||||
|
$backgroundColor: #F0F1EB;
|
||||||
|
$linkColor: #51483D;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
$selectionBackgroundColor: #26351C;
|
||||||
|
|
||||||
|
.reveal a {
|
||||||
|
line-height: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Change text colors against dark slide backgrounds
|
||||||
|
@include dark-bg-text-color(#fff);
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
40
css/theme/source/simple.scss
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* A simple theme for reveal.js presentations, similar
|
||||||
|
* to the default theme. The accent color is darkblue.
|
||||||
|
*
|
||||||
|
* This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
|
||||||
|
* reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@import "../template/settings";
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Include theme-specific fonts
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
|
||||||
|
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$mainFont: 'Lato', sans-serif;
|
||||||
|
$mainColor: #000;
|
||||||
|
$headingFont: 'News Cycle', Impact, sans-serif;
|
||||||
|
$headingColor: #000;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$headingTextTransform: none;
|
||||||
|
$backgroundColor: #fff;
|
||||||
|
$linkColor: #00008B;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
$selectionBackgroundColor: rgba(0, 0, 0, 0.99);
|
||||||
|
|
||||||
|
// Change text colors against dark slide backgrounds
|
||||||
|
@include dark-bg-text-color(#fff);
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
49
css/theme/source/sky.scss
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/**
|
||||||
|
* Sky theme for reveal.js.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@import "../template/settings";
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Include theme-specific fonts
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
|
||||||
|
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$mainFont: 'Open Sans', sans-serif;
|
||||||
|
$mainColor: #333;
|
||||||
|
$headingFont: 'Quicksand', sans-serif;
|
||||||
|
$headingColor: #333;
|
||||||
|
$headingLetterSpacing: -0.08em;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$backgroundColor: #f7fbfc;
|
||||||
|
$linkColor: #3b759e;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
$selectionBackgroundColor: #134674;
|
||||||
|
|
||||||
|
// Fix links so they are not cut off
|
||||||
|
.reveal a {
|
||||||
|
line-height: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Background generator
|
||||||
|
@mixin bodyBackground() {
|
||||||
|
@include radial-gradient( #add9e4, #f7fbfc );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Change text colors against dark slide backgrounds
|
||||||
|
@include dark-bg-text-color(#fff);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
63
css/theme/source/solarized.scss
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/**
|
||||||
|
* Solarized Light theme for reveal.js.
|
||||||
|
* Author: Achim Staebler
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@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);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Solarized colors by Ethan Schoonover
|
||||||
|
*/
|
||||||
|
html * {
|
||||||
|
color-profile: sRGB;
|
||||||
|
rendering-intent: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Solarized colors
|
||||||
|
$base03: #002b36;
|
||||||
|
$base02: #073642;
|
||||||
|
$base01: #586e75;
|
||||||
|
$base00: #657b83;
|
||||||
|
$base0: #839496;
|
||||||
|
$base1: #93a1a1;
|
||||||
|
$base2: #eee8d5;
|
||||||
|
$base3: #fdf6e3;
|
||||||
|
$yellow: #b58900;
|
||||||
|
$orange: #cb4b16;
|
||||||
|
$red: #dc322f;
|
||||||
|
$magenta: #d33682;
|
||||||
|
$violet: #6c71c4;
|
||||||
|
$blue: #268bd2;
|
||||||
|
$cyan: #2aa198;
|
||||||
|
$green: #859900;
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$mainColor: $base00;
|
||||||
|
$headingColor: $base01;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$backgroundColor: $base3;
|
||||||
|
$linkColor: $blue;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
$selectionBackgroundColor: $magenta;
|
||||||
|
|
||||||
|
// Background generator
|
||||||
|
// @mixin bodyBackground() {
|
||||||
|
// @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) );
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
46
css/theme/source/white.scss
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/**
|
||||||
|
* White theme for reveal.js. This is the opposite of the 'black' theme.
|
||||||
|
*
|
||||||
|
* By Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Default mixins and settings -----------------
|
||||||
|
@import "../template/mixins";
|
||||||
|
@import "../template/settings";
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// Include theme-specific fonts
|
||||||
|
@import url(./fonts/source-sans-pro/source-sans-pro.css);
|
||||||
|
|
||||||
|
|
||||||
|
// Override theme settings (see ../template/settings.scss)
|
||||||
|
$backgroundColor: #fff;
|
||||||
|
|
||||||
|
$mainColor: #222;
|
||||||
|
$headingColor: #222;
|
||||||
|
|
||||||
|
$mainFontSize: 42px;
|
||||||
|
$mainFont: 'Source Sans Pro', Helvetica, sans-serif;
|
||||||
|
$headingFont: 'Source Sans Pro', Helvetica, sans-serif;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$headingLetterSpacing: normal;
|
||||||
|
$headingTextTransform: uppercase;
|
||||||
|
$headingFontWeight: 600;
|
||||||
|
$linkColor: #2a76dd;
|
||||||
|
$linkColorHover: lighten( $linkColor, 15% );
|
||||||
|
$selectionBackgroundColor: lighten( $linkColor, 25% );
|
||||||
|
|
||||||
|
$heading1Size: 2.5em;
|
||||||
|
$heading2Size: 1.6em;
|
||||||
|
$heading3Size: 1.3em;
|
||||||
|
$heading4Size: 1.0em;
|
||||||
|
|
||||||
|
// Change text colors against dark slide backgrounds
|
||||||
|
@include dark-bg-text-color(#fff);
|
||||||
|
|
||||||
|
|
||||||
|
// Theme template ------------------------------
|
||||||
|
@import "../template/theme";
|
||||||
|
// ---------------------------------------------
|
28
css/theme/template/exposer.scss
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Exposes theme's variables for easy re-use in CSS for plugin authors
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--r-background-color: #{$backgroundColor};
|
||||||
|
--r-main-font: #{$mainFont};
|
||||||
|
--r-main-font-size: #{$mainFontSize};
|
||||||
|
--r-main-color: #{$mainColor};
|
||||||
|
--r-block-margin: #{$blockMargin};
|
||||||
|
--r-heading-margin: #{$headingMargin};
|
||||||
|
--r-heading-font: #{$headingFont};
|
||||||
|
--r-heading-color: #{$headingColor};
|
||||||
|
--r-heading-line-height: #{$headingLineHeight};
|
||||||
|
--r-heading-letter-spacing: #{$headingLetterSpacing};
|
||||||
|
--r-heading-text-transform: #{$headingTextTransform};
|
||||||
|
--r-heading-text-shadow: #{$headingTextShadow};
|
||||||
|
--r-heading-font-weight: #{$headingFontWeight};
|
||||||
|
--r-heading1-text-shadow: #{$heading1TextShadow};
|
||||||
|
--r-heading1-size: #{$heading1Size};
|
||||||
|
--r-heading2-size: #{$heading2Size};
|
||||||
|
--r-heading3-size: #{$heading3Size};
|
||||||
|
--r-heading4-size: #{$heading4Size};
|
||||||
|
--r-code-font: #{$codeFont};
|
||||||
|
--r-link-color: #{$linkColor};
|
||||||
|
--r-link-color-dark: #{darken($linkColor , 15% )};
|
||||||
|
--r-link-color-hover: #{$linkColorHover};
|
||||||
|
--r-selection-background-color: #{$selectionBackgroundColor};
|
||||||
|
--r-selection-color: #{$selectionColor};
|
||||||
|
}
|
45
css/theme/template/mixins.scss
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
@mixin vertical-gradient( $top, $bottom ) {
|
||||||
|
background: $top;
|
||||||
|
background: -moz-linear-gradient( top, $top 0%, $bottom 100% );
|
||||||
|
background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) );
|
||||||
|
background: -webkit-linear-gradient( top, $top 0%, $bottom 100% );
|
||||||
|
background: -o-linear-gradient( top, $top 0%, $bottom 100% );
|
||||||
|
background: -ms-linear-gradient( top, $top 0%, $bottom 100% );
|
||||||
|
background: linear-gradient( top, $top 0%, $bottom 100% );
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin horizontal-gradient( $top, $bottom ) {
|
||||||
|
background: $top;
|
||||||
|
background: -moz-linear-gradient( left, $top 0%, $bottom 100% );
|
||||||
|
background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) );
|
||||||
|
background: -webkit-linear-gradient( left, $top 0%, $bottom 100% );
|
||||||
|
background: -o-linear-gradient( left, $top 0%, $bottom 100% );
|
||||||
|
background: -ms-linear-gradient( left, $top 0%, $bottom 100% );
|
||||||
|
background: linear-gradient( left, $top 0%, $bottom 100% );
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin radial-gradient( $outer, $inner, $type: circle ) {
|
||||||
|
background: $outer;
|
||||||
|
background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
|
||||||
|
background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) );
|
||||||
|
background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
|
||||||
|
background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
|
||||||
|
background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
|
||||||
|
background: radial-gradient( center, $type cover, $inner 0%, $outer 100% );
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin light-bg-text-color( $color ) {
|
||||||
|
section.has-light-background {
|
||||||
|
&, h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: $color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin dark-bg-text-color( $color ) {
|
||||||
|
section.has-dark-background {
|
||||||
|
&, h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: $color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
45
css/theme/template/settings.scss
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
// Base settings for all themes that can optionally be
|
||||||
|
// overridden by the super-theme
|
||||||
|
|
||||||
|
// Background of the presentation
|
||||||
|
$backgroundColor: #2b2b2b;
|
||||||
|
|
||||||
|
// Primary/body text
|
||||||
|
$mainFont: 'Lato', sans-serif;
|
||||||
|
$mainFontSize: 40px;
|
||||||
|
$mainColor: #eee;
|
||||||
|
|
||||||
|
// Vertical spacing between blocks of text
|
||||||
|
$blockMargin: 20px;
|
||||||
|
|
||||||
|
// Headings
|
||||||
|
$headingMargin: 0 0 $blockMargin 0;
|
||||||
|
$headingFont: 'League Gothic', Impact, sans-serif;
|
||||||
|
$headingColor: #eee;
|
||||||
|
$headingLineHeight: 1.2;
|
||||||
|
$headingLetterSpacing: normal;
|
||||||
|
$headingTextTransform: uppercase;
|
||||||
|
$headingTextShadow: none;
|
||||||
|
$headingFontWeight: normal;
|
||||||
|
$heading1TextShadow: $headingTextShadow;
|
||||||
|
|
||||||
|
$heading1Size: 3.77em;
|
||||||
|
$heading2Size: 2.11em;
|
||||||
|
$heading3Size: 1.55em;
|
||||||
|
$heading4Size: 1.00em;
|
||||||
|
|
||||||
|
$codeFont: monospace;
|
||||||
|
|
||||||
|
// Links and actions
|
||||||
|
$linkColor: #13DAEC;
|
||||||
|
$linkColorHover: lighten( $linkColor, 20% );
|
||||||
|
|
||||||
|
// Text selection
|
||||||
|
$selectionBackgroundColor: #FF5E99;
|
||||||
|
$selectionColor: #fff;
|
||||||
|
|
||||||
|
// Generates the presentation background, can be overridden
|
||||||
|
// to return a background image or gradient
|
||||||
|
@mixin bodyBackground() {
|
||||||
|
background: $backgroundColor;
|
||||||
|
}
|
331
css/theme/template/theme.scss
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
// Base theme template for reveal.js
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
@import "./exposer";
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
@include bodyBackground();
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section>section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {font-size: var(--r-heading1-size); }
|
||||||
|
.reveal h2 {font-size: var(--r-heading2-size); }
|
||||||
|
.reveal h3 {font-size: var(--r-heading3-size); }
|
||||||
|
.reveal h4 {font-size: var(--r-heading4-size); }
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
|
||||||
|
word-wrap: break-word;
|
||||||
|
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align="center"],
|
||||||
|
.reveal table td[align="center"] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align="right"],
|
||||||
|
.reveal table td[align="right"] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color .15s ease;
|
||||||
|
}
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
// background: darken( var(--r-link-color), 15% );
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all .15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0,0,0,0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
BIN
dist/img/build.jpg
vendored
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
dist/img/case_back.png
vendored
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
dist/img/case_front.png
vendored
Normal file
After Width: | Height: | Size: 42 KiB |
59
dist/img/cpu.svg
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color">
|
||||||
|
<circle cx="20.1969" cy="19.7365" r="2.7237" fill="#ea5a47"/>
|
||||||
|
<path fill="#d22f27" d="M21.2765,17.0572a2.7207,2.7207,0,0,1-3.7589,3.7589,2.7221,2.7221,0,1,0,3.7589-3.7589Z"/>
|
||||||
|
<circle cx="30.8343" cy="19.7365" r="2.7237" fill="#ea5a47"/>
|
||||||
|
<path fill="#d22f27" d="M31.9139,17.0572a2.7207,2.7207,0,0,1-3.7589,3.7589,2.7221,2.7221,0,1,0,3.7589-3.7589Z"/>
|
||||||
|
<circle cx="37.6971" cy="19.7365" r="2.7237" fill="#ea5a47"/>
|
||||||
|
<path fill="#d22f27" d="M38.7767,17.0572a2.7207,2.7207,0,0,1-3.7589,3.7589,2.7221,2.7221,0,1,0,3.7589-3.7589Z"/>
|
||||||
|
<circle cx="45.2462" cy="19.7365" r="2.7237" fill="#ea5a47"/>
|
||||||
|
<path fill="#d22f27" d="M46.3258,17.0572a2.7207,2.7207,0,0,1-3.7589,3.7589,2.7221,2.7221,0,1,0,3.7589-3.7589Z"/>
|
||||||
|
<circle cx="23.9309" cy="30.3739" r="2.7237" fill="#fcea2b"/>
|
||||||
|
<path fill="#f1b31c" d="M25.0105,27.6946a2.7206,2.7206,0,0,1-3.7588,3.7588,2.722,2.722,0,1,0,3.7588-3.7588Z"/>
|
||||||
|
<circle cx="31.1369" cy="30.3739" r="2.7237" fill="#fcea2b"/>
|
||||||
|
<path fill="#f1b31c" d="M32.2165,27.6946a2.7206,2.7206,0,0,1-3.7589,3.7588,2.7221,2.7221,0,1,0,3.7589-3.7588Z"/>
|
||||||
|
<circle cx="47.2645" cy="30.3739" r="2.7237" fill="#fcea2b"/>
|
||||||
|
<path fill="#f1b31c" d="M48.3441,27.6946a2.7206,2.7206,0,0,1-3.7588,3.7588,2.722,2.722,0,1,0,3.7588-3.7588Z"/>
|
||||||
|
<circle cx="54.8136" cy="30.3739" r="2.7237" fill="#fcea2b"/>
|
||||||
|
<path fill="#f1b31c" d="M55.8933,27.6946a2.7206,2.7206,0,0,1-3.7589,3.7588,2.7221,2.7221,0,1,0,3.7589-3.7588Z"/>
|
||||||
|
<circle cx="23.9309" cy="41.0113" r="2.7237" fill="#f4aa41"/>
|
||||||
|
<path fill="#e27022" d="M25.0106,38.332a2.7206,2.7206,0,0,1-3.7589,3.7588,2.7221,2.7221,0,1,0,3.7589-3.7588Z"/>
|
||||||
|
<circle cx="31.1369" cy="41.0113" r="2.7237" fill="#f4aa41"/>
|
||||||
|
<path fill="#e27022" d="M32.2165,38.332a2.7206,2.7206,0,0,1-3.7589,3.7588,2.7221,2.7221,0,1,0,3.7589-3.7588Z"/>
|
||||||
|
<circle cx="41.088" cy="41.0113" r="2.7237" fill="#f4aa41"/>
|
||||||
|
<path fill="#e27022" d="M42.1676,38.332a2.7206,2.7206,0,0,1-3.7589,3.7588,2.7221,2.7221,0,1,0,3.7589-3.7588Z"/>
|
||||||
|
<circle cx="51.4227" cy="41.0113" r="2.7237" fill="#f4aa41"/>
|
||||||
|
<path fill="#e27022" d="M52.5024,38.332a2.7206,2.7206,0,0,1-3.7589,3.7588,2.7221,2.7221,0,1,0,3.7589-3.7588Z"/>
|
||||||
|
</g>
|
||||||
|
<g id="line">
|
||||||
|
<line x1="12.0921" x2="12.0921" y1="58.8737" y2="12.8737" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="48.651" x2="59.5457" y1="19.7366" y2="19.7365" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="41.0235" x2="41.8915" y1="19.7366" y2="19.7366" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="34.1442" x2="34.407" y1="19.7366" y2="19.7366" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="23.5864" x2="27.4731" y1="19.7366" y2="19.7366" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="12.8594" x2="16.8908" y1="19.7366" y2="19.7366" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="59.9079" x2="59.9079" y1="58.8737" y2="12.8737" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<circle cx="20.1969" cy="19.7365" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="30.8343" cy="19.7365" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="37.6971" cy="19.7365" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="45.2462" cy="19.7365" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<line x1="58.0749" x2="58.8594" y1="30.3739" y2="30.3739" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="50.5571" x2="51.5424" y1="30.3739" y2="30.3739" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="34.4797" x2="43.9218" y1="30.3739" y2="30.3739" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="27.1829" x2="27.885" y1="30.3739" y2="30.3739" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="12.8594" x2="20.6344" y1="30.3739" y2="30.3739" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<circle cx="23.9309" cy="30.3739" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="31.1369" cy="30.3739" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="47.2645" cy="30.3739" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="54.8137" cy="30.3739" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<line x1="54.7598" x2="58.8594" y1="41.0113" y2="41.0113" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="44.4396" x2="48.0712" y1="41.0113" y2="41.0113" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="34.4578" x2="37.7914" y1="41.0113" y2="41.0113" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="27.2519" x2="27.812" y1="41.0113" y2="41.0113" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<line x1="12.8594" x2="20.606" y1="41.0113" y2="41.0113" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<circle cx="23.9309" cy="41.0113" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="31.1369" cy="41.0113" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="41.088" cy="41.0113" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
<circle cx="51.4228" cy="41.0113" r="2.7237" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="1.3618"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.2 KiB |
16
dist/img/display.svg
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color">
|
||||||
|
<rect x="13.3528" y="8.1195" width="44.8785" height="55.4381" fill="#D0CFCE" stroke="none"/>
|
||||||
|
<polygon fill="#FFFFFF" stroke="none" points="58.2313,25.7465 40.6043,8.1195 19.9355,8.1195 19.9142,8.1407 58.2313,46.4578"/>
|
||||||
|
<rect x="17.8806" y="13.0368" width="36.1591" height="41.4387" fill="#3F3F3F" stroke="none"/>
|
||||||
|
<polygon fill="#9B9B9A" stroke="none" points="54.0397,42.2662 54.0397,21.5549 45.5216,13.0368 24.8103,13.0368"/>
|
||||||
|
</g>
|
||||||
|
<g id="hair"/>
|
||||||
|
<g id="skin"/>
|
||||||
|
<g id="skin-shadow"/>
|
||||||
|
<g id="line">
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M13.4698,62.5391V9.1669c0-0.55,0.45-1,1-1h43.0444c0.55,0,1,0.45,1,1v53.3722c0,0.55-0.45,1-1,1H14.4698 C13.9198,63.5391,13.4698,63.0891,13.4698,62.5391z"/>
|
||||||
|
<circle cx="35.992" cy="59.0842" r="2" fill="#000000" stroke="none"/>
|
||||||
|
<rect x="17.8806" y="13.0368" width="36.1591" height="41.4387" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
BIN
dist/img/esp32d.png
vendored
Normal file
After Width: | Height: | Size: 220 KiB |
55
dist/img/espressif.svg
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="1024"
|
||||||
|
height="1024"
|
||||||
|
viewBox="0 0 1024 1024"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="espressif.svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1366"
|
||||||
|
inkscape:window-height="706"
|
||||||
|
id="namedview3380"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.23046875"
|
||||||
|
inkscape:cx="512"
|
||||||
|
inkscape:cy="512"
|
||||||
|
inkscape:window-x="-8"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg2" />
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3351"
|
||||||
|
d="m 515.92912,985.55294 c -112.3058,-7.73463 -213.4963,-48.96208 -298.2706,-121.52267 -18.4877,-15.82403 -48.0955,-46.52226 -63.8174,-66.16773 -14.2762,-17.83908 -33.4995,-45.89145 -43.9324,-64.11022 C 73.762619,670.63066 51.579519,600.17568 44.739719,526.77103 c -2.1266,-22.82189 -2.1334,-66.76566 -0.014,-89.91833 10.3946,-113.55353 57.220401,-217.96659 135.157301,-301.37641 4.5351,-4.85356 8.9207,-8.82468 9.7457,-8.82468 1.58,0 25.5073,23.4521 25.5073,25.00073 0,0.49497 -4.6385,5.78226 -10.3078,11.74951 -53.8817,56.71347 -95.6428,135.69475 -113.479501,214.61961 -8.3736,37.05212 -11.2366,63.4885 -11.2366,103.75692 0,32.7067 1.3574,49.7158 6.2999,78.94064 15.545701,91.92205 60.111401,179.54678 125.448501,246.65566 76.0402,78.10252 174.0965,126.30015 283.2323,139.21707 19.8981,2.35507 63.8567,3.21342 84.4144,1.64838 108.4889,-8.25979 206.63789,-51.01863 285.65839,-124.44813 l 11.57863,-10.75943 12.97249,12.98609 12.97253,12.98625 -4.78318,4.96665 c -2.63074,2.73174 -10.5948,10.08119 -17.69789,16.33214 -80.99066,71.27445 -180.69347,114.12513 -288.94707,124.18524 -17.3384,1.61126 -58.8691,2.19792 -75.3319,1.064 z m -25.6449,-81.28038 c -17.8199,-2.48087 -38.4594,-6.64319 -53.7115,-10.83166 l -12.0384,-3.30612 -19.4834,-17.1025 c -10.7158,-9.40642 -20.0839,-17.66927 -20.8178,-18.36195 -1.0527,-0.99353 0.1075,-3.21818 5.4947,-10.53571 13.1284,-17.83229 23.129,-41.25488 26.9617,-63.14738 2.2783,-13.01367 2.2548,-35.73174 -0.051,-48.90868 -9.0988,-52.00525 -46.0197,-95.97799 -95.1836,-113.36361 -14.2443,-5.03719 -26.3603,-7.38501 -44.5895,-8.64058 -28.1934,-1.94188 -44.915,-6.29547 -67.6069,-17.602 -30.5283,-15.21115 -54.2202,-38.60666 -69.954,-69.0789 -11.3029,-21.89061 -17.5323,-45.05873 -17.3732,-64.61275 0.1847,-22.68232 5.6536,-57.70573 11.061,-70.83502 20.8197,-50.55059 65.1006,-86.43684 120.0763,-97.31235 13.2721,-2.62554 50.498,-2.59984 72.1262,0.0497 104.6074,12.81523 198.0213,56.97966 272.6925,128.92405 37.2045,35.84599 69.5807,80.07322 93.2914,127.44016 24.878,49.69867 40.7119,104.34945 47.1629,162.78254 2.2073,19.99385 2.498,70.05314 0.5173,89.1024 -2.7655,26.59846 -9.6386,65.72506 -12.0599,68.65438 -2.9581,3.57882 -49.5577,20.75945 -71.7132,26.43973 l -10.4382,2.67613 -28.5634,-10.75091 c -15.7099,-5.9131 -28.8986,-11.06418 -29.3081,-11.44706 -0.4096,-0.38288 0.7036,-4.78755 2.4737,-9.78829 6.8522,-19.35837 12.7977,-46.06066 16.0764,-72.20199 1.9766,-15.7593 1.6513,-58.835 -0.5735,-75.94572 -6.9763,-53.65386 -24.4985,-100.98511 -53.7986,-145.32162 -54.5806,-82.59053 -142.6035,-136.26849 -242.315,-147.76815 -31.8797,-3.67664 -42.7495,-1.07649 -50.4711,12.07313 -2.5759,4.3866 -2.9604,6.16083 -2.9474,13.6019 0.017,9.84433 1.4351,13.28789 8.1629,19.82385 5.5849,5.42565 11.3105,7.01538 30.2895,8.41003 86.3696,6.34666 164.7603,52.70191 212.7334,125.797 54.6034,83.19729 60.7576,190.79494 15.9683,279.181 -10.1879,20.10432 -12.822,24.09563 -15.8091,23.95409 -1.3149,-0.0621 -8.6417,-0.98357 -16.2817,-2.04714 z M 259.75502,829.4545 c -28.8759,-5.28237 -51.3832,-26.15939 -58.5829,-54.33974 -2.5278,-9.89386 -2.7099,-25.69514 -0.4096,-35.54859 4.6143,-19.76599 20.072,-39.31224 37.9212,-47.95147 13.0838,-6.33267 21.2742,-7.9787 36.8245,-7.40062 10.9386,0.40663 14.0952,0.9527 21.4857,3.71675 22.0522,8.24755 37.8408,24.72367 44.8683,46.82187 5.8586,18.42315 4.3344,37.08196 -4.5003,55.08749 -8.833,18.00201 -26.7,32.77658 -45.8256,37.89415 -7.7455,2.07242 -24.8074,2.9959 -31.7813,1.72016 z m 556.43307,-65.23732 -21.37075,-0.58369 -0.23671,-11.23141 c -0.37811,-17.94212 -2.38219,-45.20929 -4.61146,-62.74309 C 778.07185,596.08357 739.23032,504.76691 679.53722,430.03246 603.28872,334.5712 495.54202,268.81125 375.34542,244.37832 c -28.5204,-5.79749 -50.8524,-8.42534 -85.9462,-10.11346 l -24.5764,-1.18219 -0.5342,-34.22908 c -0.2939,-18.82599 -0.258,-34.86085 0.08,-35.633 0.8649,-1.97724 21.6341,-18.92262 33.9424,-27.69318 12.0635,-8.59618 29.0947,-19.42191 41.6192,-26.45492 l 8.8579,-4.97407 8.773,1.1711 c 175.8161,23.46975 333.0094,115.44655 439.64026,257.24189 64.33861,85.5561 106.9624,187.18268 123.62912,294.76514 1.51013,9.74791 2.74572,19.02217 2.74572,20.60949 0,7.64916 -30.73084,54.83482 -51.00986,78.32302 l -7.33355,8.4941 -13.8369,0.049 c -7.61033,0.0269 -23.45378,-0.21381 -35.20768,-0.53481 z M 942.794,523.16587 c -0.5403,-1.28971 -3.18901,-8.36178 -5.88622,-15.71567 C 925.1952,475.51584 903.60151,429.80004 886.13017,399.94946 840.89876,322.66964 782.39356,255.01523 713.07422,199.83064 655.06942,153.6534 588.15212,116.01653 517.26482,89.699757 c -7.5339,-2.79693 -13.6239,-5.65803 -13.6239,-6.40053 0,-0.7385 1.977,-6.90363 4.3934,-13.7003 5.1294,-14.42803 2.7495,-13.11493 25.5257,-14.08347 54.0404,-2.298 116.1916,8.65574 170.6526,30.07643 125.88479,49.513223 222.37379,159.800353 255.54027,292.083083 9.21431,36.75104 12.41002,64.01084 12.42813,106.01449 0.0143,26.69384 -0.22349,31.47612 -1.58923,32.33719 -0.88161,0.55578 -7.27575,2.91707 -14.2092,5.24732 l -12.60642,4.23681 -0.98217,-2.34491 z"
|
||||||
|
style="fill:#ed5547" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.4 KiB |
16
dist/img/green.svg
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color">
|
||||||
|
<path fill="#B1CC33" stroke="none" d="M51.935,35.8718c4.1996,0.9278,6.7648,5.4824,6.7648,5.4824s-4.2448,3.05-8.4449,2.1226 s-6.7648-5.4824-6.7648-5.4824S47.7371,34.9462,51.935,35.8718z"/>
|
||||||
|
<path fill="#5C9E31" stroke="none" d="M22.3618,19.992c4.067,1.3991,6.0978,6.2158,6.0978,6.2158s-4.5639,2.5478-8.6315,1.149 s-6.0978-6.2158-6.0978-6.2158S18.2963,18.5952,22.3618,19.992z"/>
|
||||||
|
</g>
|
||||||
|
<g id="hair"/>
|
||||||
|
<g id="skin"/>
|
||||||
|
<g id="skin-shadow"/>
|
||||||
|
<g id="line">
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M34.9254,33.9599"/>
|
||||||
|
<polyline fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="36,63.1661 36,51.1661 31,29.1661"/>
|
||||||
|
<line x1="36" x2="41" y1="51.1661" y2="41.1661" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M22.3618,19.992 c4.067,1.3991,6.0978,6.2158,6.0978,6.2158s-4.5639,2.5478-8.6315,1.149s-6.0978-6.2158-6.0978-6.2158 S18.2963,18.5952,22.3618,19.992z"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M51.935,35.8718 c4.1996,0.9278,6.7648,5.4824,6.7648,5.4824s-4.2448,3.05-8.4449,2.1226s-6.7648-5.4824-6.7648-5.4824 S47.7371,34.9462,51.935,35.8718z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
BIN
dist/img/i2c.png
vendored
Normal file
After Width: | Height: | Size: 17 KiB |
3
dist/img/i2cd.svg
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="88px" height="71px" viewBox="-0.5 -0.5 88 71"><defs/><g><rect x="0" y="0" width="70" height="70" rx="10.5" ry="10.5" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><rect x="0" y="0" width="70" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 15px; margin-left: 1px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: normal; overflow-wrap: normal;">I2C Master</div></div></div></foreignObject><text x="35" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle" font-weight="bold">I2C Master</text></switch></g><path d="M 60 30 L 70 35 L 60 40 Z" fill="#d5e8d4" stroke="#82b366" stroke-miterlimit="10" transform="rotate(-180,65,35)" pointer-events="all"/><path d="M 66 34.89 L 86 34.89" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="1 1" pointer-events="stroke"/><path d="M 66 54.67 L 86 54.89" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="1 1" pointer-events="stroke"/><rect x="20" y="20" width="50" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 48px; height: 1px; padding-top: 35px; margin-left: 21px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">SCL</div></div></div></foreignObject><text x="45" y="39" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">SCL</text></switch></g><rect x="20" y="40" width="50" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 48px; height: 1px; padding-top: 55px; margin-left: 21px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">SDA</div></div></div></foreignObject><text x="45" y="59" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">SDA</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
|
After Width: | Height: | Size: 4.0 KiB |
23
dist/img/influxdb.svg
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="InfluxData_Symbol_Only" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
x="0px" y="0px" width="900px" height="900px" viewBox="-173 -143 900 900" style="enable-background:new -173 -143 900 900;"
|
||||||
|
xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:none;}
|
||||||
|
.st1{fill:#22ADF6;}
|
||||||
|
</style>
|
||||||
|
<rect id="Background" x="-173" y="-143" class="st0" width="900" height="900"/>
|
||||||
|
<path id="Cuboctahedron" class="st1" d="M694.1,394.9l-81-352.7C608.5,22.9,591,3.6,571.7-2L201.5-116.2c-4.6-1.8-10.1-1.8-15.7-1.8
|
||||||
|
c-15.7,0-32.2,6.4-43.3,15.7l-265.2,246.8c-14.7,12.9-22.1,38.7-17.5,57.1l86.6,377.6c4.6,19.3,22.1,38.7,41.4,44.2l346.2,106.8
|
||||||
|
c4.6,1.8,10.1,1.8,15.7,1.8c15.7,0,32.2-6.4,43.3-15.7L676.6,453C691.4,439.2,698.7,414.3,694.1,394.9z M240.2-32.4l254.1,78.3
|
||||||
|
c10.1,2.8,10.1,7.4,0,10.1L360.8,86.4c-10.1,2.8-23.9-1.8-31.3-9.2l-93-100.4C228.2-31.4,230-35.1,240.2-32.4z M398.5,423.5
|
||||||
|
c2.8,10.1-3.7,15.7-13.8,12.9l-274.4-84.7c-10.1-2.8-12-11.1-4.6-18.4L315.7,138c7.4-7.4,15.7-4.6,18.4,5.5L398.5,423.5z
|
||||||
|
M-53.6,174.8L169.3-32.4c7.4-7.4,19.3-6.4,26.7,0.9L307.4,89.2c7.4,7.4,6.4,19.3-0.9,26.7L83.6,323.1c-7.4,7.4-19.3,6.4-26.7-0.9
|
||||||
|
L-54.5,201.6C-61.9,193.3-60.9,181.3-53.6,174.8z M0.8,503.6l-58.9-258.8c-2.8-10.1,1.8-12,8.3-4.6l93,100.4
|
||||||
|
c7.4,7.4,10.1,22.1,7.4,32.2L10,503.6C7.2,513.7,2.6,513.7,0.8,503.6z M326.7,654.6l-291-89.3c-10.1-2.8-15.7-13.8-12.9-23.9
|
||||||
|
l48.8-156.6c2.8-10.1,13.8-15.7,23.9-12.9l291,89.3c10.1,2.8,15.7,13.8,12.9,23.9l-48.8,156.6C347,651.9,336.9,657.4,326.7,654.6z
|
||||||
|
M584.5,442.8L390.3,623.3c-7.4,7.4-11,4.6-8.3-5.5L422.5,487c2.8-10.1,13.8-20.3,23.9-22.1l133.5-30.4
|
||||||
|
C590.1,431.8,591.9,436.4,584.5,442.8z M605.7,404.2L445.5,441c-10.1,2.8-20.3-3.7-23-13.8l-68.1-296.5c-2.8-10.1,3.7-20.3,13.8-23
|
||||||
|
l160.2-36.8c10.1-2.8,20.3,3.7,23,13.8l68.1,296.5C622.3,392.2,615.9,402.3,605.7,404.2z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
16
dist/img/lock.svg
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color">
|
||||||
|
<path fill="#D0CFCE" stroke="#D0CFCE" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M21.3751,31.1747c-0.3501-8.7708,6.4491-18.5395,14.387-18.7794c8.0047-0.2419,16.5412,10.9698,14.333,19.052h-4.0394 c0,0,1.5619-7.922-2.2164-11.2535c-1.8494-1.6307-5.2556-4.771-8.6396-4.2922c-2.2829,0.323-6.8677,3.4518-7.9271,5.4209 c-2.0643,3.8367-1.7248,9.8169-1.7248,9.8169L21.3751,31.1747z"/>
|
||||||
|
<polygon fill="#FCEA2B" stroke="none" points="53,32.2969 54.875,32.2969 54.875,59.1719 16.875,59.1719 16.875,32.2969 18.75,32.2969"/>
|
||||||
|
<polygon fill="#F1B31C" stroke="none" points="54.4302,32.493 35.66,58.9944 54.9675,58.9944"/>
|
||||||
|
</g>
|
||||||
|
<g id="hair"/>
|
||||||
|
<g id="skin"/>
|
||||||
|
<g id="skin-shadow"/>
|
||||||
|
<g id="line">
|
||||||
|
<polygon fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="53,32.25 54.875,32.25 54.875,59.125 16.875,59.125 16.875,32.25 18.75,32.25"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M21.3751,28.9146c0-8.3786,6.4151-16.2744,14.3184-16.523c7.9697-0.2507,15.4098,7.2847,14.7416,16.523"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M25.5478,28.9146c0-6.3352,4.5755-12.3054,10.2123-12.4934c5.6843-0.1896,10.9908,5.5081,10.5142,12.4934"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M46.3042,29.9146"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
19
dist/img/meter.svg
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color">
|
||||||
|
<path fill="#FFFFFF" stroke="none" d="M35.9709,3.4517L35.9709,3.4517c-3.0012,0-5.4341,2.4329-5.4341,5.4341v23.106h10.8682V8.8858 C41.4051,5.8846,38.9721,3.4517,35.9709,3.4517z"/>
|
||||||
|
<path fill="#EA5A47" stroke="none" d="M41.5274,28.931"/>
|
||||||
|
<path fill="#EA5A47" stroke="none" d="M41.0656,47.4983C44.5916,49.3267,47,53.0041,47,57.2428c0,6.0613-4.9249,10.9749-11,10.9749 s-11-4.9136-11-10.9749c0-4.2539,2.4258-7.9426,5.9724-9.7641V28.5788c0,0,8.8728,1.5603,10.0745-1.0199L41.0656,47.4983z"/>
|
||||||
|
<path fill="#D22F27" stroke="none" d="M37.0415,29.403c1.6925-0.1501,2.2824-0.3294,4.4859-1.2412l0.0236,18.8285 c0.0007,0.5571,0.182,1.1036,0.5349,1.5383c2.1678,2.6707,4.2519,5.2117,4.2519,9.0919c0,5.9935-4.9899,10.0365-10.4309,10.0365 c0,0,10.1031-7.6096,1.692-16.5858c-0.3555-0.3793-0.551-1.2297-0.551-1.7749L37.0415,29.403z"/>
|
||||||
|
</g>
|
||||||
|
<g id="hair"/>
|
||||||
|
<g id="skin"/>
|
||||||
|
<g id="skin-shadow"/>
|
||||||
|
<g id="line">
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M38.3874,35.9133c-0.7217,0.1599-1.9748,0.2657-3.3999,0.2657c-2.2364,0-4.0494-0.2606-4.0494-0.582"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M38.3874,43.6108c-0.7217,0.1599-1.9748,0.2657-3.3999,0.2657c-2.2364,0-4.0494-0.2606-4.0494-0.582"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M38.3874,28.2158c-0.7217,0.1599-1.9748,0.2657-3.3999,0.2657c-2.2364,0-4.0494-0.2606-4.0494-0.582"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M38.3874,20.5183c-0.7217,0.1599-1.9748,0.2657-3.3999,0.2657c-2.2364,0-4.0494-0.2606-4.0494-0.582"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M29.6634,49.4624c1.2934-0.9629,1.2755-2.2365,1.2755-2.2365V8.6385c0-2.807,2.2755-5.0825,5.0825-5.0825 c2.807,0,5.0825,2.2755,5.0825,5.0825v38.5874c0,0,0.0052,1.2859,1.2986,2.2488c2.3101,1.8633,3.7879,4.7172,3.7879,7.9162 c0,5.614-4.5511,10.1651-10.1651,10.1651s-10.1651-4.5511-10.1651-10.1651c0-1.5355,0.3405-2.9915,0.95-4.2966"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M38.3874,12.8208c-0.7217,0.1599-1.9748,0.2657-3.3999,0.2657c-2.2364,0-4.0494-0.2606-4.0494-0.582"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
BIN
dist/img/openweathermap.png
vendored
Normal file
After Width: | Height: | Size: 13 KiB |
14
dist/img/power.svg
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color">
|
||||||
|
<path fill="#d0cfce" stroke="none" d="M59.971,42.7985c0-0.5523,0.4477-1,1-1h4.143v-9.183h-4.143c-0.5523,0-1-0.4477-1-1 M59.971,31.6155v-7.159 H6.662v25.013h53.309v-6.671"/>
|
||||||
|
<path fill="#d0cfce" stroke="none" d="M61.083,32.3485c-0.5523,0-1-0.4477-1-1v-7.159H36.967H6.773v25.013h11.736h41.577v-6.671 c0-0.5523,0.4477-1,1-1h4.143v-9.183H61.083z"/>
|
||||||
|
<path fill="#b1cc33" stroke="none" d="M12.002,45.3665h32.239v-17.007H12.002V45.3665z"/>
|
||||||
|
</g>
|
||||||
|
<g id="hair"/>
|
||||||
|
<g id="skin"/>
|
||||||
|
<g id="skin-shadow"/>
|
||||||
|
<g id="line">
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M61.081,31.3475v-7.159 c0-0.5523-0.4477-1-1-1H6.772c-0.5523,0-1,0.4477-1,1v25.016c0,0.5523,0.4477,1,1,1h53.313c0.5523,0,1-0.4477,1-1v-6.674h5.143 v-11.183H61.081z"/>
|
||||||
|
<rect x="11" y="27.3595" width="34.239" height="19.007" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
6
dist/img/sleep.svg
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<svg id="emoji" fill="none" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color"/>
|
||||||
|
<g id="line">
|
||||||
|
<path fill-rule="evenodd" stroke="#000" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M53.5366 45.6237C45.7296 51.1493 34.8495 50.4162 27.8579 43.4246C21.4225 36.9892 20.2895 27.2593 24.4589 19.6639C19.341 23.2862 16 29.2529 16 36C16 47.0457 24.9543 56 36 56C43.5571 56 50.1353 51.8086 53.5366 45.6237Z" clip-rule="evenodd"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 483 B |
3
dist/img/spid.svg
vendored
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
dist/img/sysd.png
vendored
Normal file
After Width: | Height: | Size: 52 KiB |
3
dist/img/sysd.svg
vendored
Normal file
After Width: | Height: | Size: 17 KiB |
15
dist/img/time.svg
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color">
|
||||||
|
<circle cx="35.958" cy="35.99" r="23" fill="#FFFFFF" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
<line x1="36" x2="36" y1="18.9893" y2="35.9893" fill="#FFFFFF" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
<line x1="41.8435" x2="36.07" y1="25.7929" y2="35.7929" fill="#FFFFFF" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
</g>
|
||||||
|
<g id="hair"/>
|
||||||
|
<g id="skin"/>
|
||||||
|
<g id="skin-shadow"/>
|
||||||
|
<g id="line">
|
||||||
|
<circle cx="35.958" cy="35.99" r="23" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
<line x1="36" x2="36" y1="18.9893" y2="35.9893" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
<line x1="41.8435" x2="36.07" y1="25.7929" y2="35.7929" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
38
dist/img/timer.svg
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<svg id="emoji" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="color">
|
||||||
|
<polyline fill="#d0cfce" stroke="#d0cfce" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="53.7559,19.7366 58.3424,16.187 61.4023,20.1407 57.1493,23.4322"/>
|
||||||
|
<rect x="31.3126" y="7" width="11.0083" height="6.2941" fill="#d0cfce" stroke="none"/>
|
||||||
|
<circle cx="36.8214" cy="36.2941" r="23" fill="#FFFFFF" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
<path fill="#FFFFFF" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M25.2945,46.5054"/>
|
||||||
|
</g>
|
||||||
|
<g id="hair"/>
|
||||||
|
<g id="skin"/>
|
||||||
|
<g id="skin-shadow"/>
|
||||||
|
<g id="line">
|
||||||
|
<circle cx="36.8214" cy="36.2941" r="23" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M57.4424,22.4315"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M57.9904,22.0073"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M58.5696,21.5591"/>
|
||||||
|
<polyline fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="56.366,17.7166 58.3424,16.187 61.4023,20.1407 59.5696,21.5591"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M54.6692,18.2559"/>
|
||||||
|
<polyline fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" points="32.3214,9.7271 32.3214,7 41.3214,7 41.3214,9.8931"/>
|
||||||
|
<circle cx="36.3475" cy="16.9817" r="1" fill="#000000" stroke="none"/>
|
||||||
|
<circle cx="36.3475" cy="55.0239" r="1" fill="#000000" stroke="none"/>
|
||||||
|
<ellipse cx="49.7975" cy="22.5528" rx="0.9878" ry="1.0121" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -1.3619 41.8177)" fill="#000000" stroke="none"/>
|
||||||
|
<ellipse cx="22.8975" cy="49.4528" rx="0.9878" ry="1.0121" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -28.2619 30.6754)" fill="#000000" stroke="none"/>
|
||||||
|
<circle cx="55.3686" cy="36.0028" r="1" fill="#000000" stroke="none"/>
|
||||||
|
<circle cx="17.3264" cy="36.0028" r="1" fill="#000000" stroke="none"/>
|
||||||
|
<line x1="36.8399" x2="21.4399" y1="35.91" y2="35.91" fill="#000000" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
<line x1="36.8846" x2="25.9952" y1="35.9253" y2="46.8147" fill="#000000" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M25.2945,46.5054"/>
|
||||||
|
<ellipse cx="49.7975" cy="49.4528" rx="1.0121" ry="0.9878" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -20.3831 49.6965)" fill="#000000" stroke="none"/>
|
||||||
|
<ellipse cx="22.8975" cy="22.5528" rx="1.0121" ry="0.9878" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -9.2407 22.7965)" fill="#000000" stroke="none"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M57.4425,22.4315"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M57.9905,22.0073"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M58.5697,21.5591"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M54.6693,18.2559"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M57.4424,22.4315"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M58.5696,21.5591"/>
|
||||||
|
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M54.6692,18.2559"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
30
dist/reset.css
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/* http://meyerweb.com/eric/tools/css/reset/
|
||||||
|
v4.0 | 20180602
|
||||||
|
License: none (public domain)
|
||||||
|
*/
|
||||||
|
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||||
|
article, aside, canvas, details, embed,
|
||||||
|
figure, figcaption, footer, header, hgroup,
|
||||||
|
main, menu, nav, output, ruby, section, summary,
|
||||||
|
time, mark, audio, video {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
font: inherit;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
/* HTML5 display-role reset for older browsers */
|
||||||
|
article, aside, details, figcaption, figure,
|
||||||
|
footer, header, hgroup, main, menu, nav, section {
|
||||||
|
display: block;
|
||||||
|
}
|
8
dist/reveal.css
vendored
Normal file
9
dist/reveal.esm.js
vendored
Normal file
1
dist/reveal.esm.js.map
vendored
Normal file
9
dist/reveal.js
vendored
Normal file
1
dist/reveal.js.map
vendored
Normal file
364
dist/theme/beige.css
vendored
Normal file
@ -0,0 +1,364 @@
|
|||||||
|
/**
|
||||||
|
* Beige theme for reveal.js.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
@import url(./fonts/league-gothic/league-gothic.css);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
|
||||||
|
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #f7f3de;
|
||||||
|
--r-main-font: Lato, sans-serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #333;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: League Gothic, Impact, sans-serif;
|
||||||
|
--r-heading-color: #333;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: uppercase;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #8b743d;
|
||||||
|
--r-link-color-dark: #564826;
|
||||||
|
--r-link-color-hover: #c0a86e;
|
||||||
|
--r-selection-background-color: rgba(79, 64, 28, 0.99);
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #f7f2d3;
|
||||||
|
background: -moz-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
|
||||||
|
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, white), color-stop(100%, #f7f2d3));
|
||||||
|
background: -webkit-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
|
||||||
|
background: -o-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
|
||||||
|
background: -ms-radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
|
||||||
|
background: radial-gradient(center, circle cover, white 0%, #f7f2d3 100%);
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
357
dist/theme/black.css
vendored
Normal file
@ -0,0 +1,357 @@
|
|||||||
|
/**
|
||||||
|
* Black theme for reveal.js. This is the opposite of the 'white' theme.
|
||||||
|
*
|
||||||
|
* By Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
@import url(./fonts/source-sans-pro/source-sans-pro.css);
|
||||||
|
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #191919;
|
||||||
|
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
|
||||||
|
--r-main-font-size: 42px;
|
||||||
|
--r-main-color: #fff;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
|
||||||
|
--r-heading-color: #fff;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: uppercase;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: 600;
|
||||||
|
--r-heading1-text-shadow: none;
|
||||||
|
--r-heading1-size: 2.5em;
|
||||||
|
--r-heading2-size: 1.6em;
|
||||||
|
--r-heading3-size: 1.3em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #42affa;
|
||||||
|
--r-link-color-dark: #068de9;
|
||||||
|
--r-link-color-hover: #8dcffc;
|
||||||
|
--r-selection-background-color: #bee4fd;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #191919;
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
390
dist/theme/blood.css
vendored
Normal file
@ -0,0 +1,390 @@
|
|||||||
|
/**
|
||||||
|
* Blood theme for reveal.js
|
||||||
|
* Author: Walther http://github.com/Walther
|
||||||
|
*
|
||||||
|
* Designed to be used with highlight.js theme
|
||||||
|
* "monokai_sublime.css" available from
|
||||||
|
* https://github.com/isagalaev/highlight.js/
|
||||||
|
*
|
||||||
|
* For other themes, change $codeBackground accordingly.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic);
|
||||||
|
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #222;
|
||||||
|
--r-main-font: Ubuntu, sans-serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #eee;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: Ubuntu, sans-serif;
|
||||||
|
--r-heading-color: #eee;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: uppercase;
|
||||||
|
--r-heading-text-shadow: 2px 2px 2px #222;
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #a23;
|
||||||
|
--r-link-color-dark: #6a1520;
|
||||||
|
--r-link-color-hover: #dd5566;
|
||||||
|
--r-selection-background-color: #a23;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #222;
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.reveal p {
|
||||||
|
font-weight: 300;
|
||||||
|
text-shadow: 1px 1px #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.has-light-background p, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4 {
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal p code {
|
||||||
|
background-color: #23241f;
|
||||||
|
display: inline-block;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small code {
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
2
dist/theme/fonts/league-gothic/LICENSE
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SIL Open Font License (OFL)
|
||||||
|
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
10
dist/theme/fonts/league-gothic/league-gothic.css
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'League Gothic';
|
||||||
|
src: url('./league-gothic.eot');
|
||||||
|
src: url('./league-gothic.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('./league-gothic.woff') format('woff'),
|
||||||
|
url('./league-gothic.ttf') format('truetype');
|
||||||
|
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
BIN
dist/theme/fonts/league-gothic/league-gothic.eot
vendored
Executable file
BIN
dist/theme/fonts/league-gothic/league-gothic.ttf
vendored
Executable file
BIN
dist/theme/fonts/league-gothic/league-gothic.woff
vendored
Executable file
45
dist/theme/fonts/source-sans-pro/LICENSE
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
SIL Open Font License
|
||||||
|
|
||||||
|
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
—————————————————————————————-
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
—————————————————————————————-
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
“Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
“Reserved Font Name” refers to any names specified as such after the copyright statement(s).
|
||||||
|
|
||||||
|
“Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
“Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
||||||
|
|
||||||
|
“Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-italic.eot
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-italic.ttf
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-italic.woff
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-regular.eot
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-regular.ttf
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-regular.woff
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-semibold.eot
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-semibold.ttf
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-semibold.woff
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.eot
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.ttf
vendored
Executable file
BIN
dist/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.woff
vendored
Executable file
39
dist/theme/fonts/source-sans-pro/source-sans-pro.css
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'Source Sans Pro';
|
||||||
|
src: url('./source-sans-pro-regular.eot');
|
||||||
|
src: url('./source-sans-pro-regular.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('./source-sans-pro-regular.woff') format('woff'),
|
||||||
|
url('./source-sans-pro-regular.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Source Sans Pro';
|
||||||
|
src: url('./source-sans-pro-italic.eot');
|
||||||
|
src: url('./source-sans-pro-italic.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('./source-sans-pro-italic.woff') format('woff'),
|
||||||
|
url('./source-sans-pro-italic.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Source Sans Pro';
|
||||||
|
src: url('./source-sans-pro-semibold.eot');
|
||||||
|
src: url('./source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('./source-sans-pro-semibold.woff') format('woff'),
|
||||||
|
url('./source-sans-pro-semibold.ttf') format('truetype');
|
||||||
|
font-weight: 600;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Source Sans Pro';
|
||||||
|
src: url('./source-sans-pro-semibolditalic.eot');
|
||||||
|
src: url('./source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'),
|
||||||
|
url('./source-sans-pro-semibolditalic.woff') format('woff'),
|
||||||
|
url('./source-sans-pro-semibolditalic.ttf') format('truetype');
|
||||||
|
font-weight: 600;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
366
dist/theme/league.css
vendored
Normal file
@ -0,0 +1,366 @@
|
|||||||
|
/**
|
||||||
|
* League theme for reveal.js.
|
||||||
|
*
|
||||||
|
* This was the default theme pre-3.0.0.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
@import url(./fonts/league-gothic/league-gothic.css);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
|
||||||
|
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #2b2b2b;
|
||||||
|
--r-main-font: Lato, sans-serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #eee;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: League Gothic, Impact, sans-serif;
|
||||||
|
--r-heading-color: #eee;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: uppercase;
|
||||||
|
--r-heading-text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #13DAEC;
|
||||||
|
--r-link-color-dark: #0d99a5;
|
||||||
|
--r-link-color-hover: #71e9f4;
|
||||||
|
--r-selection-background-color: #FF5E99;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #1c1e20;
|
||||||
|
background: -moz-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
|
||||||
|
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #555a5f), color-stop(100%, #1c1e20));
|
||||||
|
background: -webkit-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
|
||||||
|
background: -o-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
|
||||||
|
background: -ms-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
|
||||||
|
background: radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
365
dist/theme/moon.css
vendored
Normal file
@ -0,0 +1,365 @@
|
|||||||
|
/**
|
||||||
|
* Solarized Dark theme for reveal.js.
|
||||||
|
* Author: Achim Staebler
|
||||||
|
*/
|
||||||
|
@import url(./fonts/league-gothic/league-gothic.css);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
|
||||||
|
/**
|
||||||
|
* Solarized colors by Ethan Schoonover
|
||||||
|
*/
|
||||||
|
html * {
|
||||||
|
color-profile: sRGB;
|
||||||
|
rendering-intent: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #002b36;
|
||||||
|
--r-main-font: Lato, sans-serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #93a1a1;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: League Gothic, Impact, sans-serif;
|
||||||
|
--r-heading-color: #eee8d5;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: uppercase;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: none;
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #268bd2;
|
||||||
|
--r-link-color-dark: #1a6091;
|
||||||
|
--r-link-color-hover: #78b9e6;
|
||||||
|
--r-selection-background-color: #d33682;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #002b36;
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
358
dist/theme/night.css
vendored
Normal file
@ -0,0 +1,358 @@
|
|||||||
|
/**
|
||||||
|
* Black theme for reveal.js.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Montserrat:700);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
|
||||||
|
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #111;
|
||||||
|
--r-main-font: Open Sans, sans-serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #eee;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: Montserrat, Impact, sans-serif;
|
||||||
|
--r-heading-color: #eee;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: -0.03em;
|
||||||
|
--r-heading-text-transform: none;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: none;
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #e7ad52;
|
||||||
|
--r-link-color-dark: #d08a1d;
|
||||||
|
--r-link-color-hover: #f3d7ac;
|
||||||
|
--r-selection-background-color: #e7ad52;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #111;
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
361
dist/theme/serif.css
vendored
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
/**
|
||||||
|
* A simple theme for reveal.js presentations, similar
|
||||||
|
* to the default theme. The accent color is brown.
|
||||||
|
*
|
||||||
|
* This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
|
||||||
|
*/
|
||||||
|
.reveal a {
|
||||||
|
line-height: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #F0F1EB;
|
||||||
|
--r-main-font: Palatino Linotype, Book Antiqua, Palatino, FreeSerif, serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #000;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: Palatino Linotype, Book Antiqua, Palatino, FreeSerif, serif;
|
||||||
|
--r-heading-color: #383D3D;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: none;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: none;
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #51483D;
|
||||||
|
--r-link-color-dark: #25211c;
|
||||||
|
--r-link-color-hover: #8b7c69;
|
||||||
|
--r-selection-background-color: #26351C;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #F0F1EB;
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
360
dist/theme/simple.css
vendored
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
/**
|
||||||
|
* A simple theme for reveal.js presentations, similar
|
||||||
|
* to the default theme. The accent color is darkblue.
|
||||||
|
*
|
||||||
|
* This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
|
||||||
|
* reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
|
||||||
|
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #fff;
|
||||||
|
--r-main-font: Lato, sans-serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #000;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: News Cycle, Impact, sans-serif;
|
||||||
|
--r-heading-color: #000;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: none;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: none;
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #00008B;
|
||||||
|
--r-link-color-dark: #00003f;
|
||||||
|
--r-link-color-hover: #0000f1;
|
||||||
|
--r-selection-background-color: rgba(0, 0, 0, 0.99);
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #fff;
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
368
dist/theme/sky.css
vendored
Normal file
@ -0,0 +1,368 @@
|
|||||||
|
/**
|
||||||
|
* Sky theme for reveal.js.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
|
||||||
|
.reveal a {
|
||||||
|
line-height: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #f7fbfc;
|
||||||
|
--r-main-font: Open Sans, sans-serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #333;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: Quicksand, sans-serif;
|
||||||
|
--r-heading-color: #333;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: -0.08em;
|
||||||
|
--r-heading-text-transform: uppercase;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: none;
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #3b759e;
|
||||||
|
--r-link-color-dark: #264c66;
|
||||||
|
--r-link-color-hover: #74a7cb;
|
||||||
|
--r-selection-background-color: #134674;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #add9e4;
|
||||||
|
background: -moz-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);
|
||||||
|
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #f7fbfc), color-stop(100%, #add9e4));
|
||||||
|
background: -webkit-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);
|
||||||
|
background: -o-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);
|
||||||
|
background: -ms-radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);
|
||||||
|
background: radial-gradient(center, circle cover, #f7fbfc 0%, #add9e4 100%);
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
361
dist/theme/solarized.css
vendored
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
/**
|
||||||
|
* Solarized Light theme for reveal.js.
|
||||||
|
* Author: Achim Staebler
|
||||||
|
*/
|
||||||
|
@import url(./fonts/league-gothic/league-gothic.css);
|
||||||
|
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
|
||||||
|
/**
|
||||||
|
* Solarized colors by Ethan Schoonover
|
||||||
|
*/
|
||||||
|
html * {
|
||||||
|
color-profile: sRGB;
|
||||||
|
rendering-intent: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #fdf6e3;
|
||||||
|
--r-main-font: Lato, sans-serif;
|
||||||
|
--r-main-font-size: 40px;
|
||||||
|
--r-main-color: #657b83;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: League Gothic, Impact, sans-serif;
|
||||||
|
--r-heading-color: #586e75;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: uppercase;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: normal;
|
||||||
|
--r-heading1-text-shadow: none;
|
||||||
|
--r-heading1-size: 3.77em;
|
||||||
|
--r-heading2-size: 2.11em;
|
||||||
|
--r-heading3-size: 1.55em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #268bd2;
|
||||||
|
--r-link-color-dark: #1a6091;
|
||||||
|
--r-link-color-hover: #78b9e6;
|
||||||
|
--r-selection-background-color: #d33682;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #fdf6e3;
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
357
dist/theme/white.css
vendored
Normal file
@ -0,0 +1,357 @@
|
|||||||
|
/**
|
||||||
|
* White theme for reveal.js. This is the opposite of the 'black' theme.
|
||||||
|
*
|
||||||
|
* By Hakim El Hattab, http://hakim.se
|
||||||
|
*/
|
||||||
|
@import url(./fonts/source-sans-pro/source-sans-pro.css);
|
||||||
|
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* GLOBAL STYLES
|
||||||
|
*********************************************/
|
||||||
|
:root {
|
||||||
|
--r-background-color: #fff;
|
||||||
|
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
|
||||||
|
--r-main-font-size: 42px;
|
||||||
|
--r-main-color: #222;
|
||||||
|
--r-block-margin: 20px;
|
||||||
|
--r-heading-margin: 0 0 20px 0;
|
||||||
|
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
|
||||||
|
--r-heading-color: #222;
|
||||||
|
--r-heading-line-height: 1.2;
|
||||||
|
--r-heading-letter-spacing: normal;
|
||||||
|
--r-heading-text-transform: uppercase;
|
||||||
|
--r-heading-text-shadow: none;
|
||||||
|
--r-heading-font-weight: 600;
|
||||||
|
--r-heading1-text-shadow: none;
|
||||||
|
--r-heading1-size: 2.5em;
|
||||||
|
--r-heading2-size: 1.6em;
|
||||||
|
--r-heading3-size: 1.3em;
|
||||||
|
--r-heading4-size: 1em;
|
||||||
|
--r-code-font: monospace;
|
||||||
|
--r-link-color: #2a76dd;
|
||||||
|
--r-link-color-dark: #1a53a1;
|
||||||
|
--r-link-color-hover: #6ca0e8;
|
||||||
|
--r-selection-background-color: #98bdef;
|
||||||
|
--r-selection-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-viewport {
|
||||||
|
background: #fff;
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal {
|
||||||
|
font-family: var(--r-main-font);
|
||||||
|
font-size: var(--r-main-font-size);
|
||||||
|
font-weight: normal;
|
||||||
|
color: var(--r-main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ::-moz-selection {
|
||||||
|
color: var(--r-selection-color);
|
||||||
|
background: var(--r-selection-background-color);
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slides section,
|
||||||
|
.reveal .slides section > section {
|
||||||
|
line-height: 1.3;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* HEADERS
|
||||||
|
*********************************************/
|
||||||
|
.reveal h1,
|
||||||
|
.reveal h2,
|
||||||
|
.reveal h3,
|
||||||
|
.reveal h4,
|
||||||
|
.reveal h5,
|
||||||
|
.reveal h6 {
|
||||||
|
margin: var(--r-heading-margin);
|
||||||
|
color: var(--r-heading-color);
|
||||||
|
font-family: var(--r-heading-font);
|
||||||
|
font-weight: var(--r-heading-font-weight);
|
||||||
|
line-height: var(--r-heading-line-height);
|
||||||
|
letter-spacing: var(--r-heading-letter-spacing);
|
||||||
|
text-transform: var(--r-heading-text-transform);
|
||||||
|
text-shadow: var(--r-heading-text-shadow);
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
font-size: var(--r-heading1-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h2 {
|
||||||
|
font-size: var(--r-heading2-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h3 {
|
||||||
|
font-size: var(--r-heading3-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h4 {
|
||||||
|
font-size: var(--r-heading4-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal h1 {
|
||||||
|
text-shadow: var(--r-heading1-text-shadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* OTHER
|
||||||
|
*********************************************/
|
||||||
|
.reveal p {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove trailing margins after titles */
|
||||||
|
.reveal h1:last-child,
|
||||||
|
.reveal h2:last-child,
|
||||||
|
.reveal h3:last-child,
|
||||||
|
.reveal h4:last-child,
|
||||||
|
.reveal h5:last-child,
|
||||||
|
.reveal h6:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure certain elements are never larger than the slide itself */
|
||||||
|
.reveal img,
|
||||||
|
.reveal video,
|
||||||
|
.reveal iframe {
|
||||||
|
max-width: 95%;
|
||||||
|
max-height: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal strong,
|
||||||
|
.reveal b {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol,
|
||||||
|
.reveal dl,
|
||||||
|
.reveal ul {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ol {
|
||||||
|
list-style-type: decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul {
|
||||||
|
list-style-type: disc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul {
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul ul {
|
||||||
|
list-style-type: circle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal ul ul,
|
||||||
|
.reveal ul ol,
|
||||||
|
.reveal ol ol,
|
||||||
|
.reveal ol ul {
|
||||||
|
display: block;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dt {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal dd {
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 70%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
padding: 5px;
|
||||||
|
font-style: italic;
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal blockquote p:first-child,
|
||||||
|
.reveal blockquote p:last-child {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal q {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 90%;
|
||||||
|
margin: var(--r-block-margin) auto;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 0.55em;
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
line-height: 1.2em;
|
||||||
|
word-wrap: break-word;
|
||||||
|
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal code {
|
||||||
|
font-family: var(--r-code-font);
|
||||||
|
text-transform: none;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal pre code {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 400px;
|
||||||
|
word-wrap: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .code-wrapper code {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table {
|
||||||
|
margin: auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th,
|
||||||
|
.reveal table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=center],
|
||||||
|
.reveal table td[align=center] {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table th[align=right],
|
||||||
|
.reveal table td[align=right] {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal table tbody tr:last-child th,
|
||||||
|
.reveal table tbody tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sup {
|
||||||
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal sub {
|
||||||
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 0.6em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal small * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal img {
|
||||||
|
margin: var(--r-block-margin) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* LINKS
|
||||||
|
*********************************************/
|
||||||
|
.reveal a {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover {
|
||||||
|
color: var(--r-link-color-hover);
|
||||||
|
text-shadow: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .roll span:after {
|
||||||
|
color: #fff;
|
||||||
|
background: var(--r-link-color-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* Frame helper
|
||||||
|
*********************************************/
|
||||||
|
.reveal .r-frame {
|
||||||
|
border: 4px solid var(--r-main-color);
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a .r-frame {
|
||||||
|
transition: all 0.15s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal a:hover .r-frame {
|
||||||
|
border-color: var(--r-link-color);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* NAVIGATION CONTROLS
|
||||||
|
*********************************************/
|
||||||
|
.reveal .controls {
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PROGRESS BAR
|
||||||
|
*********************************************/
|
||||||
|
.reveal .progress {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
color: var(--r-link-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: var(--r-background-color);
|
||||||
|
}
|
||||||
|
}
|
319
gulpfile.js
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
const pkg = require('./package.json')
|
||||||
|
const path = require('path')
|
||||||
|
const glob = require('glob')
|
||||||
|
const yargs = require('yargs')
|
||||||
|
const colors = require('colors')
|
||||||
|
const through = require('through2');
|
||||||
|
const qunit = require('node-qunit-puppeteer')
|
||||||
|
|
||||||
|
const {rollup} = require('rollup')
|
||||||
|
const {terser} = require('rollup-plugin-terser')
|
||||||
|
const babel = require('@rollup/plugin-babel').default
|
||||||
|
const commonjs = require('@rollup/plugin-commonjs')
|
||||||
|
const resolve = require('@rollup/plugin-node-resolve').default
|
||||||
|
const sass = require('sass')
|
||||||
|
|
||||||
|
const gulp = require('gulp')
|
||||||
|
const tap = require('gulp-tap')
|
||||||
|
const zip = require('gulp-zip')
|
||||||
|
const header = require('gulp-header')
|
||||||
|
const eslint = require('gulp-eslint')
|
||||||
|
const minify = require('gulp-clean-css')
|
||||||
|
const connect = require('gulp-connect')
|
||||||
|
const autoprefixer = require('gulp-autoprefixer')
|
||||||
|
|
||||||
|
const root = yargs.argv.root || '.'
|
||||||
|
const port = yargs.argv.port || 8000
|
||||||
|
const host = yargs.argv.host || 'localhost'
|
||||||
|
|
||||||
|
const banner = `/*!
|
||||||
|
* reveal.js ${pkg.version}
|
||||||
|
* ${pkg.homepage}
|
||||||
|
* MIT licensed
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011-2022 Hakim El Hattab, https://hakim.se
|
||||||
|
*/\n`
|
||||||
|
|
||||||
|
// Prevents warnings from opening too many test pages
|
||||||
|
process.setMaxListeners(20);
|
||||||
|
|
||||||
|
const babelConfig = {
|
||||||
|
babelHelpers: 'bundled',
|
||||||
|
ignore: ['node_modules'],
|
||||||
|
compact: false,
|
||||||
|
extensions: ['.js', '.html'],
|
||||||
|
plugins: [
|
||||||
|
'transform-html-import-to-string'
|
||||||
|
],
|
||||||
|
presets: [[
|
||||||
|
'@babel/preset-env',
|
||||||
|
{
|
||||||
|
corejs: 3,
|
||||||
|
useBuiltIns: 'usage',
|
||||||
|
modules: false
|
||||||
|
}
|
||||||
|
]]
|
||||||
|
};
|
||||||
|
|
||||||
|
// Our ES module bundle only targets newer browsers with
|
||||||
|
// module support. Browsers are targeted explicitly instead
|
||||||
|
// of using the "esmodule: true" target since that leads to
|
||||||
|
// polyfilling older browsers and a larger bundle.
|
||||||
|
const babelConfigESM = JSON.parse( JSON.stringify( babelConfig ) );
|
||||||
|
babelConfigESM.presets[0][1].targets = { browsers: [
|
||||||
|
'last 2 Chrome versions',
|
||||||
|
'last 2 Safari versions',
|
||||||
|
'last 2 iOS versions',
|
||||||
|
'last 2 Firefox versions',
|
||||||
|
'last 2 Edge versions',
|
||||||
|
] };
|
||||||
|
|
||||||
|
let cache = {};
|
||||||
|
|
||||||
|
// Creates a bundle with broad browser support, exposed
|
||||||
|
// as UMD
|
||||||
|
gulp.task('js-es5', () => {
|
||||||
|
return rollup({
|
||||||
|
cache: cache.umd,
|
||||||
|
input: 'js/index.js',
|
||||||
|
plugins: [
|
||||||
|
resolve(),
|
||||||
|
commonjs(),
|
||||||
|
babel( babelConfig ),
|
||||||
|
terser()
|
||||||
|
]
|
||||||
|
}).then( bundle => {
|
||||||
|
cache.umd = bundle.cache;
|
||||||
|
return bundle.write({
|
||||||
|
name: 'Reveal',
|
||||||
|
file: './dist/reveal.js',
|
||||||
|
format: 'umd',
|
||||||
|
banner: banner,
|
||||||
|
sourcemap: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
// Creates an ES module bundle
|
||||||
|
gulp.task('js-es6', () => {
|
||||||
|
return rollup({
|
||||||
|
cache: cache.esm,
|
||||||
|
input: 'js/index.js',
|
||||||
|
plugins: [
|
||||||
|
resolve(),
|
||||||
|
commonjs(),
|
||||||
|
babel( babelConfigESM ),
|
||||||
|
terser()
|
||||||
|
]
|
||||||
|
}).then( bundle => {
|
||||||
|
cache.esm = bundle.cache;
|
||||||
|
return bundle.write({
|
||||||
|
file: './dist/reveal.esm.js',
|
||||||
|
format: 'es',
|
||||||
|
banner: banner,
|
||||||
|
sourcemap: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
gulp.task('js', gulp.parallel('js-es5', 'js-es6'));
|
||||||
|
|
||||||
|
// Creates a UMD and ES module bundle for each of our
|
||||||
|
// built-in plugins
|
||||||
|
gulp.task('plugins', () => {
|
||||||
|
return Promise.all([
|
||||||
|
{ name: 'RevealHighlight', input: './plugin/highlight/plugin.js', output: './plugin/highlight/highlight' },
|
||||||
|
{ name: 'RevealMarkdown', input: './plugin/markdown/plugin.js', output: './plugin/markdown/markdown' },
|
||||||
|
{ name: 'RevealSearch', input: './plugin/search/plugin.js', output: './plugin/search/search' },
|
||||||
|
{ name: 'RevealNotes', input: './plugin/notes/plugin.js', output: './plugin/notes/notes' },
|
||||||
|
{ name: 'RevealZoom', input: './plugin/zoom/plugin.js', output: './plugin/zoom/zoom' },
|
||||||
|
{ name: 'RevealMath', input: './plugin/math/plugin.js', output: './plugin/math/math' },
|
||||||
|
].map( plugin => {
|
||||||
|
return rollup({
|
||||||
|
cache: cache[plugin.input],
|
||||||
|
input: plugin.input,
|
||||||
|
plugins: [
|
||||||
|
resolve(),
|
||||||
|
commonjs(),
|
||||||
|
babel({
|
||||||
|
...babelConfig,
|
||||||
|
ignore: [/node_modules\/(?!(highlight\.js|marked)\/).*/],
|
||||||
|
}),
|
||||||
|
terser()
|
||||||
|
]
|
||||||
|
}).then( bundle => {
|
||||||
|
cache[plugin.input] = bundle.cache;
|
||||||
|
bundle.write({
|
||||||
|
file: plugin.output + '.esm.js',
|
||||||
|
name: plugin.name,
|
||||||
|
format: 'es'
|
||||||
|
})
|
||||||
|
|
||||||
|
bundle.write({
|
||||||
|
file: plugin.output + '.js',
|
||||||
|
name: plugin.name,
|
||||||
|
format: 'umd'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
} ));
|
||||||
|
})
|
||||||
|
|
||||||
|
// a custom pipeable step to transform Sass to CSS
|
||||||
|
function compileSass() {
|
||||||
|
return through.obj( ( vinylFile, encoding, callback ) => {
|
||||||
|
const transformedFile = vinylFile.clone();
|
||||||
|
|
||||||
|
sass.render({
|
||||||
|
data: transformedFile.contents.toString(),
|
||||||
|
includePaths: ['css/', 'css/theme/template']
|
||||||
|
}, ( err, result ) => {
|
||||||
|
if( err ) {
|
||||||
|
console.log( vinylFile.path );
|
||||||
|
console.log( err.formatted );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
transformedFile.extname = '.css';
|
||||||
|
transformedFile.contents = result.css;
|
||||||
|
callback( null, transformedFile );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
gulp.task('css-themes', () => gulp.src(['./css/theme/source/*.{sass,scss}'])
|
||||||
|
.pipe(compileSass())
|
||||||
|
.pipe(gulp.dest('./dist/theme')))
|
||||||
|
|
||||||
|
gulp.task('css-core', () => gulp.src(['css/reveal.scss'])
|
||||||
|
.pipe(compileSass())
|
||||||
|
.pipe(autoprefixer())
|
||||||
|
.pipe(minify({compatibility: 'ie9'}))
|
||||||
|
.pipe(header(banner))
|
||||||
|
.pipe(gulp.dest('./dist')))
|
||||||
|
|
||||||
|
gulp.task('css', gulp.parallel('css-themes', 'css-core'))
|
||||||
|
|
||||||
|
gulp.task('qunit', () => {
|
||||||
|
|
||||||
|
let serverConfig = {
|
||||||
|
root,
|
||||||
|
port: 8009,
|
||||||
|
host: 'localhost',
|
||||||
|
name: 'test-server'
|
||||||
|
}
|
||||||
|
|
||||||
|
let server = connect.server( serverConfig )
|
||||||
|
|
||||||
|
let testFiles = glob.sync('test/*.html' )
|
||||||
|
|
||||||
|
let totalTests = 0;
|
||||||
|
let failingTests = 0;
|
||||||
|
|
||||||
|
let tests = Promise.all( testFiles.map( filename => {
|
||||||
|
return new Promise( ( resolve, reject ) => {
|
||||||
|
qunit.runQunitPuppeteer({
|
||||||
|
targetUrl: `http://${serverConfig.host}:${serverConfig.port}/${filename}`,
|
||||||
|
timeout: 20000,
|
||||||
|
redirectConsole: false,
|
||||||
|
puppeteerArgs: ['--allow-file-access-from-files']
|
||||||
|
})
|
||||||
|
.then(result => {
|
||||||
|
if( result.stats.failed > 0 ) {
|
||||||
|
console.log(`${'!'} ${filename} [${result.stats.passed}/${result.stats.total}] in ${result.stats.runtime}ms`.red);
|
||||||
|
// qunit.printResultSummary(result, console);
|
||||||
|
qunit.printFailedTests(result, console);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log(`${'✔'} ${filename} [${result.stats.passed}/${result.stats.total}] in ${result.stats.runtime}ms`.green);
|
||||||
|
}
|
||||||
|
|
||||||
|
totalTests += result.stats.total;
|
||||||
|
failingTests += result.stats.failed;
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error(error);
|
||||||
|
reject();
|
||||||
|
});
|
||||||
|
} )
|
||||||
|
} ) );
|
||||||
|
|
||||||
|
return new Promise( ( resolve, reject ) => {
|
||||||
|
|
||||||
|
tests.then( () => {
|
||||||
|
if( failingTests > 0 ) {
|
||||||
|
reject( new Error(`${failingTests}/${totalTests} tests failed`.red) );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log(`${'✔'} Passed ${totalTests} tests`.green.bold);
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
} )
|
||||||
|
.catch( () => {
|
||||||
|
reject();
|
||||||
|
} )
|
||||||
|
.finally( () => {
|
||||||
|
server.close();
|
||||||
|
} );
|
||||||
|
|
||||||
|
} );
|
||||||
|
} )
|
||||||
|
|
||||||
|
gulp.task('eslint', () => gulp.src(['./js/**', 'gulpfile.js'])
|
||||||
|
.pipe(eslint())
|
||||||
|
.pipe(eslint.format()))
|
||||||
|
|
||||||
|
gulp.task('test', gulp.series( 'eslint', 'qunit' ))
|
||||||
|
|
||||||
|
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.src(
|
||||||
|
[
|
||||||
|
'./index.html',
|
||||||
|
'./dist/**',
|
||||||
|
'./lib/**',
|
||||||
|
'./images/**',
|
||||||
|
'./plugin/**',
|
||||||
|
'./**.md'
|
||||||
|
],
|
||||||
|
{ base: './' }
|
||||||
|
)
|
||||||
|
.pipe(zip('reveal-js-presentation.zip')).pipe(gulp.dest('./'))
|
||||||
|
|
||||||
|
))
|
||||||
|
|
||||||
|
gulp.task('reload', () => gulp.src(['*.html', '*.md'])
|
||||||
|
.pipe(connect.reload()));
|
||||||
|
|
||||||
|
gulp.task('serve', () => {
|
||||||
|
|
||||||
|
connect.server({
|
||||||
|
root: root,
|
||||||
|
port: port,
|
||||||
|
host: host,
|
||||||
|
livereload: true
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.watch(['*.html', '*.md'], gulp.series('reload'))
|
||||||
|
|
||||||
|
gulp.watch(['js/**'], gulp.series('js', 'reload', 'eslint'))
|
||||||
|
|
||||||
|
gulp.watch(['plugin/**/plugin.js', 'plugin/**/*.html'], gulp.series('plugins', 'reload'))
|
||||||
|
|
||||||
|
gulp.watch([
|
||||||
|
'css/theme/source/*.{sass,scss}',
|
||||||
|
'css/theme/template/*.{sass,scss}',
|
||||||
|
], gulp.series('css-themes', 'reload'))
|
||||||
|
|
||||||
|
gulp.watch([
|
||||||
|
'css/*.scss',
|
||||||
|
'css/print/*.{sass,scss,css}'
|
||||||
|
], gulp.series('css-core', 'reload'))
|
||||||
|
|
||||||
|
gulp.watch(['test/*.html'], gulp.series('test'))
|
||||||
|
|
||||||
|
})
|
309
index.html
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
|
||||||
|
<title>MET-ESP</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="dist/reset.css">
|
||||||
|
<link rel="stylesheet" href="dist/reveal.css">
|
||||||
|
<link rel="stylesheet" href="dist/theme/black.css">
|
||||||
|
|
||||||
|
<!-- Theme used for syntax highlighted code -->
|
||||||
|
<link rel="stylesheet" href="plugin/highlight/monokai.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="reveal">
|
||||||
|
<div class="slides">
|
||||||
|
<section>
|
||||||
|
<!-- <a href="https://helcel.net">
|
||||||
|
<img src="https://static.slid.es/reveal/logo-v1/reveal-white-text.svg" alt="reveal.js logo" style="height: 180px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
|
||||||
|
</a> -->
|
||||||
|
<h3>METESP</h3>
|
||||||
|
<img src="dist/img/build.jpg" alt="System Diagram" style="height: 300px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
|
||||||
|
<br/><small>A measurement station by <a href="http://helcel.net/bio">Cedric Hölzl</a></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Goal</h2>
|
||||||
|
<p>Build an environment quality monitor.</p>
|
||||||
|
<p>
|
||||||
|
<small>Powered by FreeRTOS, a low power IOT device</small>
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<section>
|
||||||
|
<h2>Global System Design</h2>
|
||||||
|
<img src="dist/img/sysd.svg" alt="System Diagram" style="height: 240px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>ESP32</h2>
|
||||||
|
<a href="https://www.espressif.com/"><img src="dist/img/espressif.svg" alt="ESPressif" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
<small><ul>
|
||||||
|
<li>Low power, dual-core processor</li>
|
||||||
|
<li>C/C++ & FreeRTOS support</li>
|
||||||
|
<li>Wifi & BLE support</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Sensors</h2>
|
||||||
|
<a href=""><img src="dist/img/meter.svg" alt="Measure" style="height: 170px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
|
||||||
|
<small><ul>
|
||||||
|
<li>BM280: temperature, humidity & pressure</li>
|
||||||
|
<li>SGP40: Volatile Organic Compounds (VOC)</li>
|
||||||
|
<li>LTR390-UV-1: UV</li>
|
||||||
|
<li>TSL25911: ambient light (infrared & visible)</li>
|
||||||
|
<li>PMSA003I : particle concentration by size</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Touch E-ink Display</h2>
|
||||||
|
<a href=""><img src="dist/img/display.svg" alt="TouchDisplay" style="height: 140px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
|
||||||
|
<small><ul>
|
||||||
|
<li>GT1151: Touch</li>
|
||||||
|
<li>Multiple views of live data</li>
|
||||||
|
<li>Low power consumption</li>
|
||||||
|
<li>User interaction</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Open Weather Map</h2>
|
||||||
|
<a href="https://openweathermap.org/"><img src="dist/img/openweathermap.png" alt="OWM" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
|
||||||
|
<small><ul>
|
||||||
|
<li>Exterior realtime data source</li>
|
||||||
|
<li>Free API access</li>
|
||||||
|
<li>+200'000 cities</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Time-Series Database</h2>
|
||||||
|
<a href="https://www.influxdata.com/"><img src="dist/img/influxdb.svg" alt="InfluxDB" style="height: 100px; margin: 0 auto 4rem auto; background:transparent;" class="demo-logo"/></a>
|
||||||
|
<small><ul>
|
||||||
|
<li><b>Influx DB</b>, open source database system</li>
|
||||||
|
<li>Time-Series optimized storage</li>
|
||||||
|
<li>Lightweight HTTP client</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Network Time Protocol</h2>
|
||||||
|
<a href=""><img src="dist/img/time.svg" alt="Time" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
|
||||||
|
<small><ul>
|
||||||
|
<li>Get time from the network</li>
|
||||||
|
<li>Compute & display local time</li>
|
||||||
|
<li>Keep it up-to-date using internal RTC</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<section>
|
||||||
|
<h2>I2C</h2>
|
||||||
|
<img src="dist/img/i2cd.svg" alt="I2C Block" style="height: 160px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/>
|
||||||
|
<small><ul>
|
||||||
|
<li>2 wires: clock & data</li>
|
||||||
|
<li>Device have unique adress</li>
|
||||||
|
<li>Bi-directional, half-duplex</li>
|
||||||
|
<li>Simple protocol</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>I2C protocol</h2>
|
||||||
|
<img src="dist/img/i2c.png" alt="System Diagram" style="height: auto; margin: 0 auto 4rem auto; background: white;border-radius:15px" class="demo-logo"/>
|
||||||
|
<small><ul>
|
||||||
|
<li>Select device with R/W capability</li>
|
||||||
|
<li>Select register</li>
|
||||||
|
<li>Send/Read data</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Technical specs</h2>
|
||||||
|
<small><ul>
|
||||||
|
<li>100kbps usually, up to multiple Mbps</li>
|
||||||
|
<li>120 slave devices in 7 bit mode</li>
|
||||||
|
<li>Some devices have 10 bit adresses</li>
|
||||||
|
<li>Some devices have multi-byte register adresses</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<section>
|
||||||
|
<h2>SPI</h2>
|
||||||
|
<img src="dist/img/spid.svg" alt="SPI Block" style="height: 160px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/>
|
||||||
|
<small><ul>
|
||||||
|
<li>4 wires: clock, master-data, slave-data, chip-select</li>
|
||||||
|
<li>Device have unique adress</li>
|
||||||
|
<li>Bi-directional, full duplex</li>
|
||||||
|
<li>More complex protocol</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>SPI protocol</h2>
|
||||||
|
<small><ul>
|
||||||
|
<li>Multiple configurations (direct or chained, data lines)</li>
|
||||||
|
<li>For the EPD, library is provided by constructor</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Technical specs</h2>
|
||||||
|
<small><ul>
|
||||||
|
<li>1Mbps usually, ~2x the speed of I2C, up to hundreads of Mbps</li>
|
||||||
|
<li>Possibility for multiple data lines to increase bandwith further</li>
|
||||||
|
<li>Slave number limited by IO in direct configuration</li>
|
||||||
|
<li>Slave number limited by delay in chained configuration</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<section>
|
||||||
|
<h2>HTTPS</h2>
|
||||||
|
<a href=""><img src="dist/img/lock.svg" alt="Secure" style="height: 120px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
|
||||||
|
<small><ul>
|
||||||
|
<li>Manually imported certificates</li>
|
||||||
|
<li>GET from OWM (JSON)</li>
|
||||||
|
<li>POST to Telegram & DB (String)</li>
|
||||||
|
<li>JSON handled with <b>arduinojson</b> library</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<!-- <section>
|
||||||
|
<h2>UDP</h2>
|
||||||
|
<a href=""><img src="dist/img/lock.svg" alt="Secure" style="height: 120px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
|
||||||
|
<small><ul>
|
||||||
|
<li>Send 16 byte request</li>
|
||||||
|
<li>Parse Unix-time from responde (32bit)</li>
|
||||||
|
<li>Adjusted with locale & daylight-saving</li>
|
||||||
|
</ul></small>
|
||||||
|
</section> -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<section>
|
||||||
|
<h2>ESP32 Configuration</h2>
|
||||||
|
<a href="https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf"><img src="dist/img/esp32d.png" alt="ESP32 Internal" style="height: 400px; margin: 0 auto 4rem auto; background: white;border-radius:15px;" class="demo-logo"/></a>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Internal Timer</h2>
|
||||||
|
<a href=""><img src="dist/img/timer.svg" alt="Timer" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
<small><ul>
|
||||||
|
<li>Base clock runs at 80Mhz</li>
|
||||||
|
<li>We set the scaler to run at 1Mhz</li>
|
||||||
|
<li>We trigger IRQ every 1 second</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Core Configuration</h2>
|
||||||
|
<small style="display:block;">3 FreeRTOS core pinned tasks</small>
|
||||||
|
<a href=""><img src="dist/img/cpu.svg" alt="Timer" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
<small><ul>
|
||||||
|
<li>Sensor read, network get & post (Core 0)</li>
|
||||||
|
<li>Touch screen IRQ polling & handling (Core 1)</li>
|
||||||
|
<li>E-Ink Display refresh & drawing (Core 1)</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Sleep Mode</h2>
|
||||||
|
<a href=""><img src="dist/img/green.svg" alt="Sleep" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
<small><ul>
|
||||||
|
<li>After inactivity the device goes into sleep mode</li>
|
||||||
|
<li>Wakes up periodicaly to run measurements</li>
|
||||||
|
<li>Returns to standard mode on touch IRQ <b>[WIP]</b></li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Task Timing</h2>
|
||||||
|
<a href=""><img src="dist/img/timer.svg" alt="Timer" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||||||
|
<small><ul>
|
||||||
|
<li>List of functions with their run frequency</li>
|
||||||
|
<li>On minute tick check if any should have run since last tick</li>
|
||||||
|
<li>Not affected by function execution time</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<section>
|
||||||
|
<h2>Power Consumption</h2>
|
||||||
|
<a href=""><img src="dist/img/power.svg" alt="Power" style="height: 170px; margin: 0 auto 4rem auto; background: transparent;rotate:-90deg;" class="demo-logo"/></a>
|
||||||
|
<small><table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Device</th>
|
||||||
|
<th>Default</th>
|
||||||
|
<th>Sleep</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>ESP32</td>
|
||||||
|
<td>20-200 mA</td>
|
||||||
|
<td>10-800 uA</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>EPD & Touch</td>
|
||||||
|
<td>26 mA</td>
|
||||||
|
<td>122 uA</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Sensors</td>
|
||||||
|
<td>104.7 mA</td>
|
||||||
|
<td>245.4 uA</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>~330 mA (33mAh)</td>
|
||||||
|
<td>~1.1 mA (1mAh)</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></small>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<section>
|
||||||
|
<h2>Case Design</h2>
|
||||||
|
<a href=""><img src="dist/img/case_front.png" alt="Case front" style="height: 400px; margin: 0 auto 4rem auto; background: white;border-radius:15px;" class="demo-logo"/></a>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Case Design</h2>
|
||||||
|
<a href=""><img src="dist/img/case_back.png" alt="Case back" style="height: 400px; margin: 0 auto 4rem auto; background: white;border-radius:15px;" class="demo-logo"/></a>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>Future Features</h2>
|
||||||
|
<small><ul>
|
||||||
|
<li>Sleep between measurements (wake from touch/timer interupt)</li>
|
||||||
|
<li>Improved "Air quality" metric</li>
|
||||||
|
<li>More views & layouts to choose from</li>
|
||||||
|
<li>Support to controll IOT heating/cooling/ventilation</li>
|
||||||
|
</ul></small>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h2>Questions</h2>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="dist/reveal.js"></script>
|
||||||
|
<script src="plugin/notes/notes.js"></script>
|
||||||
|
<script src="plugin/markdown/markdown.js"></script>
|
||||||
|
<script src="plugin/highlight/highlight.js"></script>
|
||||||
|
<script>
|
||||||
|
// More info about initialization & config:
|
||||||
|
// - https://revealjs.com/initialization/
|
||||||
|
// - https://revealjs.com/config/
|
||||||
|
Reveal.initialize({
|
||||||
|
hash: true,
|
||||||
|
|
||||||
|
// Learn about plugins: https://revealjs.com/plugins/
|
||||||
|
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
165
js/components/playback.js
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
/**
|
||||||
|
* UI component that lets the use control auto-slide
|
||||||
|
* playback via play/pause.
|
||||||
|
*/
|
||||||
|
export default class Playback {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {HTMLElement} container The component will append
|
||||||
|
* itself to this
|
||||||
|
* @param {function} progressCheck A method which will be
|
||||||
|
* called frequently to get the current playback progress on
|
||||||
|
* a range of 0-1
|
||||||
|
*/
|
||||||
|
constructor( container, progressCheck ) {
|
||||||
|
|
||||||
|
// Cosmetics
|
||||||
|
this.diameter = 100;
|
||||||
|
this.diameter2 = this.diameter/2;
|
||||||
|
this.thickness = 6;
|
||||||
|
|
||||||
|
// Flags if we are currently playing
|
||||||
|
this.playing = false;
|
||||||
|
|
||||||
|
// Current progress on a 0-1 range
|
||||||
|
this.progress = 0;
|
||||||
|
|
||||||
|
// Used to loop the animation smoothly
|
||||||
|
this.progressOffset = 1;
|
||||||
|
|
||||||
|
this.container = container;
|
||||||
|
this.progressCheck = progressCheck;
|
||||||
|
|
||||||
|
this.canvas = document.createElement( 'canvas' );
|
||||||
|
this.canvas.className = 'playback';
|
||||||
|
this.canvas.width = this.diameter;
|
||||||
|
this.canvas.height = this.diameter;
|
||||||
|
this.canvas.style.width = this.diameter2 + 'px';
|
||||||
|
this.canvas.style.height = this.diameter2 + 'px';
|
||||||
|
this.context = this.canvas.getContext( '2d' );
|
||||||
|
|
||||||
|
this.container.appendChild( this.canvas );
|
||||||
|
|
||||||
|
this.render();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
setPlaying( value ) {
|
||||||
|
|
||||||
|
const wasPlaying = this.playing;
|
||||||
|
|
||||||
|
this.playing = value;
|
||||||
|
|
||||||
|
// Start repainting if we weren't already
|
||||||
|
if( !wasPlaying && this.playing ) {
|
||||||
|
this.animate();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
animate() {
|
||||||
|
|
||||||
|
const progressBefore = this.progress;
|
||||||
|
|
||||||
|
this.progress = this.progressCheck();
|
||||||
|
|
||||||
|
// When we loop, offset the progress so that it eases
|
||||||
|
// smoothly rather than immediately resetting
|
||||||
|
if( progressBefore > 0.8 && this.progress < 0.2 ) {
|
||||||
|
this.progressOffset = this.progress;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.render();
|
||||||
|
|
||||||
|
if( this.playing ) {
|
||||||
|
requestAnimationFrame( this.animate.bind( this ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the current progress and playback state.
|
||||||
|
*/
|
||||||
|
render() {
|
||||||
|
|
||||||
|
let progress = this.playing ? this.progress : 0,
|
||||||
|
radius = ( this.diameter2 ) - this.thickness,
|
||||||
|
x = this.diameter2,
|
||||||
|
y = this.diameter2,
|
||||||
|
iconSize = 28;
|
||||||
|
|
||||||
|
// Ease towards 1
|
||||||
|
this.progressOffset += ( 1 - this.progressOffset ) * 0.1;
|
||||||
|
|
||||||
|
const endAngle = ( - Math.PI / 2 ) + ( progress * ( Math.PI * 2 ) );
|
||||||
|
const startAngle = ( - Math.PI / 2 ) + ( this.progressOffset * ( Math.PI * 2 ) );
|
||||||
|
|
||||||
|
this.context.save();
|
||||||
|
this.context.clearRect( 0, 0, this.diameter, this.diameter );
|
||||||
|
|
||||||
|
// Solid background color
|
||||||
|
this.context.beginPath();
|
||||||
|
this.context.arc( x, y, radius + 4, 0, Math.PI * 2, false );
|
||||||
|
this.context.fillStyle = 'rgba( 0, 0, 0, 0.4 )';
|
||||||
|
this.context.fill();
|
||||||
|
|
||||||
|
// Draw progress track
|
||||||
|
this.context.beginPath();
|
||||||
|
this.context.arc( x, y, radius, 0, Math.PI * 2, false );
|
||||||
|
this.context.lineWidth = this.thickness;
|
||||||
|
this.context.strokeStyle = 'rgba( 255, 255, 255, 0.2 )';
|
||||||
|
this.context.stroke();
|
||||||
|
|
||||||
|
if( this.playing ) {
|
||||||
|
// Draw progress on top of track
|
||||||
|
this.context.beginPath();
|
||||||
|
this.context.arc( x, y, radius, startAngle, endAngle, false );
|
||||||
|
this.context.lineWidth = this.thickness;
|
||||||
|
this.context.strokeStyle = '#fff';
|
||||||
|
this.context.stroke();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.translate( x - ( iconSize / 2 ), y - ( iconSize / 2 ) );
|
||||||
|
|
||||||
|
// Draw play/pause icons
|
||||||
|
if( this.playing ) {
|
||||||
|
this.context.fillStyle = '#fff';
|
||||||
|
this.context.fillRect( 0, 0, iconSize / 2 - 4, iconSize );
|
||||||
|
this.context.fillRect( iconSize / 2 + 4, 0, iconSize / 2 - 4, iconSize );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.context.beginPath();
|
||||||
|
this.context.translate( 4, 0 );
|
||||||
|
this.context.moveTo( 0, 0 );
|
||||||
|
this.context.lineTo( iconSize - 4, iconSize / 2 );
|
||||||
|
this.context.lineTo( 0, iconSize );
|
||||||
|
this.context.fillStyle = '#fff';
|
||||||
|
this.context.fill();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.restore();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
on( type, listener ) {
|
||||||
|
this.canvas.addEventListener( type, listener, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
off( type, listener ) {
|
||||||
|
this.canvas.removeEventListener( type, listener, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
this.playing = false;
|
||||||
|
|
||||||
|
if( this.canvas.parentNode ) {
|
||||||
|
this.container.removeChild( this.canvas );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
293
js/config.js
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
/**
|
||||||
|
* The default reveal.js config object.
|
||||||
|
*/
|
||||||
|
export default {
|
||||||
|
|
||||||
|
// The "normal" size of the presentation, aspect ratio will be preserved
|
||||||
|
// when the presentation is scaled to fit different resolutions
|
||||||
|
width: 960,
|
||||||
|
height: 700,
|
||||||
|
|
||||||
|
// Factor of the display size that should remain empty around the content
|
||||||
|
margin: 0.04,
|
||||||
|
|
||||||
|
// Bounds for smallest/largest possible scale to apply to content
|
||||||
|
minScale: 0.2,
|
||||||
|
maxScale: 2.0,
|
||||||
|
|
||||||
|
// Display presentation control arrows
|
||||||
|
controls: true,
|
||||||
|
|
||||||
|
// Help the user learn the controls by providing hints, for example by
|
||||||
|
// bouncing the down arrow when they first encounter a vertical slide
|
||||||
|
controlsTutorial: true,
|
||||||
|
|
||||||
|
// Determines where controls appear, "edges" or "bottom-right"
|
||||||
|
controlsLayout: 'bottom-right',
|
||||||
|
|
||||||
|
// Visibility rule for backwards navigation arrows; "faded", "hidden"
|
||||||
|
// or "visible"
|
||||||
|
controlsBackArrows: 'faded',
|
||||||
|
|
||||||
|
// Display a presentation progress bar
|
||||||
|
progress: true,
|
||||||
|
|
||||||
|
// Display the page number of the current slide
|
||||||
|
// - true: Show slide number
|
||||||
|
// - false: Hide slide number
|
||||||
|
//
|
||||||
|
// Can optionally be set as a string that specifies the number formatting:
|
||||||
|
// - "h.v": Horizontal . vertical slide number (default)
|
||||||
|
// - "h/v": Horizontal / vertical slide number
|
||||||
|
// - "c": Flattened slide number
|
||||||
|
// - "c/t": Flattened slide number / total slides
|
||||||
|
//
|
||||||
|
// Alternatively, you can provide a function that returns the slide
|
||||||
|
// number for the current slide. The function should take in a slide
|
||||||
|
// object and return an array with one string [slideNumber] or
|
||||||
|
// three strings [n1,delimiter,n2]. See #formatSlideNumber().
|
||||||
|
slideNumber: false,
|
||||||
|
|
||||||
|
// Can be used to limit the contexts in which the slide number appears
|
||||||
|
// - "all": Always show the slide number
|
||||||
|
// - "print": Only when printing to PDF
|
||||||
|
// - "speaker": Only in the speaker view
|
||||||
|
showSlideNumber: 'all',
|
||||||
|
|
||||||
|
// Use 1 based indexing for # links to match slide number (default is zero
|
||||||
|
// based)
|
||||||
|
hashOneBasedIndex: false,
|
||||||
|
|
||||||
|
// Add the current slide number to the URL hash so that reloading the
|
||||||
|
// page/copying the URL will return you to the same slide
|
||||||
|
hash: false,
|
||||||
|
|
||||||
|
// Flags if we should monitor the hash and change slides accordingly
|
||||||
|
respondToHashChanges: true,
|
||||||
|
|
||||||
|
// Push each slide change to the browser history. Implies `hash: true`
|
||||||
|
history: false,
|
||||||
|
|
||||||
|
// Enable keyboard shortcuts for navigation
|
||||||
|
keyboard: true,
|
||||||
|
|
||||||
|
// Optional function that blocks keyboard events when retuning false
|
||||||
|
//
|
||||||
|
// If you set this to 'focused', we will only capture keyboard events
|
||||||
|
// for embedded decks when they are in focus
|
||||||
|
keyboardCondition: null,
|
||||||
|
|
||||||
|
// Disables the default reveal.js slide layout (scaling and centering)
|
||||||
|
// so that you can use custom CSS layout
|
||||||
|
disableLayout: false,
|
||||||
|
|
||||||
|
// Enable the slide overview mode
|
||||||
|
overview: true,
|
||||||
|
|
||||||
|
// Vertical centering of slides
|
||||||
|
center: true,
|
||||||
|
|
||||||
|
// Enables touch navigation on devices with touch input
|
||||||
|
touch: true,
|
||||||
|
|
||||||
|
// Loop the presentation
|
||||||
|
loop: false,
|
||||||
|
|
||||||
|
// Change the presentation direction to be RTL
|
||||||
|
rtl: false,
|
||||||
|
|
||||||
|
// Changes the behavior of our navigation directions.
|
||||||
|
//
|
||||||
|
// "default"
|
||||||
|
// Left/right arrow keys step between horizontal slides, up/down
|
||||||
|
// arrow keys step between vertical slides. Space key steps through
|
||||||
|
// all slides (both horizontal and vertical).
|
||||||
|
//
|
||||||
|
// "linear"
|
||||||
|
// Removes the up/down arrows. Left/right arrows step through all
|
||||||
|
// slides (both horizontal and vertical).
|
||||||
|
//
|
||||||
|
// "grid"
|
||||||
|
// When this is enabled, stepping left/right from a vertical stack
|
||||||
|
// to an adjacent vertical stack will land you at the same vertical
|
||||||
|
// index.
|
||||||
|
//
|
||||||
|
// Consider a deck with six slides ordered in two vertical stacks:
|
||||||
|
// 1.1 2.1
|
||||||
|
// 1.2 2.2
|
||||||
|
// 1.3 2.3
|
||||||
|
//
|
||||||
|
// If you're on slide 1.3 and navigate right, you will normally move
|
||||||
|
// from 1.3 -> 2.1. If "grid" is used, the same navigation takes you
|
||||||
|
// from 1.3 -> 2.3.
|
||||||
|
navigationMode: 'default',
|
||||||
|
|
||||||
|
// Randomizes the order of slides each time the presentation loads
|
||||||
|
shuffle: false,
|
||||||
|
|
||||||
|
// Turns fragments on and off globally
|
||||||
|
fragments: true,
|
||||||
|
|
||||||
|
// Flags whether to include the current fragment in the URL,
|
||||||
|
// so that reloading brings you to the same fragment position
|
||||||
|
fragmentInURL: true,
|
||||||
|
|
||||||
|
// Flags if the presentation is running in an embedded mode,
|
||||||
|
// i.e. contained within a limited portion of the screen
|
||||||
|
embedded: false,
|
||||||
|
|
||||||
|
// Flags if we should show a help overlay when the question-mark
|
||||||
|
// key is pressed
|
||||||
|
help: true,
|
||||||
|
|
||||||
|
// Flags if it should be possible to pause the presentation (blackout)
|
||||||
|
pause: true,
|
||||||
|
|
||||||
|
// Flags if speaker notes should be visible to all viewers
|
||||||
|
showNotes: false,
|
||||||
|
|
||||||
|
// Flags if slides with data-visibility="hidden" should be kep visible
|
||||||
|
showHiddenSlides: false,
|
||||||
|
|
||||||
|
// Global override for autoplaying embedded media (video/audio/iframe)
|
||||||
|
// - null: Media will only autoplay if data-autoplay is present
|
||||||
|
// - true: All media will autoplay, regardless of individual setting
|
||||||
|
// - false: No media will autoplay, regardless of individual setting
|
||||||
|
autoPlayMedia: null,
|
||||||
|
|
||||||
|
// Global override for preloading lazy-loaded iframes
|
||||||
|
// - null: Iframes with data-src AND data-preload will be loaded when within
|
||||||
|
// the viewDistance, iframes with only data-src will be loaded when visible
|
||||||
|
// - true: All iframes with data-src will be loaded when within the viewDistance
|
||||||
|
// - false: All iframes with data-src will be loaded only when visible
|
||||||
|
preloadIframes: null,
|
||||||
|
|
||||||
|
// Can be used to globally disable auto-animation
|
||||||
|
autoAnimate: true,
|
||||||
|
|
||||||
|
// Optionally provide a custom element matcher that will be
|
||||||
|
// used to dictate which elements we can animate between.
|
||||||
|
autoAnimateMatcher: null,
|
||||||
|
|
||||||
|
// Default settings for our auto-animate transitions, can be
|
||||||
|
// overridden per-slide or per-element via data arguments
|
||||||
|
autoAnimateEasing: 'ease',
|
||||||
|
autoAnimateDuration: 1.0,
|
||||||
|
autoAnimateUnmatched: true,
|
||||||
|
|
||||||
|
// CSS properties that can be auto-animated. Position & scale
|
||||||
|
// is matched separately so there's no need to include styles
|
||||||
|
// like top/right/bottom/left, width/height or margin.
|
||||||
|
autoAnimateStyles: [
|
||||||
|
'opacity',
|
||||||
|
'color',
|
||||||
|
'background-color',
|
||||||
|
'padding',
|
||||||
|
'font-size',
|
||||||
|
'line-height',
|
||||||
|
'letter-spacing',
|
||||||
|
'border-width',
|
||||||
|
'border-color',
|
||||||
|
'border-radius',
|
||||||
|
'outline',
|
||||||
|
'outline-offset'
|
||||||
|
],
|
||||||
|
|
||||||
|
// Controls automatic progression to the next slide
|
||||||
|
// - 0: Auto-sliding only happens if the data-autoslide HTML attribute
|
||||||
|
// is present on the current slide or fragment
|
||||||
|
// - 1+: All slides will progress automatically at the given interval
|
||||||
|
// - false: No auto-sliding, even if data-autoslide is present
|
||||||
|
autoSlide: 0,
|
||||||
|
|
||||||
|
// Stop auto-sliding after user input
|
||||||
|
autoSlideStoppable: true,
|
||||||
|
|
||||||
|
// Use this method for navigation when auto-sliding (defaults to navigateNext)
|
||||||
|
autoSlideMethod: null,
|
||||||
|
|
||||||
|
// Specify the average time in seconds that you think you will spend
|
||||||
|
// presenting each slide. This is used to show a pacing timer in the
|
||||||
|
// speaker view
|
||||||
|
defaultTiming: null,
|
||||||
|
|
||||||
|
// Enable slide navigation via mouse wheel
|
||||||
|
mouseWheel: false,
|
||||||
|
|
||||||
|
// Opens links in an iframe preview overlay
|
||||||
|
// Add `data-preview-link` and `data-preview-link="false"` to customise each link
|
||||||
|
// individually
|
||||||
|
previewLinks: false,
|
||||||
|
|
||||||
|
// Exposes the reveal.js API through window.postMessage
|
||||||
|
postMessage: true,
|
||||||
|
|
||||||
|
// Dispatches all reveal.js events to the parent window through postMessage
|
||||||
|
postMessageEvents: false,
|
||||||
|
|
||||||
|
// Focuses body when page changes visibility to ensure keyboard shortcuts work
|
||||||
|
focusBodyOnPageVisibilityChange: true,
|
||||||
|
|
||||||
|
// Transition style
|
||||||
|
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
||||||
|
|
||||||
|
// Transition speed
|
||||||
|
transitionSpeed: 'default', // default/fast/slow
|
||||||
|
|
||||||
|
// Transition style for full page slide backgrounds
|
||||||
|
backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom
|
||||||
|
|
||||||
|
// Parallax background image
|
||||||
|
parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg"
|
||||||
|
|
||||||
|
// Parallax background size
|
||||||
|
parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px"
|
||||||
|
|
||||||
|
// Parallax background repeat
|
||||||
|
parallaxBackgroundRepeat: '', // repeat/repeat-x/repeat-y/no-repeat/initial/inherit
|
||||||
|
|
||||||
|
// Parallax background position
|
||||||
|
parallaxBackgroundPosition: '', // CSS syntax, e.g. "top left"
|
||||||
|
|
||||||
|
// Amount of pixels to move the parallax background per slide step
|
||||||
|
parallaxBackgroundHorizontal: null,
|
||||||
|
parallaxBackgroundVertical: null,
|
||||||
|
|
||||||
|
// The maximum number of pages a single slide can expand onto when printing
|
||||||
|
// to PDF, unlimited by default
|
||||||
|
pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY,
|
||||||
|
|
||||||
|
// Prints each fragment on a separate slide
|
||||||
|
pdfSeparateFragments: true,
|
||||||
|
|
||||||
|
// Offset used to reduce the height of content within exported PDF pages.
|
||||||
|
// This exists to account for environment differences based on how you
|
||||||
|
// print to PDF. CLI printing options, like phantomjs and wkpdf, can end
|
||||||
|
// on precisely the total height of the document whereas in-browser
|
||||||
|
// printing has to end one pixel before.
|
||||||
|
pdfPageHeightOffset: -1,
|
||||||
|
|
||||||
|
// Number of slides away from the current that are visible
|
||||||
|
viewDistance: 3,
|
||||||
|
|
||||||
|
// Number of slides away from the current that are visible on mobile
|
||||||
|
// devices. It is advisable to set this to a lower number than
|
||||||
|
// viewDistance in order to save resources.
|
||||||
|
mobileViewDistance: 2,
|
||||||
|
|
||||||
|
// The display mode that will be used to show slides
|
||||||
|
display: 'block',
|
||||||
|
|
||||||
|
// Hide cursor if inactive
|
||||||
|
hideInactiveCursor: true,
|
||||||
|
|
||||||
|
// Time before the cursor is hidden (in ms)
|
||||||
|
hideCursorTime: 5000,
|
||||||
|
|
||||||
|
// Script dependencies to load
|
||||||
|
dependencies: [],
|
||||||
|
|
||||||
|
// Plugin objects to register and use for this presentation
|
||||||
|
plugins: []
|
||||||
|
|
||||||
|
}
|
634
js/controllers/autoanimate.js
Normal file
@ -0,0 +1,634 @@
|
|||||||
|
import { queryAll, extend, createStyleSheet, matches, closest } from '../utils/util.js'
|
||||||
|
import { FRAGMENT_STYLE_REGEX } from '../utils/constants.js'
|
||||||
|
|
||||||
|
// Counter used to generate unique IDs for auto-animated elements
|
||||||
|
let autoAnimateCounter = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Automatically animates matching elements across
|
||||||
|
* slides with the [data-auto-animate] attribute.
|
||||||
|
*/
|
||||||
|
export default class AutoAnimate {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Runs an auto-animation between the given slides.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} fromSlide
|
||||||
|
* @param {HTMLElement} toSlide
|
||||||
|
*/
|
||||||
|
run( fromSlide, toSlide ) {
|
||||||
|
|
||||||
|
// Clean up after prior animations
|
||||||
|
this.reset();
|
||||||
|
|
||||||
|
let allSlides = this.Reveal.getSlides();
|
||||||
|
let toSlideIndex = allSlides.indexOf( toSlide );
|
||||||
|
let fromSlideIndex = allSlides.indexOf( fromSlide );
|
||||||
|
|
||||||
|
// Ensure that both slides are auto-animate targets with the same data-auto-animate-id value
|
||||||
|
// (including null if absent on both) and that data-auto-animate-restart isn't set on the
|
||||||
|
// physically latter slide (independent of slide direction)
|
||||||
|
if( fromSlide.hasAttribute( 'data-auto-animate' ) && toSlide.hasAttribute( 'data-auto-animate' )
|
||||||
|
&& fromSlide.getAttribute( 'data-auto-animate-id' ) === toSlide.getAttribute( 'data-auto-animate-id' )
|
||||||
|
&& !( toSlideIndex > fromSlideIndex ? toSlide : fromSlide ).hasAttribute( 'data-auto-animate-restart' ) ) {
|
||||||
|
|
||||||
|
// Create a new auto-animate sheet
|
||||||
|
this.autoAnimateStyleSheet = this.autoAnimateStyleSheet || createStyleSheet();
|
||||||
|
|
||||||
|
let animationOptions = this.getAutoAnimateOptions( toSlide );
|
||||||
|
|
||||||
|
// Set our starting state
|
||||||
|
fromSlide.dataset.autoAnimate = 'pending';
|
||||||
|
toSlide.dataset.autoAnimate = 'pending';
|
||||||
|
|
||||||
|
// Flag the navigation direction, needed for fragment buildup
|
||||||
|
animationOptions.slideDirection = toSlideIndex > fromSlideIndex ? 'forward' : 'backward';
|
||||||
|
|
||||||
|
// If the from-slide is hidden because it has moved outside
|
||||||
|
// the view distance, we need to temporarily show it while
|
||||||
|
// measuring
|
||||||
|
let fromSlideIsHidden = fromSlide.style.display === 'none';
|
||||||
|
if( fromSlideIsHidden ) fromSlide.style.display = this.Reveal.getConfig().display;
|
||||||
|
|
||||||
|
// Inject our auto-animate styles for this transition
|
||||||
|
let css = this.getAutoAnimatableElements( fromSlide, toSlide ).map( elements => {
|
||||||
|
return this.autoAnimateElements( elements.from, elements.to, elements.options || {}, animationOptions, autoAnimateCounter++ );
|
||||||
|
} );
|
||||||
|
|
||||||
|
if( fromSlideIsHidden ) fromSlide.style.display = 'none';
|
||||||
|
|
||||||
|
// Animate unmatched elements, if enabled
|
||||||
|
if( toSlide.dataset.autoAnimateUnmatched !== 'false' && this.Reveal.getConfig().autoAnimateUnmatched === true ) {
|
||||||
|
|
||||||
|
// Our default timings for unmatched elements
|
||||||
|
let defaultUnmatchedDuration = animationOptions.duration * 0.8,
|
||||||
|
defaultUnmatchedDelay = animationOptions.duration * 0.2;
|
||||||
|
|
||||||
|
this.getUnmatchedAutoAnimateElements( toSlide ).forEach( unmatchedElement => {
|
||||||
|
|
||||||
|
let unmatchedOptions = this.getAutoAnimateOptions( unmatchedElement, animationOptions );
|
||||||
|
let id = 'unmatched';
|
||||||
|
|
||||||
|
// If there is a duration or delay set specifically for this
|
||||||
|
// element our unmatched elements should adhere to those
|
||||||
|
if( unmatchedOptions.duration !== animationOptions.duration || unmatchedOptions.delay !== animationOptions.delay ) {
|
||||||
|
id = 'unmatched-' + autoAnimateCounter++;
|
||||||
|
css.push( `[data-auto-animate="running"] [data-auto-animate-target="${id}"] { transition: opacity ${unmatchedOptions.duration}s ease ${unmatchedOptions.delay}s; }` );
|
||||||
|
}
|
||||||
|
|
||||||
|
unmatchedElement.dataset.autoAnimateTarget = id;
|
||||||
|
|
||||||
|
}, this );
|
||||||
|
|
||||||
|
// Our default transition for unmatched elements
|
||||||
|
css.push( `[data-auto-animate="running"] [data-auto-animate-target="unmatched"] { transition: opacity ${defaultUnmatchedDuration}s ease ${defaultUnmatchedDelay}s; }` );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setting the whole chunk of CSS at once is the most
|
||||||
|
// efficient way to do this. Using sheet.insertRule
|
||||||
|
// is multiple factors slower.
|
||||||
|
this.autoAnimateStyleSheet.innerHTML = css.join( '' );
|
||||||
|
|
||||||
|
// Start the animation next cycle
|
||||||
|
requestAnimationFrame( () => {
|
||||||
|
if( this.autoAnimateStyleSheet ) {
|
||||||
|
// This forces our newly injected styles to be applied in Firefox
|
||||||
|
getComputedStyle( this.autoAnimateStyleSheet ).fontWeight;
|
||||||
|
|
||||||
|
toSlide.dataset.autoAnimate = 'running';
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
this.Reveal.dispatchEvent({
|
||||||
|
type: 'autoanimate',
|
||||||
|
data: {
|
||||||
|
fromSlide,
|
||||||
|
toSlide,
|
||||||
|
sheet: this.autoAnimateStyleSheet
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rolls back all changes that we've made to the DOM so
|
||||||
|
* that as part of animating.
|
||||||
|
*/
|
||||||
|
reset() {
|
||||||
|
|
||||||
|
// Reset slides
|
||||||
|
queryAll( this.Reveal.getRevealElement(), '[data-auto-animate]:not([data-auto-animate=""])' ).forEach( element => {
|
||||||
|
element.dataset.autoAnimate = '';
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Reset elements
|
||||||
|
queryAll( this.Reveal.getRevealElement(), '[data-auto-animate-target]' ).forEach( element => {
|
||||||
|
delete element.dataset.autoAnimateTarget;
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Remove the animation sheet
|
||||||
|
if( this.autoAnimateStyleSheet && this.autoAnimateStyleSheet.parentNode ) {
|
||||||
|
this.autoAnimateStyleSheet.parentNode.removeChild( this.autoAnimateStyleSheet );
|
||||||
|
this.autoAnimateStyleSheet = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a FLIP animation where the `to` element starts out
|
||||||
|
* in the `from` element position and animates to its original
|
||||||
|
* state.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} from
|
||||||
|
* @param {HTMLElement} to
|
||||||
|
* @param {Object} elementOptions Options for this element pair
|
||||||
|
* @param {Object} animationOptions Options set at the slide level
|
||||||
|
* @param {String} id Unique ID that we can use to identify this
|
||||||
|
* auto-animate element in the DOM
|
||||||
|
*/
|
||||||
|
autoAnimateElements( from, to, elementOptions, animationOptions, id ) {
|
||||||
|
|
||||||
|
// 'from' elements are given a data-auto-animate-target with no value,
|
||||||
|
// 'to' elements are are given a data-auto-animate-target with an ID
|
||||||
|
from.dataset.autoAnimateTarget = '';
|
||||||
|
to.dataset.autoAnimateTarget = id;
|
||||||
|
|
||||||
|
// Each element may override any of the auto-animate options
|
||||||
|
// like transition easing, duration and delay via data-attributes
|
||||||
|
let options = this.getAutoAnimateOptions( to, animationOptions );
|
||||||
|
|
||||||
|
// If we're using a custom element matcher the element options
|
||||||
|
// may contain additional transition overrides
|
||||||
|
if( typeof elementOptions.delay !== 'undefined' ) options.delay = elementOptions.delay;
|
||||||
|
if( typeof elementOptions.duration !== 'undefined' ) options.duration = elementOptions.duration;
|
||||||
|
if( typeof elementOptions.easing !== 'undefined' ) options.easing = elementOptions.easing;
|
||||||
|
|
||||||
|
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
|
||||||
|
// the 'to' element so that it matches the position and size
|
||||||
|
// of the 'from' element
|
||||||
|
if( elementOptions.translate !== false || elementOptions.scale !== false ) {
|
||||||
|
|
||||||
|
let presentationScale = this.Reveal.getScale();
|
||||||
|
|
||||||
|
let delta = {
|
||||||
|
x: ( fromProps.x - toProps.x ) / presentationScale,
|
||||||
|
y: ( fromProps.y - toProps.y ) / presentationScale,
|
||||||
|
scaleX: fromProps.width / toProps.width,
|
||||||
|
scaleY: fromProps.height / toProps.height
|
||||||
|
};
|
||||||
|
|
||||||
|
// Limit decimal points to avoid 0.0001px blur and stutter
|
||||||
|
delta.x = Math.round( delta.x * 1000 ) / 1000;
|
||||||
|
delta.y = Math.round( delta.y * 1000 ) / 1000;
|
||||||
|
delta.scaleX = Math.round( delta.scaleX * 1000 ) / 1000;
|
||||||
|
delta.scaleX = Math.round( delta.scaleX * 1000 ) / 1000;
|
||||||
|
|
||||||
|
let translate = elementOptions.translate !== false && ( delta.x !== 0 || delta.y !== 0 ),
|
||||||
|
scale = elementOptions.scale !== false && ( delta.scaleX !== 0 || delta.scaleY !== 0 );
|
||||||
|
|
||||||
|
// No need to transform if nothing's changed
|
||||||
|
if( translate || scale ) {
|
||||||
|
|
||||||
|
let transform = [];
|
||||||
|
|
||||||
|
if( translate ) transform.push( `translate(${delta.x}px, ${delta.y}px)` );
|
||||||
|
if( scale ) transform.push( `scale(${delta.scaleX}, ${delta.scaleY})` );
|
||||||
|
|
||||||
|
fromProps.styles['transform'] = transform.join( ' ' );
|
||||||
|
fromProps.styles['transform-origin'] = 'top left';
|
||||||
|
|
||||||
|
toProps.styles['transform'] = 'none';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete all unchanged 'to' styles
|
||||||
|
for( let propertyName in toProps.styles ) {
|
||||||
|
const toValue = toProps.styles[propertyName];
|
||||||
|
const fromValue = fromProps.styles[propertyName];
|
||||||
|
|
||||||
|
if( toValue === fromValue ) {
|
||||||
|
delete toProps.styles[propertyName];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// If these property values were set via a custom matcher providing
|
||||||
|
// an explicit 'from' and/or 'to' value, we always inject those values.
|
||||||
|
if( toValue.explicitValue === true ) {
|
||||||
|
toProps.styles[propertyName] = toValue.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( fromValue.explicitValue === true ) {
|
||||||
|
fromProps.styles[propertyName] = fromValue.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let css = '';
|
||||||
|
|
||||||
|
let toStyleProperties = Object.keys( toProps.styles );
|
||||||
|
|
||||||
|
// Only create animate this element IF at least one style
|
||||||
|
// property has changed
|
||||||
|
if( toStyleProperties.length > 0 ) {
|
||||||
|
|
||||||
|
// Instantly move to the 'from' state
|
||||||
|
fromProps.styles['transition'] = 'none';
|
||||||
|
|
||||||
|
// Animate towards the 'to' state
|
||||||
|
toProps.styles['transition'] = `all ${options.duration}s ${options.easing} ${options.delay}s`;
|
||||||
|
toProps.styles['transition-property'] = toStyleProperties.join( ', ' );
|
||||||
|
toProps.styles['will-change'] = toStyleProperties.join( ', ' );
|
||||||
|
|
||||||
|
// Build up our custom CSS. We need to override inline styles
|
||||||
|
// so we need to make our styles vErY IMPORTANT!1!!
|
||||||
|
let fromCSS = Object.keys( fromProps.styles ).map( propertyName => {
|
||||||
|
return propertyName + ': ' + fromProps.styles[propertyName] + ' !important;';
|
||||||
|
} ).join( '' );
|
||||||
|
|
||||||
|
let toCSS = Object.keys( toProps.styles ).map( propertyName => {
|
||||||
|
return propertyName + ': ' + toProps.styles[propertyName] + ' !important;';
|
||||||
|
} ).join( '' );
|
||||||
|
|
||||||
|
css = '[data-auto-animate-target="'+ id +'"] {'+ fromCSS +'}' +
|
||||||
|
'[data-auto-animate="running"] [data-auto-animate-target="'+ id +'"] {'+ toCSS +'}';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return css;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the auto-animate options for the given element.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} element Element to pick up options
|
||||||
|
* from, either a slide or an animation target
|
||||||
|
* @param {Object} [inheritedOptions] Optional set of existing
|
||||||
|
* options
|
||||||
|
*/
|
||||||
|
getAutoAnimateOptions( element, inheritedOptions ) {
|
||||||
|
|
||||||
|
let options = {
|
||||||
|
easing: this.Reveal.getConfig().autoAnimateEasing,
|
||||||
|
duration: this.Reveal.getConfig().autoAnimateDuration,
|
||||||
|
delay: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
options = extend( options, inheritedOptions );
|
||||||
|
|
||||||
|
// Inherit options from parent elements
|
||||||
|
if( element.parentNode ) {
|
||||||
|
let autoAnimatedParent = closest( element.parentNode, '[data-auto-animate-target]' );
|
||||||
|
if( autoAnimatedParent ) {
|
||||||
|
options = this.getAutoAnimateOptions( autoAnimatedParent, options );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( element.dataset.autoAnimateEasing ) {
|
||||||
|
options.easing = element.dataset.autoAnimateEasing;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( element.dataset.autoAnimateDuration ) {
|
||||||
|
options.duration = parseFloat( element.dataset.autoAnimateDuration );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( element.dataset.autoAnimateDelay ) {
|
||||||
|
options.delay = parseFloat( element.dataset.autoAnimateDelay );
|
||||||
|
}
|
||||||
|
|
||||||
|
return options;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an object containing all of the properties
|
||||||
|
* that can be auto-animated for the given element and
|
||||||
|
* their current computed values.
|
||||||
|
*
|
||||||
|
* @param {String} direction 'from' or 'to'
|
||||||
|
*/
|
||||||
|
getAutoAnimatableProperties( direction, element, elementOptions ) {
|
||||||
|
|
||||||
|
let config = this.Reveal.getConfig();
|
||||||
|
|
||||||
|
let properties = { styles: [] };
|
||||||
|
|
||||||
|
// Position and size
|
||||||
|
if( elementOptions.translate !== false || elementOptions.scale !== false ) {
|
||||||
|
let bounds;
|
||||||
|
|
||||||
|
// Custom auto-animate may optionally return a custom tailored
|
||||||
|
// measurement function
|
||||||
|
if( typeof elementOptions.measure === 'function' ) {
|
||||||
|
bounds = elementOptions.measure( element );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if( config.center ) {
|
||||||
|
// More precise, but breaks when used in combination
|
||||||
|
// with zoom for scaling the deck ¯\_(ツ)_/¯
|
||||||
|
bounds = element.getBoundingClientRect();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let scale = this.Reveal.getScale();
|
||||||
|
bounds = {
|
||||||
|
x: element.offsetLeft * scale,
|
||||||
|
y: element.offsetTop * scale,
|
||||||
|
width: element.offsetWidth * scale,
|
||||||
|
height: element.offsetHeight * scale
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
properties.x = bounds.x;
|
||||||
|
properties.y = bounds.y;
|
||||||
|
properties.width = bounds.width;
|
||||||
|
properties.height = bounds.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
const computedStyles = getComputedStyle( element );
|
||||||
|
|
||||||
|
// CSS styles
|
||||||
|
( elementOptions.styles || config.autoAnimateStyles ).forEach( style => {
|
||||||
|
let value;
|
||||||
|
|
||||||
|
// `style` is either the property name directly, or an object
|
||||||
|
// definition of a style property
|
||||||
|
if( typeof style === 'string' ) style = { property: style };
|
||||||
|
|
||||||
|
if( typeof style.from !== 'undefined' && direction === 'from' ) {
|
||||||
|
value = { value: style.from, explicitValue: true };
|
||||||
|
}
|
||||||
|
else if( typeof style.to !== 'undefined' && direction === 'to' ) {
|
||||||
|
value = { value: style.to, explicitValue: true };
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
value = computedStyles[style.property];
|
||||||
|
}
|
||||||
|
|
||||||
|
if( value !== '' ) {
|
||||||
|
properties.styles[style.property] = value;
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
return properties;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all element pairs that we can animate
|
||||||
|
* between the given slides.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} fromSlide
|
||||||
|
* @param {HTMLElement} toSlide
|
||||||
|
*
|
||||||
|
* @return {Array} Each value is an array where [0] is
|
||||||
|
* the element we're animating from and [1] is the
|
||||||
|
* element we're animating to
|
||||||
|
*/
|
||||||
|
getAutoAnimatableElements( fromSlide, toSlide ) {
|
||||||
|
|
||||||
|
let matcher = typeof this.Reveal.getConfig().autoAnimateMatcher === 'function' ? this.Reveal.getConfig().autoAnimateMatcher : this.getAutoAnimatePairs;
|
||||||
|
|
||||||
|
let pairs = matcher.call( this, fromSlide, toSlide );
|
||||||
|
|
||||||
|
let reserved = [];
|
||||||
|
|
||||||
|
// Remove duplicate pairs
|
||||||
|
return pairs.filter( ( pair, index ) => {
|
||||||
|
if( reserved.indexOf( pair.to ) === -1 ) {
|
||||||
|
reserved.push( pair.to );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identifies matching elements between slides.
|
||||||
|
*
|
||||||
|
* You can specify a custom matcher function by using
|
||||||
|
* the `autoAnimateMatcher` config option.
|
||||||
|
*/
|
||||||
|
getAutoAnimatePairs( fromSlide, toSlide ) {
|
||||||
|
|
||||||
|
let pairs = [];
|
||||||
|
|
||||||
|
const codeNodes = 'pre';
|
||||||
|
const textNodes = 'h1, h2, h3, h4, h5, h6, p, li';
|
||||||
|
const mediaNodes = 'img, video, iframe';
|
||||||
|
|
||||||
|
// Eplicit matches via data-id
|
||||||
|
this.findAutoAnimateMatches( pairs, fromSlide, toSlide, '[data-id]', node => {
|
||||||
|
return node.nodeName + ':::' + node.getAttribute( 'data-id' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Text
|
||||||
|
this.findAutoAnimateMatches( pairs, fromSlide, toSlide, textNodes, node => {
|
||||||
|
return node.nodeName + ':::' + node.innerText;
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Media
|
||||||
|
this.findAutoAnimateMatches( pairs, fromSlide, toSlide, mediaNodes, node => {
|
||||||
|
return node.nodeName + ':::' + ( node.getAttribute( 'src' ) || node.getAttribute( 'data-src' ) );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Code
|
||||||
|
this.findAutoAnimateMatches( pairs, fromSlide, toSlide, codeNodes, node => {
|
||||||
|
return node.nodeName + ':::' + node.innerText;
|
||||||
|
} );
|
||||||
|
|
||||||
|
pairs.forEach( pair => {
|
||||||
|
|
||||||
|
// Disable scale transformations on text nodes, we transition
|
||||||
|
// each individual text property instead
|
||||||
|
if( matches( pair.from, textNodes ) ) {
|
||||||
|
pair.options = { scale: false };
|
||||||
|
}
|
||||||
|
// Animate individual lines of code
|
||||||
|
else if( matches( pair.from, codeNodes ) ) {
|
||||||
|
|
||||||
|
// Transition the code block's width and height instead of scaling
|
||||||
|
// to prevent its content from being squished
|
||||||
|
pair.options = { scale: false, styles: [ 'width', 'height' ] };
|
||||||
|
|
||||||
|
// Lines of code
|
||||||
|
this.findAutoAnimateMatches( pairs, pair.from, pair.to, '.hljs .hljs-ln-code', node => {
|
||||||
|
return node.textContent;
|
||||||
|
}, {
|
||||||
|
scale: false,
|
||||||
|
styles: [],
|
||||||
|
measure: this.getLocalBoundingBox.bind( this )
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Line numbers
|
||||||
|
this.findAutoAnimateMatches( pairs, pair.from, pair.to, '.hljs .hljs-ln-line[data-line-number]', node => {
|
||||||
|
return node.getAttribute( 'data-line-number' );
|
||||||
|
}, {
|
||||||
|
scale: false,
|
||||||
|
styles: [ 'width' ],
|
||||||
|
measure: this.getLocalBoundingBox.bind( this )
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}, this );
|
||||||
|
|
||||||
|
return pairs;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper method which returns a bounding box based on
|
||||||
|
* the given elements offset coordinates.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} element
|
||||||
|
* @return {Object} x, y, width, height
|
||||||
|
*/
|
||||||
|
getLocalBoundingBox( element ) {
|
||||||
|
|
||||||
|
const presentationScale = this.Reveal.getScale();
|
||||||
|
|
||||||
|
return {
|
||||||
|
x: Math.round( ( element.offsetLeft * presentationScale ) * 100 ) / 100,
|
||||||
|
y: Math.round( ( element.offsetTop * presentationScale ) * 100 ) / 100,
|
||||||
|
width: Math.round( ( element.offsetWidth * presentationScale ) * 100 ) / 100,
|
||||||
|
height: Math.round( ( element.offsetHeight * presentationScale ) * 100 ) / 100
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds matching elements between two slides.
|
||||||
|
*
|
||||||
|
* @param {Array} pairs List of pairs to push matches to
|
||||||
|
* @param {HTMLElement} fromScope Scope within the from element exists
|
||||||
|
* @param {HTMLElement} toScope Scope within the to element exists
|
||||||
|
* @param {String} selector CSS selector of the element to match
|
||||||
|
* @param {Function} serializer A function that accepts an element and returns
|
||||||
|
* a stringified ID based on its contents
|
||||||
|
* @param {Object} animationOptions Optional config options for this pair
|
||||||
|
*/
|
||||||
|
findAutoAnimateMatches( pairs, fromScope, toScope, selector, serializer, animationOptions ) {
|
||||||
|
|
||||||
|
let fromMatches = {};
|
||||||
|
let toMatches = {};
|
||||||
|
|
||||||
|
[].slice.call( fromScope.querySelectorAll( selector ) ).forEach( ( element, i ) => {
|
||||||
|
const key = serializer( element );
|
||||||
|
if( typeof key === 'string' && key.length ) {
|
||||||
|
fromMatches[key] = fromMatches[key] || [];
|
||||||
|
fromMatches[key].push( element );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
[].slice.call( toScope.querySelectorAll( selector ) ).forEach( ( element, i ) => {
|
||||||
|
const key = serializer( element );
|
||||||
|
toMatches[key] = toMatches[key] || [];
|
||||||
|
toMatches[key].push( element );
|
||||||
|
|
||||||
|
let fromElement;
|
||||||
|
|
||||||
|
// Retrieve the 'from' element
|
||||||
|
if( fromMatches[key] ) {
|
||||||
|
const pimaryIndex = toMatches[key].length - 1;
|
||||||
|
const secondaryIndex = fromMatches[key].length - 1;
|
||||||
|
|
||||||
|
// If there are multiple identical from elements, retrieve
|
||||||
|
// the one at the same index as our to-element.
|
||||||
|
if( fromMatches[key][ pimaryIndex ] ) {
|
||||||
|
fromElement = fromMatches[key][ pimaryIndex ];
|
||||||
|
fromMatches[key][ pimaryIndex ] = null;
|
||||||
|
}
|
||||||
|
// If there are no matching from-elements at the same index,
|
||||||
|
// use the last one.
|
||||||
|
else if( fromMatches[key][ secondaryIndex ] ) {
|
||||||
|
fromElement = fromMatches[key][ secondaryIndex ];
|
||||||
|
fromMatches[key][ secondaryIndex ] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we've got a matching pair, push it to the list of pairs
|
||||||
|
if( fromElement ) {
|
||||||
|
pairs.push({
|
||||||
|
from: fromElement,
|
||||||
|
to: element,
|
||||||
|
options: animationOptions
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a all elements within the given scope that should
|
||||||
|
* be considered unmatched in an auto-animate transition. If
|
||||||
|
* fading of unmatched elements is turned on, these elements
|
||||||
|
* will fade when going between auto-animate slides.
|
||||||
|
*
|
||||||
|
* Note that parents of auto-animate targets are NOT considerd
|
||||||
|
* unmatched since fading them would break the auto-animation.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} rootElement
|
||||||
|
* @return {Array}
|
||||||
|
*/
|
||||||
|
getUnmatchedAutoAnimateElements( rootElement ) {
|
||||||
|
|
||||||
|
return [].slice.call( rootElement.children ).reduce( ( result, element ) => {
|
||||||
|
|
||||||
|
const containsAnimatedElements = element.querySelector( '[data-auto-animate-target]' );
|
||||||
|
|
||||||
|
// The element is unmatched if
|
||||||
|
// - It is not an auto-animate target
|
||||||
|
// - It does not contain any auto-animate targets
|
||||||
|
if( !element.hasAttribute( 'data-auto-animate-target' ) && !containsAnimatedElements ) {
|
||||||
|
result.push( element );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( element.querySelector( '[data-auto-animate-target]' ) ) {
|
||||||
|
result = result.concat( this.getUnmatchedAutoAnimateElements( element ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}, [] );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
406
js/controllers/backgrounds.js
Normal file
@ -0,0 +1,406 @@
|
|||||||
|
import { queryAll } from '../utils/util.js'
|
||||||
|
import { colorToRgb, colorBrightness } from '../utils/color.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates and updates slide backgrounds.
|
||||||
|
*/
|
||||||
|
export default class Backgrounds {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
this.element = document.createElement( 'div' );
|
||||||
|
this.element.className = 'backgrounds';
|
||||||
|
this.Reveal.getRevealElement().appendChild( this.element );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the slide background elements and appends them
|
||||||
|
* to the background container. One element is created per
|
||||||
|
* slide no matter if the given slide has visible background.
|
||||||
|
*/
|
||||||
|
create() {
|
||||||
|
|
||||||
|
// Clear prior backgrounds
|
||||||
|
this.element.innerHTML = '';
|
||||||
|
this.element.classList.add( 'no-transition' );
|
||||||
|
|
||||||
|
// Iterate over all horizontal slides
|
||||||
|
this.Reveal.getHorizontalSlides().forEach( slideh => {
|
||||||
|
|
||||||
|
let backgroundStack = this.createBackground( slideh, this.element );
|
||||||
|
|
||||||
|
// Iterate over all vertical slides
|
||||||
|
queryAll( slideh, 'section' ).forEach( slidev => {
|
||||||
|
|
||||||
|
this.createBackground( slidev, backgroundStack );
|
||||||
|
|
||||||
|
backgroundStack.classList.add( 'stack' );
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Add parallax background if specified
|
||||||
|
if( this.Reveal.getConfig().parallaxBackgroundImage ) {
|
||||||
|
|
||||||
|
this.element.style.backgroundImage = 'url("' + this.Reveal.getConfig().parallaxBackgroundImage + '")';
|
||||||
|
this.element.style.backgroundSize = this.Reveal.getConfig().parallaxBackgroundSize;
|
||||||
|
this.element.style.backgroundRepeat = this.Reveal.getConfig().parallaxBackgroundRepeat;
|
||||||
|
this.element.style.backgroundPosition = this.Reveal.getConfig().parallaxBackgroundPosition;
|
||||||
|
|
||||||
|
// Make sure the below properties are set on the element - these properties are
|
||||||
|
// needed for proper transitions to be set on the element via CSS. To remove
|
||||||
|
// annoying background slide-in effect when the presentation starts, apply
|
||||||
|
// these properties after short time delay
|
||||||
|
setTimeout( () => {
|
||||||
|
this.Reveal.getRevealElement().classList.add( 'has-parallax-background' );
|
||||||
|
}, 1 );
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
this.element.style.backgroundImage = '';
|
||||||
|
this.Reveal.getRevealElement().classList.remove( 'has-parallax-background' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a background for the given slide.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} slide
|
||||||
|
* @param {HTMLElement} container The element that the background
|
||||||
|
* should be appended to
|
||||||
|
* @return {HTMLElement} New background div
|
||||||
|
*/
|
||||||
|
createBackground( slide, container ) {
|
||||||
|
|
||||||
|
// Main slide background element
|
||||||
|
let element = document.createElement( 'div' );
|
||||||
|
element.className = 'slide-background ' + slide.className.replace( /present|past|future/, '' );
|
||||||
|
|
||||||
|
// Inner background element that wraps images/videos/iframes
|
||||||
|
let contentElement = document.createElement( 'div' );
|
||||||
|
contentElement.className = 'slide-background-content';
|
||||||
|
|
||||||
|
element.appendChild( contentElement );
|
||||||
|
container.appendChild( element );
|
||||||
|
|
||||||
|
slide.slideBackgroundElement = element;
|
||||||
|
slide.slideBackgroundContentElement = contentElement;
|
||||||
|
|
||||||
|
// Syncs the background to reflect all current background settings
|
||||||
|
this.sync( slide );
|
||||||
|
|
||||||
|
return element;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders all of the visual properties of a slide background
|
||||||
|
* based on the various background attributes.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} slide
|
||||||
|
*/
|
||||||
|
sync( slide ) {
|
||||||
|
|
||||||
|
const element = slide.slideBackgroundElement,
|
||||||
|
contentElement = slide.slideBackgroundContentElement;
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
background: slide.getAttribute( 'data-background' ),
|
||||||
|
backgroundSize: slide.getAttribute( 'data-background-size' ),
|
||||||
|
backgroundImage: slide.getAttribute( 'data-background-image' ),
|
||||||
|
backgroundVideo: slide.getAttribute( 'data-background-video' ),
|
||||||
|
backgroundIframe: slide.getAttribute( 'data-background-iframe' ),
|
||||||
|
backgroundColor: slide.getAttribute( 'data-background-color' ),
|
||||||
|
backgroundGradient: slide.getAttribute( 'data-background-gradient' ),
|
||||||
|
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
|
||||||
|
backgroundPosition: slide.getAttribute( 'data-background-position' ),
|
||||||
|
backgroundTransition: slide.getAttribute( 'data-background-transition' ),
|
||||||
|
backgroundOpacity: slide.getAttribute( 'data-background-opacity' ),
|
||||||
|
};
|
||||||
|
|
||||||
|
const dataPreload = slide.hasAttribute( 'data-preload' );
|
||||||
|
|
||||||
|
// Reset the prior background state in case this is not the
|
||||||
|
// initial sync
|
||||||
|
slide.classList.remove( 'has-dark-background' );
|
||||||
|
slide.classList.remove( 'has-light-background' );
|
||||||
|
|
||||||
|
element.removeAttribute( 'data-loaded' );
|
||||||
|
element.removeAttribute( 'data-background-hash' );
|
||||||
|
element.removeAttribute( 'data-background-size' );
|
||||||
|
element.removeAttribute( 'data-background-transition' );
|
||||||
|
element.style.backgroundColor = '';
|
||||||
|
|
||||||
|
contentElement.style.backgroundSize = '';
|
||||||
|
contentElement.style.backgroundRepeat = '';
|
||||||
|
contentElement.style.backgroundPosition = '';
|
||||||
|
contentElement.style.backgroundImage = '';
|
||||||
|
contentElement.style.opacity = '';
|
||||||
|
contentElement.innerHTML = '';
|
||||||
|
|
||||||
|
if( data.background ) {
|
||||||
|
// Auto-wrap image urls in url(...)
|
||||||
|
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp|webp)([?#\s]|$)/gi.test( data.background ) ) {
|
||||||
|
slide.setAttribute( 'data-background-image', data.background );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
element.style.background = data.background;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a hash for this combination of background settings.
|
||||||
|
// This is used to determine when two slide backgrounds are
|
||||||
|
// the same.
|
||||||
|
if( data.background || data.backgroundColor || data.backgroundGradient || data.backgroundImage || data.backgroundVideo || data.backgroundIframe ) {
|
||||||
|
element.setAttribute( 'data-background-hash', data.background +
|
||||||
|
data.backgroundSize +
|
||||||
|
data.backgroundImage +
|
||||||
|
data.backgroundVideo +
|
||||||
|
data.backgroundIframe +
|
||||||
|
data.backgroundColor +
|
||||||
|
data.backgroundGradient +
|
||||||
|
data.backgroundRepeat +
|
||||||
|
data.backgroundPosition +
|
||||||
|
data.backgroundTransition +
|
||||||
|
data.backgroundOpacity );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Additional and optional background properties
|
||||||
|
if( data.backgroundSize ) element.setAttribute( 'data-background-size', data.backgroundSize );
|
||||||
|
if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor;
|
||||||
|
if( data.backgroundGradient ) element.style.backgroundImage = data.backgroundGradient;
|
||||||
|
if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition );
|
||||||
|
|
||||||
|
if( dataPreload ) element.setAttribute( 'data-preload', '' );
|
||||||
|
|
||||||
|
// Background image options are set on the content wrapper
|
||||||
|
if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize;
|
||||||
|
if( data.backgroundRepeat ) contentElement.style.backgroundRepeat = data.backgroundRepeat;
|
||||||
|
if( data.backgroundPosition ) contentElement.style.backgroundPosition = data.backgroundPosition;
|
||||||
|
if( data.backgroundOpacity ) contentElement.style.opacity = data.backgroundOpacity;
|
||||||
|
|
||||||
|
// If this slide has a background color, we add a class that
|
||||||
|
// signals if it is light or dark. If the slide has no background
|
||||||
|
// color, no class will be added
|
||||||
|
let contrastColor = data.backgroundColor;
|
||||||
|
|
||||||
|
// If no bg color was found, or it cannot be converted by colorToRgb, check the computed background
|
||||||
|
if( !contrastColor || !colorToRgb( contrastColor ) ) {
|
||||||
|
let computedBackgroundStyle = window.getComputedStyle( element );
|
||||||
|
if( computedBackgroundStyle && computedBackgroundStyle.backgroundColor ) {
|
||||||
|
contrastColor = computedBackgroundStyle.backgroundColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( contrastColor ) {
|
||||||
|
const rgb = colorToRgb( contrastColor );
|
||||||
|
|
||||||
|
// Ignore fully transparent backgrounds. Some browsers return
|
||||||
|
// rgba(0,0,0,0) when reading the computed background color of
|
||||||
|
// an element with no background
|
||||||
|
if( rgb && rgb.a !== 0 ) {
|
||||||
|
if( colorBrightness( contrastColor ) < 128 ) {
|
||||||
|
slide.classList.add( 'has-dark-background' );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
slide.classList.add( 'has-light-background' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the background elements to reflect the current
|
||||||
|
* slide.
|
||||||
|
*
|
||||||
|
* @param {boolean} includeAll If true, the backgrounds of
|
||||||
|
* all vertical slides (not just the present) will be updated.
|
||||||
|
*/
|
||||||
|
update( includeAll = false ) {
|
||||||
|
|
||||||
|
let currentSlide = this.Reveal.getCurrentSlide();
|
||||||
|
let indices = this.Reveal.getIndices();
|
||||||
|
|
||||||
|
let currentBackground = null;
|
||||||
|
|
||||||
|
// Reverse past/future classes when in RTL mode
|
||||||
|
let horizontalPast = this.Reveal.getConfig().rtl ? 'future' : 'past',
|
||||||
|
horizontalFuture = this.Reveal.getConfig().rtl ? 'past' : 'future';
|
||||||
|
|
||||||
|
// Update the classes of all backgrounds to match the
|
||||||
|
// states of their slides (past/present/future)
|
||||||
|
Array.from( this.element.childNodes ).forEach( ( backgroundh, h ) => {
|
||||||
|
|
||||||
|
backgroundh.classList.remove( 'past', 'present', 'future' );
|
||||||
|
|
||||||
|
if( h < indices.h ) {
|
||||||
|
backgroundh.classList.add( horizontalPast );
|
||||||
|
}
|
||||||
|
else if ( h > indices.h ) {
|
||||||
|
backgroundh.classList.add( horizontalFuture );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
backgroundh.classList.add( 'present' );
|
||||||
|
|
||||||
|
// Store a reference to the current background element
|
||||||
|
currentBackground = backgroundh;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( includeAll || h === indices.h ) {
|
||||||
|
queryAll( backgroundh, '.slide-background' ).forEach( ( backgroundv, v ) => {
|
||||||
|
|
||||||
|
backgroundv.classList.remove( 'past', 'present', 'future' );
|
||||||
|
|
||||||
|
if( v < indices.v ) {
|
||||||
|
backgroundv.classList.add( 'past' );
|
||||||
|
}
|
||||||
|
else if ( v > indices.v ) {
|
||||||
|
backgroundv.classList.add( 'future' );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
backgroundv.classList.add( 'present' );
|
||||||
|
|
||||||
|
// Only if this is the present horizontal and vertical slide
|
||||||
|
if( h === indices.h ) currentBackground = backgroundv;
|
||||||
|
}
|
||||||
|
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Stop content inside of previous backgrounds
|
||||||
|
if( this.previousBackground ) {
|
||||||
|
|
||||||
|
this.Reveal.slideContent.stopEmbeddedContent( this.previousBackground, { unloadIframes: !this.Reveal.slideContent.shouldPreload( this.previousBackground ) } );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start content in the current background
|
||||||
|
if( currentBackground ) {
|
||||||
|
|
||||||
|
this.Reveal.slideContent.startEmbeddedContent( currentBackground );
|
||||||
|
|
||||||
|
let currentBackgroundContent = currentBackground.querySelector( '.slide-background-content' );
|
||||||
|
if( currentBackgroundContent ) {
|
||||||
|
|
||||||
|
let backgroundImageURL = currentBackgroundContent.style.backgroundImage || '';
|
||||||
|
|
||||||
|
// Restart GIFs (doesn't work in Firefox)
|
||||||
|
if( /\.gif/i.test( backgroundImageURL ) ) {
|
||||||
|
currentBackgroundContent.style.backgroundImage = '';
|
||||||
|
window.getComputedStyle( currentBackgroundContent ).opacity;
|
||||||
|
currentBackgroundContent.style.backgroundImage = backgroundImageURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't transition between identical backgrounds. This
|
||||||
|
// prevents unwanted flicker.
|
||||||
|
let previousBackgroundHash = this.previousBackground ? this.previousBackground.getAttribute( 'data-background-hash' ) : null;
|
||||||
|
let currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' );
|
||||||
|
if( currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== this.previousBackground ) {
|
||||||
|
this.element.classList.add( 'no-transition' );
|
||||||
|
}
|
||||||
|
|
||||||
|
this.previousBackground = currentBackground;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there's a background brightness flag for this slide,
|
||||||
|
// bubble it to the .reveal container
|
||||||
|
if( currentSlide ) {
|
||||||
|
[ 'has-light-background', 'has-dark-background' ].forEach( classToBubble => {
|
||||||
|
if( currentSlide.classList.contains( classToBubble ) ) {
|
||||||
|
this.Reveal.getRevealElement().classList.add( classToBubble );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.getRevealElement().classList.remove( classToBubble );
|
||||||
|
}
|
||||||
|
}, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow the first background to apply without transition
|
||||||
|
setTimeout( () => {
|
||||||
|
this.element.classList.remove( 'no-transition' );
|
||||||
|
}, 1 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the position of the parallax background based
|
||||||
|
* on the current slide index.
|
||||||
|
*/
|
||||||
|
updateParallax() {
|
||||||
|
|
||||||
|
let indices = this.Reveal.getIndices();
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().parallaxBackgroundImage ) {
|
||||||
|
|
||||||
|
let horizontalSlides = this.Reveal.getHorizontalSlides(),
|
||||||
|
verticalSlides = this.Reveal.getVerticalSlides();
|
||||||
|
|
||||||
|
let backgroundSize = this.element.style.backgroundSize.split( ' ' ),
|
||||||
|
backgroundWidth, backgroundHeight;
|
||||||
|
|
||||||
|
if( backgroundSize.length === 1 ) {
|
||||||
|
backgroundWidth = backgroundHeight = parseInt( backgroundSize[0], 10 );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
backgroundWidth = parseInt( backgroundSize[0], 10 );
|
||||||
|
backgroundHeight = parseInt( backgroundSize[1], 10 );
|
||||||
|
}
|
||||||
|
|
||||||
|
let slideWidth = this.element.offsetWidth,
|
||||||
|
horizontalSlideCount = horizontalSlides.length,
|
||||||
|
horizontalOffsetMultiplier,
|
||||||
|
horizontalOffset;
|
||||||
|
|
||||||
|
if( typeof this.Reveal.getConfig().parallaxBackgroundHorizontal === 'number' ) {
|
||||||
|
horizontalOffsetMultiplier = this.Reveal.getConfig().parallaxBackgroundHorizontal;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
horizontalOffsetMultiplier = horizontalSlideCount > 1 ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
horizontalOffset = horizontalOffsetMultiplier * indices.h * -1;
|
||||||
|
|
||||||
|
let slideHeight = this.element.offsetHeight,
|
||||||
|
verticalSlideCount = verticalSlides.length,
|
||||||
|
verticalOffsetMultiplier,
|
||||||
|
verticalOffset;
|
||||||
|
|
||||||
|
if( typeof this.Reveal.getConfig().parallaxBackgroundVertical === 'number' ) {
|
||||||
|
verticalOffsetMultiplier = this.Reveal.getConfig().parallaxBackgroundVertical;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
verticalOffsetMultiplier = ( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
verticalOffset = verticalSlideCount > 0 ? verticalOffsetMultiplier * indices.v : 0;
|
||||||
|
|
||||||
|
this.element.style.backgroundPosition = horizontalOffset + 'px ' + -verticalOffset + 'px';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
this.element.remove();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
266
js/controllers/controls.js
vendored
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
import { queryAll } from '../utils/util.js'
|
||||||
|
import { isAndroid } from '../utils/device.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manages our presentation controls. This includes both
|
||||||
|
* the built-in control arrows as well as event monitoring
|
||||||
|
* of any elements within the presentation with either of the
|
||||||
|
* following helper classes:
|
||||||
|
* - .navigate-up
|
||||||
|
* - .navigate-right
|
||||||
|
* - .navigate-down
|
||||||
|
* - .navigate-left
|
||||||
|
* - .navigate-next
|
||||||
|
* - .navigate-prev
|
||||||
|
*/
|
||||||
|
export default class Controls {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
this.onNavigateLeftClicked = this.onNavigateLeftClicked.bind( this );
|
||||||
|
this.onNavigateRightClicked = this.onNavigateRightClicked.bind( this );
|
||||||
|
this.onNavigateUpClicked = this.onNavigateUpClicked.bind( this );
|
||||||
|
this.onNavigateDownClicked = this.onNavigateDownClicked.bind( this );
|
||||||
|
this.onNavigatePrevClicked = this.onNavigatePrevClicked.bind( this );
|
||||||
|
this.onNavigateNextClicked = this.onNavigateNextClicked.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
const rtl = this.Reveal.getConfig().rtl;
|
||||||
|
const revealElement = this.Reveal.getRevealElement();
|
||||||
|
|
||||||
|
this.element = document.createElement( 'aside' );
|
||||||
|
this.element.className = 'controls';
|
||||||
|
this.element.innerHTML =
|
||||||
|
`<button class="navigate-left" aria-label="${ rtl ? 'next slide' : 'previous slide' }"><div class="controls-arrow"></div></button>
|
||||||
|
<button class="navigate-right" aria-label="${ rtl ? 'previous slide' : 'next slide' }"><div class="controls-arrow"></div></button>
|
||||||
|
<button class="navigate-up" aria-label="above slide"><div class="controls-arrow"></div></button>
|
||||||
|
<button class="navigate-down" aria-label="below slide"><div class="controls-arrow"></div></button>`;
|
||||||
|
|
||||||
|
this.Reveal.getRevealElement().appendChild( this.element );
|
||||||
|
|
||||||
|
// There can be multiple instances of controls throughout the page
|
||||||
|
this.controlsLeft = queryAll( revealElement, '.navigate-left' );
|
||||||
|
this.controlsRight = queryAll( revealElement, '.navigate-right' );
|
||||||
|
this.controlsUp = queryAll( revealElement, '.navigate-up' );
|
||||||
|
this.controlsDown = queryAll( revealElement, '.navigate-down' );
|
||||||
|
this.controlsPrev = queryAll( revealElement, '.navigate-prev' );
|
||||||
|
this.controlsNext = queryAll( revealElement, '.navigate-next' );
|
||||||
|
|
||||||
|
// The left, right and down arrows in the standard reveal.js controls
|
||||||
|
this.controlsRightArrow = this.element.querySelector( '.navigate-right' );
|
||||||
|
this.controlsLeftArrow = this.element.querySelector( '.navigate-left' );
|
||||||
|
this.controlsDownArrow = this.element.querySelector( '.navigate-down' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the reveal.js config is updated.
|
||||||
|
*/
|
||||||
|
configure( config, oldConfig ) {
|
||||||
|
|
||||||
|
this.element.style.display = config.controls ? 'block' : 'none';
|
||||||
|
|
||||||
|
this.element.setAttribute( 'data-controls-layout', config.controlsLayout );
|
||||||
|
this.element.setAttribute( 'data-controls-back-arrows', config.controlsBackArrows );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bind() {
|
||||||
|
|
||||||
|
// Listen to both touch and click events, in case the device
|
||||||
|
// supports both
|
||||||
|
let pointerEvents = [ 'touchstart', 'click' ];
|
||||||
|
|
||||||
|
// Only support touch for Android, fixes double navigations in
|
||||||
|
// stock browser
|
||||||
|
if( isAndroid ) {
|
||||||
|
pointerEvents = [ 'touchstart' ];
|
||||||
|
}
|
||||||
|
|
||||||
|
pointerEvents.forEach( eventName => {
|
||||||
|
this.controlsLeft.forEach( el => el.addEventListener( eventName, this.onNavigateLeftClicked, false ) );
|
||||||
|
this.controlsRight.forEach( el => el.addEventListener( eventName, this.onNavigateRightClicked, false ) );
|
||||||
|
this.controlsUp.forEach( el => el.addEventListener( eventName, this.onNavigateUpClicked, false ) );
|
||||||
|
this.controlsDown.forEach( el => el.addEventListener( eventName, this.onNavigateDownClicked, false ) );
|
||||||
|
this.controlsPrev.forEach( el => el.addEventListener( eventName, this.onNavigatePrevClicked, false ) );
|
||||||
|
this.controlsNext.forEach( el => el.addEventListener( eventName, this.onNavigateNextClicked, false ) );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
unbind() {
|
||||||
|
|
||||||
|
[ 'touchstart', 'click' ].forEach( eventName => {
|
||||||
|
this.controlsLeft.forEach( el => el.removeEventListener( eventName, this.onNavigateLeftClicked, false ) );
|
||||||
|
this.controlsRight.forEach( el => el.removeEventListener( eventName, this.onNavigateRightClicked, false ) );
|
||||||
|
this.controlsUp.forEach( el => el.removeEventListener( eventName, this.onNavigateUpClicked, false ) );
|
||||||
|
this.controlsDown.forEach( el => el.removeEventListener( eventName, this.onNavigateDownClicked, false ) );
|
||||||
|
this.controlsPrev.forEach( el => el.removeEventListener( eventName, this.onNavigatePrevClicked, false ) );
|
||||||
|
this.controlsNext.forEach( el => el.removeEventListener( eventName, this.onNavigateNextClicked, false ) );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the state of all control/navigation arrows.
|
||||||
|
*/
|
||||||
|
update() {
|
||||||
|
|
||||||
|
let routes = this.Reveal.availableRoutes();
|
||||||
|
|
||||||
|
// Remove the 'enabled' class from all directions
|
||||||
|
[...this.controlsLeft, ...this.controlsRight, ...this.controlsUp, ...this.controlsDown, ...this.controlsPrev, ...this.controlsNext].forEach( node => {
|
||||||
|
node.classList.remove( 'enabled', 'fragmented' );
|
||||||
|
|
||||||
|
// Set 'disabled' attribute on all directions
|
||||||
|
node.setAttribute( 'disabled', 'disabled' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Add the 'enabled' class to the available routes; remove 'disabled' attribute to enable buttons
|
||||||
|
if( routes.left ) this.controlsLeft.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );
|
||||||
|
if( routes.right ) this.controlsRight.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );
|
||||||
|
if( routes.up ) this.controlsUp.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );
|
||||||
|
if( routes.down ) this.controlsDown.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );
|
||||||
|
|
||||||
|
// Prev/next buttons
|
||||||
|
if( routes.left || routes.up ) this.controlsPrev.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );
|
||||||
|
if( routes.right || routes.down ) this.controlsNext.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );
|
||||||
|
|
||||||
|
// Highlight fragment directions
|
||||||
|
let currentSlide = this.Reveal.getCurrentSlide();
|
||||||
|
if( currentSlide ) {
|
||||||
|
|
||||||
|
let fragmentsRoutes = this.Reveal.fragments.availableRoutes();
|
||||||
|
|
||||||
|
// Always apply fragment decorator to prev/next buttons
|
||||||
|
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' ); } );
|
||||||
|
|
||||||
|
// Apply fragment decorators to directional buttons based on
|
||||||
|
// what slide axis they are in
|
||||||
|
if( this.Reveal.isVerticalSlide( currentSlide ) ) {
|
||||||
|
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' ); } );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if( fragmentsRoutes.prev ) this.controlsLeft.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );
|
||||||
|
if( fragmentsRoutes.next ) this.controlsRight.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().controlsTutorial ) {
|
||||||
|
|
||||||
|
let indices = this.Reveal.getIndices();
|
||||||
|
|
||||||
|
// Highlight control arrows with an animation to ensure
|
||||||
|
// that the viewer knows how to navigate
|
||||||
|
if( !this.Reveal.hasNavigatedVertically() && routes.down ) {
|
||||||
|
this.controlsDownArrow.classList.add( 'highlight' );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.controlsDownArrow.classList.remove( 'highlight' );
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().rtl ) {
|
||||||
|
|
||||||
|
if( !this.Reveal.hasNavigatedHorizontally() && routes.left && indices.v === 0 ) {
|
||||||
|
this.controlsLeftArrow.classList.add( 'highlight' );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.controlsLeftArrow.classList.remove( 'highlight' );
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if( !this.Reveal.hasNavigatedHorizontally() && routes.right && indices.v === 0 ) {
|
||||||
|
this.controlsRightArrow.classList.add( 'highlight' );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.controlsRightArrow.classList.remove( 'highlight' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
this.unbind();
|
||||||
|
this.element.remove();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handlers for navigation control buttons.
|
||||||
|
*/
|
||||||
|
onNavigateLeftClicked( event ) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
this.Reveal.onUserInput();
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().navigationMode === 'linear' ) {
|
||||||
|
this.Reveal.prev();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.left();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onNavigateRightClicked( event ) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
this.Reveal.onUserInput();
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().navigationMode === 'linear' ) {
|
||||||
|
this.Reveal.next();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.right();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onNavigateUpClicked( event ) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
this.Reveal.onUserInput();
|
||||||
|
|
||||||
|
this.Reveal.up();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onNavigateDownClicked( event ) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
this.Reveal.onUserInput();
|
||||||
|
|
||||||
|
this.Reveal.down();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onNavigatePrevClicked( event ) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
this.Reveal.onUserInput();
|
||||||
|
|
||||||
|
this.Reveal.prev();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onNavigateNextClicked( event ) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
this.Reveal.onUserInput();
|
||||||
|
|
||||||
|
this.Reveal.next();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
103
js/controllers/focus.js
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
import { closest } from '../utils/util.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manages focus when a presentation is embedded. This
|
||||||
|
* helps us only capture keyboard from the presentation
|
||||||
|
* a user is currently interacting with in a page where
|
||||||
|
* multiple presentations are embedded.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const STATE_FOCUS = 'focus';
|
||||||
|
const STATE_BLUR = 'blur';
|
||||||
|
|
||||||
|
export default class Focus {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
this.onRevealPointerDown = this.onRevealPointerDown.bind( this );
|
||||||
|
this.onDocumentPointerDown = this.onDocumentPointerDown.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the reveal.js config is updated.
|
||||||
|
*/
|
||||||
|
configure( config, oldConfig ) {
|
||||||
|
|
||||||
|
if( config.embedded ) {
|
||||||
|
this.blur();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.focus();
|
||||||
|
this.unbind();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bind() {
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().embedded ) {
|
||||||
|
this.Reveal.getRevealElement().addEventListener( 'pointerdown', this.onRevealPointerDown, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
unbind() {
|
||||||
|
|
||||||
|
this.Reveal.getRevealElement().removeEventListener( 'pointerdown', this.onRevealPointerDown, false );
|
||||||
|
document.removeEventListener( 'pointerdown', this.onDocumentPointerDown, false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
focus() {
|
||||||
|
|
||||||
|
if( this.state !== STATE_FOCUS ) {
|
||||||
|
this.Reveal.getRevealElement().classList.add( 'focused' );
|
||||||
|
document.addEventListener( 'pointerdown', this.onDocumentPointerDown, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
this.state = STATE_FOCUS;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
blur() {
|
||||||
|
|
||||||
|
if( this.state !== STATE_BLUR ) {
|
||||||
|
this.Reveal.getRevealElement().classList.remove( 'focused' );
|
||||||
|
document.removeEventListener( 'pointerdown', this.onDocumentPointerDown, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
this.state = STATE_BLUR;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
isFocused() {
|
||||||
|
|
||||||
|
return this.state === STATE_FOCUS;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
this.Reveal.getRevealElement().classList.remove( 'focused' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onRevealPointerDown( event ) {
|
||||||
|
|
||||||
|
this.focus();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onDocumentPointerDown( event ) {
|
||||||
|
|
||||||
|
let revealElement = closest( event.target, '.reveal' );
|
||||||
|
if( !revealElement || revealElement !== this.Reveal.getRevealElement() ) {
|
||||||
|
this.blur();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
376
js/controllers/fragments.js
Normal file
@ -0,0 +1,376 @@
|
|||||||
|
import { extend, queryAll } from '../utils/util.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles sorting and navigation of slide fragments.
|
||||||
|
* Fragments are elements within a slide that are
|
||||||
|
* revealed/animated incrementally.
|
||||||
|
*/
|
||||||
|
export default class Fragments {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the reveal.js config is updated.
|
||||||
|
*/
|
||||||
|
configure( config, oldConfig ) {
|
||||||
|
|
||||||
|
if( config.fragments === false ) {
|
||||||
|
this.disable();
|
||||||
|
}
|
||||||
|
else if( oldConfig.fragments === false ) {
|
||||||
|
this.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If fragments are disabled in the deck, they should all be
|
||||||
|
* visible rather than stepped through.
|
||||||
|
*/
|
||||||
|
disable() {
|
||||||
|
|
||||||
|
queryAll( this.Reveal.getSlidesElement(), '.fragment' ).forEach( element => {
|
||||||
|
element.classList.add( 'visible' );
|
||||||
|
element.classList.remove( 'current-fragment' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse of #disable(). Only called if fragments have
|
||||||
|
* previously been disabled.
|
||||||
|
*/
|
||||||
|
enable() {
|
||||||
|
|
||||||
|
queryAll( this.Reveal.getSlidesElement(), '.fragment' ).forEach( element => {
|
||||||
|
element.classList.remove( 'visible' );
|
||||||
|
element.classList.remove( 'current-fragment' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an object describing the available fragment
|
||||||
|
* directions.
|
||||||
|
*
|
||||||
|
* @return {{prev: boolean, next: boolean}}
|
||||||
|
*/
|
||||||
|
availableRoutes() {
|
||||||
|
|
||||||
|
let currentSlide = this.Reveal.getCurrentSlide();
|
||||||
|
if( currentSlide && this.Reveal.getConfig().fragments ) {
|
||||||
|
let fragments = currentSlide.querySelectorAll( '.fragment:not(.disabled)' );
|
||||||
|
let hiddenFragments = currentSlide.querySelectorAll( '.fragment:not(.disabled):not(.visible)' );
|
||||||
|
|
||||||
|
return {
|
||||||
|
prev: fragments.length - hiddenFragments.length > 0,
|
||||||
|
next: !!hiddenFragments.length
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return { prev: false, next: false };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a sorted fragments list, ordered by an increasing
|
||||||
|
* "data-fragment-index" attribute.
|
||||||
|
*
|
||||||
|
* Fragments will be revealed in the order that they are returned by
|
||||||
|
* this function, so you can use the index attributes to control the
|
||||||
|
* order of fragment appearance.
|
||||||
|
*
|
||||||
|
* To maintain a sensible default fragment order, fragments are presumed
|
||||||
|
* to be passed in document order. This function adds a "fragment-index"
|
||||||
|
* attribute to each node if such an attribute is not already present,
|
||||||
|
* and sets that attribute to an integer value which is the position of
|
||||||
|
* the fragment within the fragments list.
|
||||||
|
*
|
||||||
|
* @param {object[]|*} fragments
|
||||||
|
* @param {boolean} grouped If true the returned array will contain
|
||||||
|
* nested arrays for all fragments with the same index
|
||||||
|
* @return {object[]} sorted Sorted array of fragments
|
||||||
|
*/
|
||||||
|
sort( fragments, grouped = false ) {
|
||||||
|
|
||||||
|
fragments = Array.from( fragments );
|
||||||
|
|
||||||
|
let ordered = [],
|
||||||
|
unordered = [],
|
||||||
|
sorted = [];
|
||||||
|
|
||||||
|
// Group ordered and unordered elements
|
||||||
|
fragments.forEach( fragment => {
|
||||||
|
if( fragment.hasAttribute( 'data-fragment-index' ) ) {
|
||||||
|
let index = parseInt( fragment.getAttribute( 'data-fragment-index' ), 10 );
|
||||||
|
|
||||||
|
if( !ordered[index] ) {
|
||||||
|
ordered[index] = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
ordered[index].push( fragment );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
unordered.push( [ fragment ] );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Append fragments without explicit indices in their
|
||||||
|
// DOM order
|
||||||
|
ordered = ordered.concat( unordered );
|
||||||
|
|
||||||
|
// Manually count the index up per group to ensure there
|
||||||
|
// are no gaps
|
||||||
|
let index = 0;
|
||||||
|
|
||||||
|
// Push all fragments in their sorted order to an array,
|
||||||
|
// this flattens the groups
|
||||||
|
ordered.forEach( group => {
|
||||||
|
group.forEach( fragment => {
|
||||||
|
sorted.push( fragment );
|
||||||
|
fragment.setAttribute( 'data-fragment-index', index );
|
||||||
|
} );
|
||||||
|
|
||||||
|
index ++;
|
||||||
|
} );
|
||||||
|
|
||||||
|
return grouped === true ? ordered : sorted;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sorts and formats all of fragments in the
|
||||||
|
* presentation.
|
||||||
|
*/
|
||||||
|
sortAll() {
|
||||||
|
|
||||||
|
this.Reveal.getHorizontalSlides().forEach( horizontalSlide => {
|
||||||
|
|
||||||
|
let verticalSlides = queryAll( horizontalSlide, 'section' );
|
||||||
|
verticalSlides.forEach( ( verticalSlide, y ) => {
|
||||||
|
|
||||||
|
this.sort( verticalSlide.querySelectorAll( '.fragment' ) );
|
||||||
|
|
||||||
|
}, this );
|
||||||
|
|
||||||
|
if( verticalSlides.length === 0 ) this.sort( horizontalSlide.querySelectorAll( '.fragment' ) );
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refreshes the fragments on the current slide so that they
|
||||||
|
* have the appropriate classes (.visible + .current-fragment).
|
||||||
|
*
|
||||||
|
* @param {number} [index] The index of the current fragment
|
||||||
|
* @param {array} [fragments] Array containing all fragments
|
||||||
|
* in the current slide
|
||||||
|
*
|
||||||
|
* @return {{shown: array, hidden: array}}
|
||||||
|
*/
|
||||||
|
update( index, fragments ) {
|
||||||
|
|
||||||
|
let changedFragments = {
|
||||||
|
shown: [],
|
||||||
|
hidden: []
|
||||||
|
};
|
||||||
|
|
||||||
|
let currentSlide = this.Reveal.getCurrentSlide();
|
||||||
|
if( currentSlide && this.Reveal.getConfig().fragments ) {
|
||||||
|
|
||||||
|
fragments = fragments || this.sort( currentSlide.querySelectorAll( '.fragment' ) );
|
||||||
|
|
||||||
|
if( fragments.length ) {
|
||||||
|
|
||||||
|
let maxIndex = 0;
|
||||||
|
|
||||||
|
if( typeof index !== 'number' ) {
|
||||||
|
let currentFragment = this.sort( currentSlide.querySelectorAll( '.fragment.visible' ) ).pop();
|
||||||
|
if( currentFragment ) {
|
||||||
|
index = parseInt( currentFragment.getAttribute( 'data-fragment-index' ) || 0, 10 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Array.from( fragments ).forEach( ( el, i ) => {
|
||||||
|
|
||||||
|
if( el.hasAttribute( 'data-fragment-index' ) ) {
|
||||||
|
i = parseInt( el.getAttribute( 'data-fragment-index' ), 10 );
|
||||||
|
}
|
||||||
|
|
||||||
|
maxIndex = Math.max( maxIndex, i );
|
||||||
|
|
||||||
|
// Visible fragments
|
||||||
|
if( i <= index ) {
|
||||||
|
let wasVisible = el.classList.contains( 'visible' )
|
||||||
|
el.classList.add( 'visible' );
|
||||||
|
el.classList.remove( 'current-fragment' );
|
||||||
|
|
||||||
|
if( i === index ) {
|
||||||
|
// Announce the fragments one by one to the Screen Reader
|
||||||
|
this.Reveal.announceStatus( this.Reveal.getStatusText( el ) );
|
||||||
|
|
||||||
|
el.classList.add( 'current-fragment' );
|
||||||
|
this.Reveal.slideContent.startEmbeddedContent( el );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !wasVisible ) {
|
||||||
|
changedFragments.shown.push( el )
|
||||||
|
this.Reveal.dispatchEvent({
|
||||||
|
target: el,
|
||||||
|
type: 'visible',
|
||||||
|
bubbles: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Hidden fragments
|
||||||
|
else {
|
||||||
|
let wasVisible = el.classList.contains( 'visible' )
|
||||||
|
el.classList.remove( 'visible' );
|
||||||
|
el.classList.remove( 'current-fragment' );
|
||||||
|
|
||||||
|
if( wasVisible ) {
|
||||||
|
this.Reveal.slideContent.stopEmbeddedContent( el );
|
||||||
|
changedFragments.hidden.push( el );
|
||||||
|
this.Reveal.dispatchEvent({
|
||||||
|
target: el,
|
||||||
|
type: 'hidden',
|
||||||
|
bubbles: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Write the current fragment index to the slide <section>.
|
||||||
|
// This can be used by end users to apply styles based on
|
||||||
|
// the current fragment index.
|
||||||
|
index = typeof index === 'number' ? index : -1;
|
||||||
|
index = Math.max( Math.min( index, maxIndex ), -1 );
|
||||||
|
currentSlide.setAttribute( 'data-fragment', index );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return changedFragments;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formats the fragments on the given slide so that they have
|
||||||
|
* valid indices. Call this if fragments are changed in the DOM
|
||||||
|
* after reveal.js has already initialized.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} slide
|
||||||
|
* @return {Array} a list of the HTML fragments that were synced
|
||||||
|
*/
|
||||||
|
sync( slide = this.Reveal.getCurrentSlide() ) {
|
||||||
|
|
||||||
|
return this.sort( slide.querySelectorAll( '.fragment' ) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigate to the specified slide fragment.
|
||||||
|
*
|
||||||
|
* @param {?number} index The index of the fragment that
|
||||||
|
* should be shown, -1 means all are invisible
|
||||||
|
* @param {number} offset Integer offset to apply to the
|
||||||
|
* fragment index
|
||||||
|
*
|
||||||
|
* @return {boolean} true if a change was made in any
|
||||||
|
* fragments visibility as part of this call
|
||||||
|
*/
|
||||||
|
goto( index, offset = 0 ) {
|
||||||
|
|
||||||
|
let currentSlide = this.Reveal.getCurrentSlide();
|
||||||
|
if( currentSlide && this.Reveal.getConfig().fragments ) {
|
||||||
|
|
||||||
|
let fragments = this.sort( currentSlide.querySelectorAll( '.fragment:not(.disabled)' ) );
|
||||||
|
if( fragments.length ) {
|
||||||
|
|
||||||
|
// If no index is specified, find the current
|
||||||
|
if( typeof index !== 'number' ) {
|
||||||
|
let lastVisibleFragment = this.sort( currentSlide.querySelectorAll( '.fragment:not(.disabled).visible' ) ).pop();
|
||||||
|
|
||||||
|
if( lastVisibleFragment ) {
|
||||||
|
index = parseInt( lastVisibleFragment.getAttribute( 'data-fragment-index' ) || 0, 10 );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
index = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply the offset if there is one
|
||||||
|
index += offset;
|
||||||
|
|
||||||
|
let changedFragments = this.update( index, fragments );
|
||||||
|
|
||||||
|
if( changedFragments.hidden.length ) {
|
||||||
|
this.Reveal.dispatchEvent({
|
||||||
|
type: 'fragmenthidden',
|
||||||
|
data: {
|
||||||
|
fragment: changedFragments.hidden[0],
|
||||||
|
fragments: changedFragments.hidden
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if( changedFragments.shown.length ) {
|
||||||
|
this.Reveal.dispatchEvent({
|
||||||
|
type: 'fragmentshown',
|
||||||
|
data: {
|
||||||
|
fragment: changedFragments.shown[0],
|
||||||
|
fragments: changedFragments.shown
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Reveal.controls.update();
|
||||||
|
this.Reveal.progress.update();
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().fragmentInURL ) {
|
||||||
|
this.Reveal.location.writeURL();
|
||||||
|
}
|
||||||
|
|
||||||
|
return !!( changedFragments.shown.length || changedFragments.hidden.length );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigate to the next slide fragment.
|
||||||
|
*
|
||||||
|
* @return {boolean} true if there was a next fragment,
|
||||||
|
* false otherwise
|
||||||
|
*/
|
||||||
|
next() {
|
||||||
|
|
||||||
|
return this.goto( null, 1 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigate to the previous slide fragment.
|
||||||
|
*
|
||||||
|
* @return {boolean} true if there was a previous fragment,
|
||||||
|
* false otherwise
|
||||||
|
*/
|
||||||
|
prev() {
|
||||||
|
|
||||||
|
return this.goto( null, -1 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
392
js/controllers/keyboard.js
Normal file
@ -0,0 +1,392 @@
|
|||||||
|
import { enterFullscreen } from '../utils/util.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles all reveal.js keyboard interactions.
|
||||||
|
*/
|
||||||
|
export default class Keyboard {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
// A key:value map of keyboard keys and descriptions of
|
||||||
|
// the actions they trigger
|
||||||
|
this.shortcuts = {};
|
||||||
|
|
||||||
|
// Holds custom key code mappings
|
||||||
|
this.bindings = {};
|
||||||
|
|
||||||
|
this.onDocumentKeyDown = this.onDocumentKeyDown.bind( this );
|
||||||
|
this.onDocumentKeyPress = this.onDocumentKeyPress.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the reveal.js config is updated.
|
||||||
|
*/
|
||||||
|
configure( config, oldConfig ) {
|
||||||
|
|
||||||
|
if( config.navigationMode === 'linear' ) {
|
||||||
|
this.shortcuts['→ , ↓ , SPACE , N , L , J'] = 'Next slide';
|
||||||
|
this.shortcuts['← , ↑ , P , H , K'] = 'Previous slide';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.shortcuts['N , SPACE'] = 'Next slide';
|
||||||
|
this.shortcuts['P , Shift SPACE'] = 'Previous slide';
|
||||||
|
this.shortcuts['← , H'] = 'Navigate left';
|
||||||
|
this.shortcuts['→ , L'] = 'Navigate right';
|
||||||
|
this.shortcuts['↑ , K'] = 'Navigate up';
|
||||||
|
this.shortcuts['↓ , J'] = 'Navigate down';
|
||||||
|
}
|
||||||
|
|
||||||
|
this.shortcuts['Alt + ←/↑/→/↓'] = 'Navigate without fragments';
|
||||||
|
this.shortcuts['Shift + ←/↑/→/↓'] = 'Jump to first/last slide';
|
||||||
|
this.shortcuts['B , .'] = 'Pause';
|
||||||
|
this.shortcuts['F'] = 'Fullscreen';
|
||||||
|
this.shortcuts['ESC, O'] = 'Slide overview';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts listening for keyboard events.
|
||||||
|
*/
|
||||||
|
bind() {
|
||||||
|
|
||||||
|
document.addEventListener( 'keydown', this.onDocumentKeyDown, false );
|
||||||
|
document.addEventListener( 'keypress', this.onDocumentKeyPress, false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops listening for keyboard events.
|
||||||
|
*/
|
||||||
|
unbind() {
|
||||||
|
|
||||||
|
document.removeEventListener( 'keydown', this.onDocumentKeyDown, false );
|
||||||
|
document.removeEventListener( 'keypress', this.onDocumentKeyPress, false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a custom key binding with optional description to
|
||||||
|
* be added to the help screen.
|
||||||
|
*/
|
||||||
|
addKeyBinding( binding, callback ) {
|
||||||
|
|
||||||
|
if( typeof binding === 'object' && binding.keyCode ) {
|
||||||
|
this.bindings[binding.keyCode] = {
|
||||||
|
callback: callback,
|
||||||
|
key: binding.key,
|
||||||
|
description: binding.description
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.bindings[binding] = {
|
||||||
|
callback: callback,
|
||||||
|
key: null,
|
||||||
|
description: null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the specified custom key binding.
|
||||||
|
*/
|
||||||
|
removeKeyBinding( keyCode ) {
|
||||||
|
|
||||||
|
delete this.bindings[keyCode];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Programmatically triggers a keyboard event
|
||||||
|
*
|
||||||
|
* @param {int} keyCode
|
||||||
|
*/
|
||||||
|
triggerKey( keyCode ) {
|
||||||
|
|
||||||
|
this.onDocumentKeyDown( { keyCode } );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a new shortcut to include in the help overlay
|
||||||
|
*
|
||||||
|
* @param {String} key
|
||||||
|
* @param {String} value
|
||||||
|
*/
|
||||||
|
registerKeyboardShortcut( key, value ) {
|
||||||
|
|
||||||
|
this.shortcuts[key] = value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getShortcuts() {
|
||||||
|
|
||||||
|
return this.shortcuts;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getBindings() {
|
||||||
|
|
||||||
|
return this.bindings;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for the document level 'keypress' event.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onDocumentKeyPress( event ) {
|
||||||
|
|
||||||
|
// Check if the pressed key is question mark
|
||||||
|
if( event.shiftKey && event.charCode === 63 ) {
|
||||||
|
this.Reveal.toggleHelp();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for the document level 'keydown' event.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onDocumentKeyDown( event ) {
|
||||||
|
|
||||||
|
let config = this.Reveal.getConfig();
|
||||||
|
|
||||||
|
// If there's a condition specified and it returns false,
|
||||||
|
// ignore this event
|
||||||
|
if( typeof config.keyboardCondition === 'function' && config.keyboardCondition(event) === false ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If keyboardCondition is set, only capture keyboard events
|
||||||
|
// for embedded decks when they are focused
|
||||||
|
if( config.keyboardCondition === 'focused' && !this.Reveal.isFocused() ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shorthand
|
||||||
|
let keyCode = event.keyCode;
|
||||||
|
|
||||||
|
// Remember if auto-sliding was paused so we can toggle it
|
||||||
|
let autoSlideWasPaused = !this.Reveal.isAutoSliding();
|
||||||
|
|
||||||
|
this.Reveal.onUserInput( event );
|
||||||
|
|
||||||
|
// Is there a focused element that could be using the keyboard?
|
||||||
|
let activeElementIsCE = document.activeElement && document.activeElement.isContentEditable === true;
|
||||||
|
let activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName );
|
||||||
|
let activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className);
|
||||||
|
|
||||||
|
// Whitelist certain modifiers for slide navigation shortcuts
|
||||||
|
let isNavigationKey = [32, 37, 38, 39, 40, 78, 80].indexOf( event.keyCode ) !== -1;
|
||||||
|
|
||||||
|
// Prevent all other events when a modifier is pressed
|
||||||
|
let unusedModifier = !( isNavigationKey && event.shiftKey || event.altKey ) &&
|
||||||
|
( event.shiftKey || event.altKey || event.ctrlKey || event.metaKey );
|
||||||
|
|
||||||
|
// Disregard the event if there's a focused element or a
|
||||||
|
// keyboard modifier key is present
|
||||||
|
if( activeElementIsCE || activeElementIsInput || activeElementIsNotes || unusedModifier ) return;
|
||||||
|
|
||||||
|
// While paused only allow resume keyboard events; 'b', 'v', '.'
|
||||||
|
let resumeKeyCodes = [66,86,190,191];
|
||||||
|
let key;
|
||||||
|
|
||||||
|
// Custom key bindings for togglePause should be able to resume
|
||||||
|
if( typeof config.keyboard === 'object' ) {
|
||||||
|
for( key in config.keyboard ) {
|
||||||
|
if( config.keyboard[key] === 'togglePause' ) {
|
||||||
|
resumeKeyCodes.push( parseInt( key, 10 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( this.Reveal.isPaused() && resumeKeyCodes.indexOf( keyCode ) === -1 ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use linear navigation if we're configured to OR if
|
||||||
|
// the presentation is one-dimensional
|
||||||
|
let useLinearMode = config.navigationMode === 'linear' || !this.Reveal.hasHorizontalSlides() || !this.Reveal.hasVerticalSlides();
|
||||||
|
|
||||||
|
let triggered = false;
|
||||||
|
|
||||||
|
// 1. User defined key bindings
|
||||||
|
if( typeof config.keyboard === 'object' ) {
|
||||||
|
|
||||||
|
for( key in config.keyboard ) {
|
||||||
|
|
||||||
|
// Check if this binding matches the pressed key
|
||||||
|
if( parseInt( key, 10 ) === keyCode ) {
|
||||||
|
|
||||||
|
let value = config.keyboard[ key ];
|
||||||
|
|
||||||
|
// Callback function
|
||||||
|
if( typeof value === 'function' ) {
|
||||||
|
value.apply( null, [ event ] );
|
||||||
|
}
|
||||||
|
// String shortcuts to reveal.js API
|
||||||
|
else if( typeof value === 'string' && typeof this.Reveal[ value ] === 'function' ) {
|
||||||
|
this.Reveal[ value ].call();
|
||||||
|
}
|
||||||
|
|
||||||
|
triggered = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Registered custom key bindings
|
||||||
|
if( triggered === false ) {
|
||||||
|
|
||||||
|
for( key in this.bindings ) {
|
||||||
|
|
||||||
|
// Check if this binding matches the pressed key
|
||||||
|
if( parseInt( key, 10 ) === keyCode ) {
|
||||||
|
|
||||||
|
let action = this.bindings[ key ].callback;
|
||||||
|
|
||||||
|
// Callback function
|
||||||
|
if( typeof action === 'function' ) {
|
||||||
|
action.apply( null, [ event ] );
|
||||||
|
}
|
||||||
|
// String shortcuts to reveal.js API
|
||||||
|
else if( typeof action === 'string' && typeof this.Reveal[ action ] === 'function' ) {
|
||||||
|
this.Reveal[ action ].call();
|
||||||
|
}
|
||||||
|
|
||||||
|
triggered = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. System defined key bindings
|
||||||
|
if( triggered === false ) {
|
||||||
|
|
||||||
|
// Assume true and try to prove false
|
||||||
|
triggered = true;
|
||||||
|
|
||||||
|
// P, PAGE UP
|
||||||
|
if( keyCode === 80 || keyCode === 33 ) {
|
||||||
|
this.Reveal.prev({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
// N, PAGE DOWN
|
||||||
|
else if( keyCode === 78 || keyCode === 34 ) {
|
||||||
|
this.Reveal.next({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
// H, LEFT
|
||||||
|
else if( keyCode === 72 || keyCode === 37 ) {
|
||||||
|
if( event.shiftKey ) {
|
||||||
|
this.Reveal.slide( 0 );
|
||||||
|
}
|
||||||
|
else if( !this.Reveal.overview.isActive() && useLinearMode ) {
|
||||||
|
this.Reveal.prev({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.left({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// L, RIGHT
|
||||||
|
else if( keyCode === 76 || keyCode === 39 ) {
|
||||||
|
if( event.shiftKey ) {
|
||||||
|
this.Reveal.slide( this.Reveal.getHorizontalSlides().length - 1 );
|
||||||
|
}
|
||||||
|
else if( !this.Reveal.overview.isActive() && useLinearMode ) {
|
||||||
|
this.Reveal.next({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.right({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// K, UP
|
||||||
|
else if( keyCode === 75 || keyCode === 38 ) {
|
||||||
|
if( event.shiftKey ) {
|
||||||
|
this.Reveal.slide( undefined, 0 );
|
||||||
|
}
|
||||||
|
else if( !this.Reveal.overview.isActive() && useLinearMode ) {
|
||||||
|
this.Reveal.prev({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.up({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// J, DOWN
|
||||||
|
else if( keyCode === 74 || keyCode === 40 ) {
|
||||||
|
if( event.shiftKey ) {
|
||||||
|
this.Reveal.slide( undefined, Number.MAX_VALUE );
|
||||||
|
}
|
||||||
|
else if( !this.Reveal.overview.isActive() && useLinearMode ) {
|
||||||
|
this.Reveal.next({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.down({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// HOME
|
||||||
|
else if( keyCode === 36 ) {
|
||||||
|
this.Reveal.slide( 0 );
|
||||||
|
}
|
||||||
|
// END
|
||||||
|
else if( keyCode === 35 ) {
|
||||||
|
this.Reveal.slide( this.Reveal.getHorizontalSlides().length - 1 );
|
||||||
|
}
|
||||||
|
// SPACE
|
||||||
|
else if( keyCode === 32 ) {
|
||||||
|
if( this.Reveal.overview.isActive() ) {
|
||||||
|
this.Reveal.overview.deactivate();
|
||||||
|
}
|
||||||
|
if( event.shiftKey ) {
|
||||||
|
this.Reveal.prev({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.next({skipFragments: event.altKey});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// TWO-SPOT, SEMICOLON, B, V, PERIOD, LOGITECH PRESENTER TOOLS "BLACK SCREEN" BUTTON
|
||||||
|
else if( keyCode === 58 || keyCode === 59 || keyCode === 66 || keyCode === 86 || keyCode === 190 || keyCode === 191 ) {
|
||||||
|
this.Reveal.togglePause();
|
||||||
|
}
|
||||||
|
// F
|
||||||
|
else if( keyCode === 70 ) {
|
||||||
|
enterFullscreen( config.embedded ? this.Reveal.getViewportElement() : document.documentElement );
|
||||||
|
}
|
||||||
|
// A
|
||||||
|
else if( keyCode === 65 ) {
|
||||||
|
if ( config.autoSlideStoppable ) {
|
||||||
|
this.Reveal.toggleAutoSlide( autoSlideWasPaused );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
triggered = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the input resulted in a triggered action we should prevent
|
||||||
|
// the browsers default behavior
|
||||||
|
if( triggered ) {
|
||||||
|
event.preventDefault && event.preventDefault();
|
||||||
|
}
|
||||||
|
// ESC or O key
|
||||||
|
else if( keyCode === 27 || keyCode === 79 ) {
|
||||||
|
if( this.Reveal.closeOverlay() === false ) {
|
||||||
|
this.Reveal.overview.toggle();
|
||||||
|
}
|
||||||
|
|
||||||
|
event.preventDefault && event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
// If auto-sliding is enabled we need to cue up
|
||||||
|
// another timeout
|
||||||
|
this.Reveal.cueAutoSlide();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
245
js/controllers/location.js
Normal file
@ -0,0 +1,245 @@
|
|||||||
|
/**
|
||||||
|
* Reads and writes the URL based on reveal.js' current state.
|
||||||
|
*/
|
||||||
|
export default class Location {
|
||||||
|
|
||||||
|
// The minimum number of milliseconds that must pass between
|
||||||
|
// calls to history.replaceState
|
||||||
|
MAX_REPLACE_STATE_FREQUENCY = 1000
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
// Delays updates to the URL due to a Chrome thumbnailer bug
|
||||||
|
this.writeURLTimeout = 0;
|
||||||
|
|
||||||
|
this.replaceStateTimestamp = 0;
|
||||||
|
|
||||||
|
this.onWindowHashChange = this.onWindowHashChange.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bind() {
|
||||||
|
|
||||||
|
window.addEventListener( 'hashchange', this.onWindowHashChange, false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
unbind() {
|
||||||
|
|
||||||
|
window.removeEventListener( 'hashchange', this.onWindowHashChange, false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the slide indices for the given hash link.
|
||||||
|
*
|
||||||
|
* @param {string} [hash] the hash string that we want to
|
||||||
|
* find the indices for
|
||||||
|
*
|
||||||
|
* @returns slide indices or null
|
||||||
|
*/
|
||||||
|
getIndicesFromHash( hash=window.location.hash ) {
|
||||||
|
|
||||||
|
// Attempt to parse the hash as either an index or name
|
||||||
|
let name = hash.replace( /^#\/?/, '' );
|
||||||
|
let bits = name.split( '/' );
|
||||||
|
|
||||||
|
// If the first bit is not fully numeric and there is a name we
|
||||||
|
// can assume that this is a named link
|
||||||
|
if( !/^[0-9]*$/.test( bits[0] ) && name.length ) {
|
||||||
|
let element;
|
||||||
|
|
||||||
|
let f;
|
||||||
|
|
||||||
|
// Parse named links with fragments (#/named-link/2)
|
||||||
|
if( /\/[-\d]+$/g.test( name ) ) {
|
||||||
|
f = parseInt( name.split( '/' ).pop(), 10 );
|
||||||
|
f = isNaN(f) ? undefined : f;
|
||||||
|
name = name.split( '/' ).shift();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure the named link is a valid HTML ID attribute
|
||||||
|
try {
|
||||||
|
element = document.getElementById( decodeURIComponent( name ) );
|
||||||
|
}
|
||||||
|
catch ( error ) { }
|
||||||
|
|
||||||
|
if( element ) {
|
||||||
|
return { ...this.Reveal.getIndices( element ), f };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const config = this.Reveal.getConfig();
|
||||||
|
let hashIndexBase = config.hashOneBasedIndex ? 1 : 0;
|
||||||
|
|
||||||
|
// Read the index components of the hash
|
||||||
|
let h = ( parseInt( bits[0], 10 ) - hashIndexBase ) || 0,
|
||||||
|
v = ( parseInt( bits[1], 10 ) - hashIndexBase ) || 0,
|
||||||
|
f;
|
||||||
|
|
||||||
|
if( config.fragmentInURL ) {
|
||||||
|
f = parseInt( bits[2], 10 );
|
||||||
|
if( isNaN( f ) ) {
|
||||||
|
f = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { h, v, f };
|
||||||
|
}
|
||||||
|
|
||||||
|
// The hash couldn't be parsed or no matching named link was found
|
||||||
|
return null
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the current URL (hash) and navigates accordingly.
|
||||||
|
*/
|
||||||
|
readURL() {
|
||||||
|
|
||||||
|
const currentIndices = this.Reveal.getIndices();
|
||||||
|
const newIndices = this.getIndicesFromHash();
|
||||||
|
|
||||||
|
if( newIndices ) {
|
||||||
|
if( ( newIndices.h !== currentIndices.h || newIndices.v !== currentIndices.v || newIndices.f !== undefined ) ) {
|
||||||
|
this.Reveal.slide( newIndices.h, newIndices.v, newIndices.f );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If no new indices are available, we're trying to navigate to
|
||||||
|
// a slide hash that does not exist
|
||||||
|
else {
|
||||||
|
this.Reveal.slide( currentIndices.h || 0, currentIndices.v || 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the page URL (hash) to reflect the current
|
||||||
|
* state.
|
||||||
|
*
|
||||||
|
* @param {number} delay The time in ms to wait before
|
||||||
|
* writing the hash
|
||||||
|
*/
|
||||||
|
writeURL( delay ) {
|
||||||
|
|
||||||
|
let config = this.Reveal.getConfig();
|
||||||
|
let currentSlide = this.Reveal.getCurrentSlide();
|
||||||
|
|
||||||
|
// Make sure there's never more than one timeout running
|
||||||
|
clearTimeout( this.writeURLTimeout );
|
||||||
|
|
||||||
|
// If a delay is specified, timeout this call
|
||||||
|
if( typeof delay === 'number' ) {
|
||||||
|
this.writeURLTimeout = setTimeout( this.writeURL, delay );
|
||||||
|
}
|
||||||
|
else if( currentSlide ) {
|
||||||
|
|
||||||
|
let hash = this.getHash();
|
||||||
|
|
||||||
|
// If we're configured to push to history OR the history
|
||||||
|
// API is not avaialble.
|
||||||
|
if( config.history ) {
|
||||||
|
window.location.hash = hash;
|
||||||
|
}
|
||||||
|
// If we're configured to reflect the current slide in the
|
||||||
|
// URL without pushing to history.
|
||||||
|
else if( config.hash ) {
|
||||||
|
// If the hash is empty, don't add it to the URL
|
||||||
|
if( hash === '/' ) {
|
||||||
|
this.debouncedReplaceState( window.location.pathname + window.location.search );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.debouncedReplaceState( '#' + hash );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// UPDATE: The below nuking of all hash changes breaks
|
||||||
|
// anchors on pages where reveal.js is running. Removed
|
||||||
|
// in 4.0. Why was it here in the first place? ¯\_(ツ)_/¯
|
||||||
|
//
|
||||||
|
// If history and hash are both disabled, a hash may still
|
||||||
|
// be added to the URL by clicking on a href with a hash
|
||||||
|
// target. Counter this by always removing the hash.
|
||||||
|
// else {
|
||||||
|
// window.history.replaceState( null, null, window.location.pathname + window.location.search );
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
replaceState( url ) {
|
||||||
|
|
||||||
|
window.history.replaceState( null, null, url );
|
||||||
|
this.replaceStateTimestamp = Date.now();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
debouncedReplaceState( url ) {
|
||||||
|
|
||||||
|
clearTimeout( this.replaceStateTimeout );
|
||||||
|
|
||||||
|
if( Date.now() - this.replaceStateTimestamp > this.MAX_REPLACE_STATE_FREQUENCY ) {
|
||||||
|
this.replaceState( url );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.replaceStateTimeout = setTimeout( () => this.replaceState( url ), this.MAX_REPLACE_STATE_FREQUENCY );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a hash URL that will resolve to the given slide location.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} [slide=currentSlide] The slide to link to
|
||||||
|
*/
|
||||||
|
getHash( slide ) {
|
||||||
|
|
||||||
|
let url = '/';
|
||||||
|
|
||||||
|
// Attempt to create a named link based on the slide's ID
|
||||||
|
let s = slide || this.Reveal.getCurrentSlide();
|
||||||
|
let id = s ? s.getAttribute( 'id' ) : null;
|
||||||
|
if( id ) {
|
||||||
|
id = encodeURIComponent( id );
|
||||||
|
}
|
||||||
|
|
||||||
|
let index = this.Reveal.getIndices( slide );
|
||||||
|
if( !this.Reveal.getConfig().fragmentInURL ) {
|
||||||
|
index.f = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the current slide has an ID, use that as a named link,
|
||||||
|
// but we don't support named links with a fragment index
|
||||||
|
if( typeof id === 'string' && id.length ) {
|
||||||
|
url = '/' + id;
|
||||||
|
|
||||||
|
// If there is also a fragment, append that at the end
|
||||||
|
// of the named link, like: #/named-link/2
|
||||||
|
if( index.f >= 0 ) url += '/' + index.f;
|
||||||
|
}
|
||||||
|
// Otherwise use the /h/v index
|
||||||
|
else {
|
||||||
|
let hashIndexBase = this.Reveal.getConfig().hashOneBasedIndex ? 1 : 0;
|
||||||
|
if( index.h > 0 || index.v > 0 || index.f >= 0 ) url += index.h + hashIndexBase;
|
||||||
|
if( index.v > 0 || index.f >= 0 ) url += '/' + (index.v + hashIndexBase );
|
||||||
|
if( index.f >= 0 ) url += '/' + index.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
return url;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for the window level 'hashchange' event.
|
||||||
|
*
|
||||||
|
* @param {object} [event]
|
||||||
|
*/
|
||||||
|
onWindowHashChange( event ) {
|
||||||
|
|
||||||
|
this.readURL();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
120
js/controllers/notes.js
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
/**
|
||||||
|
* Handles the showing and
|
||||||
|
*/
|
||||||
|
export default class Notes {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
this.element = document.createElement( 'div' );
|
||||||
|
this.element.className = 'speaker-notes';
|
||||||
|
this.element.setAttribute( 'data-prevent-swipe', '' );
|
||||||
|
this.element.setAttribute( 'tabindex', '0' );
|
||||||
|
this.Reveal.getRevealElement().appendChild( this.element );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the reveal.js config is updated.
|
||||||
|
*/
|
||||||
|
configure( config, oldConfig ) {
|
||||||
|
|
||||||
|
if( config.showNotes ) {
|
||||||
|
this.element.setAttribute( 'data-layout', typeof config.showNotes === 'string' ? config.showNotes : 'inline' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pick up notes from the current slide and display them
|
||||||
|
* to the viewer.
|
||||||
|
*
|
||||||
|
* @see {@link config.showNotes}
|
||||||
|
*/
|
||||||
|
update() {
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().showNotes && this.element && this.Reveal.getCurrentSlide() && !this.Reveal.print.isPrintingPDF() ) {
|
||||||
|
|
||||||
|
this.element.innerHTML = this.getSlideNotes() || '<span class="notes-placeholder">No notes on this slide.</span>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the visibility of the speaker notes sidebar that
|
||||||
|
* is used to share annotated slides. The notes sidebar is
|
||||||
|
* only visible if showNotes is true and there are notes on
|
||||||
|
* one or more slides in the deck.
|
||||||
|
*/
|
||||||
|
updateVisibility() {
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().showNotes && this.hasNotes() && !this.Reveal.print.isPrintingPDF() ) {
|
||||||
|
this.Reveal.getRevealElement().classList.add( 'show-notes' );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.getRevealElement().classList.remove( 'show-notes' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if there are speaker notes for ANY slide in the
|
||||||
|
* presentation.
|
||||||
|
*/
|
||||||
|
hasNotes() {
|
||||||
|
|
||||||
|
return this.Reveal.getSlidesElement().querySelectorAll( '[data-notes], aside.notes' ).length > 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if this presentation is running inside of the
|
||||||
|
* speaker notes window.
|
||||||
|
*
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
isSpeakerNotesWindow() {
|
||||||
|
|
||||||
|
return !!window.location.search.match( /receiver/gi );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the speaker notes from a slide. Notes can be
|
||||||
|
* defined in two ways:
|
||||||
|
* 1. As a data-notes attribute on the slide <section>
|
||||||
|
* 2. As an <aside class="notes"> inside of the slide
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} [slide=currentSlide]
|
||||||
|
* @return {(string|null)}
|
||||||
|
*/
|
||||||
|
getSlideNotes( slide = this.Reveal.getCurrentSlide() ) {
|
||||||
|
|
||||||
|
// Notes can be specified via the data-notes attribute...
|
||||||
|
if( slide.hasAttribute( 'data-notes' ) ) {
|
||||||
|
return slide.getAttribute( 'data-notes' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// ... or using an <aside class="notes"> element
|
||||||
|
let notesElement = slide.querySelector( 'aside.notes' );
|
||||||
|
if( notesElement ) {
|
||||||
|
return notesElement.innerHTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
this.element.remove();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
255
js/controllers/overview.js
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
import { SLIDES_SELECTOR } from '../utils/constants.js'
|
||||||
|
import { extend, queryAll, transformElement } from '../utils/util.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles all logic related to the overview mode
|
||||||
|
* (birds-eye view of all slides).
|
||||||
|
*/
|
||||||
|
export default class Overview {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
this.active = false;
|
||||||
|
|
||||||
|
this.onSlideClicked = this.onSlideClicked.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the overview of slides (quick nav) by scaling
|
||||||
|
* down and arranging all slide elements.
|
||||||
|
*/
|
||||||
|
activate() {
|
||||||
|
|
||||||
|
// Only proceed if enabled in config
|
||||||
|
if( this.Reveal.getConfig().overview && !this.isActive() ) {
|
||||||
|
|
||||||
|
this.active = true;
|
||||||
|
|
||||||
|
this.Reveal.getRevealElement().classList.add( 'overview' );
|
||||||
|
|
||||||
|
// Don't auto-slide while in overview mode
|
||||||
|
this.Reveal.cancelAutoSlide();
|
||||||
|
|
||||||
|
// Move the backgrounds element into the slide container to
|
||||||
|
// that the same scaling is applied
|
||||||
|
this.Reveal.getSlidesElement().appendChild( this.Reveal.getBackgroundsElement() );
|
||||||
|
|
||||||
|
// Clicking on an overview slide navigates to it
|
||||||
|
queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( slide => {
|
||||||
|
if( !slide.classList.contains( 'stack' ) ) {
|
||||||
|
slide.addEventListener( 'click', this.onSlideClicked, true );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Calculate slide sizes
|
||||||
|
const margin = 70;
|
||||||
|
const slideSize = this.Reveal.getComputedSlideSize();
|
||||||
|
this.overviewSlideWidth = slideSize.width + margin;
|
||||||
|
this.overviewSlideHeight = slideSize.height + margin;
|
||||||
|
|
||||||
|
// Reverse in RTL mode
|
||||||
|
if( this.Reveal.getConfig().rtl ) {
|
||||||
|
this.overviewSlideWidth = -this.overviewSlideWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Reveal.updateSlidesVisibility();
|
||||||
|
|
||||||
|
this.layout();
|
||||||
|
this.update();
|
||||||
|
|
||||||
|
this.Reveal.layout();
|
||||||
|
|
||||||
|
const indices = this.Reveal.getIndices();
|
||||||
|
|
||||||
|
// Notify observers of the overview showing
|
||||||
|
this.Reveal.dispatchEvent({
|
||||||
|
type: 'overviewshown',
|
||||||
|
data: {
|
||||||
|
'indexh': indices.h,
|
||||||
|
'indexv': indices.v,
|
||||||
|
'currentSlide': this.Reveal.getCurrentSlide()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uses CSS transforms to position all slides in a grid for
|
||||||
|
* display inside of the overview mode.
|
||||||
|
*/
|
||||||
|
layout() {
|
||||||
|
|
||||||
|
// Layout slides
|
||||||
|
this.Reveal.getHorizontalSlides().forEach( ( hslide, h ) => {
|
||||||
|
hslide.setAttribute( 'data-index-h', h );
|
||||||
|
transformElement( hslide, 'translate3d(' + ( h * this.overviewSlideWidth ) + 'px, 0, 0)' );
|
||||||
|
|
||||||
|
if( hslide.classList.contains( 'stack' ) ) {
|
||||||
|
|
||||||
|
queryAll( hslide, 'section' ).forEach( ( vslide, v ) => {
|
||||||
|
vslide.setAttribute( 'data-index-h', h );
|
||||||
|
vslide.setAttribute( 'data-index-v', v );
|
||||||
|
|
||||||
|
transformElement( vslide, 'translate3d(0, ' + ( v * this.overviewSlideHeight ) + 'px, 0)' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Layout slide backgrounds
|
||||||
|
Array.from( this.Reveal.getBackgroundsElement().childNodes ).forEach( ( hbackground, h ) => {
|
||||||
|
transformElement( hbackground, 'translate3d(' + ( h * this.overviewSlideWidth ) + 'px, 0, 0)' );
|
||||||
|
|
||||||
|
queryAll( hbackground, '.slide-background' ).forEach( ( vbackground, v ) => {
|
||||||
|
transformElement( vbackground, 'translate3d(0, ' + ( v * this.overviewSlideHeight ) + 'px, 0)' );
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Moves the overview viewport to the current slides.
|
||||||
|
* Called each time the current slide changes.
|
||||||
|
*/
|
||||||
|
update() {
|
||||||
|
|
||||||
|
const vmin = Math.min( window.innerWidth, window.innerHeight );
|
||||||
|
const scale = Math.max( vmin / 5, 150 ) / vmin;
|
||||||
|
const indices = this.Reveal.getIndices();
|
||||||
|
|
||||||
|
this.Reveal.transformSlides( {
|
||||||
|
overview: [
|
||||||
|
'scale('+ scale +')',
|
||||||
|
'translateX('+ ( -indices.h * this.overviewSlideWidth ) +'px)',
|
||||||
|
'translateY('+ ( -indices.v * this.overviewSlideHeight ) +'px)'
|
||||||
|
].join( ' ' )
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exits the slide overview and enters the currently
|
||||||
|
* active slide.
|
||||||
|
*/
|
||||||
|
deactivate() {
|
||||||
|
|
||||||
|
// Only proceed if enabled in config
|
||||||
|
if( this.Reveal.getConfig().overview ) {
|
||||||
|
|
||||||
|
this.active = false;
|
||||||
|
|
||||||
|
this.Reveal.getRevealElement().classList.remove( 'overview' );
|
||||||
|
|
||||||
|
// Temporarily add a class so that transitions can do different things
|
||||||
|
// depending on whether they are exiting/entering overview, or just
|
||||||
|
// moving from slide to slide
|
||||||
|
this.Reveal.getRevealElement().classList.add( 'overview-deactivating' );
|
||||||
|
|
||||||
|
setTimeout( () => {
|
||||||
|
this.Reveal.getRevealElement().classList.remove( 'overview-deactivating' );
|
||||||
|
}, 1 );
|
||||||
|
|
||||||
|
// Move the background element back out
|
||||||
|
this.Reveal.getRevealElement().appendChild( this.Reveal.getBackgroundsElement() );
|
||||||
|
|
||||||
|
// Clean up changes made to slides
|
||||||
|
queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( slide => {
|
||||||
|
transformElement( slide, '' );
|
||||||
|
|
||||||
|
slide.removeEventListener( 'click', this.onSlideClicked, true );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Clean up changes made to backgrounds
|
||||||
|
queryAll( this.Reveal.getBackgroundsElement(), '.slide-background' ).forEach( background => {
|
||||||
|
transformElement( background, '' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
this.Reveal.transformSlides( { overview: '' } );
|
||||||
|
|
||||||
|
const indices = this.Reveal.getIndices();
|
||||||
|
|
||||||
|
this.Reveal.slide( indices.h, indices.v );
|
||||||
|
this.Reveal.layout();
|
||||||
|
this.Reveal.cueAutoSlide();
|
||||||
|
|
||||||
|
// Notify observers of the overview hiding
|
||||||
|
this.Reveal.dispatchEvent({
|
||||||
|
type: 'overviewhidden',
|
||||||
|
data: {
|
||||||
|
'indexh': indices.h,
|
||||||
|
'indexv': indices.v,
|
||||||
|
'currentSlide': this.Reveal.getCurrentSlide()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggles the slide overview mode on and off.
|
||||||
|
*
|
||||||
|
* @param {Boolean} [override] Flag which overrides the
|
||||||
|
* toggle logic and forcibly sets the desired state. True means
|
||||||
|
* overview is open, false means it's closed.
|
||||||
|
*/
|
||||||
|
toggle( override ) {
|
||||||
|
|
||||||
|
if( typeof override === 'boolean' ) {
|
||||||
|
override ? this.activate() : this.deactivate();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.isActive() ? this.deactivate() : this.activate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the overview is currently active.
|
||||||
|
*
|
||||||
|
* @return {Boolean} true if the overview is active,
|
||||||
|
* false otherwise
|
||||||
|
*/
|
||||||
|
isActive() {
|
||||||
|
|
||||||
|
return this.active;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked when a slide is and we're in the overview.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onSlideClicked( event ) {
|
||||||
|
|
||||||
|
if( this.isActive() ) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
let element = event.target;
|
||||||
|
|
||||||
|
while( element && !element.nodeName.match( /section/gi ) ) {
|
||||||
|
element = element.parentNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( element && !element.classList.contains( 'disabled' ) ) {
|
||||||
|
|
||||||
|
this.deactivate();
|
||||||
|
|
||||||
|
if( element.nodeName.match( /section/gi ) ) {
|
||||||
|
let h = parseInt( element.getAttribute( 'data-index-h' ), 10 ),
|
||||||
|
v = parseInt( element.getAttribute( 'data-index-v' ), 10 );
|
||||||
|
|
||||||
|
this.Reveal.slide( h, v );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
254
js/controllers/plugins.js
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
import { loadScript } from '../utils/loader.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manages loading and registering of reveal.js plugins.
|
||||||
|
*/
|
||||||
|
export default class Plugins {
|
||||||
|
|
||||||
|
constructor( reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = reveal;
|
||||||
|
|
||||||
|
// Flags our current state (idle -> loading -> loaded)
|
||||||
|
this.state = 'idle';
|
||||||
|
|
||||||
|
// An id:instance map of currently registed plugins
|
||||||
|
this.registeredPlugins = {};
|
||||||
|
|
||||||
|
this.asyncDependencies = [];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads reveal.js dependencies, registers and
|
||||||
|
* initializes plugins.
|
||||||
|
*
|
||||||
|
* Plugins are direct references to a reveal.js plugin
|
||||||
|
* object that we register and initialize after any
|
||||||
|
* synchronous dependencies have loaded.
|
||||||
|
*
|
||||||
|
* Dependencies are defined via the 'dependencies' config
|
||||||
|
* option and will be loaded prior to starting reveal.js.
|
||||||
|
* Some dependencies may have an 'async' flag, if so they
|
||||||
|
* will load after reveal.js has been started up.
|
||||||
|
*/
|
||||||
|
load( plugins, dependencies ) {
|
||||||
|
|
||||||
|
this.state = 'loading';
|
||||||
|
|
||||||
|
plugins.forEach( this.registerPlugin.bind( this ) );
|
||||||
|
|
||||||
|
return new Promise( resolve => {
|
||||||
|
|
||||||
|
let scripts = [],
|
||||||
|
scriptsToLoad = 0;
|
||||||
|
|
||||||
|
dependencies.forEach( s => {
|
||||||
|
// Load if there's no condition or the condition is truthy
|
||||||
|
if( !s.condition || s.condition() ) {
|
||||||
|
if( s.async ) {
|
||||||
|
this.asyncDependencies.push( s );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
scripts.push( s );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
if( scripts.length ) {
|
||||||
|
scriptsToLoad = scripts.length;
|
||||||
|
|
||||||
|
const scriptLoadedCallback = (s) => {
|
||||||
|
if( s && typeof s.callback === 'function' ) s.callback();
|
||||||
|
|
||||||
|
if( --scriptsToLoad === 0 ) {
|
||||||
|
this.initPlugins().then( resolve );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Load synchronous scripts
|
||||||
|
scripts.forEach( s => {
|
||||||
|
if( typeof s.id === 'string' ) {
|
||||||
|
this.registerPlugin( s );
|
||||||
|
scriptLoadedCallback( s );
|
||||||
|
}
|
||||||
|
else if( typeof s.src === 'string' ) {
|
||||||
|
loadScript( s.src, () => scriptLoadedCallback(s) );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.warn( 'Unrecognized plugin format', s );
|
||||||
|
scriptLoadedCallback();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.initPlugins().then( resolve );
|
||||||
|
}
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes our plugins and waits for them to be ready
|
||||||
|
* before proceeding.
|
||||||
|
*/
|
||||||
|
initPlugins() {
|
||||||
|
|
||||||
|
return new Promise( resolve => {
|
||||||
|
|
||||||
|
let pluginValues = Object.values( this.registeredPlugins );
|
||||||
|
let pluginsToInitialize = pluginValues.length;
|
||||||
|
|
||||||
|
// If there are no plugins, skip this step
|
||||||
|
if( pluginsToInitialize === 0 ) {
|
||||||
|
this.loadAsync().then( resolve );
|
||||||
|
}
|
||||||
|
// ... otherwise initialize plugins
|
||||||
|
else {
|
||||||
|
|
||||||
|
let initNextPlugin;
|
||||||
|
|
||||||
|
let afterPlugInitialized = () => {
|
||||||
|
if( --pluginsToInitialize === 0 ) {
|
||||||
|
this.loadAsync().then( resolve );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
initNextPlugin();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let i = 0;
|
||||||
|
|
||||||
|
// Initialize plugins serially
|
||||||
|
initNextPlugin = () => {
|
||||||
|
|
||||||
|
let plugin = pluginValues[i++];
|
||||||
|
|
||||||
|
// If the plugin has an 'init' method, invoke it
|
||||||
|
if( typeof plugin.init === 'function' ) {
|
||||||
|
let promise = plugin.init( this.Reveal );
|
||||||
|
|
||||||
|
// If the plugin returned a Promise, wait for it
|
||||||
|
if( promise && typeof promise.then === 'function' ) {
|
||||||
|
promise.then( afterPlugInitialized );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
afterPlugInitialized();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
afterPlugInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
initNextPlugin();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} )
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads all async reveal.js dependencies.
|
||||||
|
*/
|
||||||
|
loadAsync() {
|
||||||
|
|
||||||
|
this.state = 'loaded';
|
||||||
|
|
||||||
|
if( this.asyncDependencies.length ) {
|
||||||
|
this.asyncDependencies.forEach( s => {
|
||||||
|
loadScript( s.src, s.callback );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.resolve();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a new plugin with this reveal.js instance.
|
||||||
|
*
|
||||||
|
* reveal.js waits for all regisered plugins to initialize
|
||||||
|
* before considering itself ready, as long as the plugin
|
||||||
|
* is registered before calling `Reveal.initialize()`.
|
||||||
|
*/
|
||||||
|
registerPlugin( plugin ) {
|
||||||
|
|
||||||
|
// Backwards compatibility to make reveal.js ~3.9.0
|
||||||
|
// plugins work with reveal.js 4.0.0
|
||||||
|
if( arguments.length === 2 && typeof arguments[0] === 'string' ) {
|
||||||
|
plugin = arguments[1];
|
||||||
|
plugin.id = arguments[0];
|
||||||
|
}
|
||||||
|
// Plugin can optionally be a function which we call
|
||||||
|
// to create an instance of the plugin
|
||||||
|
else if( typeof plugin === 'function' ) {
|
||||||
|
plugin = plugin();
|
||||||
|
}
|
||||||
|
|
||||||
|
let id = plugin.id;
|
||||||
|
|
||||||
|
if( typeof id !== 'string' ) {
|
||||||
|
console.warn( 'Unrecognized plugin format; can\'t find plugin.id', plugin );
|
||||||
|
}
|
||||||
|
else if( this.registeredPlugins[id] === undefined ) {
|
||||||
|
this.registeredPlugins[id] = plugin;
|
||||||
|
|
||||||
|
// If a plugin is registered after reveal.js is loaded,
|
||||||
|
// initialize it right away
|
||||||
|
if( this.state === 'loaded' && typeof plugin.init === 'function' ) {
|
||||||
|
plugin.init( this.Reveal );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.warn( 'reveal.js: "'+ id +'" plugin has already been registered' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a specific plugin has been registered.
|
||||||
|
*
|
||||||
|
* @param {String} id Unique plugin identifier
|
||||||
|
*/
|
||||||
|
hasPlugin( id ) {
|
||||||
|
|
||||||
|
return !!this.registeredPlugins[id];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the specific plugin instance, if a plugin
|
||||||
|
* with the given ID has been registered.
|
||||||
|
*
|
||||||
|
* @param {String} id Unique plugin identifier
|
||||||
|
*/
|
||||||
|
getPlugin( id ) {
|
||||||
|
|
||||||
|
return this.registeredPlugins[id];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getRegisteredPlugins() {
|
||||||
|
|
||||||
|
return this.registeredPlugins;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
Object.values( this.registeredPlugins ).forEach( plugin => {
|
||||||
|
if( typeof plugin.destroy === 'function' ) {
|
||||||
|
plugin.destroy();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
this.registeredPlugins = {};
|
||||||
|
this.asyncDependencies = [];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
129
js/controllers/pointer.js
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
/**
|
||||||
|
* Handles hiding of the pointer/cursor when inactive.
|
||||||
|
*/
|
||||||
|
export default class Pointer {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
// Throttles mouse wheel navigation
|
||||||
|
this.lastMouseWheelStep = 0;
|
||||||
|
|
||||||
|
// Is the mouse pointer currently hidden from view
|
||||||
|
this.cursorHidden = false;
|
||||||
|
|
||||||
|
// Timeout used to determine when the cursor is inactive
|
||||||
|
this.cursorInactiveTimeout = 0;
|
||||||
|
|
||||||
|
this.onDocumentCursorActive = this.onDocumentCursorActive.bind( this );
|
||||||
|
this.onDocumentMouseScroll = this.onDocumentMouseScroll.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the reveal.js config is updated.
|
||||||
|
*/
|
||||||
|
configure( config, oldConfig ) {
|
||||||
|
|
||||||
|
if( config.mouseWheel ) {
|
||||||
|
document.addEventListener( 'DOMMouseScroll', this.onDocumentMouseScroll, false ); // FF
|
||||||
|
document.addEventListener( 'mousewheel', this.onDocumentMouseScroll, false );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
document.removeEventListener( 'DOMMouseScroll', this.onDocumentMouseScroll, false ); // FF
|
||||||
|
document.removeEventListener( 'mousewheel', this.onDocumentMouseScroll, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auto-hide the mouse pointer when its inactive
|
||||||
|
if( config.hideInactiveCursor ) {
|
||||||
|
document.addEventListener( 'mousemove', this.onDocumentCursorActive, false );
|
||||||
|
document.addEventListener( 'mousedown', this.onDocumentCursorActive, false );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.showCursor();
|
||||||
|
|
||||||
|
document.removeEventListener( 'mousemove', this.onDocumentCursorActive, false );
|
||||||
|
document.removeEventListener( 'mousedown', this.onDocumentCursorActive, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows the mouse pointer after it has been hidden with
|
||||||
|
* #hideCursor.
|
||||||
|
*/
|
||||||
|
showCursor() {
|
||||||
|
|
||||||
|
if( this.cursorHidden ) {
|
||||||
|
this.cursorHidden = false;
|
||||||
|
this.Reveal.getRevealElement().style.cursor = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hides the mouse pointer when it's on top of the .reveal
|
||||||
|
* container.
|
||||||
|
*/
|
||||||
|
hideCursor() {
|
||||||
|
|
||||||
|
if( this.cursorHidden === false ) {
|
||||||
|
this.cursorHidden = true;
|
||||||
|
this.Reveal.getRevealElement().style.cursor = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
this.showCursor();
|
||||||
|
|
||||||
|
document.removeEventListener( 'DOMMouseScroll', this.onDocumentMouseScroll, false );
|
||||||
|
document.removeEventListener( 'mousewheel', this.onDocumentMouseScroll, false );
|
||||||
|
document.removeEventListener( 'mousemove', this.onDocumentCursorActive, false );
|
||||||
|
document.removeEventListener( 'mousedown', this.onDocumentCursorActive, false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called whenever there is mouse input at the document level
|
||||||
|
* to determine if the cursor is active or not.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onDocumentCursorActive( event ) {
|
||||||
|
|
||||||
|
this.showCursor();
|
||||||
|
|
||||||
|
clearTimeout( this.cursorInactiveTimeout );
|
||||||
|
|
||||||
|
this.cursorInactiveTimeout = setTimeout( this.hideCursor.bind( this ), this.Reveal.getConfig().hideCursorTime );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles mouse wheel scrolling, throttled to avoid skipping
|
||||||
|
* multiple slides.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onDocumentMouseScroll( event ) {
|
||||||
|
|
||||||
|
if( Date.now() - this.lastMouseWheelStep > 1000 ) {
|
||||||
|
|
||||||
|
this.lastMouseWheelStep = Date.now();
|
||||||
|
|
||||||
|
let delta = event.detail || -event.wheelDelta;
|
||||||
|
if( delta > 0 ) {
|
||||||
|
this.Reveal.next();
|
||||||
|
}
|
||||||
|
else if( delta < 0 ) {
|
||||||
|
this.Reveal.prev();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
236
js/controllers/print.js
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
import { SLIDES_SELECTOR } from '../utils/constants.js'
|
||||||
|
import { queryAll, createStyleSheet } from '../utils/util.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setups up our presentation for printing/exporting to PDF.
|
||||||
|
*/
|
||||||
|
export default class Print {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures the presentation for printing to a static
|
||||||
|
* PDF.
|
||||||
|
*/
|
||||||
|
async setupPDF() {
|
||||||
|
|
||||||
|
const config = this.Reveal.getConfig();
|
||||||
|
const slides = queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR )
|
||||||
|
|
||||||
|
// Compute slide numbers now, before we start duplicating slides
|
||||||
|
const injectPageNumbers = config.slideNumber && /all|print/i.test( config.showSlideNumber );
|
||||||
|
|
||||||
|
const slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight );
|
||||||
|
|
||||||
|
// Dimensions of the PDF pages
|
||||||
|
const pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ),
|
||||||
|
pageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) );
|
||||||
|
|
||||||
|
// Dimensions of slides within the pages
|
||||||
|
const slideWidth = slideSize.width,
|
||||||
|
slideHeight = slideSize.height;
|
||||||
|
|
||||||
|
await new Promise( requestAnimationFrame );
|
||||||
|
|
||||||
|
// Let the browser know what page size we want to print
|
||||||
|
createStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0px;}' );
|
||||||
|
|
||||||
|
// Limit the size of certain elements to the dimensions of the slide
|
||||||
|
createStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' );
|
||||||
|
|
||||||
|
document.documentElement.classList.add( 'print-pdf' );
|
||||||
|
document.body.style.width = pageWidth + 'px';
|
||||||
|
document.body.style.height = pageHeight + 'px';
|
||||||
|
|
||||||
|
const viewportElement = document.querySelector( '.reveal-viewport' );
|
||||||
|
let presentationBackground;
|
||||||
|
if( viewportElement ) {
|
||||||
|
const viewportStyles = window.getComputedStyle( viewportElement );
|
||||||
|
if( viewportStyles && viewportStyles.background ) {
|
||||||
|
presentationBackground = viewportStyles.background;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure stretch elements fit on slide
|
||||||
|
await new Promise( requestAnimationFrame );
|
||||||
|
this.Reveal.layoutSlideContents( slideWidth, slideHeight );
|
||||||
|
|
||||||
|
// Batch scrollHeight access to prevent layout thrashing
|
||||||
|
await new Promise( requestAnimationFrame );
|
||||||
|
|
||||||
|
const slideScrollHeights = slides.map( slide => slide.scrollHeight );
|
||||||
|
|
||||||
|
const pages = [];
|
||||||
|
const pageContainer = slides[0].parentNode;
|
||||||
|
let slideNumber = 1;
|
||||||
|
|
||||||
|
// Slide and slide background layout
|
||||||
|
slides.forEach( function( slide, index ) {
|
||||||
|
|
||||||
|
// Vertical stacks are not centred since their section
|
||||||
|
// children will be
|
||||||
|
if( slide.classList.contains( 'stack' ) === false ) {
|
||||||
|
// Center the slide inside of the page, giving the slide some margin
|
||||||
|
let left = ( pageWidth - slideWidth ) / 2;
|
||||||
|
let top = ( pageHeight - slideHeight ) / 2;
|
||||||
|
|
||||||
|
const contentHeight = slideScrollHeights[ index ];
|
||||||
|
let numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );
|
||||||
|
|
||||||
|
// Adhere to configured pages per slide limit
|
||||||
|
numberOfPages = Math.min( numberOfPages, config.pdfMaxPagesPerSlide );
|
||||||
|
|
||||||
|
// Center slides vertically
|
||||||
|
if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {
|
||||||
|
top = Math.max( ( pageHeight - contentHeight ) / 2, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrap the slide in a page element and hide its overflow
|
||||||
|
// so that no page ever flows onto another
|
||||||
|
const page = document.createElement( 'div' );
|
||||||
|
pages.push( page );
|
||||||
|
|
||||||
|
page.className = 'pdf-page';
|
||||||
|
page.style.height = ( ( pageHeight + config.pdfPageHeightOffset ) * numberOfPages ) + 'px';
|
||||||
|
|
||||||
|
// Copy the presentation-wide background to each individual
|
||||||
|
// page when printing
|
||||||
|
if( presentationBackground ) {
|
||||||
|
page.style.background = presentationBackground;
|
||||||
|
}
|
||||||
|
|
||||||
|
page.appendChild( slide );
|
||||||
|
|
||||||
|
// Position the slide inside of the page
|
||||||
|
slide.style.left = left + 'px';
|
||||||
|
slide.style.top = top + 'px';
|
||||||
|
slide.style.width = slideWidth + 'px';
|
||||||
|
|
||||||
|
// Re-run the slide layout so that r-fit-text is applied based on
|
||||||
|
// the printed slide size
|
||||||
|
this.Reveal.slideContent.layout( slide )
|
||||||
|
|
||||||
|
if( slide.slideBackgroundElement ) {
|
||||||
|
page.insertBefore( slide.slideBackgroundElement, slide );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inject notes if `showNotes` is enabled
|
||||||
|
if( config.showNotes ) {
|
||||||
|
|
||||||
|
// Are there notes for this slide?
|
||||||
|
const notes = this.Reveal.getSlideNotes( slide );
|
||||||
|
if( notes ) {
|
||||||
|
|
||||||
|
const notesSpacing = 8;
|
||||||
|
const notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline';
|
||||||
|
const notesElement = document.createElement( 'div' );
|
||||||
|
notesElement.classList.add( 'speaker-notes' );
|
||||||
|
notesElement.classList.add( 'speaker-notes-pdf' );
|
||||||
|
notesElement.setAttribute( 'data-layout', notesLayout );
|
||||||
|
notesElement.innerHTML = notes;
|
||||||
|
|
||||||
|
if( notesLayout === 'separate-page' ) {
|
||||||
|
pages.push( notesElement );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
notesElement.style.left = notesSpacing + 'px';
|
||||||
|
notesElement.style.bottom = notesSpacing + 'px';
|
||||||
|
notesElement.style.width = ( pageWidth - notesSpacing*2 ) + 'px';
|
||||||
|
page.appendChild( notesElement );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inject page numbers if `slideNumbers` are enabled
|
||||||
|
if( injectPageNumbers ) {
|
||||||
|
const numberElement = document.createElement( 'div' );
|
||||||
|
numberElement.classList.add( 'slide-number' );
|
||||||
|
numberElement.classList.add( 'slide-number-pdf' );
|
||||||
|
numberElement.innerHTML = slideNumber++;
|
||||||
|
page.appendChild( numberElement );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy page and show fragments one after another
|
||||||
|
if( config.pdfSeparateFragments ) {
|
||||||
|
|
||||||
|
// Each fragment 'group' is an array containing one or more
|
||||||
|
// fragments. Multiple fragments that appear at the same time
|
||||||
|
// are part of the same group.
|
||||||
|
const fragmentGroups = this.Reveal.fragments.sort( page.querySelectorAll( '.fragment' ), true );
|
||||||
|
|
||||||
|
let previousFragmentStep;
|
||||||
|
|
||||||
|
fragmentGroups.forEach( function( fragments, index ) {
|
||||||
|
|
||||||
|
// Remove 'current-fragment' from the previous group
|
||||||
|
if( previousFragmentStep ) {
|
||||||
|
previousFragmentStep.forEach( function( fragment ) {
|
||||||
|
fragment.classList.remove( 'current-fragment' );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show the fragments for the current index
|
||||||
|
fragments.forEach( function( fragment ) {
|
||||||
|
fragment.classList.add( 'visible', 'current-fragment' );
|
||||||
|
}, this );
|
||||||
|
|
||||||
|
// Create a separate page for the current fragment state
|
||||||
|
const clonedPage = page.cloneNode( true );
|
||||||
|
|
||||||
|
// Inject unique page numbers for fragments
|
||||||
|
if( injectPageNumbers ) {
|
||||||
|
const numberElement = clonedPage.querySelector( '.slide-number-pdf' );
|
||||||
|
const fragmentNumber = index + 1;
|
||||||
|
numberElement.innerHTML += '.' + fragmentNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
pages.push( clonedPage );
|
||||||
|
|
||||||
|
previousFragmentStep = fragments;
|
||||||
|
|
||||||
|
}, this );
|
||||||
|
|
||||||
|
// Reset the first/original page so that all fragments are hidden
|
||||||
|
fragmentGroups.forEach( function( fragments ) {
|
||||||
|
fragments.forEach( function( fragment ) {
|
||||||
|
fragment.classList.remove( 'visible', 'current-fragment' );
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
// Show all fragments
|
||||||
|
else {
|
||||||
|
queryAll( page, '.fragment:not(.fade-out)' ).forEach( function( fragment ) {
|
||||||
|
fragment.classList.add( 'visible' );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}, this );
|
||||||
|
|
||||||
|
await new Promise( requestAnimationFrame );
|
||||||
|
|
||||||
|
pages.forEach( page => pageContainer.appendChild( page ) );
|
||||||
|
|
||||||
|
// Notify subscribers that the PDF layout is good to go
|
||||||
|
this.Reveal.dispatchEvent({ type: 'pdf-ready' });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if this instance is being used to print a PDF.
|
||||||
|
*/
|
||||||
|
isPrintingPDF() {
|
||||||
|
|
||||||
|
return ( /print-pdf/gi ).test( window.location.search );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
110
js/controllers/progress.js
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
/**
|
||||||
|
* Creates a visual progress bar for the presentation.
|
||||||
|
*/
|
||||||
|
export default class Progress {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
this.onProgressClicked = this.onProgressClicked.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
this.element = document.createElement( 'div' );
|
||||||
|
this.element.className = 'progress';
|
||||||
|
this.Reveal.getRevealElement().appendChild( this.element );
|
||||||
|
|
||||||
|
this.bar = document.createElement( 'span' );
|
||||||
|
this.element.appendChild( this.bar );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the reveal.js config is updated.
|
||||||
|
*/
|
||||||
|
configure( config, oldConfig ) {
|
||||||
|
|
||||||
|
this.element.style.display = config.progress ? 'block' : 'none';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bind() {
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().progress && this.element ) {
|
||||||
|
this.element.addEventListener( 'click', this.onProgressClicked, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
unbind() {
|
||||||
|
|
||||||
|
if ( this.Reveal.getConfig().progress && this.element ) {
|
||||||
|
this.element.removeEventListener( 'click', this.onProgressClicked, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the progress bar to reflect the current slide.
|
||||||
|
*/
|
||||||
|
update() {
|
||||||
|
|
||||||
|
// Update progress if enabled
|
||||||
|
if( this.Reveal.getConfig().progress && this.bar ) {
|
||||||
|
|
||||||
|
let scale = this.Reveal.getProgress();
|
||||||
|
|
||||||
|
// Don't fill the progress bar if there's only one slide
|
||||||
|
if( this.Reveal.getTotalSlides() < 2 ) {
|
||||||
|
scale = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.bar.style.transform = 'scaleX('+ scale +')';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getMaxWidth() {
|
||||||
|
|
||||||
|
return this.Reveal.getRevealElement().offsetWidth;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clicking on the progress bar results in a navigation to the
|
||||||
|
* closest approximate horizontal slide using this equation:
|
||||||
|
*
|
||||||
|
* ( clickX / presentationWidth ) * numberOfSlides
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onProgressClicked( event ) {
|
||||||
|
|
||||||
|
this.Reveal.onUserInput( event );
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
let slides = this.Reveal.getSlides();
|
||||||
|
let slidesTotal = slides.length;
|
||||||
|
let slideIndex = Math.floor( ( event.clientX / this.getMaxWidth() ) * slidesTotal );
|
||||||
|
|
||||||
|
if( this.Reveal.getConfig().rtl ) {
|
||||||
|
slideIndex = slidesTotal - slideIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
let targetIndices = this.Reveal.getIndices(slides[slideIndex]);
|
||||||
|
this.Reveal.slide( targetIndices.h, targetIndices.v );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
this.element.remove();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
479
js/controllers/slidecontent.js
Normal file
@ -0,0 +1,479 @@
|
|||||||
|
import { extend, queryAll, closest, getMimeTypeFromFile } from '../utils/util.js'
|
||||||
|
import { isMobile } from '../utils/device.js'
|
||||||
|
|
||||||
|
import fitty from 'fitty';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles loading, unloading and playback of slide
|
||||||
|
* content such as images, videos and iframes.
|
||||||
|
*/
|
||||||
|
export default class SlideContent {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
this.startEmbeddedIframe = this.startEmbeddedIframe.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should the given element be preloaded?
|
||||||
|
* Decides based on local element attributes and global config.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} element
|
||||||
|
*/
|
||||||
|
shouldPreload( element ) {
|
||||||
|
|
||||||
|
// Prefer an explicit global preload setting
|
||||||
|
let preload = this.Reveal.getConfig().preloadIframes;
|
||||||
|
|
||||||
|
// If no global setting is available, fall back on the element's
|
||||||
|
// own preload setting
|
||||||
|
if( typeof preload !== 'boolean' ) {
|
||||||
|
preload = element.hasAttribute( 'data-preload' );
|
||||||
|
}
|
||||||
|
|
||||||
|
return preload;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the given slide is within the configured view
|
||||||
|
* distance. Shows the slide element and loads any content
|
||||||
|
* that is set to load lazily (data-src).
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} slide Slide to show
|
||||||
|
*/
|
||||||
|
load( slide, options = {} ) {
|
||||||
|
|
||||||
|
// Show the slide element
|
||||||
|
slide.style.display = this.Reveal.getConfig().display;
|
||||||
|
|
||||||
|
// Media elements with data-src attributes
|
||||||
|
queryAll( slide, 'img[data-src], video[data-src], audio[data-src], iframe[data-src]' ).forEach( element => {
|
||||||
|
if( element.tagName !== 'IFRAME' || this.shouldPreload( element ) ) {
|
||||||
|
element.setAttribute( 'src', element.getAttribute( 'data-src' ) );
|
||||||
|
element.setAttribute( 'data-lazy-loaded', '' );
|
||||||
|
element.removeAttribute( 'data-src' );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Media elements with <source> children
|
||||||
|
queryAll( slide, 'video, audio' ).forEach( media => {
|
||||||
|
let sources = 0;
|
||||||
|
|
||||||
|
queryAll( media, 'source[data-src]' ).forEach( source => {
|
||||||
|
source.setAttribute( 'src', source.getAttribute( 'data-src' ) );
|
||||||
|
source.removeAttribute( 'data-src' );
|
||||||
|
source.setAttribute( 'data-lazy-loaded', '' );
|
||||||
|
sources += 1;
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Enable inline video playback in mobile Safari
|
||||||
|
if( isMobile && media.tagName === 'VIDEO' ) {
|
||||||
|
media.setAttribute( 'playsinline', '' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we rewrote sources for this video/audio element, we need
|
||||||
|
// to manually tell it to load from its new origin
|
||||||
|
if( sources > 0 ) {
|
||||||
|
media.load();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
// Show the corresponding background element
|
||||||
|
let background = slide.slideBackgroundElement;
|
||||||
|
if( background ) {
|
||||||
|
background.style.display = 'block';
|
||||||
|
|
||||||
|
let backgroundContent = slide.slideBackgroundContentElement;
|
||||||
|
let backgroundIframe = slide.getAttribute( 'data-background-iframe' );
|
||||||
|
|
||||||
|
// If the background contains media, load it
|
||||||
|
if( background.hasAttribute( 'data-loaded' ) === false ) {
|
||||||
|
background.setAttribute( 'data-loaded', 'true' );
|
||||||
|
|
||||||
|
let backgroundImage = slide.getAttribute( 'data-background-image' ),
|
||||||
|
backgroundVideo = slide.getAttribute( 'data-background-video' ),
|
||||||
|
backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ),
|
||||||
|
backgroundVideoMuted = slide.hasAttribute( 'data-background-video-muted' );
|
||||||
|
|
||||||
|
// Images
|
||||||
|
if( backgroundImage ) {
|
||||||
|
// base64
|
||||||
|
if( /^data:/.test( backgroundImage.trim() ) ) {
|
||||||
|
backgroundContent.style.backgroundImage = `url(${backgroundImage.trim()})`;
|
||||||
|
}
|
||||||
|
// URL(s)
|
||||||
|
else {
|
||||||
|
backgroundContent.style.backgroundImage = backgroundImage.split( ',' ).map( background => {
|
||||||
|
return `url(${encodeURI(background.trim())})`;
|
||||||
|
}).join( ',' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Videos
|
||||||
|
else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {
|
||||||
|
let video = document.createElement( 'video' );
|
||||||
|
|
||||||
|
if( backgroundVideoLoop ) {
|
||||||
|
video.setAttribute( 'loop', '' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( backgroundVideoMuted ) {
|
||||||
|
video.muted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enable inline playback in mobile Safari
|
||||||
|
//
|
||||||
|
// Mute is required for video to play when using
|
||||||
|
// swipe gestures to navigate since they don't
|
||||||
|
// count as direct user actions :'(
|
||||||
|
if( isMobile ) {
|
||||||
|
video.muted = true;
|
||||||
|
video.setAttribute( 'playsinline', '' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Support comma separated lists of video sources
|
||||||
|
backgroundVideo.split( ',' ).forEach( source => {
|
||||||
|
let type = getMimeTypeFromFile( source );
|
||||||
|
if( type ) {
|
||||||
|
video.innerHTML += `<source src="${source}" type="${type}">`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
video.innerHTML += `<source src="${source}">`;
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
backgroundContent.appendChild( video );
|
||||||
|
}
|
||||||
|
// Iframes
|
||||||
|
else if( backgroundIframe && options.excludeIframes !== true ) {
|
||||||
|
let iframe = document.createElement( 'iframe' );
|
||||||
|
iframe.setAttribute( 'allowfullscreen', '' );
|
||||||
|
iframe.setAttribute( 'mozallowfullscreen', '' );
|
||||||
|
iframe.setAttribute( 'webkitallowfullscreen', '' );
|
||||||
|
iframe.setAttribute( 'allow', 'autoplay' );
|
||||||
|
|
||||||
|
iframe.setAttribute( 'data-src', backgroundIframe );
|
||||||
|
|
||||||
|
iframe.style.width = '100%';
|
||||||
|
iframe.style.height = '100%';
|
||||||
|
iframe.style.maxHeight = '100%';
|
||||||
|
iframe.style.maxWidth = '100%';
|
||||||
|
|
||||||
|
backgroundContent.appendChild( iframe );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start loading preloadable iframes
|
||||||
|
let backgroundIframeElement = backgroundContent.querySelector( 'iframe[data-src]' );
|
||||||
|
if( backgroundIframeElement ) {
|
||||||
|
|
||||||
|
// Check if this iframe is eligible to be preloaded
|
||||||
|
if( this.shouldPreload( background ) && !/autoplay=(1|true|yes)/gi.test( backgroundIframe ) ) {
|
||||||
|
if( backgroundIframeElement.getAttribute( 'src' ) !== backgroundIframe ) {
|
||||||
|
backgroundIframeElement.setAttribute( 'src', backgroundIframe );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.layout( slide );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies JS-dependent layout helpers for the given slide,
|
||||||
|
* if there are any.
|
||||||
|
*/
|
||||||
|
layout( slide ) {
|
||||||
|
|
||||||
|
// Autosize text with the r-fit-text class based on the
|
||||||
|
// size of its container. This needs to happen after the
|
||||||
|
// slide is visible in order to measure the text.
|
||||||
|
Array.from( slide.querySelectorAll( '.r-fit-text' ) ).forEach( element => {
|
||||||
|
fitty( element, {
|
||||||
|
minSize: 24,
|
||||||
|
maxSize: this.Reveal.getConfig().height * 0.8,
|
||||||
|
observeMutations: false,
|
||||||
|
observeWindow: false
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unloads and hides the given slide. This is called when the
|
||||||
|
* slide is moved outside of the configured view distance.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} slide
|
||||||
|
*/
|
||||||
|
unload( slide ) {
|
||||||
|
|
||||||
|
// Hide the slide element
|
||||||
|
slide.style.display = 'none';
|
||||||
|
|
||||||
|
// Hide the corresponding background element
|
||||||
|
let background = this.Reveal.getSlideBackground( slide );
|
||||||
|
if( background ) {
|
||||||
|
background.style.display = 'none';
|
||||||
|
|
||||||
|
// Unload any background iframes
|
||||||
|
queryAll( background, 'iframe[src]' ).forEach( element => {
|
||||||
|
element.removeAttribute( 'src' );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset lazy-loaded media elements with src attributes
|
||||||
|
queryAll( slide, 'video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]' ).forEach( element => {
|
||||||
|
element.setAttribute( 'data-src', element.getAttribute( 'src' ) );
|
||||||
|
element.removeAttribute( 'src' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Reset lazy-loaded media elements with <source> children
|
||||||
|
queryAll( slide, 'video[data-lazy-loaded] source[src], audio source[src]' ).forEach( source => {
|
||||||
|
source.setAttribute( 'data-src', source.getAttribute( 'src' ) );
|
||||||
|
source.removeAttribute( 'src' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enforces origin-specific format rules for embedded media.
|
||||||
|
*/
|
||||||
|
formatEmbeddedContent() {
|
||||||
|
|
||||||
|
let _appendParamToIframeSource = ( sourceAttribute, sourceURL, param ) => {
|
||||||
|
queryAll( this.Reveal.getSlidesElement(), 'iframe['+ sourceAttribute +'*="'+ sourceURL +'"]' ).forEach( el => {
|
||||||
|
let src = el.getAttribute( sourceAttribute );
|
||||||
|
if( src && src.indexOf( param ) === -1 ) {
|
||||||
|
el.setAttribute( sourceAttribute, src + ( !/\?/.test( src ) ? '?' : '&' ) + param );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// YouTube frames must include "?enablejsapi=1"
|
||||||
|
_appendParamToIframeSource( 'src', 'youtube.com/embed/', 'enablejsapi=1' );
|
||||||
|
_appendParamToIframeSource( 'data-src', 'youtube.com/embed/', 'enablejsapi=1' );
|
||||||
|
|
||||||
|
// Vimeo frames must include "?api=1"
|
||||||
|
_appendParamToIframeSource( 'src', 'player.vimeo.com/', 'api=1' );
|
||||||
|
_appendParamToIframeSource( 'data-src', 'player.vimeo.com/', 'api=1' );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start playback of any embedded content inside of
|
||||||
|
* the given element.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} element
|
||||||
|
*/
|
||||||
|
startEmbeddedContent( element ) {
|
||||||
|
|
||||||
|
if( element && !this.Reveal.isSpeakerNotes() ) {
|
||||||
|
|
||||||
|
// Restart GIFs
|
||||||
|
queryAll( element, 'img[src$=".gif"]' ).forEach( el => {
|
||||||
|
// Setting the same unchanged source like this was confirmed
|
||||||
|
// to work in Chrome, FF & Safari
|
||||||
|
el.setAttribute( 'src', el.getAttribute( 'src' ) );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// HTML5 media elements
|
||||||
|
queryAll( element, 'video, audio' ).forEach( el => {
|
||||||
|
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prefer an explicit global autoplay setting
|
||||||
|
let autoplay = this.Reveal.getConfig().autoPlayMedia;
|
||||||
|
|
||||||
|
// If no global setting is available, fall back on the element's
|
||||||
|
// own autoplay setting
|
||||||
|
if( typeof autoplay !== 'boolean' ) {
|
||||||
|
autoplay = el.hasAttribute( 'data-autoplay' ) || !!closest( el, '.slide-background' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( autoplay && typeof el.play === 'function' ) {
|
||||||
|
|
||||||
|
// If the media is ready, start playback
|
||||||
|
if( el.readyState > 1 ) {
|
||||||
|
this.startEmbeddedMedia( { target: el } );
|
||||||
|
}
|
||||||
|
// Mobile devices never fire a loaded event so instead
|
||||||
|
// of waiting, we initiate playback
|
||||||
|
else if( isMobile ) {
|
||||||
|
let promise = el.play();
|
||||||
|
|
||||||
|
// If autoplay does not work, ensure that the controls are visible so
|
||||||
|
// that the viewer can start the media on their own
|
||||||
|
if( promise && typeof promise.catch === 'function' && el.controls === false ) {
|
||||||
|
promise.catch( () => {
|
||||||
|
el.controls = true;
|
||||||
|
|
||||||
|
// Once the video does start playing, hide the controls again
|
||||||
|
el.addEventListener( 'play', () => {
|
||||||
|
el.controls = false;
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If the media isn't loaded, wait before playing
|
||||||
|
else {
|
||||||
|
el.removeEventListener( 'loadeddata', this.startEmbeddedMedia ); // remove first to avoid dupes
|
||||||
|
el.addEventListener( 'loadeddata', this.startEmbeddedMedia );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Normal iframes
|
||||||
|
queryAll( element, 'iframe[src]' ).forEach( el => {
|
||||||
|
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.startEmbeddedIframe( { target: el } );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Lazy loading iframes
|
||||||
|
queryAll( element, 'iframe[data-src]' ).forEach( el => {
|
||||||
|
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) {
|
||||||
|
el.removeEventListener( 'load', this.startEmbeddedIframe ); // remove first to avoid dupes
|
||||||
|
el.addEventListener( 'load', this.startEmbeddedIframe );
|
||||||
|
el.setAttribute( 'src', el.getAttribute( 'data-src' ) );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts playing an embedded video/audio element after
|
||||||
|
* it has finished loading.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
startEmbeddedMedia( event ) {
|
||||||
|
|
||||||
|
let isAttachedToDOM = !!closest( event.target, 'html' ),
|
||||||
|
isVisible = !!closest( event.target, '.present' );
|
||||||
|
|
||||||
|
if( isAttachedToDOM && isVisible ) {
|
||||||
|
event.target.currentTime = 0;
|
||||||
|
event.target.play();
|
||||||
|
}
|
||||||
|
|
||||||
|
event.target.removeEventListener( 'loadeddata', this.startEmbeddedMedia );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* "Starts" the content of an embedded iframe using the
|
||||||
|
* postMessage API.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
startEmbeddedIframe( event ) {
|
||||||
|
|
||||||
|
let iframe = event.target;
|
||||||
|
|
||||||
|
if( iframe && iframe.contentWindow ) {
|
||||||
|
|
||||||
|
let isAttachedToDOM = !!closest( event.target, 'html' ),
|
||||||
|
isVisible = !!closest( event.target, '.present' );
|
||||||
|
|
||||||
|
if( isAttachedToDOM && isVisible ) {
|
||||||
|
|
||||||
|
// Prefer an explicit global autoplay setting
|
||||||
|
let autoplay = this.Reveal.getConfig().autoPlayMedia;
|
||||||
|
|
||||||
|
// If no global setting is available, fall back on the element's
|
||||||
|
// own autoplay setting
|
||||||
|
if( typeof autoplay !== 'boolean' ) {
|
||||||
|
autoplay = iframe.hasAttribute( 'data-autoplay' ) || !!closest( iframe, '.slide-background' );
|
||||||
|
}
|
||||||
|
|
||||||
|
// YouTube postMessage API
|
||||||
|
if( /youtube\.com\/embed\//.test( iframe.getAttribute( 'src' ) ) && autoplay ) {
|
||||||
|
iframe.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' );
|
||||||
|
}
|
||||||
|
// Vimeo postMessage API
|
||||||
|
else if( /player\.vimeo\.com\//.test( iframe.getAttribute( 'src' ) ) && autoplay ) {
|
||||||
|
iframe.contentWindow.postMessage( '{"method":"play"}', '*' );
|
||||||
|
}
|
||||||
|
// Generic postMessage API
|
||||||
|
else {
|
||||||
|
iframe.contentWindow.postMessage( 'slide:start', '*' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop playback of any embedded content inside of
|
||||||
|
* the targeted slide.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} element
|
||||||
|
*/
|
||||||
|
stopEmbeddedContent( element, options = {} ) {
|
||||||
|
|
||||||
|
options = extend( {
|
||||||
|
// Defaults
|
||||||
|
unloadIframes: true
|
||||||
|
}, options );
|
||||||
|
|
||||||
|
if( element && element.parentNode ) {
|
||||||
|
// HTML5 media elements
|
||||||
|
queryAll( element, 'video, audio' ).forEach( el => {
|
||||||
|
if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) {
|
||||||
|
el.setAttribute('data-paused-by-reveal', '');
|
||||||
|
el.pause();
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Generic postMessage API for non-lazy loaded iframes
|
||||||
|
queryAll( element, 'iframe' ).forEach( el => {
|
||||||
|
if( el.contentWindow ) el.contentWindow.postMessage( 'slide:stop', '*' );
|
||||||
|
el.removeEventListener( 'load', this.startEmbeddedIframe );
|
||||||
|
});
|
||||||
|
|
||||||
|
// YouTube postMessage API
|
||||||
|
queryAll( element, 'iframe[src*="youtube.com/embed/"]' ).forEach( el => {
|
||||||
|
if( !el.hasAttribute( 'data-ignore' ) && el.contentWindow && typeof el.contentWindow.postMessage === 'function' ) {
|
||||||
|
el.contentWindow.postMessage( '{"event":"command","func":"pauseVideo","args":""}', '*' );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Vimeo postMessage API
|
||||||
|
queryAll( element, 'iframe[src*="player.vimeo.com/"]' ).forEach( el => {
|
||||||
|
if( !el.hasAttribute( 'data-ignore' ) && el.contentWindow && typeof el.contentWindow.postMessage === 'function' ) {
|
||||||
|
el.contentWindow.postMessage( '{"method":"pause"}', '*' );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if( options.unloadIframes === true ) {
|
||||||
|
// Unload lazy-loaded iframes
|
||||||
|
queryAll( element, 'iframe[data-src]' ).forEach( el => {
|
||||||
|
// Only removing the src doesn't actually unload the frame
|
||||||
|
// in all browsers (Firefox) so we set it to blank first
|
||||||
|
el.setAttribute( 'src', 'about:blank' );
|
||||||
|
el.removeAttribute( 'src' );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
132
js/controllers/slidenumber.js
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
/**
|
||||||
|
* Handles the display of reveal.js' optional slide number.
|
||||||
|
*/
|
||||||
|
export default class SlideNumber {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
this.element = document.createElement( 'div' );
|
||||||
|
this.element.className = 'slide-number';
|
||||||
|
this.Reveal.getRevealElement().appendChild( this.element );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when the reveal.js config is updated.
|
||||||
|
*/
|
||||||
|
configure( config, oldConfig ) {
|
||||||
|
|
||||||
|
let slideNumberDisplay = 'none';
|
||||||
|
if( config.slideNumber && !this.Reveal.isPrintingPDF() ) {
|
||||||
|
if( config.showSlideNumber === 'all' ) {
|
||||||
|
slideNumberDisplay = 'block';
|
||||||
|
}
|
||||||
|
else if( config.showSlideNumber === 'speaker' && this.Reveal.isSpeakerNotes() ) {
|
||||||
|
slideNumberDisplay = 'block';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.element.style.display = slideNumberDisplay;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the slide number to match the current slide.
|
||||||
|
*/
|
||||||
|
update() {
|
||||||
|
|
||||||
|
// Update slide number if enabled
|
||||||
|
if( this.Reveal.getConfig().slideNumber && this.element ) {
|
||||||
|
this.element.innerHTML = this.getSlideNumber();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the HTML string corresponding to the current slide
|
||||||
|
* number, including formatting.
|
||||||
|
*/
|
||||||
|
getSlideNumber( slide = this.Reveal.getCurrentSlide() ) {
|
||||||
|
|
||||||
|
let config = this.Reveal.getConfig();
|
||||||
|
let value;
|
||||||
|
let format = 'h.v';
|
||||||
|
|
||||||
|
if ( typeof config.slideNumber === 'function' ) {
|
||||||
|
value = config.slideNumber( slide );
|
||||||
|
} else {
|
||||||
|
// Check if a custom number format is available
|
||||||
|
if( typeof config.slideNumber === 'string' ) {
|
||||||
|
format = config.slideNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there are ONLY vertical slides in this deck, always use
|
||||||
|
// a flattened slide number
|
||||||
|
if( !/c/.test( format ) && this.Reveal.getHorizontalSlides().length === 1 ) {
|
||||||
|
format = 'c';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Offset the current slide number by 1 to make it 1-indexed
|
||||||
|
let horizontalOffset = slide && slide.dataset.visibility === 'uncounted' ? 0 : 1;
|
||||||
|
|
||||||
|
value = [];
|
||||||
|
switch( format ) {
|
||||||
|
case 'c':
|
||||||
|
value.push( this.Reveal.getSlidePastCount( slide ) + horizontalOffset );
|
||||||
|
break;
|
||||||
|
case 'c/t':
|
||||||
|
value.push( this.Reveal.getSlidePastCount( slide ) + horizontalOffset, '/', this.Reveal.getTotalSlides() );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
let indices = this.Reveal.getIndices( slide );
|
||||||
|
value.push( indices.h + horizontalOffset );
|
||||||
|
let sep = format === 'h/v' ? '/' : '.';
|
||||||
|
if( this.Reveal.isVerticalSlide( slide ) ) value.push( sep, indices.v + 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let url = '#' + this.Reveal.location.getHash( slide );
|
||||||
|
return this.formatNumber( value[0], value[1], value[2], url );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies HTML formatting to a slide number before it's
|
||||||
|
* written to the DOM.
|
||||||
|
*
|
||||||
|
* @param {number} a Current slide
|
||||||
|
* @param {string} delimiter Character to separate slide numbers
|
||||||
|
* @param {(number|*)} b Total slides
|
||||||
|
* @param {HTMLElement} [url='#'+locationHash()] The url to link to
|
||||||
|
* @return {string} HTML string fragment
|
||||||
|
*/
|
||||||
|
formatNumber( a, delimiter, b, url = '#' + this.Reveal.location.getHash() ) {
|
||||||
|
|
||||||
|
if( typeof b === 'number' && !isNaN( b ) ) {
|
||||||
|
return `<a href="${url}">
|
||||||
|
<span class="slide-number-a">${a}</span>
|
||||||
|
<span class="slide-number-delimiter">${delimiter}</span>
|
||||||
|
<span class="slide-number-b">${b}</span>
|
||||||
|
</a>`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return `<a href="${url}">
|
||||||
|
<span class="slide-number-a">${a}</span>
|
||||||
|
</a>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
|
||||||
|
this.element.remove();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
263
js/controllers/touch.js
Normal file
@ -0,0 +1,263 @@
|
|||||||
|
import { isAndroid } from '../utils/device.js'
|
||||||
|
import { matches } from '../utils/util.js'
|
||||||
|
|
||||||
|
const SWIPE_THRESHOLD = 40;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls all touch interactions and navigations for
|
||||||
|
* a presentation.
|
||||||
|
*/
|
||||||
|
export default class Touch {
|
||||||
|
|
||||||
|
constructor( Reveal ) {
|
||||||
|
|
||||||
|
this.Reveal = Reveal;
|
||||||
|
|
||||||
|
// Holds information about the currently ongoing touch interaction
|
||||||
|
this.touchStartX = 0;
|
||||||
|
this.touchStartY = 0;
|
||||||
|
this.touchStartCount = 0;
|
||||||
|
this.touchCaptured = false;
|
||||||
|
|
||||||
|
this.onPointerDown = this.onPointerDown.bind( this );
|
||||||
|
this.onPointerMove = this.onPointerMove.bind( this );
|
||||||
|
this.onPointerUp = this.onPointerUp.bind( this );
|
||||||
|
this.onTouchStart = this.onTouchStart.bind( this );
|
||||||
|
this.onTouchMove = this.onTouchMove.bind( this );
|
||||||
|
this.onTouchEnd = this.onTouchEnd.bind( this );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
bind() {
|
||||||
|
|
||||||
|
let revealElement = this.Reveal.getRevealElement();
|
||||||
|
|
||||||
|
if( 'onpointerdown' in window ) {
|
||||||
|
// Use W3C pointer events
|
||||||
|
revealElement.addEventListener( 'pointerdown', this.onPointerDown, false );
|
||||||
|
revealElement.addEventListener( 'pointermove', this.onPointerMove, false );
|
||||||
|
revealElement.addEventListener( 'pointerup', this.onPointerUp, false );
|
||||||
|
}
|
||||||
|
else if( window.navigator.msPointerEnabled ) {
|
||||||
|
// IE 10 uses prefixed version of pointer events
|
||||||
|
revealElement.addEventListener( 'MSPointerDown', this.onPointerDown, false );
|
||||||
|
revealElement.addEventListener( 'MSPointerMove', this.onPointerMove, false );
|
||||||
|
revealElement.addEventListener( 'MSPointerUp', this.onPointerUp, false );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Fall back to touch events
|
||||||
|
revealElement.addEventListener( 'touchstart', this.onTouchStart, false );
|
||||||
|
revealElement.addEventListener( 'touchmove', this.onTouchMove, false );
|
||||||
|
revealElement.addEventListener( 'touchend', this.onTouchEnd, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
unbind() {
|
||||||
|
|
||||||
|
let revealElement = this.Reveal.getRevealElement();
|
||||||
|
|
||||||
|
revealElement.removeEventListener( 'pointerdown', this.onPointerDown, false );
|
||||||
|
revealElement.removeEventListener( 'pointermove', this.onPointerMove, false );
|
||||||
|
revealElement.removeEventListener( 'pointerup', this.onPointerUp, false );
|
||||||
|
|
||||||
|
revealElement.removeEventListener( 'MSPointerDown', this.onPointerDown, false );
|
||||||
|
revealElement.removeEventListener( 'MSPointerMove', this.onPointerMove, false );
|
||||||
|
revealElement.removeEventListener( 'MSPointerUp', this.onPointerUp, false );
|
||||||
|
|
||||||
|
revealElement.removeEventListener( 'touchstart', this.onTouchStart, false );
|
||||||
|
revealElement.removeEventListener( 'touchmove', this.onTouchMove, false );
|
||||||
|
revealElement.removeEventListener( 'touchend', this.onTouchEnd, false );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the target element prevents the triggering of
|
||||||
|
* swipe navigation.
|
||||||
|
*/
|
||||||
|
isSwipePrevented( target ) {
|
||||||
|
|
||||||
|
// Prevent accidental swipes when scrubbing timelines
|
||||||
|
if( matches( target, 'video, audio' ) ) return true;
|
||||||
|
|
||||||
|
while( target && typeof target.hasAttribute === 'function' ) {
|
||||||
|
if( target.hasAttribute( 'data-prevent-swipe' ) ) return true;
|
||||||
|
target = target.parentNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for the 'touchstart' event, enables support for
|
||||||
|
* swipe and pinch gestures.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onTouchStart( event ) {
|
||||||
|
|
||||||
|
if( this.isSwipePrevented( event.target ) ) return true;
|
||||||
|
|
||||||
|
this.touchStartX = event.touches[0].clientX;
|
||||||
|
this.touchStartY = event.touches[0].clientY;
|
||||||
|
this.touchStartCount = event.touches.length;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for the 'touchmove' event.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onTouchMove( event ) {
|
||||||
|
|
||||||
|
if( this.isSwipePrevented( event.target ) ) return true;
|
||||||
|
|
||||||
|
let config = this.Reveal.getConfig();
|
||||||
|
|
||||||
|
// Each touch should only trigger one action
|
||||||
|
if( !this.touchCaptured ) {
|
||||||
|
this.Reveal.onUserInput( event );
|
||||||
|
|
||||||
|
let currentX = event.touches[0].clientX;
|
||||||
|
let currentY = event.touches[0].clientY;
|
||||||
|
|
||||||
|
// There was only one touch point, look for a swipe
|
||||||
|
if( event.touches.length === 1 && this.touchStartCount !== 2 ) {
|
||||||
|
|
||||||
|
let availableRoutes = this.Reveal.availableRoutes({ includeFragments: true });
|
||||||
|
|
||||||
|
let deltaX = currentX - this.touchStartX,
|
||||||
|
deltaY = currentY - this.touchStartY;
|
||||||
|
|
||||||
|
if( deltaX > SWIPE_THRESHOLD && Math.abs( deltaX ) > Math.abs( deltaY ) ) {
|
||||||
|
this.touchCaptured = true;
|
||||||
|
if( config.navigationMode === 'linear' ) {
|
||||||
|
if( config.rtl ) {
|
||||||
|
this.Reveal.next();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.prev();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.left();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if( deltaX < -SWIPE_THRESHOLD && Math.abs( deltaX ) > Math.abs( deltaY ) ) {
|
||||||
|
this.touchCaptured = true;
|
||||||
|
if( config.navigationMode === 'linear' ) {
|
||||||
|
if( config.rtl ) {
|
||||||
|
this.Reveal.prev();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.right();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if( deltaY > SWIPE_THRESHOLD && availableRoutes.up ) {
|
||||||
|
this.touchCaptured = true;
|
||||||
|
if( config.navigationMode === 'linear' ) {
|
||||||
|
this.Reveal.prev();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.up();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if( deltaY < -SWIPE_THRESHOLD && availableRoutes.down ) {
|
||||||
|
this.touchCaptured = true;
|
||||||
|
if( config.navigationMode === 'linear' ) {
|
||||||
|
this.Reveal.next();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.Reveal.down();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we're embedded, only block touch events if they have
|
||||||
|
// triggered an action
|
||||||
|
if( config.embedded ) {
|
||||||
|
if( this.touchCaptured || this.Reveal.isVerticalSlide() ) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Not embedded? Block them all to avoid needless tossing
|
||||||
|
// around of the viewport in iOS
|
||||||
|
else {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// There's a bug with swiping on some Android devices unless
|
||||||
|
// the default action is always prevented
|
||||||
|
else if( isAndroid ) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handler for the 'touchend' event.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onTouchEnd( event ) {
|
||||||
|
|
||||||
|
this.touchCaptured = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert pointer down to touch start.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onPointerDown( event ) {
|
||||||
|
|
||||||
|
if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
|
||||||
|
event.touches = [{ clientX: event.clientX, clientY: event.clientY }];
|
||||||
|
this.onTouchStart( event );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert pointer move to touch move.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onPointerMove( event ) {
|
||||||
|
|
||||||
|
if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
|
||||||
|
event.touches = [{ clientX: event.clientX, clientY: event.clientY }];
|
||||||
|
this.onTouchMove( event );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert pointer up to touch end.
|
||||||
|
*
|
||||||
|
* @param {object} event
|
||||||
|
*/
|
||||||
|
onPointerUp( event ) {
|
||||||
|
|
||||||
|
if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
|
||||||
|
event.touches = [{ clientX: event.clientX, clientY: event.clientY }];
|
||||||
|
this.onTouchEnd( event );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|