Files
kraken/website/presentation.html

117 lines
3.2 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<title>Kraken Quals Presentation</title>
<link id="theme" rel="stylesheet" type="text/css" href="recursive.css"/>
<link href="favicon.png" rel="icon" type="image/png"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
// unset recursive.css website version
body { max-width: unset; }
.title > h1 { font-size: 4em; }
h1 { font-size: 2.5em; }
.rerun_container { position: relative; }
</style>
</head>
<body onload="loadEverything();">
<textarea id="source">
class: center, middle, title
# Kraken
_FOSS Fexprs: <a title="Kraken on GitHub" href="https://github.com/limvot/kraken">https://github.com/limvot/kraken</a>_
---
# Agenda
1. Introduction
2. Deep-dive
3. ...
[NOTE]: This file is portable; you don't need any other file, or an internet connection for this presentation.
---
# Introduction
HEre's some test code:
.run_container[
<div class="editor" id="hello_editor">; Of course
(println "Hello World")
; Just print 3
(println "Math workssss:" (+ 1 2 4))
</div>
]
--
.rerun_container[
<pre><code class="remark_code" id="hello_editor_output">output here...</code></pre>
<button class="run_button" onclick="executeKraken(hello_editor_jar[1].toString(), 'hello_editor_output')">Rerun</button> <br>
]
---
# Another slideo
boro
</textarea>
<link rel="stylesheet" href="./default.min.css">
<script src="./highlight.min.js"></script>
<script type="module">
import {CodeJar} from './codejar.js'
window.loadEverything = function() {
var slideshow = remark.create();
document.querySelectorAll('.editor').forEach((editor_div) => {
if (window[editor_div.id + "_jar"] == undefined) {
window[editor_div.id + "_jar"] = []
}
window[editor_div.id + "_jar"].push(CodeJar(editor_div, hljs.highlightElement))
});
slideshow.on('showSlide', function (slide) {
//console.log('Navigated to', slide)
for (const c of slide.content) {
if (c.class == "run_container") {
//console.log("found editor", c)
const re = /class="editor" id="([^"]+)"/;
let id = c.content[0].match(re)[1]
let editors = window[id + "_jar"]
if (slide.properties.continued == "true") {
editors[1].updateCode(editors[0].toString())
//console.log("Got editors", editors, "running kraken")
executeKraken(editors[1].toString(), id + "_output")
} else {
editors[0].updateCode(editors[1].toString())
}
}
}
})
}
</script>
<script>
var output_name = ""
var Module = {
noInitialRun: true,
onRuntimeInitialized: () => {
},
print: txt => {
document.getElementById(output_name).innerHTML += txt + "\n";
},
printErr: txt => {
document.getElementById(output_name).innerHTML += "STDERR:[" + txt + "]\n";
}
};
function executeKraken(code, new_output_name) {
output_name = new_output_name
document.getElementById(new_output_name).innerHTML = "";
Module.callMain(["-C", code]);
}
</script>
<script type="text/javascript" src="k_prime.js"></script>
<script src="remark-latest.min.js"></script>
</body>
</html>