Vendor htmx 2.0.4
This commit is contained in:
parent
af77322755
commit
76449d814f
@ -26,6 +26,9 @@ var funcs = template.FuncMap{
|
||||
//go:embed intake.css
|
||||
var Stylesheet []byte
|
||||
|
||||
//go:embed htmx.org@2.0.4.js
|
||||
var Htmx []byte
|
||||
|
||||
//go:embed *.html
|
||||
var templates embed.FS
|
||||
|
||||
|
1
web/html/htmx.org@2.0.4.js
Normal file
1
web/html/htmx.org@2.0.4.js
Normal file
File diff suppressed because one or more lines are too long
@ -5,6 +5,7 @@
|
||||
<title>{{ block "title" . }}Intake{{ end }}</title>
|
||||
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMS41ZEdYUgAAAGFJREFUOE+lkFEKwDAIxXrzXXB3ckMm9EnAV/YRCxFCcUXEL3Jc77NDjpDA/VGL3RFWYEICfeGC8oQc9IPuCAnQDcoRVmBCAn3hgvKEHPSD7ggJ0A3KEVZgQgJ94YLSJ9YDUzNGDXGZ/JEAAAAASUVORK5CYII=">
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<script src="/htmx.org@2.0.4.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
@ -29,6 +29,7 @@ func RunServer(db *core.DB, addr string, port string) {
|
||||
|
||||
handleFunc("GET /", env.getRoot)
|
||||
handleFunc("GET /style.css", env.getStyle)
|
||||
handleFunc("GET /htmx.org@2.0.4.js", env.getScript)
|
||||
handleFunc("GET /source/{source}", env.getSource)
|
||||
handleFunc("GET /item/{source}/{id}", env.getItem)
|
||||
|
||||
|
@ -33,3 +33,9 @@ func (env *Env) getStyle(writer http.ResponseWriter, req *http.Request) {
|
||||
writer.Header()["Content-Type"] = []string{"text/css; charset=utf-8"}
|
||||
writer.Write(html.Stylesheet)
|
||||
}
|
||||
|
||||
func (env *Env) getScript(writer http.ResponseWriter, req *http.Request) {
|
||||
writer.Header()["Cache-Control"] = []string{"public, max-age=86400"}
|
||||
writer.Header()["Content-Type"] = []string{"application/javascript; charset=utf-8"}
|
||||
writer.Write(html.Htmx)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user