-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
124 lines (108 loc) · 4.78 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>reveal.js-linkify</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.4.0/reset.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.4.0/reveal.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.4.0/theme/black.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.4.0/plugin/highlight/monokai.css">
<!-- Linkify CSS -->
<link rel="stylesheet" href="plugin/linkify/linkify.css">
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h2>Linkify</h2>
<p>A Reveal.js plugin to automatically create links to online compilers</p>
<pre><code data-trim data-noescape>
#include <iostream>
int main() {
std::cout << "Hello, world!\n";
}
</code></pre>
<pre><code data-trim data-noescape class="javascript">
console.log("Hello, world!");
</code></pre>
<small>Now available for C++ (using Godbolt) and for JavaScript (on Codepen)!</small>
</section>
<section>
<h4>From HTML</h4>
<pre><code data-trim data-noescape>
#include <iostream>
int main() {
std::cout << "Hello, world from html!\n";
}
</code></pre>
</section>
<section data-markdown>
#### From Markdown
```cpp
#include <iostream>
int main() {
std::cout << "Hello, world from markdown!\n";
}
```
</section>
<section data-markdown>
#### With Line Numbers
```cpp [4-6|7-11]
#include <iostream>
int main() {
std::cout << "Input a number: ";
int i;
std::cin >> i;
if (i >= 0) {
std::cout << "Your number is non-negative!\n";
} else {
std::cout << "Your number is negative!\n";
}
}
```
</section>
<section data-markdown>
#### Easy to Setup and Configure
```js
Reveal.initialize({
// ...
linkify: {
// Linkify Configuration
},
plugins: [ /* ..., */ Linkify ]
});
```
</section>
<section>
<h4>Links</h4>
<p>
<a href="https://github.com/alex-van-vliet/reveal.js-linkify">Source & Documentation</a>
</p>
<small>Thanks for using Linkify!</small>
</section>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.4.0/reveal.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.4.0/plugin/notes/notes.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.4.0/plugin/markdown/markdown.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.4.0/plugin/highlight/highlight.js"></script>
<script src="plugin/linkify/linkify.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
linkify: {
// Use default configuration
},
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes, Linkify ]
});
</script>
</body>
</html>