Notes2/views/pages/notes2.gotmpl
2026-05-03 09:17:20 +02:00

33 lines
698 B
Go Template

{{ define "page" }}
<div id="notes2">
<div id="tree" tabindex=0></div>
<div id="crumbs"></div>
<n2-syncprogress></n2-syncprogress>
<n2-nodeui id="note"></n2-nodeui>
</div>
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/notes2.css">
<script type="module">
import {NodeStore} from 'node_store'
import {App} from "/js/{{ .VERSION }}/app.mjs"
import {API} from 'api'
import {Sync} from 'sync'
window.Sync = Sync
if (!API.hasAuthenticationToken()) {
location.href = '/login'
} else {
try {
window.nodeStore = new NodeStore()
window.nodeStore.initializeDB().then(() => {
window._app = new App()
})
} catch (e) {
alert(e)
}
}
</script>
{{ end }}