1
Fork 0
hare-playground/frontend/code.html

75 lines
2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>code</title>
<link rel="stylesheet" href="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="codapi.js"></script>
<script src="codapi-settings.js"></script>
<link rel="stylesheet" href="codapi.css" />
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
pre {
margin-bottom: 0;
background: #f5f5f5;
line-height: 1.2;
}
code {
display: block;
padding: 1.5em;
}
codapi-snippet {
display: block;
margin-bottom: 0.8em;
background: #f5f5f5;
}
codapi-toolbar button {
padding: 0;
border: none;
background: none;
line-height: 1.35;
color: #008bf5;
font-size: 16px;
}
codapi-toolbar button::after {
content: " ▶";
}
codapi-toolbar a {
color: #008bf5;
border-bottom: 1px solid rgba(0, 139, 245, 0.2);
text-decoration: none;
font-size: 16px;
}
</style>
</head>
<body>
<codapi-settings url="http://joltrast:8080/v1"></codapi-settings>
<div id="playground">
<pre class="code"><code contenteditable="true">
use fmt;
use time;
export fn main() void = {
const greetings = [
"Hello, world!",
"¡Hola Mundo!",
"Γειά σου Κόσμε!",
"Привіт, світ!",
"こんにちは世界!",
];
for (let i = 0z; i < len(greetings); i+= 1) {
fmt::println(greetings[i])!;
time::sleep(1 * time::SECOND);
};
};
</code></pre>
</div>
<codapi-snippet sandbox="hare" editor="basic" selector="#playground .code">
</codapi-snippet>
</body>
</html>