honu/index.html
2025-11-04 19:13:05 -08:00

152 lines
3.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>🐢 Honu</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
height: 100vh;
display: flex;
flex-direction: column;
background: #1e1e1e;
color: #d4d4d4;
}
header {
padding: 1rem;
background: #252526;
border-bottom: 1px solid #3e3e42;
display: flex;
justify-content: space-between;
align-items: center;
}
h1 {
font-size: 1.5rem;
font-weight: 600;
color: #4ec9b0;
}
.subtitle {
font-size: 0.875rem;
color: #858585;
margin-left: 1rem;
}
.container {
flex: 1;
display: flex;
flex-direction: row;
overflow: hidden;
}
.left-pane {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
border-right: 1px solid #3e3e42;
}
.right-pane {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
background: #ffffff;
}
#canvas {
width: 100%;
height: 100%;
}
.editor-container {
flex: 1;
overflow: auto;
}
.cm-editor {
height: 100%;
}
.controls {
display: flex;
gap: 0.5rem;
}
button {
padding: 0.5rem 1rem;
background: #0e639c;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.875rem;
font-weight: 500;
transition: background 0.2s;
}
button:hover {
background: #1177bb;
}
button:active {
background: #0d5689;
}
.status {
font-size: 0.75rem;
color: #858585;
padding: 0.25rem 0.5rem;
background: #1e1e1e;
border-radius: 4px;
}
.status.success {
color: #4ec9b0;
}
.status.error {
color: #f48771;
}
</style>
</head>
<body>
<header>
<div style="display: flex; align-items: center;">
<h1>🐢 Honu</h1>
</div>
<div class="controls">
<button id="run-btn">Run (Cmd+Enter)</button>
<button id="clear-btn">Clear</button>
<label style="display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem;">
<input type="checkbox" id="slow-mode" style="cursor: pointer;">
Slow Draw
</label>
<div class="status" id="status"></div>
</div>
</header>
<div class="container">
<div class="left-pane">
<div class="editor-container" id="editor"></div>
</div>
<div class="right-pane" id="right-pane" style="position: relative;">
<canvas id="canvas"></canvas>
<canvas id="turtle-canvas" style="position: absolute; top: 0; left: 0; pointer-events: none;"></canvas>
</div>
</div>
<script type="module" src="dist/app.js"></script>
</body>
</html>