Initial rendering of the node tree
This commit is contained in:
commit
c5bec0afa6
7477 changed files with 8513 additions and 0 deletions
16
views/pages/app.gotmpl
Normal file
16
views/pages/app.gotmpl
Normal 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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue