Initial rendering of the node tree

This commit is contained in:
Magnus Åhall 2025-07-02 18:02:09 +02:00
commit c5bec0afa6
7477 changed files with 8513 additions and 0 deletions

16
views/pages/app.gotmpl Normal file
View file

@ -0,0 +1,16 @@
{{ define "page" }}
<script type="module" defer>
import { TreeNode } from '/js/{{ .VERSION }}/app.mjs'
window._VERSION = '{{ .VERSION }}'
fetch('/nodes/tree/0?depth=2')
.then(data => data.json())
.then(json => {
const top = document.getElementById('nodes')
const topNode = new TreeNode(top, json)
topNode.render()
})
</script>
<div id="nodes"></div>
{{ end }}