72 lines
1.9 KiB
HTML
72 lines
1.9 KiB
HTML
<!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="https://hare-exec.fly.dev/v1"></codapi-settings>
|
||
<div id="playground">
|
||
<pre class="code"><code contenteditable="true">use fmt;
|
||
|
||
export fn main() void = {
|
||
const greetings = [
|
||
"Hello, world!",
|
||
"¡Hola Mundo!",
|
||
"Γειά σου Κόσμε!",
|
||
"Привіт, світ!",
|
||
"こんにちは世界!",
|
||
];
|
||
for (let i = 0z; i < len(greetings); i+= 1) {
|
||
fmt::println(greetings[i])!;
|
||
};
|
||
};
|
||
</code></pre>
|
||
</div>
|
||
|
||
<codapi-snippet sandbox="hare" editor="basic" selector="#playground .code">
|
||
</codapi-snippet>
|
||
</body>
|
||
</html>
|