2023-07-06 20:59:24 +02:00
< div class = "ui card" >
< div id = "profile-avatar" class = "content gt-df" >
{{ if eq .SignedUserID .ContextUser.ID }}
2023-09-25 15:15:51 +02:00
< a class = "image" href = " {{ AppSubUrl }} /user/settings" data-tooltip-content = " {{ ctx .Locale.Tr "user.change_avatar" }} " >
2023-07-06 20:59:24 +02:00
{{/* the size doesn't take affect (and no need to take affect), image size(width) should be controlled by the parent container since this is not a flex layout*/}}
2023-08-10 05:19:39 +02:00
{{ ctx .AvatarUtils.Avatar .ContextUser 256 }}
2023-07-06 20:59:24 +02:00
< / a >
{{ else }}
< span class = "image" >
2023-08-10 05:19:39 +02:00
{{ ctx .AvatarUtils.Avatar .ContextUser 256 }}
2023-07-06 20:59:24 +02:00
< / span >
{{ end }}
< / div >
< div class = "content gt-word-break profile-avatar-name" >
{{ if .ContextUser.FullName }} < span class = "header text center" > {{ .ContextUser.FullName }} </ span > {{ end }}
< span class = "username text center" > {{ .ContextUser.Name }} </ span >
< div class = "gt-mt-3" >
2023-09-25 15:15:51 +02:00
< a class = "muted" href = " {{ .ContextUser.HomeLink }} ?tab=followers" > {{ svg "octicon-person" 18 "gt-mr-2" }}{{ .NumFollowers }} {{ ctx .Locale.Tr "user.followers" }} </ a > ยท < a class = "muted" href = " {{ .ContextUser.HomeLink }} ?tab=following" > {{ .NumFollowing }} {{ ctx .Locale.Tr "user.following" }} </ a >
2023-09-03 13:06:59 +02:00
{{ if .EnableFeed }}
2023-09-25 15:15:51 +02:00
< a href = " {{ .ContextUser.HomeLink }} .rss" >< i class = "ui text grey gt-ml-3" data-tooltip-content = " {{ ctx .Locale.Tr "rss_feed" }} " > {{ svg "octicon-rss" 18 }} </ i ></ a >
2023-09-03 13:06:59 +02:00
{{ end }}
2023-07-06 20:59:24 +02:00
< / div >
< / div >
< div class = "extra content gt-word-break" >
< ul >
{{ if .ContextUser.Location }}
2023-07-31 10:44:45 +02:00
< li >
{{ svg "octicon-location" }}
< span class = "gt-f1" > {{ .ContextUser.Location }} </ span >
{{ if .UserLocationMapURL }}
{{/* We presume that the UserLocationMapURL is safe, as it is provided by the site administrator. */}}
2023-09-25 15:15:51 +02:00
< a href = " {{ .UserLocationMapURL | Safe }}{{ .ContextUser.Location | QueryEscape }} " rel = "nofollow noreferrer" data-tooltip-content = " {{ ctx .Locale.Tr "user.show_on_map" }} " >
2023-07-31 10:44:45 +02:00
{{ svg "octicon-link-external" }}
< / a >
{{ end }}
< / li >
2023-07-06 20:59:24 +02:00
{{ end }}
{{ if ( eq .SignedUserID .ContextUser.ID ) }}
< li >
{{ svg "octicon-mail" }}
2023-07-31 10:44:45 +02:00
< a class = "gt-f1" href = "mailto: {{ .ContextUser.Email }} " rel = "nofollow" > {{ .ContextUser.Email }} </ a >
2023-08-11 19:40:38 +02:00
< a href = " {{ AppSubUrl }} /user/settings#privacy-user-settings" >
2023-07-06 20:59:24 +02:00
{{ if .ShowUserEmail }}
2023-09-25 15:15:51 +02:00
< i data-tooltip-content = " {{ ctx .Locale.Tr "user.email_visibility.limited" }} " >
2023-07-06 20:59:24 +02:00
{{ svg "octicon-unlock" }}
< / i >
{{ else }}
2023-09-25 15:15:51 +02:00
< i data-tooltip-content = " {{ ctx .Locale.Tr "user.email_visibility.private" }} " >
2023-07-06 20:59:24 +02:00
{{ svg "octicon-lock" }}
< / i >
{{ end }}
< / a >
< / li >
{{ else }}
{{ if .ShowUserEmail }}
< li >
{{ svg "octicon-mail" }}
< a href = "mailto: {{ .ContextUser.Email }} " rel = "nofollow" > {{ .ContextUser.Email }} </ a >
< / li >
{{ end }}
{{ end }}
{{ if .ContextUser.Website }}
< li >
{{ svg "octicon-link" }}
< a target = "_blank" rel = "noopener noreferrer me" href = " {{ .ContextUser.Website }} " > {{ .ContextUser.Website }} </ a >
< / li >
{{ end }}
{{ if $.RenderedDescription }}
< li >
< div class = "render-content markup" > {{ $.RenderedDescription | Str2html }} </ div >
< / li >
{{ end }}
{{ range .OpenIDs }}
{{ if .Show }}
< li >
{{ svg "fontawesome-openid" }}
< a target = "_blank" rel = "noopener noreferrer" href = " {{ .URI }} " > {{ .URI }} </ a >
< / li >
{{ end }}
{{ end }}
2023-09-25 15:15:51 +02:00
< li > {{ svg "octicon-calendar" }} < span > {{ ctx .Locale.Tr "user.joined_on" ( DateTime "short" .ContextUser.CreatedUnix ) | Safe }} </ span ></ li >
2023-07-06 20:59:24 +02:00
{{ if and .Orgs .HasOrgsVisible }}
< li >
< ul class = "user-orgs" >
{{ range .Orgs }}
2023-10-06 14:47:45 +02:00
{{ if ( or .Visibility.IsPublic ( and ( $.SignedUser ) ( or .Visibility.IsLimited ( and ( .HasMemberWithUserID $.SignedUserID ) .Visibility.IsPrivate ) ( $.IsAdmin )))) }}
2023-07-06 20:59:24 +02:00
< li >
< a href = " {{ .HomeLink }} " data-tooltip-content = " {{ .Name }} " >
2023-08-10 05:19:39 +02:00
{{ ctx .AvatarUtils.Avatar . }}
2023-07-06 20:59:24 +02:00
< / a >
< / li >
{{ end }}
{{ end }}
< / ul >
< / li >
{{ end }}
{{ if .Badges }}
< li >
< ul class = "user-badges" >
{{ range .Badges }}
< li >
< img width = "64" height = "64" src = " {{ .ImageURL }} " alt = " {{ .Description }} " data-tooltip-content = " {{ .Description }} " >
< / li >
{{ end }}
< / ul >
< / li >
{{ end }}
{{ if and .IsSigned ( ne .SignedUserID .ContextUser.ID ) }}
< li class = "follow" >
{{ if $.IsFollowing }}
2023-07-07 17:27:12 +02:00
< button class = "ui basic red button link-action" data-url = " {{ .ContextUser.HomeLink }} ?action=unfollow" >
2023-09-25 15:15:51 +02:00
{{ svg "octicon-person" }} {{ ctx .Locale.Tr "user.unfollow" }}
2023-07-07 17:27:12 +02:00
< / button >
2023-07-06 20:59:24 +02:00
{{ else }}
2023-09-19 00:05:31 +02:00
< button class = "ui basic primary button link-action" data-url = " {{ .ContextUser.HomeLink }} ?action=follow" >
2023-09-25 15:15:51 +02:00
{{ svg "octicon-person" }} {{ ctx .Locale.Tr "user.follow" }}
2023-07-07 17:27:12 +02:00
< / button >
2023-07-06 20:59:24 +02:00
{{ end }}
< / li >
{{ end }}
< / ul >
< / div >
< / div >