portfolio/api/webHandler/loginpageHandler.go
2024-05-16 17:36:44 +02:00

25 lines
421 B
Go

package webHandler
import (
"html/template"
"net/http"
)
func InitLoginpage(w http.ResponseWriter, r *http.Request) {
tmpl := template.Must(template.ParseFiles(
"./templates/login/index.html",
"./templates/navbar/index.html",
"./templates/themeSelector/index.html",
))
err := tmpl.Execute(w, nil)
if err != nil {
_, err := w.Write([]byte("failed to load"))
if err != nil {
return
}
return
}
}