diff --git a/appview/pages/pages.go b/appview/pages/pages.go index 2f3e14d7..c732bdb8 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -31,6 +31,13 @@ func funcMap() template.FuncMap { "add": func(a, b int) int { return a + b }, + "didOrHandle": func(did, handle string) string { + if handle != "" { + return fmt.Sprintf("@%s", handle) + } else { + return did + } + }, } } diff --git a/appview/pages/templates/layouts/topbar.html b/appview/pages/templates/layouts/topbar.html index b566200d..8fe7be0b 100644 --- a/appview/pages/templates/layouts/topbar.html +++ b/appview/pages/templates/layouts/topbar.html @@ -1,48 +1,47 @@ {{ define "layouts/topbar" }} - {{ with .LoggedInUser }} - - {{ else }} - login - {{ end }} - + {{ end }} diff --git a/appview/pages/templates/user/profile.html b/appview/pages/templates/user/profile.html index d1533a5b..6c04882d 100644 --- a/appview/pages/templates/user/profile.html +++ b/appview/pages/templates/user/profile.html @@ -1,17 +1,20 @@ {{define "title"}}{{ or .UserHandle .UserDid }}{{end}} {{define "content"}} -

{{ or .UserHandle .UserDid }} profile

+

{{ didOrHandle .UserDid .UserHandle }}

-

repos

- + {{end}}