diff --git a/appview/pages/pages.go b/appview/pages/pages.go index 9ef2f2b..6a1b908 100644 --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -146,6 +146,7 @@ type ProfilePageParams struct { ProfileStats ProfileStats FollowStatus db.FollowStatus DidHandleMap map[string]string + AvatarUri string } type ProfileStats struct { diff --git a/appview/pages/templates/layouts/topbar.html b/appview/pages/templates/layouts/topbar.html index 0ba5fcf..20eadf3 100644 --- a/appview/pages/templates/layouts/topbar.html +++ b/appview/pages/templates/layouts/topbar.html @@ -3,12 +3,12 @@
- tangled + tangledalpha
{{ with .LoggedInUser }} - + {{ block "dropDown" . }} {{ end }} diff --git a/appview/pages/templates/user/profile.html b/appview/pages/templates/user/profile.html index fb34b56..1efcbbf 100644 --- a/appview/pages/templates/user/profile.html +++ b/appview/pages/templates/user/profile.html @@ -1,76 +1,100 @@ {{ define "title" }}{{ or .UserHandle .UserDid }}{{ end }} {{ define "content" }} +
+
+ {{ block "profileCard" . }} {{ end }} +
+ +
+ {{ block "ownRepos" . }} {{ end }} + {{ block "collaboratingRepos" . }} {{ end }} +
+
+{{ end }} -
-

- {{ didOrHandle .UserDid .UserHandle }} -

- {{ if ne .FollowStatus.String "IsSelf" }} - - {{ end }} +{{ define "profileCard" }} +
+
+ {{ if .AvatarUri }} + + {{ end }}
-
+

+ {{ didOrHandle .UserDid .UserHandle }} +

+
{{ .ProfileStats.Followers }} followers
{{ .ProfileStats.Following }} following
-

REPOS

-
- {{ range .Repos }} -
- -
- {{ .Knot }} -
-
- {{ else }} -

This user does not have any repos yet.

- {{ end }} -
-

COLLABORATING ON

-
- {{ range .CollaboratingRepos }} -
+ {{ end }} +
+{{ end }} + +{{ define "ownRepos" }} +

REPOS

+
+ {{ range .Repos }} + +
+ {{ .Knot }} +
+
{{ else }} -

This user is not collaborating.

+

This user does not have any repos yet.

{{ end }} +
+{{ end }} + +{{ define "collaboratingRepos" }} +

COLLABORATING ON

+
+ {{ range .CollaboratingRepos }} + + {{ else }} +

This user is not collaborating.

+ {{ end }} +
{{ end }} diff --git a/appview/state/follow.go b/appview/state/follow.go index ccd1799..db67c3d 100644 --- a/appview/state/follow.go +++ b/appview/state/follow.go @@ -61,7 +61,7 @@ func (s *State) Follow(w http.ResponseWriter, r *http.Request) { w.Write([]byte(fmt.Sprintf(`