From b6e481d63eec15191f2717957682c13ee8a68308 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:59:39 +0100 Subject: [feature] Allow user to choose "gallery" style layout for web view of profile (#3917) * [feature] Allow user to choose "gallery" style web layout * find a bug and squish it up and all day long you'll have good luck * just a sec * [performance] reindex public timeline + tinker with query a bit * fiddling * should be good now * last bit of finagling, i'm done now i prommy * panic normally --- web/template/profile.tmpl | 197 ++-------------------------------------------- 1 file changed, 6 insertions(+), 191 deletions(-) (limited to 'web/template/profile.tmpl') diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl index 6b486eb74..d7d24cb64 100644 --- a/web/template/profile.tmpl +++ b/web/template/profile.tmpl @@ -17,200 +17,15 @@ // along with this program. If not, see . */ -}} -{{- define "profileMovedTo" -}} -{{- with .account.Moved }} -
- - ℹ️ This account has permanently moved to - - @{{ .Username }} - - -
-{{- end }} -{{- end -}} - -{{- define "defaultAvatarDimension" -}} -{{- /* 136 is the default width/height for 8.5rem avatars, double it to get a good look when expanded. */ -}} -272 -{{- end -}} - -{{- define "avatarWidth" -}} -{{- with .account }} - {{- if isNil .AvatarAttachment -}} - {{- template "defaultAvatarDimension" . -}} - {{- else -}} - {{- /* Use the avatar's proper dimensions. */ -}} - {{- .AvatarAttachment.Meta.Original.Width -}} - {{- end -}} -{{- end }} -{{- end -}} - -{{- define "avatarHeight" -}} -{{- with .account }} - {{- if isNil .AvatarAttachment -}} - {{- template "defaultAvatarDimension" . -}} - {{- else -}} - {{- /* Use the avatar's proper dimensions. */ -}} - {{- .AvatarAttachment.Meta.Original.Height -}} - {{- end -}} -{{- end }} -{{- end -}} - -{{- define "avatarAlt" -}} - Avatar for {{ .account.Username -}} - {{- if .account.AvatarDescription }} - {{- /* Add the avatar's image description. */ -}} - : {{ .account.AvatarDescription -}} - {{- end -}} -{{- end -}} - -{{- define "headerAlt" -}} - Header for {{ .account.Username -}} - {{- if .account.HeaderDescription }} - {{- /* Add the header's image description. */ -}} - : {{ .account.HeaderDescription -}} - {{- end -}} -{{- end -}} - -{{- define "avatar" -}} -{{- with . }} - -{{- end }} -{{- end -}} - {{- with . }}
-

Profile for {{ .account.Username -}}

-
- {{- if .account.Moved }} - {{- include "profileMovedTo" . | indent 2 }} - {{- end }} -
- - {{- if .account.HeaderAttachment }} - - {{- end }} - {{- template - -
-
- {{- with . }} - {{- include "avatar" . | indent 3 }} - {{- end }} -
-
Display name
-
- {{- if .account.DisplayName -}} - {{- emojify .account.Emojis (escape .account.DisplayName) -}} - {{- else -}} - {{- .account.Username -}} - {{- end -}} -
-
- {{- if .account.Bot }} -
Bot account
-
- true - -
- {{- end }} -
Username
-
@{{- .account.Username -}}@{{- .instance.AccountDomain -}}
-
- {{- if .account.Roles }} -
Role
- {{- range .account.Roles }} -
{{- .Name -}}
- {{- end }} - {{- end }} -
- -
-
+ {{- with . }} + {{- include "profile_header.tmpl" . | indent 1 }} + {{- end }}
-
-
-

About {{- .account.Username -}}

-
- {{- if .account.Fields }} - {{- include "profile_fields.tmpl" . | indent 3 }} - {{- end }} -

Bio

-
- {{- if .account.Note }} - {{ emojify .account.Emojis (noescape .account.Note) }} - {{- else }} -

This GoToSocial user hasn't written a bio yet!

- {{- end }} -
-

Stats

-
-
Joined
-
-
Posts
-
{{- .account.StatusesCount -}}
-
Followed by
-
{{- if .account.HideCollections -}}hidden{{- else -}}{{- .account.FollowersCount -}}{{- end -}}
-
Following
-
{{- if .account.HideCollections -}}hidden{{- else -}}{{- .account.FollowingCount -}}{{- end -}}
-
-
+ {{- with . }} + {{- include "profile_about_user.tmpl" . | indent 2 }} + {{- end }}
{{- if .pinned_statuses }}
-- cgit v1.3