diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-02-14 00:23:35 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-02-14 00:23:35 +0100 |
commit | ce7c563f464c5d85ddafa94ce631afaa7467a4c2 (patch) | |
tree | e283e257a9b47ed9ec235916a86fc28ec808bda9 | |
parent | 24c2071fcaa8065d450dae78a80a671697f0e873 (diff) | |
download | gosten-ce7c563f464c5d85ddafa94ce631afaa7467a4c2.tar.gz gosten-ce7c563f464c5d85ddafa94ce631afaa7467a4c2.tar.bz2 gosten-ce7c563f464c5d85ddafa94ce631afaa7467a4c2.zip |
Handle static stuff
Diffstat (limited to '')
-rw-r--r-- | main.go | 1 | ||||
-rw-r--r-- | static/style.css | 0 | ||||
-rw-r--r-- | templ/base.tpl | 4 |
3 files changed, 3 insertions, 2 deletions
@@ -50,6 +50,7 @@ func main() { mux.Handle("GET /login", loginPage()) mux.HandleFunc("POST /login", handleLogin) mux.Handle("GET /logout", handleLogout()) + mux.Handle("/static/", http.StripPrefix("/static", http.FileServer(http.Dir("static")))) mux.Handle("/favicon.ico", http.NotFoundHandler()) handler := sessionHandler(mux) diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/static/style.css diff --git a/templ/base.tpl b/templ/base.tpl index e88d735..89e095f 100644 --- a/templ/base.tpl +++ b/templ/base.tpl @@ -3,14 +3,14 @@ <head> <meta charset="UTF-8"> <title>{{block "title" .}}Kosten{{end}}</title> - <link rel="stylesheet" href="./style.css"> + <link rel="stylesheet" href="/static/style.css"> </head> <body> {{block "body" .}} Dummy Text {{end}} {{block "js" .}} - <script src="./index.js"></script> + <script src="/static/index.js"></script> {{end}} </body> </html>
\ No newline at end of file |