From 26683b3d49beea9b1f0e8f78df4720285d4c0825 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 15 Apr 2022 14:33:01 +0200 Subject: [feature] Web profile pages for accounts (#449) * add default avatars * allow webModule to error * return errWithCode from account get * add AccountGetLocalByUsername * check nil requesting account * add timestampShort function for just month/year * move loading logic to New + add default avatars * add profile page view * update swagger docs * add excludeReblogs to GetAccountStatuses * ignore casing when selecting local account by username * appropriate redirects * css fiddling * add 'about' heading * adjust thread page to work with routing * return AP representation if requested + authorized * simplify auth check * go fmt * golangci-lint ignore math/rand --- web/template/profile.tmpl | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 web/template/profile.tmpl (limited to 'web/template') diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl new file mode 100644 index 000000000..cfabeee6f --- /dev/null +++ b/web/template/profile.tmpl @@ -0,0 +1,47 @@ +{{ template "header.tmpl" .}} +
+ {{ if .account.Header }}{{ end }} +
+ +
+

About @{{.account.Username}}

+
+ {{ if .account.Note }}{{ .account.Note | noescape }}{{else}}This GoToSocial user hasn't written a bio yet!{{end}} +
+
+
+
+
Joined {{.account.CreatedAt | timestampShort}}
+
Followed by {{.account.FollowersCount}}
+
Following {{.account.FollowingCount}}
+
Posted {{.account.StatusesCount}}
+
+

Recent public posts by @{{.account.Username}}

+
+ {{range .statuses}} +
+ {{ template "status.tmpl" .}} +
+ {{end}} +
+
+ +{{ template "footer.tmpl" .}} \ No newline at end of file -- cgit v1.3