package handler import ( "html/template" "net/http" "codeberg.org/VARASYS/ZDDC/zddc/internal/config" "codeberg.org/VARASYS/ZDDC/zddc/internal/zddc" ) // profileView is the data passed to the profile template's HTML shell. // // Only cheap-to-compute fields appear here — Email comes from the request // context, IsSuperAdmin reads the root .zddc only (single file + ACL chain // cache hit), and HasCustomCSS is a single stat call. Everything else // (visible projects, admin subtrees, editable scaffolds) is fetched lazily // by the page's JS via /.profile/access after first paint, so the slow // .zddc tree walk doesn't block the initial render. See AccessView and // enumerateAccess for the JSON contract the client renders against. type profileView struct { Email string EmailHeader string IsSuperAdmin bool ProfilePathPrefix string AssetsPathPrefix string HasCustomCSS bool } // serveProfilePage renders the universal profile page at GET /.profile/. // Reachable to anyone (anonymous included). The shell is intentionally // minimal: identity card + theme + localStorage + super-admin diagnostic // scaffolds (gated by the cheap IsSuperAdmin check) + a hidden //