This repository has been archived by the owner on Dec 10, 2020. It is now read-only.
forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
116 lines (107 loc) · 3.19 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Perl + Wasm</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/black.css" id="theme">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css" id="highlight-theme">
<style type="text/css">
div.nx-hide-bullet li {
list-style-type: none;
margin: 0;
white-space: nowrap;
}
img.nx-icon {
margin: 0;
max-width: 32px;
max-height: 32px;
}
strong { color:orange; }
em { color: yellow; }
p code { color: cyan; }
sup { color: yellow; }
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-markdown="index.md">
<textarea data-template>
</textarea>
</section>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="webperl.js"></script>
<script type="text/perl">
use strict;
use warnings;
use 5.010;
js("console.log('Perl is ready')");
</script>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ],
markdown: {
smartypants: true
}
}).then( function() {
var ctrl = false;
$('.perl-source').on('keydown', function (e) {
if(e.key == "Control")
ctrl = true;
else if(ctrl && e.key == "x")
{
Perl.eval(e.target.value);
e.preventDefault();
}
else if(ctrl && e.key == "z")
{
$('.perl-source').hide();
$('.js-source').show();
}
});
$('.perl-source').on('keyup', function (e) {
if(e.key == "Control")
ctrl = false;
});
$('.js-source').on('keydown', function (e) {
if(e.key == "Control")
ctrl = true;
else if(ctrl && e.key == "x")
{
eval(e.target.value);
e.preventDefault();
}
else if(ctrl && e.key == "z")
{
$('.perl-source').show();
$('.js-source').hide();
}
});
$('.perl-source').on('keyup', function (e) {
if(e.key == "Control")
ctrl = false;
});
var orig = Perl.output;
Perl.output = function (string, chan) {
orig(string,chan);
$('.perl-output').append(string);
};
});
</script>
</body>
</html>