1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-11 09:04:51 +02:00

switch from gulp to vite to build, add types for reveal.js config

This commit is contained in:
Hakim El Hattab
2024-03-28 11:07:57 +01:00
parent eb95b14531
commit a89af36022
90 changed files with 61921 additions and 1106 deletions

30
css/reset.css Normal file
View 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;
}

View File

@@ -4,42 +4,41 @@
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(./fonts/league-gothic/league-gothic.css); @import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$mainColor: #333; $mainColor: #333;
$headingColor: #333; $headingColor: #333;
$headingTextShadow: none; $headingTextShadow: none;
$backgroundColor: #f7f3de; $backgroundColor: #f7f3de;
$linkColor: #8b743d; $linkColor: #8b743d;
$linkColorHover: color.scale( $linkColor, $lightness: 20% ); $linkColorHover: color.scale($linkColor, $lightness: 20%);
$selectionBackgroundColor: rgba(79, 64, 28, 0.99); $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); $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, 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);
$overlayElementBgColor: 0, 0, 0; $overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240; $overlayElementFgColor: 240, 240, 240;
// Background generator // Background generator
@mixin bodyBackground() { @mixin bodyBackground() {
@include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); @include radial-gradient(rgba(247, 242, 211, 1), rgba(255, 255, 255, 1));
} }
// Change text colors against dark slide backgrounds // Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff); @include dark-bg-text-color(#fff);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -7,18 +7,15 @@
* - $mainFontSize controls code blocks, too (although under some ratio). * - $mainFontSize controls code blocks, too (although under some ratio).
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(./fonts/source-sans-pro/source-sans-pro.css); @import url(./fonts/source-sans-pro/source-sans-pro.css);
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$backgroundColor: #000000; $backgroundColor: #000000;
@@ -26,25 +23,24 @@ $mainColor: #fff;
$headingColor: #fff; $headingColor: #fff;
$mainFontSize: 42px; $mainFontSize: 42px;
$mainFont: 'Source Sans Pro', Helvetica, sans-serif; $mainFont: "Source Sans Pro", Helvetica, sans-serif;
$headingFont: 'Source Sans Pro', Helvetica, sans-serif; $headingFont: "Source Sans Pro", Helvetica, sans-serif;
$headingTextShadow: none; $headingTextShadow: none;
$headingLetterSpacing: normal; $headingLetterSpacing: normal;
$headingTextTransform: uppercase; $headingTextTransform: uppercase;
$headingFontWeight: 600; $headingFontWeight: 600;
$linkColor: #42affa; $linkColor: #42affa;
$linkColorHover: color.scale( $linkColor, $lightness: 15% ); $linkColorHover: color.scale($linkColor, $lightness: 15%);
$selectionBackgroundColor: color.scale( $linkColor, $lightness: 25% ); $selectionBackgroundColor: color.scale($linkColor, $lightness: 25%);
$heading1Size: 2.5em; $heading1Size: 2.5em;
$heading2Size: 1.6em; $heading2Size: 1.6em;
$heading3Size: 1.3em; $heading3Size: 1.3em;
$heading4Size: 1.0em; $heading4Size: 1em;
// Change text colors against light slide backgrounds // Change text colors against light slide backgrounds
@include light-bg-text-color(#000); @include light-bg-text-color(#000);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -4,17 +4,14 @@
* By Hakim El Hattab, http://hakim.se * By Hakim El Hattab, http://hakim.se
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(./fonts/source-sans-pro/source-sans-pro.css); @import url("/theme/fonts/source-sans-pro/source-sans-pro.css");
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$backgroundColor: #191919; $backgroundColor: #191919;
@@ -23,25 +20,24 @@ $mainColor: #fff;
$headingColor: #fff; $headingColor: #fff;
$mainFontSize: 42px; $mainFontSize: 42px;
$mainFont: 'Source Sans Pro', Helvetica, sans-serif; $mainFont: "Source Sans Pro", Helvetica, sans-serif;
$headingFont: 'Source Sans Pro', Helvetica, sans-serif; $headingFont: "Source Sans Pro", Helvetica, sans-serif;
$headingTextShadow: none; $headingTextShadow: none;
$headingLetterSpacing: normal; $headingLetterSpacing: normal;
$headingTextTransform: uppercase; $headingTextTransform: uppercase;
$headingFontWeight: 600; $headingFontWeight: 600;
$linkColor: #42affa; $linkColor: #42affa;
$linkColorHover: color.scale( $linkColor, $lightness: 15% ); $linkColorHover: color.scale($linkColor, $lightness: 15%);
$selectionBackgroundColor: rgba( $linkColor, 0.75 ); $selectionBackgroundColor: rgba($linkColor, 0.75);
$heading1Size: 2.5em; $heading1Size: 2.5em;
$heading2Size: 1.6em; $heading2Size: 1.6em;
$heading3Size: 1.3em; $heading3Size: 1.3em;
$heading4Size: 1.0em; $heading4Size: 1em;
// Change text colors against light slide backgrounds // Change text colors against light slide backgrounds
@include light-bg-text-color(#222); @include light-bg-text-color(#222);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -28,20 +28,24 @@ $codeBackground: #23241f;
$backgroundColor: $coal; $backgroundColor: $coal;
// Main text // Main text
$mainFont: Ubuntu, 'sans-serif'; $mainFont: Ubuntu, "sans-serif";
$mainColor: #eee; $mainColor: #eee;
// Headings // Headings
$headingFont: Ubuntu, 'sans-serif'; $headingFont: Ubuntu, "sans-serif";
$headingTextShadow: 2px 2px 2px $coal; $headingTextShadow: 2px 2px 2px $coal;
// h1 shadow, borrowed humbly from // h1 shadow, borrowed humbly from
// (c) Default theme by Hakim El Hattab // (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); $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, 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);
// Links // Links
$linkColor: $blood; $linkColor: $blood;
$linkColorHover: color.scale( $linkColor, $lightness: 20% ); $linkColorHover: color.scale($linkColor, $lightness: 20%);
// Text selection // Text selection
$selectionBackgroundColor: $blood; $selectionBackgroundColor: $blood;
@@ -50,22 +54,25 @@ $selectionColor: #fff;
// Change text colors against dark slide backgrounds // Change text colors against dark slide backgrounds
@include light-bg-text-color(#222); @include light-bg-text-color(#222);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------
// some overrides after theme template import // some overrides after theme template import
.reveal p { .reveal p {
font-weight: 300; font-weight: 300;
text-shadow: 1px 1px $coal; text-shadow: 1px 1px $coal;
} }
section.has-light-background { section.has-light-background {
p, h1, h2, h3, h4 { p,
text-shadow: none; h1,
} h2,
h3,
h4 {
text-shadow: none;
}
} }
.reveal h1, .reveal h1,
@@ -74,15 +81,15 @@ section.has-light-background {
.reveal h4, .reveal h4,
.reveal h5, .reveal h5,
.reveal h6 { .reveal h6 {
font-weight: 700; font-weight: 700;
} }
.reveal p code { .reveal p code {
background-color: $codeBackground; background-color: $codeBackground;
display: inline-block; display: inline-block;
border-radius: 7px; border-radius: 7px;
} }
.reveal small code { .reveal small code {
vertical-align: baseline; vertical-align: baseline;
} }

View File

@@ -5,8 +5,8 @@
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@import "../template/mixins"; @import "./template/mixins";
@import "../template/settings"; @import "./template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@@ -75,7 +75,7 @@ $codeFont: "Fira Code", $systemFontsMono;
@include light-bg-text-color($background); @include light-bg-text-color($background);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------
// Define additional color effects based on Dracula spec // Define additional color effects based on Dracula spec

View File

@@ -8,8 +8,8 @@
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@import "../template/mixins"; @import "./template/mixins";
@import "../template/settings"; @import "./template/settings";
// --------------------------------------------- // ---------------------------------------------
@@ -32,5 +32,5 @@ $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -3,15 +3,12 @@
* Author: Achim Staebler * Author: Achim Staebler
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(./fonts/league-gothic/league-gothic.css); @import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
@@ -21,22 +18,22 @@
*/ */
// Solarized colors // Solarized colors
$base03: #002b36; $base03: #002b36;
$base02: #073642; $base02: #073642;
$base01: #586e75; $base01: #586e75;
$base00: #657b83; $base00: #657b83;
$base0: #839496; $base0: #839496;
$base1: #93a1a1; $base1: #93a1a1;
$base2: #eee8d5; $base2: #eee8d5;
$base3: #fdf6e3; $base3: #fdf6e3;
$yellow: #b58900; $yellow: #b58900;
$orange: #cb4b16; $orange: #cb4b16;
$red: #dc322f; $red: #dc322f;
$magenta: #d33682; $magenta: #d33682;
$violet: #6c71c4; $violet: #6c71c4;
$blue: #268bd2; $blue: #268bd2;
$cyan: #2aa198; $cyan: #2aa198;
$green: #859900; $green: #859900;
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$mainColor: $base1; $mainColor: $base1;
@@ -44,12 +41,12 @@ $headingColor: $base2;
$headingTextShadow: none; $headingTextShadow: none;
$backgroundColor: $base03; $backgroundColor: $base03;
$linkColor: $blue; $linkColor: $blue;
$linkColorHover: color.scale( $linkColor, $lightness: 20% ); $linkColorHover: color.scale($linkColor, $lightness: 20%);
$selectionBackgroundColor: $magenta; $selectionBackgroundColor: $magenta;
// Change text colors against light slide backgrounds // Change text colors against light slide backgrounds
@include light-bg-text-color(#222); @include light-bg-text-color(#222);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -4,26 +4,23 @@
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(https://fonts.googleapis.com/css?family=Montserrat:700); @import url(https://fonts.googleapis.com/css?family=Montserrat:700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$backgroundColor: #111; $backgroundColor: #111;
$mainFont: 'Open Sans', sans-serif; $mainFont: "Open Sans", sans-serif;
$linkColor: #e7ad52; $linkColor: #e7ad52;
$linkColorHover: color.scale( $linkColor, $lightness: 20% ); $linkColorHover: color.scale($linkColor, $lightness: 20%);
$headingFont: 'Montserrat', Impact, sans-serif; $headingFont: "Montserrat", Impact, sans-serif;
$headingTextShadow: none; $headingTextShadow: none;
$headingLetterSpacing: -0.03em; $headingLetterSpacing: -0.03em;
$headingTextTransform: none; $headingTextTransform: none;
@@ -32,7 +29,6 @@ $selectionBackgroundColor: #e7ad52;
// Change text colors against light slide backgrounds // Change text colors against light slide backgrounds
@include light-bg-text-color(#222); @include light-bg-text-color(#222);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -5,26 +5,23 @@
* This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; $mainFont: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
$mainColor: #000; $mainColor: #000;
$headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; $headingFont: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
$headingColor: #383D3D; $headingColor: #383d3d;
$headingTextShadow: none; $headingTextShadow: none;
$headingTextTransform: none; $headingTextTransform: none;
$backgroundColor: #F0F1EB; $backgroundColor: #f0f1eb;
$linkColor: #51483D; $linkColor: #51483d;
$linkColorHover: color.scale( $linkColor, $lightness: 20% ); $linkColorHover: color.scale($linkColor, $lightness: 20%);
$selectionBackgroundColor: #26351C; $selectionBackgroundColor: #26351c;
$overlayElementBgColor: 0, 0, 0; $overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240; $overlayElementFgColor: 240, 240, 240;
@@ -36,7 +33,6 @@ $overlayElementFgColor: 240, 240, 240;
// Change text colors against dark slide backgrounds // Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff); @include dark-bg-text-color(#fff);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -6,30 +6,26 @@
* reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); @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); @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$mainFont: 'Lato', sans-serif; $mainFont: "Lato", sans-serif;
$mainColor: #000; $mainColor: #000;
$headingFont: 'News Cycle', Impact, sans-serif; $headingFont: "News Cycle", Impact, sans-serif;
$headingColor: #000; $headingColor: #000;
$headingTextShadow: none; $headingTextShadow: none;
$headingTextTransform: none; $headingTextTransform: none;
$backgroundColor: #fff; $backgroundColor: #fff;
$linkColor: #00008B; $linkColor: #00008b;
$linkColorHover: color.scale( $linkColor, $lightness: 20% ); $linkColorHover: color.scale($linkColor, $lightness: 20%);
$selectionBackgroundColor: rgba(0, 0, 0, 0.99); $selectionBackgroundColor: rgba(0, 0, 0, 0.99);
$overlayElementBgColor: 0, 0, 0; $overlayElementBgColor: 0, 0, 0;
@@ -38,7 +34,6 @@ $overlayElementFgColor: 240, 240, 240;
// Change text colors against dark slide backgrounds // Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff); @include dark-bg-text-color(#fff);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -4,30 +4,26 @@
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // 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=Quicksand:400,700,400italic,700italic);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$mainFont: 'Open Sans', sans-serif; $mainFont: "Open Sans", sans-serif;
$mainColor: #333; $mainColor: #333;
$headingFont: 'Quicksand', sans-serif; $headingFont: "Quicksand", sans-serif;
$headingColor: #333; $headingColor: #333;
$headingLetterSpacing: -0.08em; $headingLetterSpacing: -0.08em;
$headingTextShadow: none; $headingTextShadow: none;
$backgroundColor: #f7fbfc; $backgroundColor: #f7fbfc;
$linkColor: #3b759e; $linkColor: #3b759e;
$linkColorHover: color.scale( $linkColor, $lightness: 20% ); $linkColorHover: color.scale($linkColor, $lightness: 20%);
$selectionBackgroundColor: #134674; $selectionBackgroundColor: #134674;
$overlayElementBgColor: 0, 0, 0; $overlayElementBgColor: 0, 0, 0;
@@ -35,19 +31,17 @@ $overlayElementFgColor: 240, 240, 240;
// Fix links so they are not cut off // Fix links so they are not cut off
.reveal a { .reveal a {
line-height: 1.3em; line-height: 1.3em;
} }
// Background generator // Background generator
@mixin bodyBackground() { @mixin bodyBackground() {
@include radial-gradient( #add9e4, #f7fbfc ); @include radial-gradient(#add9e4, #f7fbfc);
} }
// Change text colors against dark slide backgrounds // Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff); @include dark-bg-text-color(#fff);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -3,45 +3,41 @@
* Author: Achim Staebler * Author: Achim Staebler
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(./fonts/league-gothic/league-gothic.css); @import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
/** /**
* Solarized colors by Ethan Schoonover * Solarized colors by Ethan Schoonover
*/ */
html * { html * {
color-profile: sRGB; color-profile: sRGB;
rendering-intent: auto; rendering-intent: auto;
} }
// Solarized colors // Solarized colors
$base03: #002b36; $base03: #002b36;
$base02: #073642; $base02: #073642;
$base01: #586e75; $base01: #586e75;
$base00: #657b83; $base00: #657b83;
$base0: #839496; $base0: #839496;
$base1: #93a1a1; $base1: #93a1a1;
$base2: #eee8d5; $base2: #eee8d5;
$base3: #fdf6e3; $base3: #fdf6e3;
$yellow: #b58900; $yellow: #b58900;
$orange: #cb4b16; $orange: #cb4b16;
$red: #dc322f; $red: #dc322f;
$magenta: #d33682; $magenta: #d33682;
$violet: #6c71c4; $violet: #6c71c4;
$blue: #268bd2; $blue: #268bd2;
$cyan: #2aa198; $cyan: #2aa198;
$green: #859900; $green: #859900;
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$mainColor: $base00; $mainColor: $base00;
@@ -49,7 +45,7 @@ $headingColor: $base01;
$headingTextShadow: none; $headingTextShadow: none;
$backgroundColor: $base3; $backgroundColor: $base3;
$linkColor: $blue; $linkColor: $blue;
$linkColorHover: color.scale( $linkColor, $lightness: 20% ); $linkColorHover: color.scale($linkColor, $lightness: 20%);
$selectionBackgroundColor: $magenta; $selectionBackgroundColor: $magenta;
$overlayElementBgColor: 0, 0, 0; $overlayElementBgColor: 0, 0, 0;
@@ -60,8 +56,6 @@ $overlayElementFgColor: 240, 240, 240;
// @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) );
// } // }
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -7,18 +7,15 @@
* - $mainFontSize controls code blocks, too (although under some ratio). * - $mainFontSize controls code blocks, too (although under some ratio).
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(./fonts/source-sans-pro/source-sans-pro.css); @import url(./fonts/source-sans-pro/source-sans-pro.css);
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$backgroundColor: #fff; $backgroundColor: #fff;
@@ -26,20 +23,20 @@ $mainColor: #000;
$headingColor: #000; $headingColor: #000;
$mainFontSize: 42px; $mainFontSize: 42px;
$mainFont: 'Source Sans Pro', Helvetica, sans-serif; $mainFont: "Source Sans Pro", Helvetica, sans-serif;
$headingFont: 'Source Sans Pro', Helvetica, sans-serif; $headingFont: "Source Sans Pro", Helvetica, sans-serif;
$headingTextShadow: none; $headingTextShadow: none;
$headingLetterSpacing: normal; $headingLetterSpacing: normal;
$headingTextTransform: uppercase; $headingTextTransform: uppercase;
$headingFontWeight: 600; $headingFontWeight: 600;
$linkColor: #2a76dd; $linkColor: #2a76dd;
$linkColorHover: color.scale( $linkColor, $lightness: 15% ); $linkColorHover: color.scale($linkColor, $lightness: 15%);
$selectionBackgroundColor: color.scale( $linkColor, $lightness: 25% ); $selectionBackgroundColor: color.scale($linkColor, $lightness: 25%);
$heading1Size: 2.5em; $heading1Size: 2.5em;
$heading2Size: 1.6em; $heading2Size: 1.6em;
$heading3Size: 1.3em; $heading3Size: 1.3em;
$heading4Size: 1.0em; $heading4Size: 1em;
$overlayElementBgColor: 0, 0, 0; $overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240; $overlayElementFgColor: 240, 240, 240;
@@ -47,7 +44,6 @@ $overlayElementFgColor: 240, 240, 240;
// Change text colors against dark slide backgrounds // Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff); @include dark-bg-text-color(#fff);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -4,18 +4,15 @@
* By Hakim El Hattab, http://hakim.se * By Hakim El Hattab, http://hakim.se
*/ */
// Default mixins and settings ----------------- // Default mixins and settings -----------------
@use "sass:color"; @use "sass:color";
@import "../template/mixins"; @import "../template/mixins";
@import "../template/settings"; @import "../template/settings";
// --------------------------------------------- // ---------------------------------------------
// Include theme-specific fonts // Include theme-specific fonts
@import url(./fonts/source-sans-pro/source-sans-pro.css); @import url(./fonts/source-sans-pro/source-sans-pro.css);
// Override theme settings (see ../template/settings.scss) // Override theme settings (see ../template/settings.scss)
$backgroundColor: #fff; $backgroundColor: #fff;
@@ -23,20 +20,20 @@ $mainColor: #222;
$headingColor: #222; $headingColor: #222;
$mainFontSize: 42px; $mainFontSize: 42px;
$mainFont: 'Source Sans Pro', Helvetica, sans-serif; $mainFont: "Source Sans Pro", Helvetica, sans-serif;
$headingFont: 'Source Sans Pro', Helvetica, sans-serif; $headingFont: "Source Sans Pro", Helvetica, sans-serif;
$headingTextShadow: none; $headingTextShadow: none;
$headingLetterSpacing: normal; $headingLetterSpacing: normal;
$headingTextTransform: uppercase; $headingTextTransform: uppercase;
$headingFontWeight: 600; $headingFontWeight: 600;
$linkColor: #2a76dd; $linkColor: #2a76dd;
$linkColorHover: color.scale( $linkColor, $lightness: 15% ); $linkColorHover: color.scale($linkColor, $lightness: 15%);
$selectionBackgroundColor: color.scale( $linkColor, $lightness: 25% ); $selectionBackgroundColor: color.scale($linkColor, $lightness: 25%);
$heading1Size: 2.5em; $heading1Size: 2.5em;
$heading2Size: 1.6em; $heading2Size: 1.6em;
$heading3Size: 1.3em; $heading3Size: 1.3em;
$heading4Size: 1.0em; $heading4Size: 1em;
$overlayElementBgColor: 0, 0, 0; $overlayElementBgColor: 0, 0, 0;
$overlayElementFgColor: 240, 240, 240; $overlayElementFgColor: 240, 240, 240;
@@ -44,7 +41,6 @@ $overlayElementFgColor: 240, 240, 240;
// Change text colors against dark slide backgrounds // Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff); @include dark-bg-text-color(#fff);
// Theme template ------------------------------ // Theme template ------------------------------
@import "../template/theme"; @import "./template/theme";
// --------------------------------------------- // ---------------------------------------------

View File

@@ -474,13 +474,19 @@ Reveal.on( 'customevent', function() {
</div> </div>
<script src="dist/reveal.js"></script> <!-- <script src="dist/reveal.js"></script>
<script src="plugin/zoom/zoom.js"></script> <script src="plugin/zoom/zoom.js"></script>
<script src="plugin/notes/notes.js"></script> <script src="plugin/notes/notes.js"></script>
<script src="plugin/search/search.js"></script> <script src="plugin/search/search.js"></script>
<script src="plugin/markdown/markdown.js"></script> <script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script> <script src="plugin/highlight/highlight.js"></script> -->
<script> <script type="module">
import Reveal from 'reveal.js';
import RevealZoom from 'reveal.js/plugin/zoom';
import RevealNotes from 'reveal.js/plugin/notes';
import RevealSearch from 'reveal.js/plugin/search';
import RevealMarkdown from 'reveal.js/plugin/markdown';
import RevealHighlight from 'reveal.js/plugin/highlight';
// Also available as an ES module, see: // Also available as an ES module, see:
// https://revealjs.com/initialization/ // https://revealjs.com/initialization/

84
dist/config.d.ts vendored Normal file
View File

@@ -0,0 +1,84 @@
type RevealConfig = {
width: number | string;
height: number | string;
margin: number;
minScale: number;
maxScale: number;
controls: boolean;
controlsTutorial: boolean;
controlsLayout: 'edges' | 'bottom-right';
controlsBackArrows: 'faded' | 'hidden' | 'visible';
progress: boolean;
slideNumber: boolean | 'h.v' | 'h/v' | 'c' | 'c/t' | ((slide: any) => string | [string, string, string]);
showSlideNumber: 'all' | 'print' | 'speaker';
hashOneBasedIndex: boolean;
hash: boolean;
respondToHashChanges: boolean;
jumpToSlide: boolean;
history: boolean;
keyboard: boolean;
keyboardCondition: null | 'focused' | ((event: KeyboardEvent) => boolean);
disableLayout: boolean;
overview: boolean;
center: boolean;
touch: boolean;
loop: boolean;
rtl: boolean;
navigationMode: 'default' | 'linear' | 'grid';
shuffle: boolean;
fragments: boolean;
fragmentInURL: boolean;
embedded: boolean;
help: boolean;
pause: boolean;
showNotes: boolean;
showHiddenSlides: boolean;
autoPlayMedia: null | boolean;
preloadIframes: null | boolean;
autoAnimate: boolean;
autoAnimateMatcher: null | Function;
autoAnimateEasing: 'ease' | string;
autoAnimateDuration: number;
autoAnimateUnmatched: boolean;
autoAnimateStyles: string[];
autoSlide: number | false;
autoSlideStoppable: boolean;
autoSlideMethod: null | Function;
defaultTiming: null;
mouseWheel: boolean;
previewLinks: boolean;
postMessage: boolean;
postMessageEvents: boolean;
focusBodyOnPageVisibilityChange: boolean;
transition: 'none' | 'fade' | 'slide' | 'convex' | 'concave' | 'zoom';
transitionSpeed: 'default' | 'fast' | 'slow';
backgroundTransition: 'fade' | 'none' | 'slide' | 'convex' | 'concave' | 'zoom';
parallaxBackgroundImage: null | string;
parallaxBackgroundSize: null | string;
parallaxBackgroundRepeat: null | string;
parallaxBackgroundPosition: null | string;
parallaxBackgroundHorizontal: null | number;
parallaxBackgroundVertical: null | number;
view: null | 'print' | 'scroll';
scrollLayout: 'full' | 'compact';
scrollSnap: false | 'proximity' | 'mandatory';
scrollProgress: 'auto' | boolean;
scrollActivationWidth: number;
pdfMaxPagesPerSlide: number;
pdfSeparateFragments: boolean;
pdfPageHeightOffset: number;
viewDistance: number;
mobileViewDistance: number;
display: string;
hideInactiveCursor: boolean;
hideCursorTime: number;
sortFragmentsOnSync: boolean;
dependencies: any[];
plugins: any[];
};
export type PartialRevealConfig = Partial<RevealConfig>;
/**
* The default reveal.js config object.
*/
declare const config: RevealConfig;
export default config;

12
dist/index.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
/**
* Expose the Reveal class to the window. To create a
* new instance:
* let deck = new Reveal( document.querySelector( '.reveal' ), {
* controls: false
* } );
* deck.initialize().then(() => {
* // reveal.js is ready
* });
*/
declare let Reveal: any;
export default Reveal;

18
dist/plugin/highlight.js vendored Normal file

File diff suppressed because one or more lines are too long

47979
dist/plugin/highlight.mjs vendored Normal file

File diff suppressed because one or more lines are too long

54
dist/plugin/markdown.js vendored Normal file

File diff suppressed because one or more lines are too long

1738
dist/plugin/markdown.mjs vendored Normal file

File diff suppressed because it is too large Load Diff

4
dist/plugin/math.js vendored Normal file
View File

@@ -0,0 +1,4 @@
(function(d,r){typeof exports=="object"&&typeof module<"u"?module.exports=r():typeof define=="function"&&define.amd?define(r):(d=typeof globalThis<"u"?globalThis:d||self,d.RevealMath=r())})(this,function(){"use strict";const d=()=>{let n,s={version:"latest",delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredTags:["script","noscript","style","textarea","pre"]};const c=t=>{let e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)},l=t=>new Promise((e,i)=>{const o=document.createElement("script");o.type="text/javascript",o.onload=e,o.onerror=i,o.src=t,document.head.append(o)});async function a(t){for(const e of t)await l(e)}return{id:"katex",init:function(t){n=t;let e=n.getConfig().katex||{},i={...s,...e};const{local:o,version:x,extensions:S,...g}=i;let p=i.local||"https://cdn.jsdelivr.net/npm/katex",u=i.local?"":"@"+i.version,j=p+u+"/dist/katex.min.css",M=p+u+"/dist/katex.min.js",v=p+u+"/dist/contrib/mhchem.min.js",J=p+u+"/dist/contrib/auto-render.min.js",h=[M];i.extensions&&i.extensions.includes("mhchem")&&h.push(v),h.push(J);const f=()=>{renderMathInElement(t.getSlidesElement(),g),n.layout()};c(j),a(h).then(()=>{n.isReady()?f():n.on("ready",f.bind(this))})}}},r=()=>{let n,s={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre"]},skipStartupTypeset:!0};function c(l,a){let t=document.querySelector("head"),e=document.createElement("script");e.type="text/javascript",e.src=l;let i=()=>{typeof a=="function"&&(a.call(),a=null)};e.onload=i,e.onreadystatechange=()=>{this.readyState==="loaded"&&i()},t.appendChild(e)}return{id:"mathjax2",init:function(l){n=l;let a=n.getConfig().mathjax2||n.getConfig().math||{},t={...s,...a},e=t.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js",i=t.config||"TeX-AMS_HTML-full",o=e+"?config="+i;t.tex2jax={...s.tex2jax,...a.tex2jax},t.mathjax=t.config=null,c(o,function(){MathJax.Hub.Config(t),MathJax.Hub.Queue(["Typeset",MathJax.Hub,n.getRevealElement()]),MathJax.Hub.Queue(n.layout),n.on("slidechanged",function(x){MathJax.Hub.Queue(["Typeset",MathJax.Hub,x.currentSlide])})})}}},m=()=>{let n,s={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then(()=>{n.layout()})}}};function c(l,a){let t=document.createElement("script");t.type="text/javascript",t.id="MathJax-script",t.src=l,t.async=!0,t.onload=()=>{typeof a=="function"&&(a.call(),a=null)},document.head.appendChild(t)}return{id:"mathjax3",init:function(l){n=l;let a=n.getConfig().mathjax3||{},t={...s,...a};t.tex={...s.tex,...a.tex},t.options={...s.options,...a.options},t.startup={...s.startup,...a.startup};let e=t.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";t.mathjax=null,window.MathJax=t,c(e,function(){n.addEventListener("slidechanged",function(i){MathJax.typeset()})})}}},y=r;/*!
* This plugin is a wrapper for the MathJax2,
* MathJax3 and KaTeX typesetter plugins.
*/return Plugin=Object.assign(y(),{KaTeX:d,MathJax2:r,MathJax3:m})});

119
dist/plugin/math.mjs vendored Normal file
View File

@@ -0,0 +1,119 @@
const M = () => {
let n, s = {
version: "latest",
delimiters: [
{ left: "$$", right: "$$", display: !0 },
// Note: $$ has to come before $
{ left: "$", right: "$", display: !1 },
{ left: "\\(", right: "\\)", display: !1 },
{ left: "\\[", right: "\\]", display: !0 }
],
ignoredTags: ["script", "noscript", "style", "textarea", "pre"]
};
const r = (t) => {
let e = document.createElement("link");
e.rel = "stylesheet", e.href = t, document.head.appendChild(e);
}, l = (t) => new Promise((e, i) => {
const o = document.createElement("script");
o.type = "text/javascript", o.onload = e, o.onerror = i, o.src = t, document.head.append(o);
});
async function a(t) {
for (const e of t)
await l(e);
}
return {
id: "katex",
init: function(t) {
n = t;
let e = n.getConfig().katex || {}, i = { ...s, ...e };
const { local: o, version: u, extensions: k, ...m } = i;
let c = i.local || "https://cdn.jsdelivr.net/npm/katex", d = i.local ? "" : "@" + i.version, f = c + d + "/dist/katex.min.css", y = c + d + "/dist/katex.min.js", g = c + d + "/dist/contrib/mhchem.min.js", j = c + d + "/dist/contrib/auto-render.min.js", p = [y];
i.extensions && i.extensions.includes("mhchem") && p.push(g), p.push(j);
const h = () => {
renderMathInElement(t.getSlidesElement(), m), n.layout();
};
r(f), a(p).then(() => {
n.isReady() ? h() : n.on("ready", h.bind(this));
});
}
};
}, x = () => {
let n, s = {
messageStyle: "none",
tex2jax: {
inlineMath: [["$", "$"], ["\\(", "\\)"]],
skipTags: ["script", "noscript", "style", "textarea", "pre"]
},
skipStartupTypeset: !0
};
function r(l, a) {
let t = document.querySelector("head"), e = document.createElement("script");
e.type = "text/javascript", e.src = l;
let i = () => {
typeof a == "function" && (a.call(), a = null);
};
e.onload = i, e.onreadystatechange = () => {
this.readyState === "loaded" && i();
}, t.appendChild(e);
}
return {
id: "mathjax2",
init: function(l) {
n = l;
let a = n.getConfig().mathjax2 || n.getConfig().math || {}, t = { ...s, ...a }, e = t.mathjax || "https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js", i = t.config || "TeX-AMS_HTML-full", o = e + "?config=" + i;
t.tex2jax = { ...s.tex2jax, ...a.tex2jax }, t.mathjax = t.config = null, r(o, function() {
MathJax.Hub.Config(t), MathJax.Hub.Queue(["Typeset", MathJax.Hub, n.getRevealElement()]), MathJax.Hub.Queue(n.layout), n.on("slidechanged", function(u) {
MathJax.Hub.Queue(["Typeset", MathJax.Hub, u.currentSlide]);
});
});
}
};
}, v = () => {
let n, s = {
tex: {
inlineMath: [["$", "$"], ["\\(", "\\)"]]
},
options: {
skipHtmlTags: ["script", "noscript", "style", "textarea", "pre"]
},
startup: {
ready: () => {
MathJax.startup.defaultReady(), MathJax.startup.promise.then(() => {
n.layout();
});
}
}
};
function r(l, a) {
let t = document.createElement("script");
t.type = "text/javascript", t.id = "MathJax-script", t.src = l, t.async = !0, t.onload = () => {
typeof a == "function" && (a.call(), a = null);
}, document.head.appendChild(t);
}
return {
id: "mathjax3",
init: function(l) {
n = l;
let a = n.getConfig().mathjax3 || {}, t = { ...s, ...a };
t.tex = { ...s.tex, ...a.tex }, t.options = { ...s.options, ...a.options }, t.startup = { ...s.startup, ...a.startup };
let e = t.mathjax || "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";
t.mathjax = null, window.MathJax = t, r(e, function() {
n.addEventListener("slidechanged", function(i) {
MathJax.typeset();
});
});
}
};
}, J = x;
/*!
* This plugin is a wrapper for the MathJax2,
* MathJax3 and KaTeX typesetter plugins.
*/
const S = Plugin = Object.assign(J(), {
KaTeX: M,
MathJax2: x,
MathJax3: v
});
export {
S as default
};

944
dist/plugin/notes.js vendored Normal file

File diff suppressed because one or more lines are too long

2548
dist/plugin/notes.mjs vendored Normal file

File diff suppressed because it is too large Load Diff

7
dist/plugin/search.js vendored Normal file
View File

@@ -0,0 +1,7 @@
(function(p,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(p=typeof globalThis<"u"?globalThis:p||self,p.RevealSearch=n())})(this,function(){"use strict";/*!
* Handles finding a text string anywhere in the slides and showing the next occurrence to the user
* by navigatating to that slide and highlighting it.
*
* @author Jon Snyder <snyder.jon@gmail.com>, February 2013
*/return()=>{let n,t,i,o,a,g,f;function v(){t=document.createElement("div"),t.classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML=`<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>
</span>`,i=t.querySelector(".searchinput"),i.style.width="240px",i.style.fontSize="14px",i.style.padding="4px 6px",i.style.color="#000",i.style.background="#fff",i.style.borderRadius="2px",i.style.border="0",i.style.outline="0",i.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",i.style["-webkit-appearance"]="none",n.getRevealElement().appendChild(t),i.addEventListener("keyup",function(r){switch(r.keyCode){case 13:r.preventDefault(),k(),g=!1;break;default:g=!0}},!1),C()}function w(){t||v(),t.style.display="inline",i.focus(),i.select()}function C(){t||v(),t.style.display="none",f&&f.remove()}function T(){t||v(),t.style.display!=="inline"?w():C()}function k(){if(g){var r=i.value;r===""?(f&&f.remove(),o=null):(f=new L("slidecontent"),o=f.apply(r),a=0)}o&&(o.length&&o.length<=a&&(a=0),o.length>a&&(n.slide(o[a].h,o[a].v),a++))}function L(r,d){var I=document.getElementById(r)||document.body,x=d||"EM",M=new RegExp("^(?:"+x+"|SCRIPT|FORM)$"),E=["#ff6","#a0ffff","#9f9","#f99","#f6f"],m=[],B=0,y="",c=[];this.setRegex=function(e){e=e.trim(),y=new RegExp("("+e+")","i")},this.getRegex=function(){return y.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(e){if(!(e==null||!e)&&y&&!M.test(e.nodeName)){if(e.hasChildNodes())for(var l=0;l<e.childNodes.length;l++)this.hiliteWords(e.childNodes[l]);if(e.nodeType==3){var N,s;if((N=e.nodeValue)&&(s=y.exec(N))){for(var u=e;u!=null&&u.nodeName!="SECTION";)u=u.parentNode;for(var S=n.getIndices(u),D=c.length,R=!1,l=0;l<D;l++)c[l].h===S.h&&c[l].v===S.v&&(R=!0);R||c.push(S),m[s[0].toLowerCase()]||(m[s[0].toLowerCase()]=E[B++%E.length]);var h=document.createElement(x);h.appendChild(document.createTextNode(s[0])),h.style.backgroundColor=m[s[0].toLowerCase()],h.style.fontStyle="inherit",h.style.color="#000";var b=e.splitText(s.index);b.nodeValue=b.nodeValue.substring(s[0].length),e.parentNode.insertBefore(h,b)}}}},this.remove=function(){for(var e=document.getElementsByTagName(x),l;e.length&&(l=e[0]);)l.parentNode.replaceChild(l.firstChild,l)},this.apply=function(e){if(!(e==null||!e))return this.remove(),this.setRegex(e),this.hiliteWords(I),c}}return{id:"search",init:r=>{n=r,n.registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",function(d){d.key=="F"&&(d.ctrlKey||d.metaKey)&&(d.preventDefault(),T())},!1)},open:w}}});

83
dist/plugin/search.mjs vendored Normal file
View File

@@ -0,0 +1,83 @@
/*!
* Handles finding a text string anywhere in the slides and showing the next occurrence to the user
* by navigatating to that slide and highlighting it.
*
* @author Jon Snyder <snyder.jon@gmail.com>, February 2013
*/
const D = () => {
let c, t, i, n, a, y, s;
function g() {
t = document.createElement("div"), t.classList.add("searchbox"), t.style.position = "absolute", t.style.top = "10px", t.style.right = "10px", t.style.zIndex = 10, t.innerHTML = `<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>
</span>`, i = t.querySelector(".searchinput"), i.style.width = "240px", i.style.fontSize = "14px", i.style.padding = "4px 6px", i.style.color = "#000", i.style.background = "#fff", i.style.borderRadius = "2px", i.style.border = "0", i.style.outline = "0", i.style.boxShadow = "0 2px 18px rgba(0, 0, 0, 0.2)", i.style["-webkit-appearance"] = "none", c.getRevealElement().appendChild(t), i.addEventListener("keyup", function(r) {
switch (r.keyCode) {
case 13:
r.preventDefault(), k(), y = !1;
break;
default:
y = !0;
}
}, !1), w();
}
function b() {
t || g(), t.style.display = "inline", i.focus(), i.select();
}
function w() {
t || g(), t.style.display = "none", s && s.remove();
}
function R() {
t || g(), t.style.display !== "inline" ? b() : w();
}
function k() {
if (y) {
var r = i.value;
r === "" ? (s && s.remove(), n = null) : (s = new T("slidecontent"), n = s.apply(r), a = 0);
}
n && (n.length && n.length <= a && (a = 0), n.length > a && (c.slide(n[a].h, n[a].v), a++));
}
function T(r, f) {
var L = document.getElementById(r) || document.body, v = f || "EM", I = new RegExp("^(?:" + v + "|SCRIPT|FORM)$"), C = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"], x = [], M = 0, p = "", d = [];
this.setRegex = function(e) {
e = e.trim(), p = new RegExp("(" + e + ")", "i");
}, this.getRegex = function() {
return p.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
}, this.hiliteWords = function(e) {
if (!(e == null || !e) && p && !I.test(e.nodeName)) {
if (e.hasChildNodes())
for (var l = 0; l < e.childNodes.length; l++)
this.hiliteWords(e.childNodes[l]);
if (e.nodeType == 3) {
var E, o;
if ((E = e.nodeValue) && (o = p.exec(E))) {
for (var h = e; h != null && h.nodeName != "SECTION"; )
h = h.parentNode;
for (var m = c.getIndices(h), B = d.length, N = !1, l = 0; l < B; l++)
d[l].h === m.h && d[l].v === m.v && (N = !0);
N || d.push(m), x[o[0].toLowerCase()] || (x[o[0].toLowerCase()] = C[M++ % C.length]);
var u = document.createElement(v);
u.appendChild(document.createTextNode(o[0])), u.style.backgroundColor = x[o[0].toLowerCase()], u.style.fontStyle = "inherit", u.style.color = "#000";
var S = e.splitText(o.index);
S.nodeValue = S.nodeValue.substring(o[0].length), e.parentNode.insertBefore(u, S);
}
}
}
}, this.remove = function() {
for (var e = document.getElementsByTagName(v), l; e.length && (l = e[0]); )
l.parentNode.replaceChild(l.firstChild, l);
}, this.apply = function(e) {
if (!(e == null || !e))
return this.remove(), this.setRegex(e), this.hiliteWords(L), d;
};
}
return {
id: "search",
init: (r) => {
c = r, c.registerKeyboardShortcut("CTRL + Shift + F", "Search"), document.addEventListener("keydown", function(f) {
f.key == "F" && (f.ctrlKey || f.metaKey) && (f.preventDefault(), R());
}, !1);
},
open: b
};
};
export {
D as default
};

9
dist/plugin/zoom.js vendored Normal file
View File

@@ -0,0 +1,9 @@
(function(f,u){typeof exports=="object"&&typeof module<"u"?module.exports=u():typeof define=="function"&&define.amd?define(u):(f=typeof globalThis<"u"?globalThis:f||self,f.RevealZoom=u())})(this,function(){"use strict";/*!
* reveal.js Zoom plugin
*/const f={id:"zoom",init:function(n){n.getRevealElement().addEventListener("mousedown",function(o){var l=/Linux/.test(window.navigator.platform)?"ctrl":"alt",r=(n.getConfig().zoomKey?n.getConfig().zoomKey:l)+"Key",s=n.getConfig().zoomLevel?n.getConfig().zoomLevel:2;o[r]&&!n.isOverview()&&(o.preventDefault(),m.to({x:o.clientX,y:o.clientY,scale:s,pan:!1}))})},destroy:()=>{m.reset()}},u=()=>f;/*!
* zoom.js 0.3 (modified for use with reveal.js)
* http://lab.hakim.se/zoom-js
* MIT licensed
*
* Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
*/var m=function(){var n=1,o=0,l=0,r=-1,s=-1,y="transform"in document.body.style;y&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",function(e){n!==1&&e.keyCode===27&&m.out()}),document.addEventListener("mousemove",function(e){n!==1&&(o=e.clientX,l=e.clientY)});function w(e,t){var i=c();if(e.width=e.width||1,e.height=e.height||1,e.x-=(window.innerWidth-e.width*t)/2,e.y-=(window.innerHeight-e.height*t)/2,y)if(t===1)document.body.style.transform="";else{var d=i.x+"px "+i.y+"px",h="translate("+-e.x+"px,"+-e.y+"px) scale("+t+")";document.body.style.transformOrigin=d,document.body.style.transform=h}else t===1?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(i.x+e.x)/t+"px",document.body.style.top=-(i.y+e.y)/t+"px",document.body.style.width=t*100+"%",document.body.style.height=t*100+"%",document.body.style.zoom=t);n=t,document.documentElement.classList&&(n!==1?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function a(){var e=.12,t=window.innerWidth*e,i=window.innerHeight*e,d=c();l<i?window.scroll(d.x,d.y-(1-l/i)*(14/n)):l>window.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-l)/i)*(14/n)),o<t?window.scroll(d.x-(1-o/t)*(14/n),d.y):o>window.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-o)/t)*(14/n),d.y)}function c(){return{x:window.scrollX!==void 0?window.scrollX:window.pageXOffset,y:window.scrollY!==void 0?window.scrollY:window.pageYOffset}}return{to:function(e){if(n!==1)m.out();else{if(e.x=e.x||0,e.y=e.y||0,e.element){var t=20,i=e.element.getBoundingClientRect();e.x=i.left-t,e.y=i.top-t,e.width=i.width+t*2,e.height=i.height+t*2}e.width!==void 0&&e.height!==void 0&&(e.scale=Math.max(Math.min(window.innerWidth/e.width,window.innerHeight/e.height),1)),e.scale>1&&(e.x*=e.scale,e.y*=e.scale,w(e,e.scale),e.pan!==!1&&(r=setTimeout(function(){s=setInterval(a,1e3/60)},800)))}},out:function(){clearTimeout(r),clearInterval(s),w({x:0,y:0},1),n=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return n}}}();return u});

102
dist/plugin/zoom.mjs vendored Normal file
View File

@@ -0,0 +1,102 @@
/*!
* reveal.js Zoom plugin
*/
const c = {
id: "zoom",
init: function(n) {
n.getRevealElement().addEventListener("mousedown", function(o) {
var l = /Linux/.test(window.navigator.platform) ? "ctrl" : "alt", f = (n.getConfig().zoomKey ? n.getConfig().zoomKey : l) + "Key", m = n.getConfig().zoomLevel ? n.getConfig().zoomLevel : 2;
o[f] && !n.isOverview() && (o.preventDefault(), r.to({
x: o.clientX,
y: o.clientY,
scale: m,
pan: !1
}));
});
},
destroy: () => {
r.reset();
}
}, h = () => c;
/*!
* zoom.js 0.3 (modified for use with reveal.js)
* http://lab.hakim.se/zoom-js
* MIT licensed
*
* Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
*/
var r = function() {
var n = 1, o = 0, l = 0, f = -1, m = -1, u = "transform" in document.body.style;
u && (document.body.style.transition = "transform 0.8s ease"), document.addEventListener("keyup", function(e) {
n !== 1 && e.keyCode === 27 && r.out();
}), document.addEventListener("mousemove", function(e) {
n !== 1 && (o = e.clientX, l = e.clientY);
});
function y(e, t) {
var i = s();
if (e.width = e.width || 1, e.height = e.height || 1, e.x -= (window.innerWidth - e.width * t) / 2, e.y -= (window.innerHeight - e.height * t) / 2, u)
if (t === 1)
document.body.style.transform = "";
else {
var d = i.x + "px " + i.y + "px", w = "translate(" + -e.x + "px," + -e.y + "px) scale(" + t + ")";
document.body.style.transformOrigin = d, document.body.style.transform = w;
}
else
t === 1 ? (document.body.style.position = "", document.body.style.left = "", document.body.style.top = "", document.body.style.width = "", document.body.style.height = "", document.body.style.zoom = "") : (document.body.style.position = "relative", document.body.style.left = -(i.x + e.x) / t + "px", document.body.style.top = -(i.y + e.y) / t + "px", document.body.style.width = t * 100 + "%", document.body.style.height = t * 100 + "%", document.body.style.zoom = t);
n = t, document.documentElement.classList && (n !== 1 ? document.documentElement.classList.add("zoomed") : document.documentElement.classList.remove("zoomed"));
}
function a() {
var e = 0.12, t = window.innerWidth * e, i = window.innerHeight * e, d = s();
l < i ? window.scroll(d.x, d.y - (1 - l / i) * (14 / n)) : l > window.innerHeight - i && window.scroll(d.x, d.y + (1 - (window.innerHeight - l) / i) * (14 / n)), o < t ? window.scroll(d.x - (1 - o / t) * (14 / n), d.y) : o > window.innerWidth - t && window.scroll(d.x + (1 - (window.innerWidth - o) / t) * (14 / n), d.y);
}
function s() {
return {
x: window.scrollX !== void 0 ? window.scrollX : window.pageXOffset,
y: window.scrollY !== void 0 ? window.scrollY : window.pageYOffset
};
}
return {
/**
* Zooms in on either a rectangle or HTML element.
*
* @param {Object} options
* - element: HTML element to zoom in on
* OR
* - x/y: coordinates in non-transformed space to zoom in on
* - width/height: the portion of the screen to zoom in on
* - scale: can be used instead of width/height to explicitly set scale
*/
to: function(e) {
if (n !== 1)
r.out();
else {
if (e.x = e.x || 0, e.y = e.y || 0, e.element) {
var t = 20, i = e.element.getBoundingClientRect();
e.x = i.left - t, e.y = i.top - t, e.width = i.width + t * 2, e.height = i.height + t * 2;
}
e.width !== void 0 && e.height !== void 0 && (e.scale = Math.max(Math.min(window.innerWidth / e.width, window.innerHeight / e.height), 1)), e.scale > 1 && (e.x *= e.scale, e.y *= e.scale, y(e, e.scale), e.pan !== !1 && (f = setTimeout(function() {
m = setInterval(a, 1e3 / 60);
}, 800)));
}
},
/**
* Resets the document zoom state to its default.
*/
out: function() {
clearTimeout(f), clearInterval(m), y({ x: 0, y: 0 }, 1), n = 1;
},
// Alias
magnify: function(e) {
this.to(e);
},
reset: function() {
this.out();
},
zoomLevel: function() {
return n;
}
};
}();
export {
h as default
};

31
dist/reset.css vendored
View File

@@ -1,30 +1 @@
/* http://meyerweb.com/eric/tools/css/reset/ 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}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}
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;
}

2142
dist/reveal.css vendored

File diff suppressed because one or more lines are too long

3
dist/reveal.d.mts vendored Normal file
View File

@@ -0,0 +1,3 @@
export * from './index'
import Reveal from './index'
export default Reveal

3494
dist/reveal.mjs vendored Normal file

File diff suppressed because it is too large Load Diff

18
dist/theme/black.css vendored
View File

@@ -4,7 +4,13 @@
* By Hakim El Hattab, http://hakim.se * By Hakim El Hattab, http://hakim.se
*/ */
@import url(./fonts/source-sans-pro/source-sans-pro.css); @import url(./fonts/source-sans-pro/source-sans-pro.css);
section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 { section.has-light-background,
section.has-light-background h1,
section.has-light-background h2,
section.has-light-background h3,
section.has-light-background h4,
section.has-light-background h5,
section.has-light-background h6 {
color: #222; color: #222;
} }
@@ -257,13 +263,13 @@ section.has-light-background, section.has-light-background h1, section.has-light
border-bottom: 1px solid; border-bottom: 1px solid;
} }
.reveal table th[align=center], .reveal table th[align="center"],
.reveal table td[align=center] { .reveal table td[align="center"] {
text-align: center; text-align: center;
} }
.reveal table th[align=right], .reveal table th[align="right"],
.reveal table td[align=right] { .reveal table td[align="right"] {
text-align: right; text-align: right;
} }
@@ -356,4 +362,4 @@ section.has-light-background, section.has-light-background h1, section.has-light
.backgrounds { .backgrounds {
background-color: var(--r-background-color); background-color: var(--r-background-color);
} }
} }

View File

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

View File

@@ -6,9 +6,9 @@
<title>reveal.js</title> <title>reveal.js</title>
<link rel="stylesheet" href="dist/reset.css"> <link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="dist/reveal.css"> <link rel="stylesheet" href="css/reveal.scss">
<link rel="stylesheet" href="dist/theme/black.css"> <link rel="stylesheet" href="css/theme/black.scss">
<!-- Theme used for syntax highlighted code --> <!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css"> <link rel="stylesheet" href="plugin/highlight/monokai.css">
@@ -18,14 +18,26 @@
<div class="slides"> <div class="slides">
<section>Slide 1</section> <section>Slide 1</section>
<section>Slide 2</section> <section>Slide 2</section>
<section data-markdown>
<script type="text/template">
## Markdown Support
```html []
<section data-markdown>
## Markdown Support
</section>
```
</script>
</section>
</div> </div>
</div> </div>
<script src="dist/reveal.js"></script> <script type="module">
<script src="plugin/notes/notes.js"></script> import Reveal from 'reveal.js';
<script src="plugin/markdown/markdown.js"></script> import RevealNotes from 'reveal.js/plugin/notes';
<script src="plugin/highlight/highlight.js"></script> import RevealMarkdown from 'reveal.js/plugin/markdown';
<script> import RevealHighlight from 'reveal.js/plugin/highlight';
// More info about initialization & config: // More info about initialization & config:
// - https://revealjs.com/initialization/ // - https://revealjs.com/initialization/
// - https://revealjs.com/config/ // - https://revealjs.com/config/

View File

@@ -1,333 +0,0 @@
/**
* 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.
// - true: Display controls on all screens
// - false: Hide controls on all screens
// - "speaker-only": Only display controls in the speaker view
controls: true,
// Help the user learn the controls by providing hints, for example by
// 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,
// Enable support for jump-to-slide navigation shortcuts
jumpToSlide: true,
// Push each slide change to the browser history. Implies `hash: true`
history: false,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Optional function that blocks keyboard events when returning 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,
// Can be used to initialize reveal.js in one of the following views:
// - print: Render the presentation so that it can be printed to PDF
// - scroll: Show the presentation as a tall scrollable page with scroll
// triggered animations
view: null,
// Adjusts the height of each slide in the scroll view.
// - full: Each slide is as tall as the viewport
// - compact: Slides are as small as possible, allowing multiple slides
// to be visible in parallel on tall devices
scrollLayout: 'full',
// Control how scroll snapping works in the scroll view.
// - false: No snapping, scrolling is continuous
// - proximity: Snap when close to a slide
// - mandatory: Always snap to the closest slide
//
// Only applies to presentations in scroll view.
scrollSnap: 'mandatory',
// Enables and configure the scroll view progress bar.
// - 'auto': Show the scrollbar while scrolling, hide while idle
// - true: Always show the scrollbar
// - false: Never show the scrollbar
scrollProgress: 'auto',
// Automatically activate the scroll view when we the viewport falls
// below the given width.
scrollActivationWidth: 435,
// The maximum number of pages a single slide can expand onto when printing
// to PDF, unlimited by default
pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY,
// 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,
// Should we automatically sort and set indices for fragments
// at each sync? (See Reveal.sync)
sortFragmentsOnSync: true,
// Script dependencies to load
dependencies: [],
// Plugin objects to register and use for this presentation
plugins: []
}

651
js/config.ts Normal file
View File

@@ -0,0 +1,651 @@
// TODO convert all line to blocks + add comments for each prop
type RevealConfig = {
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions
width: number | string;
height: number | string;
// Factor of the display size that should remain empty around the content
margin: number;
// Bounds for smallest/largest possible scale to apply to content
minScale: number;
maxScale: number;
// Display presentation control arrows
// - true: Display controls on all screens
// - false: Hide controls on all screens
// - "speaker-only": Only display controls in the speaker view
controls: boolean | 'speaker-only';
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: boolean;
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'edges' | 'bottom-right';
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded' | 'hidden' | 'visible';
// Display a presentation progress bar
progress: boolean;
// 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: boolean | 'h.v' | 'h/v' | 'c' | 'c/t' | ((slide: any) => string | [string, string, string]);
// 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' | 'print' | 'speaker';
// Use 1 based indexing for # links to match slide number (default is zero
// based)
hashOneBasedIndex: boolean;
// 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: boolean;
// Flags if we should monitor the hash and change slides accordingly
respondToHashChanges: boolean;
// Enable support for jump-to-slide navigation shortcuts
jumpToSlide: boolean;
// Push each slide change to the browser history. Implies `hash: true`
history: boolean;
// Enable keyboard shortcuts for navigation
keyboard: boolean;
// 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 | 'focused' | ((event: KeyboardEvent) => boolean);
// Disables the default reveal.js slide layout (scaling and centering)
// so that you can use custom CSS layout
disableLayout: boolean;
// Enable the slide overview mode
overview: boolean;
// Vertical centering of slides
center: boolean;
// Enables touch navigation on devices with touch input
touch: boolean;
// Loop the presentation
loop: boolean;
// Change the presentation direction to be RTL
rtl: boolean;
// 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' | 'linear' | 'grid';
// Randomizes the order of slides each time the presentation loads
shuffle: boolean;
// Turns fragments on and off globally
fragments: boolean;
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: boolean;
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: boolean;
// Flags if we should show a help overlay when the question-mark
// key is pressed
help: boolean;
// Flags if it should be possible to pause the presentation (blackout)
pause: boolean;
// Flags if speaker notes should be visible to all viewers
showNotes: boolean;
// Flags if slides with data-visibility="hidden" should be kep visible
showHiddenSlides: boolean;
// 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 | boolean;
// 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 | boolean;
// Can be used to globally disable auto-animation
autoAnimate: boolean;
// Optionally provide a custom element matcher that will be
// used to dictate which elements we can animate between.
autoAnimateMatcher: null | Function;
// Default settings for our auto-animate transitions, can be
// overridden per-slide or per-element via data arguments
autoAnimateEasing: 'ease' | string;
autoAnimateDuration: number
autoAnimateUnmatched: boolean;
// 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: string[];
// 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: number | false;
// Stop auto-sliding after user input
autoSlideStoppable: boolean;
// Use this method for navigation when auto-sliding (defaults to navigateNext)
autoSlideMethod: null | Function;
// 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: boolean;
// Opens links in an iframe preview overlay
// Add `data-preview-link` and `data-preview-link="false"` to customise each link
// individually
previewLinks: boolean;
// Exposes the reveal.js API through window.postMessage
postMessage: boolean;
// Dispatches all reveal.js events to the parent window through postMessage
postMessageEvents: boolean;
// Focuses body when page changes visibility to ensure keyboard shortcuts work
focusBodyOnPageVisibilityChange: boolean;
// Transition style
transition: 'none' | 'fade' | 'slide' | 'convex' | 'concave' | 'zoom';
// Transition speed
transitionSpeed: 'default' | 'fast' | 'slow';
// Transition style for full page slide backgrounds
backgroundTransition: 'fade' | 'none' | 'slide' | 'convex' | 'concave' | 'zoom';
// Parallax background image
parallaxBackgroundImage: null | string; // CSS syntax, e.g. "a.jpg"
// Parallax background size
parallaxBackgroundSize: null | string; // CSS syntax, e.g. "3000px 2000px"
// Parallax background repeat
parallaxBackgroundRepeat: null | string; // repeat/repeat-x/repeat-y/no-repeat/initial/inherit
// Parallax background position
parallaxBackgroundPosition: null | string; // CSS syntax, e.g. "top left"
// Amount of pixels to move the parallax background per slide step
parallaxBackgroundHorizontal: null | number;
parallaxBackgroundVertical: null | number;
// Can be used to initialize reveal.js in one of the following views:
// - print: Render the presentation so that it can be printed to PDF
// - scroll: Show the presentation as a tall scrollable page with scroll
// triggered animations
view: null | 'print' | 'scroll';
// Adjusts the height of each slide in the scroll view.
// - full: Each slide is as tall as the viewport
// - compact: Slides are as small as possible, allowing multiple slides
// to be visible in parallel on tall devices
scrollLayout: 'full' | 'compact';
// Control how scroll snapping works in the scroll view.
// - false: No snapping, scrolling is continuous
// - proximity: Snap when close to a slide
// - mandatory: Always snap to the closest slide
//
// Only applies to presentations in scroll view.
scrollSnap: false | 'proximity' | 'mandatory';
// Enables and configure the scroll view progress bar.
// - 'auto': Show the scrollbar while scrolling, hide while idle
// - true: Always show the scrollbar
// - false: Never show the scrollbar
scrollProgress: 'auto' | boolean;
// Automatically activate the scroll view when we the viewport falls
// below the given width.
scrollActivationWidth: number;
// The maximum number of pages a single slide can expand onto when printing
// to PDF, unlimited by default
pdfMaxPagesPerSlide: number,
// Prints each fragment on a separate slide
pdfSeparateFragments: boolean;
// 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: number
// Number of slides away from the current that are visible
viewDistance: number;
// 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: number;
// The display mode that will be used to show slides
display: string;
// Hide cursor if inactive
hideInactiveCursor: boolean;
// Time before the cursor is hidden (in ms)
hideCursorTime: number;
// Should we automatically sort and set indices for fragments
// at each sync? (See Reveal.sync)
sortFragmentsOnSync: boolean;
// Script dependencies to load
dependencies: any[],
// Plugin objects to register and use for this presentation
plugins: any[]
}
export type PartialRevealConfig = Partial<RevealConfig>;
/**
* The default reveal.js config object.
*/
const config : RevealConfig = {
// 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,
// Enable support for jump-to-slide navigation shortcuts
jumpToSlide: true,
// Push each slide change to the browser history. Implies `hash: true`
history: false,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Optional function that blocks keyboard events when retuning false
//
// 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,
// Can be used to initialize reveal.js in one of the following views:
// - print: Render the presentation so that it can be printed to PDF
// - scroll: Show the presentation as a tall scrollable page with scroll
// triggered animations
view: null,
// Adjusts the height of each slide in the scroll view.
// - full: Each slide is as tall as the viewport
// - compact: Slides are as small as possible, allowing multiple slides
// to be visible in parallel on tall devices
scrollLayout: 'full',
// Control how scroll snapping works in the scroll view.
// - false: No snapping, scrolling is continuous
// - proximity: Snap when close to a slide
// - mandatory: Always snap to the closest slide
//
// Only applies to presentations in scroll view.
scrollSnap: 'mandatory',
// Enables and configure the scroll view progress bar.
// - 'auto': Show the scrollbar while scrolling, hide while idle
// - true: Always show the scrollbar
// - false: Never show the scrollbar
scrollProgress: 'auto',
// Automatically activate the scroll view when we the viewport falls
// below the given width.
scrollActivationWidth: 435,
// The maximum number of pages a single slide can expand onto when printing
// to PDF, unlimited by default
pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY,
// 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,
// Should we automatically sort and set indices for fragments
// at each sync? (See Reveal.sync)
sortFragmentsOnSync: true,
// Script dependencies to load
dependencies: [],
// Plugin objects to register and use for this presentation
plugins: []
}
export default config;

View File

@@ -1,3 +1,6 @@
import { PartialRevealConfig } from './config.js';
//@ts-ignore
import Deck, { VERSION } from './reveal.js' import Deck, { VERSION } from './reveal.js'
/** /**
@@ -25,9 +28,11 @@ let Reveal = Deck;
* }); * });
*/ */
let enqueuedAPICalls = []; type RevealApiFunction = (...args: any[]) => any;
Reveal.initialize = options => { let enqueuedAPICalls: RevealApiFunction[] = [];
Reveal.initialize = ( options: PartialRevealConfig ) => {
// Create our singleton reveal.js instance // Create our singleton reveal.js instance
Object.assign( Reveal, new Deck( document.querySelector( '.reveal' ), options ) ); Object.assign( Reveal, new Deck( document.querySelector( '.reveal' ), options ) );
@@ -46,7 +51,7 @@ Reveal.initialize = options => {
* of them when Reveal.initialize is called. * of them when Reveal.initialize is called.
*/ */
[ 'configure', 'on', 'off', 'addEventListener', 'removeEventListener', 'registerPlugin' ].forEach( method => { [ 'configure', 'on', 'off', 'addEventListener', 'removeEventListener', 'registerPlugin' ].forEach( method => {
Reveal[method] = ( ...args ) => { Reveal[method] = ( ...args: any ) => {
enqueuedAPICalls.push( deck => deck[method].call( null, ...args ) ); enqueuedAPICalls.push( deck => deck[method].call( null, ...args ) );
} }
} ); } );

View File

@@ -18,7 +18,7 @@ import Touch from './controllers/touch.js'
import Focus from './controllers/focus.js' import Focus from './controllers/focus.js'
import Notes from './controllers/notes.js' import Notes from './controllers/notes.js'
import Playback from './components/playback.js' import Playback from './components/playback.js'
import defaultConfig from './config.js' import defaultConfig from './config.ts'
import * as Util from './utils/util.js' import * as Util from './utils/util.js'
import * as Device from './utils/device.js' import * as Device from './utils/device.js'
import { import {

1343
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,13 +4,49 @@
"description": "The HTML Presentation Framework", "description": "The HTML Presentation Framework",
"homepage": "https://revealjs.com", "homepage": "https://revealjs.com",
"subdomain": "revealjs", "subdomain": "revealjs",
"main": "dist/reveal.js",
"module": "dist/reveal.esm.js",
"license": "MIT", "license": "MIT",
"main": "dist/reveal.js",
"module": "dist/reveal.mjs",
"exports": {
".": {
"import": "./dist/reveal.mjs",
"require": "./dist/reveal.js"
},
"./reveal.css": "./dist/reveal.css",
"./reset.css": "./dist/reset.css",
"./plugin/highlight": {
"import": "./dist/plugin/highlight.mjs",
"require": "./dist/plugin/highlight.js"
},
"./plugin/markdown": {
"import": "./dist/plugin/markdown.mjs",
"require": "./dist/plugin/markdown.js"
},
"./plugin/math": {
"import": "./dist/plugin/math.mjs",
"require": "./dist/plugin/math.js"
},
"./plugin/notes": {
"import": "./dist/plugin/notes.mjs",
"require": "./dist/plugin/notes.js"
},
"./plugin/search": {
"import": "./dist/plugin/search.mjs",
"require": "./dist/plugin/search.js"
},
"./plugin/zoom": {
"import": "./dist/plugin/zoom.mjs",
"require": "./dist/plugin/zoom.js"
}
},
"scripts": { "scripts": {
"dev": "vite",
"build:core": "tsc && vite build && vite build -c vite.config.styles.ts",
"build": "tsc && vite build && vite build -c vite.config.styles.ts && vite build -c plugin/highlight/vite.config.ts && vite build -c plugin/markdown/vite.config.ts && vite build -c plugin/math/vite.config.ts && vite build -c plugin/notes/vite.config.ts && vite build -c plugin/search/vite.config.ts && vite build -c plugin/zoom/vite.config.ts",
"test": "gulp test", "test": "gulp test",
"start": "gulp serve", "start": "vite"
"build": "gulp build"
}, },
"author": { "author": {
"name": "Hakim El Hattab", "name": "Hakim El Hattab",
@@ -55,7 +91,10 @@
"through2": "^4.0.2", "through2": "^4.0.2",
"qunit": "^2.22.0", "qunit": "^2.22.0",
"rollup": "^4.1.5", "rollup": "^4.1.5",
"sass": "^1.79.4", "sass": "^1.69.5",
"typescript": "^5.2.2",
"vite": "^5.2.0",
"vite-plugin-dts": "^3.8.0",
"yargs": "^17.7.2" "yargs": "^17.7.2"
}, },
"overrides": { "overrides": {

View File

@@ -0,0 +1,22 @@
import { resolve } from 'path';
import { defineConfig } from 'vite'
import { appendExtension } from '../../vite.config.ts';
// Once Vite supports multiple entries for plugins, this build can
// be merged into the main vite.config.ts.
// See https://github.com/vitejs/vite/pull/10609
export default defineConfig({
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'umd'],
entry: {
'plugin/highlight': resolve(__dirname, 'index.js'),
},
name: 'RevealHighlight',
fileName: appendExtension
}
},
plugins: [],
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,22 @@
import { resolve } from 'path';
import { defineConfig } from 'vite'
import { appendExtension } from '../../vite.config.ts';
// Once Vite supports multiple entries for plugins, this build can
// be merged into the main vite.config.ts.
// See https://github.com/vitejs/vite/pull/10609
export default defineConfig({
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'umd'],
entry: {
'plugin/markdown': resolve(__dirname, 'index.js'),
},
name: 'RevealMarkdown',
fileName: appendExtension
}
},
plugins: [],
})

View File

@@ -0,0 +1,22 @@
import { resolve } from 'path';
import { defineConfig } from 'vite'
import { appendExtension } from '../../vite.config.ts';
// Once Vite supports multiple entries for plugins, this build can
// be merged into the main vite.config.ts.
// See https://github.com/vitejs/vite/pull/10609
export default defineConfig({
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'umd'],
entry: {
'plugin/math': resolve(__dirname, 'index.js'),
},
name: 'RevealMath',
fileName: appendExtension
}
},
plugins: [],
})

View File

@@ -1,4 +1,4 @@
import speakerViewHTML from './speaker-view.html' import speakerViewHTML from './speaker-view.html?raw'
import { marked } from 'marked'; import { marked } from 'marked';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,22 @@
import { resolve } from 'path';
import { defineConfig } from 'vite'
import { appendExtension } from '../../vite.config.ts';
// Once Vite supports multiple entries for plugins, this build can
// be merged into the main vite.config.ts.
// See https://github.com/vitejs/vite/pull/10609
export default defineConfig({
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'umd'],
entry: {
'plugin/notes': resolve(__dirname, 'index.js'),
},
name: 'RevealNotes',
fileName: appendExtension
}
},
plugins: [],
})

View File

@@ -0,0 +1,22 @@
import { resolve } from 'path';
import { defineConfig } from 'vite'
import { appendExtension } from '../../vite.config.ts';
// Once Vite supports multiple entries for plugins, this build can
// be merged into the main vite.config.ts.
// See https://github.com/vitejs/vite/pull/10609
export default defineConfig({
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'umd'],
entry: {
'plugin/search': resolve(__dirname, 'index.js'),
},
name: 'RevealSearch',
fileName: appendExtension
}
},
plugins: [],
})

View File

@@ -0,0 +1,22 @@
import { resolve } from 'path';
import { defineConfig } from 'vite'
import { appendExtension } from '../../vite.config.ts';
// Once Vite supports multiple entries for plugins, this build can
// be merged into the main vite.config.ts.
// See https://github.com/vitejs/vite/pull/10609
export default defineConfig({
build: {
emptyOutDir: false,
lib: {
formats: ['es', 'umd'],
entry: {
'plugin/zoom': resolve(__dirname, 'index.js'),
},
name: 'RevealZoom',
fileName: appendExtension
}
},
plugins: [],
})

View File

@@ -1,11 +0,0 @@
/*!
* reveal.js Zoom plugin
*/
const e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(t){var n=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:n)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;t[i]&&!e.isOverview()&&(t.preventDefault(),o.to({x:t.clientX,y:t.clientY,scale:d,pan:!1}))}))},destroy:()=>{o.reset()}};var t=()=>e,o=function(){var e=1,t=0,n=0,i=-1,d=-1,l="transform"in document.body.style;function s(t,o){var n=r();if(t.width=t.width||1,t.height=t.height||1,t.x-=(window.innerWidth-t.width*o)/2,t.y-=(window.innerHeight-t.height*o)/2,l)if(1===o)document.body.style.transform="";else{var i=n.x+"px "+n.y+"px",d="translate("+-t.x+"px,"+-t.y+"px) scale("+o+")";document.body.style.transformOrigin=i,document.body.style.transform=d}else 1===o?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(n.x+t.x)/o+"px",document.body.style.top=-(n.y+t.y)/o+"px",document.body.style.width=100*o+"%",document.body.style.height=100*o+"%",document.body.style.zoom=o);e=o,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function c(){var o=.12*window.innerWidth,i=.12*window.innerHeight,d=r();n<i?window.scroll(d.x,d.y-14/e*(1-n/i)):n>window.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-n)/i)*(14/e)),t<o?window.scroll(d.x-14/e*(1-t/o),d.y):t>window.innerWidth-o&&window.scroll(d.x+(1-(window.innerWidth-t)/o)*(14/e),d.y)}function r(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return l&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",(function(t){1!==e&&27===t.keyCode&&o.out()})),document.addEventListener("mousemove",(function(o){1!==e&&(t=o.clientX,n=o.clientY)})),{to:function(t){if(1!==e)o.out();else{if(t.x=t.x||0,t.y=t.y||0,t.element){var n=t.element.getBoundingClientRect();t.x=n.left-20,t.y=n.top-20,t.width=n.width+40,t.height=n.height+40}void 0!==t.width&&void 0!==t.height&&(t.scale=Math.max(Math.min(window.innerWidth/t.width,window.innerHeight/t.height),1)),t.scale>1&&(t.x*=t.scale,t.y*=t.scale,s(t,t.scale),!1!==t.pan&&(i=setTimeout((function(){d=setInterval(c,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),s({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();
/*!
* zoom.js 0.3 (modified for use with reveal.js)
* http://lab.hakim.se/zoom-js
* MIT licensed
*
* Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
*/export{t as default};

View File

@@ -1,11 +0,0 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealZoom=t()}(this,(function(){"use strict";
/*!
* reveal.js Zoom plugin
*/const e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(o){var n=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:n)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;o[i]&&!e.isOverview()&&(o.preventDefault(),t.to({x:o.clientX,y:o.clientY,scale:d,pan:!1}))}))},destroy:()=>{t.reset()}};var t=function(){var e=1,o=0,n=0,i=-1,d=-1,l="transform"in document.body.style;function s(t,o){var n=r();if(t.width=t.width||1,t.height=t.height||1,t.x-=(window.innerWidth-t.width*o)/2,t.y-=(window.innerHeight-t.height*o)/2,l)if(1===o)document.body.style.transform="";else{var i=n.x+"px "+n.y+"px",d="translate("+-t.x+"px,"+-t.y+"px) scale("+o+")";document.body.style.transformOrigin=i,document.body.style.transform=d}else 1===o?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(n.x+t.x)/o+"px",document.body.style.top=-(n.y+t.y)/o+"px",document.body.style.width=100*o+"%",document.body.style.height=100*o+"%",document.body.style.zoom=o);e=o,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function c(){var t=.12*window.innerWidth,i=.12*window.innerHeight,d=r();n<i?window.scroll(d.x,d.y-14/e*(1-n/i)):n>window.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-n)/i)*(14/e)),o<t?window.scroll(d.x-14/e*(1-o/t),d.y):o>window.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-o)/t)*(14/e),d.y)}function r(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return l&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",(function(o){1!==e&&27===o.keyCode&&t.out()})),document.addEventListener("mousemove",(function(t){1!==e&&(o=t.clientX,n=t.clientY)})),{to:function(o){if(1!==e)t.out();else{if(o.x=o.x||0,o.y=o.y||0,o.element){var n=o.element.getBoundingClientRect();o.x=n.left-20,o.y=n.top-20,o.width=n.width+40,o.height=n.height+40}void 0!==o.width&&void 0!==o.height&&(o.scale=Math.max(Math.min(window.innerWidth/o.width,window.innerHeight/o.height),1)),o.scale>1&&(o.x*=o.scale,o.y*=o.scale,s(o,o.scale),!1!==o.pan&&(i=setTimeout((function(){d=setInterval(c,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),s({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();
/*!
* zoom.js 0.3 (modified for use with reveal.js)
* http://lab.hakim.se/zoom-js
* MIT licensed
*
* Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
*/return()=>e}));

View File

@@ -0,0 +1,71 @@
/*
Monokai style - ported by Luigi Maselli - http://grigio.org
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #272822;
color: #ddd;
}
.hljs-tag,
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-strong,
.hljs-name {
color: #f92672;
}
.hljs-code {
color: #66d9ef;
}
.hljs-class .hljs-title {
color: white;
}
.hljs-attribute,
.hljs-symbol,
.hljs-regexp,
.hljs-link {
color: #bf79db;
}
.hljs-string,
.hljs-bullet,
.hljs-subst,
.hljs-title,
.hljs-section,
.hljs-emphasis,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #a6e22e;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #75715e;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-selector-id {
font-weight: bold;
}

View File

@@ -0,0 +1,80 @@
/*
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
based on dark.css by Ivan Sagalaev
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #3f3f3f;
color: #dcdcdc;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-tag {
color: #e3ceab;
}
.hljs-template-tag {
color: #dcdcdc;
}
.hljs-number {
color: #8cd0d3;
}
.hljs-variable,
.hljs-template-variable,
.hljs-attribute {
color: #efdcbc;
}
.hljs-literal {
color: #efefaf;
}
.hljs-subst {
color: #8f8f8f;
}
.hljs-title,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-section,
.hljs-type {
color: #efef8f;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link {
color: #dca3a3;
}
.hljs-deletion,
.hljs-string,
.hljs-built_in,
.hljs-builtin-name {
color: #cc9393;
}
.hljs-addition,
.hljs-comment,
.hljs-quote,
.hljs-meta {
color: #7f9f7f;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@@ -0,0 +1,2 @@
SIL Open Font License (OFL)
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL

View 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;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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.

View 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;
}

View File

@@ -315,9 +315,9 @@
</div> </div>
<script type="module"> <script type="module">
import Reveal from '../dist/reveal.esm.js' import Reveal from '../js';
import Markdown from '../plugin/markdown/markdown.esm.js' import Markdown from '../plugin/markdown'
import Highlight from '../plugin/highlight/highlight.esm.js' import Highlight from '../plugin/highlight'
QUnit.config.testTimeout = 30000; QUnit.config.testTimeout = 30000;

View File

@@ -38,8 +38,8 @@
<script type="module"> <script type="module">
import Reveal from '../dist/reveal.esm.js'; import Reveal from '../js';
import Zoom from '../plugin/zoom/zoom.esm.js'; import Zoom from '../plugin/zoom';
QUnit.config.testTimeout = 30000; QUnit.config.testTimeout = 30000;
QUnit.module( 'Multiple reveal.js instances' ); QUnit.module( 'Multiple reveal.js instances' );

25
tsconfig.json Normal file
View File

@@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["js"],
"references": [{ "path": "./tsconfig.node.json" }]
}

11
tsconfig.node.json Normal file
View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true
},
"include": ["vite.config.ts"]
}

20
vite.config.styles.ts Normal file
View File

@@ -0,0 +1,20 @@
import { resolve } from 'path'
import { defineConfig } from 'vite'
export default defineConfig({
root: './',
build: {
emptyOutDir: false,
cssCodeSplit: true,
lib: {
formats: ['es'],
entry: {
'reveal': resolve(__dirname, 'css/reveal.scss'),
'reset': resolve(__dirname, 'css/reset.css'),
'theme/black': resolve(__dirname, 'css/theme/black.scss'),
},
}
},
plugins: [],
})

42
vite.config.ts Normal file
View File

@@ -0,0 +1,42 @@
import { resolve } from 'path'
import { ModuleFormat } from 'rollup';
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts';
export const appendExtension = (format:ModuleFormat, name:String) : string => {
if( format === 'es' ) {
return `${name}.mjs`;
}
else {
return `${name}.js`;
}
}
export default defineConfig({
build: {
emptyOutDir: true,
lib: {
formats: ['es', 'umd'],
entry: resolve(__dirname, 'js/index.ts'),
name: 'Reveal',
fileName: (format, entryName) => {
return appendExtension(format, 'reveal');
}
},
rollupOptions: {
output: {
assetFileNames: "reveal.[ext]",
},
},
},
resolve: {
alias: {
// Matches the exported paths in package.json
'reveal.js/plugin': './plugin',
'reveal.js': '/js',
},
},
plugins: [
dts({ insertTypesEntry: true }),
],
})