embed.go 336 B

123456789101112131415161718192021
  1. package user
  2. import (
  3. "gitote/gitote/pkg/context"
  4. "strings"
  5. )
  6. const (
  7. EMBED = "embed/user"
  8. )
  9. func Embed(c *context.Context) {
  10. ctxUser := GetUserByName(c, strings.TrimSuffix(c.Params(":username"), ""))
  11. c.Data["Title"] = ctxUser.DisplayName()
  12. c.Data["PageIsUserProfile"] = true
  13. c.Data["Owner"] = ctxUser
  14. c.HTML(200, EMBED)
  15. }