2024-07-11 21:25:58 +08:00
|
|
|
package handler
|
2024-07-12 20:32:33 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
"picgo/corelib"
|
|
|
|
)
|
|
|
|
|
|
|
|
func IndexHandler(w http.ResponseWriter, r *http.Request) {
|
|
|
|
if r.Method == "GET" {
|
|
|
|
data := struct {
|
|
|
|
Title string
|
|
|
|
Active string
|
|
|
|
}{
|
2024-07-13 20:33:20 +08:00
|
|
|
Title: "Dashboard",
|
2024-07-12 20:32:33 +08:00
|
|
|
Active: r.URL.Path,
|
|
|
|
}
|
2024-07-13 20:33:20 +08:00
|
|
|
corelib.TemplateHandler(w, data, "view/layout.html", "view/index.html")
|
2024-07-12 20:32:33 +08:00
|
|
|
}
|
|
|
|
}
|