You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

kanban.go 556 B

123456789101112131415161718192021222324
  1. package kanban
  2. import (
  3. "code.gitea.io/gitea/modules/base"
  4. "code.gitea.io/gitea/modules/context"
  5. "code.gitea.io/gitea/modules/setting"
  6. "net/http"
  7. "os"
  8. "path"
  9. "time"
  10. )
  11. func Index(ctx *context.Context) {
  12. file := path.Join(setting.StaticRootPath, "public/kanban/index.html")
  13. name := "index.html"
  14. f, err := os.Open(file)
  15. if err != nil {
  16. ctx.HTML(http.StatusNotFound, base.TplName("status/404"))
  17. return
  18. }
  19. defer f.Close()
  20. ctx.Resp.Header().Set("Content-Type", "text/html")
  21. http.ServeContent(ctx.Resp, ctx.Req.Request, name, time.Now(), f)
  22. }