Using reveal.js, we can make beautiful and powerful slides on web, in a easy way.
Press the F1 key to show keyboard shortcuts while navigation.
Download the lastest version from github.
or, use ESM version directly from the CDN:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js/dist/reveal.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js/dist/theme/night.css">
<script type="module">
import Reveal from 'https://cdn.jsdelivr.net/npm/reveal.js/dist/reveal.esm.js';
Reveal.initialize();
</script>
The following codes would generate 2 slides:
<div class='reveal'>
<div class='slides'>
<section>
<h2>Slide1 Title</h2>
<p>Slide1 content.</p>
</section>
<section>
<h2>Slide2 Title</h2>
<p>Slide2 content.</p>
</section>
</div>
</div>
Need sub-sections?
Click on the Down arrow to view the source codes for it.
<section>
<section> ... </section>
<section> ... </section>
...
</section>
The current sub-section would be navigated in the normal horizontal direction. And the other sub-sections would be navigated via the vertical arrows.
Effects:
function sum(a, b) {
return a + b;
}
let result = sum(3, 5);
console.log(result);
Press Down arrow to see how.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js/plugin/highlight/zenburn.css">
<script type="module">
import Reveal from 'https://cdn.jsdelivr.net/npm/reveal.js/dist/reveal.esm.js';
import RevealHighlight from 'https://cdn.jsdelivr.net/npm/reveal.js/plugin/highlight/highlight.esm.js';
Reveal.initialize({
plugins: [RevealHighlight]
});
</script>
The available CSS files includes zenburn.css (being used) and monokai.css.
Press Down arrow to see how to write source codes.
<pre><code data-trim>
function sum(a, b) {
return a + b;
}
let result = sum(3, 5);
console.log(result);
</code></pre>
HTML characters will be escaped by default.
If not, add data-noescape attribute to the code element.
See more below.
Source Codes:
<pre><code data-trim><script type="text/template">
sealed class Either<out A, out B> {
data class Left<out A>(val a: A) : Either<A, Nothing>()
data class Right<out B>(val b: B) : Either<Nothing, B>()
}
</script></code></pre>
Effects:
Source Codes:
Effects:
See more below.
Source codes:
Effects:
function sum(a, b) {
return a + b;
}
let result = sum(3, 5);
console.log(result);
Source codes:
Effects:
function sum(a, b) {
return a + b;
}
let result = sum(3, 5);
console.log(result);
Source codes:
Effects:
function sum(a, b) {
return a + b;
}
let result = sum(3, 5);
console.log(result);