Skip to content

Commit 0c25015

Browse files
authored
Merge pull request #146 from davidovich/pr/chrisreddington/115
Brings up to date pr/chrisreddington/115 and reveal-js 4.4.0
2 parents 57e6200 + 3d53962 commit 0c25015

File tree

122 files changed

+6402
-13924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+6402
-13924
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
public
33
exampleSite/resources/_gen
4+
.hugo_build.lock

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ theme = "moon"
430430
# the following supposes that menu is accessible in static dir
431431
[[params.reveal_hugo.plugins]]
432432
# Name the plugin. This should be the same name used to register a reveal-js plugin,
433-
# for example RevealMenu, RevealNotes
434-
name = RevealMenu
433+
# for example: `RevealMenu`, `RevealNotes`
434+
name = "RevealMenu"
435435
source = "menu/menu.js"
436436
css = "menu/menu.css"
437437
# verbatim = true # should the css and source paths be used as-is ?
@@ -512,8 +512,8 @@ Reveal.js theme customization is easiest to do by overriding variables in the SC
512512
If you just wanted to change the presentation colors, here's what you might put in `custom-theme.scss`:
513513

514514
```scss
515-
@import "../reveal-js/css/theme/template/mixins";
516-
@import "../reveal-js/css/theme/template/settings";
515+
@import "../reveal-js/dist/theme/template/mixins";
516+
@import "../reveal-js/dist/theme/template/settings";
517517

518518
$backgroundColor: rgb(3, 129, 45);
519519
$mainColor: #fff;

static/reveal-js/css/theme/README.md renamed to assets/reveal-js/dist/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Dependencies
22

3-
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 including the Grunt dependencies installed before proceeding: https://github.com/hakimel/reveal.js#full-setup
3+
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
44

55
## Creating a Theme
66

7-
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/gruntfile.js)) when you run `npm run build -- css-themes`.
7+
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled from Sass to CSS (see the [gulpfile](https://github.com/hakimel/reveal.js/blob/master/gulpfile.js)) when you run `npm run build -- css-themes`.
88

99
Each theme file does four things in the following order:
1010

assets/reveal-js/dist/layout.scss

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* Layout helpers.
3+
*/
4+
5+
// Stretch an element vertically based on available space
6+
.reveal .stretch,
7+
.reveal .r-stretch {
8+
max-width: none;
9+
max-height: none;
10+
}
11+
12+
.reveal pre.stretch code,
13+
.reveal pre.r-stretch code {
14+
height: 100%;
15+
max-height: 100%;
16+
box-sizing: border-box;
17+
}
18+
19+
// Text that auto-fits it's container
20+
.reveal .r-fit-text {
21+
display: inline-block; // https://github.com/rikschennink/fitty#performance
22+
white-space: nowrap;
23+
}
24+
25+
// Stack multiple elements on top of each other
26+
.reveal .r-stack {
27+
display: grid;
28+
}
29+
30+
.reveal .r-stack > * {
31+
grid-area: 1/1;
32+
margin: auto;
33+
}
34+
35+
// Horizontal and vertical stacks
36+
.reveal .r-vstack,
37+
.reveal .r-hstack {
38+
display: flex;
39+
40+
img, video {
41+
min-width: 0;
42+
min-height: 0;
43+
object-fit: contain;
44+
}
45+
}
46+
47+
.reveal .r-vstack {
48+
flex-direction: column;
49+
align-items: center;
50+
justify-content: center;
51+
}
52+
53+
.reveal .r-hstack {
54+
flex-direction: row;
55+
align-items: center;
56+
justify-content: center;
57+
}
58+
59+
// Naming based on tailwindcss
60+
.reveal .items-stretch { align-items: stretch; }
61+
.reveal .items-start { align-items: flex-start; }
62+
.reveal .items-center { align-items: center; }
63+
.reveal .items-end { align-items: flex-end; }
64+
65+
.reveal .justify-between { justify-content: space-between; }
66+
.reveal .justify-around { justify-content: space-around; }
67+
.reveal .justify-start { justify-content: flex-start; }
68+
.reveal .justify-center { justify-content: center; }
69+
.reveal .justify-end { justify-content: flex-end; }

0 commit comments

Comments
 (0)