16 lines
371 B
Go Template
16 lines
371 B
Go Template
{{ 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 }}
|