wip
This commit is contained in:
parent
515c748e14
commit
bd4a475923
23 changed files with 1217 additions and 192 deletions
22
views/pages/notes2.gotmpl
Normal file
22
views/pages/notes2.gotmpl
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{{ define "page" }}
|
||||
|
||||
<script type="module">
|
||||
import { h, Component, render, createRef } from 'preact'
|
||||
import htm from 'htm'
|
||||
{{ if .Data._dev -}}
|
||||
import 'preact/debug'
|
||||
import 'preact/devtools'
|
||||
{{- end }}
|
||||
import { Notes2 } from "/js/{{ .VERSION }}/app.mjs"
|
||||
import { API } from 'api'
|
||||
|
||||
if (!API.hasAuthenticationToken()) {
|
||||
location.href = '/login'
|
||||
} else {
|
||||
const html = htm.bind(h)
|
||||
window._notes2 = createRef()
|
||||
render(html`<${Notes2} ref=${window._notes2} />`, document.getElementById('app'))
|
||||
}
|
||||
</script>
|
||||
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue