diff options
Diffstat (limited to 'templates/home.html')
| -rw-r--r-- | templates/home.html | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/templates/home.html b/templates/home.html index aeb2739..f8102e6 100644 --- a/templates/home.html +++ b/templates/home.html @@ -2,7 +2,7 @@ <h2>~welcome</h2> <p>hey there penguin! or, <strong>{{ .User.Username }}</strong>, i guess.</p> -<p>this network does not have access to the outside internet. everything runs off of this battery, phone, and mini AP; i carry it around sometimes.</p> +<p>this network does not serve the outside internet. everything runs off of this battery, phone, and mini AP. i carry it around sometimes.</p> <div style="text-align: center" > <img width="60%" src="/static/img/lab.png"> @@ -33,6 +33,7 @@ git push {{ end }} </ul> <script src="/static/js/waddlers.js"></script> +<script src="/static/js/chat.js"></script> <div id="log" class="chat-log" aria-live="polite"></div> @@ -43,11 +44,32 @@ git push <hr> +<h3>~place</h3> +<p>pick a color and click to drop it, scroll to zoom in, drag to pan the canvas. <span id="cooldown" class="muted"></span></p> + +<div id="palette" class="palette"></div> +<div id="viewport" class="canvas-viewport"> + <canvas id="canvas" width="{{ .Canvas.Cols }}" height="{{ .Canvas.Rows }}"></canvas> + <div id="pixel-cursor" class="pixel-cursor"></div> + <div id="coords" class="canvas-coords"></div> +</div> + +<script> +window.CANVAS = { + rows: {{ .Canvas.Rows }}, + cols: {{ .Canvas.Cols }}, + scale: {{ .Canvas.Scale }}, + cooldownMs: {{ .Canvas.CooldownMs }}, + palette: [{{ range $i, $c := .Canvas.Palette }}{{ if $i }}, {{ end }}"{{ $c }}"{{ end }}] +}; +</script> +<script src="/static/js/canvas.js"></script> + +<hr> + <h3>~minecraft</h3> <p>java edition — join <code>penguins.lan</code></p> <p id="mc-status" class="muted">checking…</p> <script src="/static/js/minecraft.js"></script> - -<script src="/static/js/chat.js"></script> {{ end }} |
