Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream changes #1

Merged
merged 33 commits into from
Sep 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
942304d
add --slide-width/height css variables
hakimel Jun 1, 2020
cd5c9c5
build js
hakimel Jun 1, 2020
61624ae
🤦
hakimel Jun 1, 2020
7ebade7
remove 20px vertical padding on slide sections
hakimel Jun 2, 2020
c910747
don't write '#/' to url on first slide, remove history api feature de…
hakimel Jun 2, 2020
d272628
add support for data-visibility=hidden
hakimel Jun 2, 2020
ac79c7c
leave the progress bar empty if there's < 2 slides
hakimel Jun 5, 2020
166af89
all themes now have contrasting text colors based on slide bg
hakimel Jun 5, 2020
6772518
Merge branch 'master' of github.com:hakimel/reveal.js into dev
hakimel Jun 5, 2020
37d8337
add support for wrapping code in script tempalte to avoid html parser…
hakimel Jun 5, 2020
66cbd66
fix slide numbering issue with uncounted horizontal slides (fixes #2675)
hakimel Jun 5, 2020
1b6a3b1
add support for auto-sized big text via r-fit-text
hakimel Jun 5, 2020
f231c53
Merge branch 'master' of github.com:hakimel/reveal.js into dev
hakimel Jun 9, 2020
aa66779
fit-text helper now triggers lazyily when slide enters view distance
hakimel Jun 9, 2020
be46081
correct scope for fit-text selector
hakimel Jun 9, 2020
cd2a792
allow images inside of h/vstacks to be proportionally downsized
hakimel Jun 9, 2020
2fccb77
add 'playsinline' to all inline videos, dont mute background videos o…
hakimel Jun 16, 2020
9ff27cf
bg videos remain muted on mobile, otherwise broken when navigating wi…
hakimel Jun 16, 2020
2bfe705
include /css and /js in npm package #2712
hakimel Jun 30, 2020
b05e530
Fix URL to pdf-export documentation
ebriand Aug 4, 2020
3a99a7b
shuffle now applies to vertical slides as well
hakimel Aug 17, 2020
a150d0c
Start relative paths in CSS with ./
michaelmior Aug 18, 2020
80d96b4
upgrade rollup-plugin-terser to fix npm warning #2751
hakimel Aug 19, 2020
faa8b56
dependency upgrades
hakimel Aug 19, 2020
aa62bd4
Update README.md
rschmehl Sep 6, 2020
2c121d2
docs: Fix simple typo, transiition -> transition
timgates42 Sep 7, 2020
5676ef7
Merge pull request #2771 from timgates42/bugfix_typo_transition
hakimel Sep 9, 2020
b13c7b4
Merge pull request #2767 from rschmehl/patch-1
hakimel Sep 9, 2020
5f7c945
Merge pull request #2752 from michaelmior/css-paths
hakimel Sep 9, 2020
17bfa62
Merge pull request #2746 from ebriand/patch-1
hakimel Sep 9, 2020
4d62dcc
Merge branch 'master' of github.com:hakimel/reveal.js into dev
hakimel Sep 9, 2020
676936e
revert debug change to index.html
hakimel Sep 9, 2020
e09437f
escape HTML entities in code parsed from markdown, fixes #2744
hakimel Sep 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 13.x]
node-version: [10.x, 14.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/test
/examples
/css
/js
.github
.gulpfile
.sass-cache
Expand Down
12 changes: 12 additions & 0 deletions css/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
box-sizing: border-box;
}

// Text that auto-fits it's container
.reveal .r-fit-text {
display: inline-block; // https://github.com/rikschennink/fitty#performance
white-space: nowrap;
}

// Stack multiple elements on top of each other
.reveal .r-stack {
display: grid;
Expand All @@ -30,6 +36,12 @@
.reveal .r-vstack,
.reveal .r-hstack {
display: flex;

img, video {
min-width: 0;
min-height: 0;
object-fit: contain;
}
}

.reveal .r-vstack {
Expand Down
2 changes: 1 addition & 1 deletion css/print/pdf.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This stylesheet is used to print reveal.js
* presentations to PDF.
*
* https://revealjs.revealjs.com/pdf-export/
* https://revealjs.com/pdf-export/
*/

html.print-pdf {
Expand Down
1 change: 0 additions & 1 deletion css/reveal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ $controlsArrowAngleActive: 36deg;
display: none;
position: absolute;
width: 100%;
padding: 20px 0px;
pointer-events: auto;

z-index: 10;
Expand Down
2 changes: 1 addition & 1 deletion css/theme/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Dependencies

Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment installed before proceeding: https://revealjs.revealjs.com/installation/#full-setup
Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment installed before proceeding: https://revealjs.com/installation/#full-setup

## Creating a Theme

Expand Down
6 changes: 4 additions & 2 deletions css/theme/source/beige.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


// Include theme-specific fonts
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);


Expand All @@ -32,8 +32,10 @@ $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b
@include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) );
}

// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);


// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// ---------------------------------------------
11 changes: 4 additions & 7 deletions css/theme/source/black.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


// 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)
Expand All @@ -37,13 +37,10 @@ $heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;

section.has-light-background {
&, h1, h2, h3, h4, h5, h6 {
color: #222;
}
}
// Change text colors against light slide backgrounds
@include light-bg-text-color(#222);


// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// ---------------------------------------------
9 changes: 9 additions & 0 deletions css/theme/source/blood.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ $linkColorHover: lighten( $linkColor, 20% );
$selectionBackgroundColor: $blood;
$selectionColor: #fff;

// Change text colors against dark slide backgrounds
@include light-bg-text-color(#222);


// Theme template ------------------------------
@import "../template/theme";
Expand All @@ -58,6 +61,12 @@ $selectionColor: #fff;
text-shadow: 1px 1px $coal;
}

section.has-light-background {
p, h1, h2, h3, h4 {
text-shadow: none;
}
}

.reveal h1,
.reveal h2,
.reveal h3,
Expand Down
6 changes: 4 additions & 2 deletions css/theme/source/league.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


// Include theme-specific fonts
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);

// Override theme settings (see ../template/settings.scss)
Expand All @@ -27,8 +27,10 @@ $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b
@include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) );
}

// Change text colors against light slide backgrounds
@include light-bg-text-color(#222);


// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// ---------------------------------------------
5 changes: 3 additions & 2 deletions css/theme/source/moon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


// Include theme-specific fonts
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);

/**
Expand Down Expand Up @@ -50,7 +50,8 @@ $linkColor: $blue;
$linkColorHover: lighten( $linkColor, 20% );
$selectionBackgroundColor: $magenta;


// Change text colors against light slide backgrounds
@include light-bg-text-color(#222);

// Theme template ------------------------------
@import "../template/theme";
Expand Down
3 changes: 3 additions & 0 deletions css/theme/source/night.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ $headingLetterSpacing: -0.03em;
$headingTextTransform: none;
$selectionBackgroundColor: #e7ad52;

// Change text colors against light slide backgrounds
@include light-bg-text-color(#222);


// Theme template ------------------------------
@import "../template/theme";
Expand Down
3 changes: 3 additions & 0 deletions css/theme/source/serif.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ $selectionBackgroundColor: #26351C;
line-height: 1.3em;
}

// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);


// Theme template ------------------------------
@import "../template/theme";
Expand Down
7 changes: 2 additions & 5 deletions css/theme/source/simple.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ $linkColor: #00008B;
$linkColorHover: lighten( $linkColor, 20% );
$selectionBackgroundColor: rgba(0, 0, 0, 0.99);

section.has-dark-background {
&, h1, h2, h3, h4, h5, h6 {
color: #fff;
}
}
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);


// Theme template ------------------------------
Expand Down
3 changes: 3 additions & 0 deletions css/theme/source/sky.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ $selectionBackgroundColor: #134674;
@include radial-gradient( #add9e4, #f7fbfc );
}

// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);



// Theme template ------------------------------
Expand Down
2 changes: 1 addition & 1 deletion css/theme/source/solarized.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


// Include theme-specific fonts
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);


Expand Down
11 changes: 4 additions & 7 deletions css/theme/source/white.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


// 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)
Expand All @@ -37,13 +37,10 @@ $heading2Size: 1.6em;
$heading3Size: 1.3em;
$heading4Size: 1.0em;

section.has-dark-background {
&, h1, h2, h3, h4, h5, h6 {
color: #fff;
}
}
// Change text colors against dark slide backgrounds
@include dark-bg-text-color(#fff);


// Theme template ------------------------------
@import "../template/theme";
// ---------------------------------------------
// ---------------------------------------------
16 changes: 16 additions & 0 deletions css/theme/template/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,20 @@
background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
background: radial-gradient( center, $type cover, $inner 0%, $outer 100% );
}

@mixin light-bg-text-color( $color ) {
section.has-light-background {
&, h1, h2, h3, h4, h5, h6 {
color: $color;
}
}
}

@mixin dark-bg-text-color( $color ) {
section.has-dark-background {
&, h1, h2, h3, h4, h5, h6 {
color: $color;
}
}
}
10 changes: 10 additions & 0 deletions css/theme/template/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@
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,
Expand Down
31 changes: 19 additions & 12 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ <h2>Slides</h2>
</p>
</section>

<section data-visibility="hidden">
<h2>Hidden Slides</h2>
<p>
This slide is visible in the source, but hidden when the presentation is viewed. You can show all hidden slides by setting the `showHiddenSlides` config option to `true`.
</p>
</section>

<section data-auto-animate>
<h2 data-id="code-title">Pretty Code</h2>
<pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers>
Expand All @@ -95,35 +102,35 @@ <h2 data-id="code-title">Pretty Code</h2>

<section data-auto-animate>
<h2 data-id="code-title">With animations</h2>
<pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers="|4,8-11|17|22-24">
<pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers="|4,8-11|17|22-24"><script type="text/template">
import React, { useState } from 'react';

function Example() {
const [count, setCount] = useState(0);

return (
&lt;div&gt;
&lt;p&gt;You clicked {count} times&lt;/p&gt;
&lt;button onClick={() =&gt; setCount(count + 1)}&gt;
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
&lt;/button&gt;
&lt;/div&gt;
</button>
</div>
);
}

function SecondExample() {
const [count, setCount] = useState(0);

return (
&lt;div&gt;
&lt;p&gt;You clicked {count} times&lt;/p&gt;
&lt;button onClick={() =&gt; setCount(count + 1)}&gt;
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
&lt;/button&gt;
&lt;/div&gt;
</button>
</div>
);
}
</code></pre>
</script></code></pre>
</section>

<section>
Expand Down
2 changes: 1 addition & 1 deletion dist/reveal.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion dist/theme/beige.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
*
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
@import url(fonts/league-gothic/league-gothic.css);
@import url(./fonts/league-gothic/league-gothic.css);
@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff; }

/*********************************************
* GLOBAL STYLES
*********************************************/
Expand Down Expand Up @@ -105,6 +108,15 @@
margin: 20px 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,
Expand Down
Loading