-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
137 lines (129 loc) · 5.82 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html>
<head>
<title>pRust Presentation</title>
<meta charset="UTF-8">
<meta name="description" content="pRUST allow the execution of presented code on revealjs.">
<meta name="author" content="Bechir Nemlaghi">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="components/moz-reveal.js/css/reveal.css">
<link rel="stylesheet" href="components/moz-reveal.js/css/theme/mozilla-poly.css" id="theme">
<link rel="stylesheet" href="components/moz-reveal.js/lib/css/zenburn.css">
<link rel="stylesheet" href="css/console.css" id="theme">
<script src="components/jquery/dist/jquery.min.js"></script>
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? 'components/moz-reveal.js/css/print/pdf.css' : 'components/moz-reveal.js/css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
</head>
<body>
<div class="outer">
<a href="https://www.mozilla.org/">Mozilla</a>
</div>
<div class="reveal">
<div class="slides">
<section>
<h1>pRUST</h1>
<p>
<small>Crafted By</small> <a href="https://twitter.com/bnemlaghi">Bechir Nemlaghi</a><small> with love!</small>
</p>
</section>
<section>
<h3>What is this</h3>
<section>
<p>
<b>pRUST</b> is for now a POC of an interactive way to present
RUST, the memory safe language, it is meant to evolve into
a <b>reveal plugin</b>.
</p>
</section>
<section>
<p>
<b>pRUST</b> allow the execution of demonstrated code whitin
the presentation.
</p>
</section>
<section>
<a href="https://www.rust-lang.org/" target="_blank">Find more about Rust</a>
</section>
</section>
<section>
<h3>How it work</h3>
<p>
All you have to do is to use this template, add <b>rust</b>
class in any code you want to be executabe.
</p>
<pre><code data-trim class="hljs html"><pre><code data-trim class="hljs rust">rust code here</code></pre></code></pre>
</section>
<section>
<h3>Demo</h3>
<pre><code data-trim class="hljs rust">
// This is a comment
fn main() {
println!("Hello World!");
}
</code></pre>
</section>
<section>
<h3>Remote source</h3>
<section>
<p>
The following code is pulled from <a href="https://gist.github.com/chikoski/9d29be8f0f61b0b567e3" target="_blank">https://gist.github.com/chikoski/9d29be8f0f61b0b567e3</a>
</p>
<pre><code data-source="https://gist.githubusercontent.com/chikoski/9d29be8f0f61b0b567e3/raw/a3d9cce23703f451f8f538816c1a0a7a1457680b/concat.rs" data-trim class="hljs rust">
</code></pre>
</section>
<section>
<p>
To use hosted/shared source, you can use this snippet, adding the url of your code
in the data-source attribute.
</p>
<pre><code data-trim class="hljs html"><pre><code data-source="https://site.org/code/source" data-trim class="hljs rust"></code></pre></code></pre>
</section>
</section>
<section>
<h3>Editable</h3>
<pre><code data-trim contenteditable class="hljs rust">
fn main() {
let mut count = 0u32;
println!("Let's count until infinity!");
// Infinite loop
loop {
count += 1;
if count == 3 {
println!("three");
// Skip the rest of this iteration
continue;
}
println!("{}", count);
if count == 5 {
println!("OK, that's enough");
// Exit this loop
break;
}
}
}
</code></pre>
</section>
<section>
<h3>To be added</h3>
<ul>
<li class="fragment grow">Implement as reveal plugin</li>
<li class="fragment grow">Highlight compilation errors</li>
<li class="fragment grow">Undo/Redo code change</li>
<li class="fragment grow">VanillaJS implementation</li>
</ul>
</section>
</div>
</div>
<script src="components/moz-reveal.js/lib/js/head.min.js"></script>
<script src="components/moz-reveal.js/js/reveal.js"></script>
<script src="js/revealInit.js"></script>
<script src="js/playRust.js"></script>
</body>
</html>