feat: public profile page + richer hover card with "See full profile"

- New /users/{id} page renders a user's full profile from the card endpoint:
  avatar, roles, full bio, contact (location/phone), links and custom detail
  fields (internal extra keys hidden; link schemes sanitized).
- The hover user-card now shows a longer bio, phone, up to 3 links, and a
  "See full profile →" button linking to /users/{id}.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
etalon
2026-06-13 12:40:16 +02:00
parent 88fa5d19c8
commit 9a5e302a26
4 changed files with 84 additions and 2 deletions
+8
View File
@@ -263,6 +263,14 @@ func (s *Server) routesWeb(mux *http.ServeMux) {
})
}))
mux.HandleFunc("GET /users/{id}", s.page(func(w http.ResponseWriter, r *http.Request, u *domain.User) {
s.render(w, r, "public-profile.html", &pageData{
Title: "Profile", User: u,
Scripts: []string{"/static/js/public-profile.js"},
Data: map[string]any{"UserID": r.PathValue("id")},
})
}))
rolePage("/messages", "messages.html", "Messages", "messages", "/static/js/messages.js", nil)
rolePage("/metrics", "metrics.html", "Metrics", "metrics", "/static/js/metrics.js", nil)
}