26 lines
515 B
Go
26 lines
515 B
Go
package action
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"tea.kareha.org/pot/himewiki/internal/config"
|
|
"tea.kareha.org/pot/himewiki/internal/data"
|
|
"tea.kareha.org/pot/himewiki/internal/templates"
|
|
)
|
|
|
|
func Info(cfg *config.Config, w http.ResponseWriter, r *http.Request, params *Params) {
|
|
stat := data.Stat()
|
|
public := config.Publish(cfg)
|
|
|
|
data := struct {
|
|
SiteName string
|
|
Stat data.Info
|
|
Public config.Public
|
|
}{
|
|
SiteName: cfg.Site.Name,
|
|
Stat: stat,
|
|
Public: public,
|
|
}
|
|
templates.Render(w, "info", data)
|
|
}
|