2022-03-12 18:06:39 +00:00
|
|
|
// package controllers
|
2022-02-23 12:07:09 +00:00
|
|
|
|
2022-03-12 18:06:39 +00:00
|
|
|
// import (
|
|
|
|
// "net/http"
|
2022-02-23 12:07:09 +00:00
|
|
|
|
2022-03-12 18:06:39 +00:00
|
|
|
// "git.technical.kiwi/go/otfe/models"
|
|
|
|
// )
|
2022-02-23 12:07:09 +00:00
|
|
|
|
2022-03-12 18:06:39 +00:00
|
|
|
// //Static pages
|
|
|
|
// type Static struct{}
|
2022-02-23 12:07:09 +00:00
|
|
|
|
2022-03-12 18:06:39 +00:00
|
|
|
// type staticData struct {
|
|
|
|
// Title string
|
|
|
|
// User models.User
|
|
|
|
// }
|
2022-02-23 12:07:09 +00:00
|
|
|
|
2022-03-12 18:06:39 +00:00
|
|
|
// type contextKey string
|
2022-02-23 12:07:09 +00:00
|
|
|
|
2022-03-12 18:06:39 +00:00
|
|
|
// func (c contextKey) String() string {
|
|
|
|
// return string(c)
|
|
|
|
// }
|
2022-02-23 12:07:09 +00:00
|
|
|
|
2022-03-12 18:06:39 +00:00
|
|
|
// //Home page
|
|
|
|
// func (s *Static) Home(w http.ResponseWriter, r *http.Request, u models.User) {
|
|
|
|
// data := staticData{Title: "Otfe"}
|
|
|
|
// data.User = u
|
|
|
|
// //fmt.Fprintln(w, data.User)
|
|
|
|
// t(w, data, "/static/home.gtpl")
|
|
|
|
// }
|