Skip to content

Commit

Permalink
Merge pull request #1 from hakimel/master
Browse files Browse the repository at this point in the history
Merge upstream changes
  • Loading branch information
jacek-jonca authored Sep 13, 2020
2 parents 15815ef + e09437f commit 52b54fd
Show file tree
Hide file tree
Showing 60 changed files with 597 additions and 201 deletions.
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

0 comments on commit 52b54fd

Please sign in to comment.