Notes2/views/pages/notes2.gotmpl
2026-06-01 14:27:41 +02:00

49 lines
1,017 B
Go Template

{{ define "page" }}
<div id="notes2">
<div id="tree" tabindex=0></div>
<div id="main-page">
<!-- Storage stats -->
<div id="page-storage">
<n2-pagestorage></n2-pagestorage>
</div>
<!-- Node editing -->
<div id="page-node">
<div id="crumbs"></div>
<n2-syncprogress></n2-syncprogress>
<n2-nodeui id="note"></n2-nodeui>
</div>
</div>
</div>
<link rel="stylesheet" type="text/css" href="/css/{{ .VERSION }}/notes2.css">
<script type="module">
import {NodeStore} from '/js/{{ .VERSION }}/node_store.mjs'
import {App} from "/js/{{ .VERSION }}/app.mjs"
import {API} from 'api'
import {Sync} from 'sync'
import { } from '/js/{{ .VERSION }}/page_storage.mjs'
import { } from '/js/{{ .VERSION }}/file.mjs'
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 }}