go-skeletor/controller/home.go

40 lines
914 B
Go

package controller
import (
"arno/skeletor/config"
"arno/skeletor/service"
"arno/skeletor/tool"
"net/http"
"github.com/martini-contrib/render"
"github.com/martini-contrib/sessions"
)
func Home(ctn *service.Container, session sessions.Session, req *http.Request, r render.Render) {
myconfig := config.Must(ctn)
rendermap := map[string]interface{}{
"conf": myconfig,
"session": tool.Rendersession(session),
"useheader": true,
"usesidebar": false,
"usecontainer": true,
}
r.HTML(200, "home/home", rendermap)
}
func HomeConfig(ctn *service.Container, session sessions.Session, req *http.Request, r render.Render) {
myconfig := config.Must(ctn)
rendermap := map[string]interface{}{
"conf": myconfig,
"session": tool.Rendersession(session),
"useheader": true,
"usesidebar": true,
"usecontainer": true,
}
r.HTML(200, "home/home", rendermap)
}