This commit is contained in:
ethan merchant 2024-11-27 14:20:48 -05:00
parent 72638cda3a
commit 4173fbdff2
3 changed files with 29 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import (
"dofdev/web/pages/about" "dofdev/web/pages/about"
braillexr "dofdev/web/pages/braille_xr" braillexr "dofdev/web/pages/braille_xr"
"dofdev/web/pages/dev"
"dofdev/web/pages/games" "dofdev/web/pages/games"
"dofdev/web/pages/mono" "dofdev/web/pages/mono"
"dofdev/web/pages/moves" "dofdev/web/pages/moves"
@ -20,6 +21,7 @@ func New() *mux.Router {
r.PathPrefix(("/public/")).Handler(http.StripPrefix("/public/", http.FileServer(http.Dir("web/public/")))) r.PathPrefix(("/public/")).Handler(http.StripPrefix("/public/", http.FileServer(http.Dir("web/public/"))))
r.HandleFunc("/", mono.Handler) r.HandleFunc("/", mono.Handler)
r.HandleFunc("/about", about.Handler) r.HandleFunc("/about", about.Handler)
r.HandleFunc("/dev", dev.Handler)
r.HandleFunc("/moves", moves.Handler) r.HandleFunc("/moves", moves.Handler)
r.HandleFunc("/move/{hash}", moves.MoveHandler) r.HandleFunc("/move/{hash}", moves.MoveHandler)
r.HandleFunc("/games", games.Handler) r.HandleFunc("/games", games.Handler)

6
tem/html/pages/dev.html Normal file
View file

@ -0,0 +1,6 @@
{{ template "head.html" .}}
<div style='height: 44px; width: 100%;'></div>
<h1>dev</h1>

21
web/pages/dev/dev.go Normal file
View file

@ -0,0 +1,21 @@
package dev
import (
"dofdev/tem"
"net/http"
)
func Handler(w http.ResponseWriter, r *http.Request) {
data := struct {
TopHash string
}{
TopHash: "silo",
}
tem.Render(
w, r,
"dev.html",
"dev",
"account management",
data,
)
}