Skip to content

Commit 38cbb99

Browse files
committed
Added code highlighting (solarized-light theme), added hljs initialization, changed transition to cube and removed reveal default controls.
1 parent 2fad89f commit 38cbb99

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<link rel="stylesheet" href="/jspm_packages/github/hakimel/reveal.js@3.3.0/css/reveal.css">
99
<link rel="stylesheet" href="/jspm_packages/github/hakimel/reveal.js@3.3.0/css/theme/white.css">
1010
<link rel="stylesheet" href="/src/css/common.css">
11+
<link rel="stylesheet" href="/src/css/solarized-light.css">
1112

1213
</head>
1314

@@ -27,6 +28,19 @@ <h1 style="font-size: 4.5em; margin-bottom: -0.25em;" class="primaryColor" >like
2728
<h1 style="font-size: 5em;"class="flippedColor" >that</h1>
2829
</section>
2930

31+
<section>
32+
<h3>Declaring and using variables</h3>
33+
<pre><code class="css" data-trim data-noescape>
34+
:root {
35+
--main-color: #06c;
36+
}
37+
38+
#foo h1 {
39+
color: var(--main-color);
40+
}
41+
</code></pre>
42+
</section>
43+
3044
</div>
3145
</div>
3246

src/css/solarized-light.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/revealWrapper.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
import Reveal from 'reveal';
22
import classList from '/jspm_packages/github/hakimel/reveal.js@3.3.0/lib/js/classList.js';
3+
import hljs from '/jspm_packages/github/hakimel/reveal.js@3.3.0/plugin/highlight/highlight.js';
34
import zoom from '/jspm_packages/github/hakimel/reveal.js@3.3.0/plugin/zoom-js/zoom.js';
45

56
Reveal.initialize({
6-
controls: true,
7+
controls: false,
78
progress: true,
89
history: true,
910
center: true,
1011
overview: true,
1112
touch: true,
1213
theme: window.Reveal.getQueryHash().theme, // available themes are in /css/theme
13-
transition: 'linear', // default/cube/page/concave/zoom/linear/fade/none
14+
transition: 'cube', // default/cube/page/concave/zoom/linear/fade/none
1415
dependencies: [
1516
// do not use it - use system JS instead.
1617
]
1718
});
1819

20+
hljs.initHighlighting();
1921

2022
export default Reveal;

0 commit comments

Comments
 (0)