2023-07-06 18:59:24 +00:00
< div class = "ui card" >
< div id = "profile-avatar" class = "content gt-df" >
{{ if eq .SignedUserID .ContextUser.ID }}
< a class = "image" href = " {{ AppSubUrl }} /user/settings" data-tooltip-content = " {{ .locale.Tr "user.change_avatar" }} " >
{{/* 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 03:19:39 +00:00
{{ ctx .AvatarUtils.Avatar .ContextUser 256 }}
2023-07-06 18:59:24 +00:00
< / a >
{{ else }}
< span class = "image" >
2023-08-10 03:19:39 +00:00
{{ ctx .AvatarUtils.Avatar .ContextUser 256 }}
2023-07-06 18:59:24 +00: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 >
{{ if .EnableFeed }}
< a href = " {{ .ContextUser.HomeLink }} .rss" >< i class = "ui text grey gt-ml-3" data-tooltip-content = " {{ .locale.Tr "rss_feed" }} " > {{ svg "octicon-rss" 18 }} </ i ></ a >
{{ end }}
< div class = "gt-mt-3" >
< a class = "muted" href = " {{ .ContextUser.HomeLink }} ?tab=followers" > {{ svg "octicon-person" 18 "gt-mr-2" }}{{ .NumFollowers }} {{ .locale.Tr "user.followers" }} </ a > · < a class = "muted" href = " {{ .ContextUser.HomeLink }} ?tab=following" > {{ .NumFollowing }} {{ .locale.Tr "user.following" }} </ a >
< / div >
< / div >
< div class = "extra content gt-word-break" >
< ul >
{{ if .ContextUser.Location }}
2023-07-31 08:44:45 +00: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. */}}
< a href = " {{ .UserLocationMapURL | Safe }}{{ .ContextUser.Location | QueryEscape }} " rel = "nofollow noreferrer" data-tooltip-content = " {{ .locale.Tr "user.show_on_map" }} " >
{{ svg "octicon-link-external" }}
< / a >
{{ end }}
< / li >
2023-07-06 18:59:24 +00:00
{{ end }}
{{ if ( eq .SignedUserID .ContextUser.ID ) }}
< li >
{{ svg "octicon-mail" }}
2023-07-31 08:44:45 +00:00
< a class = "gt-f1" href = "mailto: {{ .ContextUser.Email }} " rel = "nofollow" > {{ .ContextUser.Email }} </ a >
2023-08-11 17:40:38 +00:00
< a href = " {{ AppSubUrl }} /user/settings#privacy-user-settings" >
2023-07-06 18:59:24 +00:00
{{ if .ShowUserEmail }}
2023-07-31 08:44:45 +00:00
< i data-tooltip-content = " {{ .locale.Tr "user.email_visibility.limited" }} " >
2023-07-06 18:59:24 +00:00
{{ svg "octicon-unlock" }}
< / i >
{{ else }}
2023-07-31 08:44:45 +00:00
< i data-tooltip-content = " {{ .locale.Tr "user.email_visibility.private" }} " >
2023-07-06 18:59:24 +00: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-07-31 08:44:45 +00:00
< li > {{ svg "octicon-calendar" }} < span > {{ .locale.Tr "user.joined_on" ( DateTime "short" .ContextUser.CreatedUnix ) | Safe }} </ span ></ li >
2023-07-06 18:59:24 +00:00
{{ if and .Orgs .HasOrgsVisible }}
< li >
< ul class = "user-orgs" >
{{ range .Orgs }}
{{ if ( or .Visibility.IsPublic ( and ( $.SignedUser ) ( or .Visibility.IsLimited ( and ( .HasMemberWithUserID $.SignedUserID ) .Visibility.IsPrivate ) ( $.IsAdmin )))) }}
< li >
< a href = " {{ .HomeLink }} " data-tooltip-content = " {{ .Name }} " >
2023-08-10 03:19:39 +00:00
{{ ctx .AvatarUtils.Avatar . }}
2023-07-06 18:59:24 +00: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 15:27:12 +00:00
< button class = "ui basic red button link-action" data-url = " {{ .ContextUser.HomeLink }} ?action=unfollow" >
{{ svg "octicon-person" }} {{ .locale.Tr "user.unfollow" }}
< / button >
2023-07-06 18:59:24 +00:00
{{ else }}
2023-07-07 15:27:12 +00:00
< button class = "ui basic green button link-action" data-url = " {{ .ContextUser.HomeLink }} ?action=follow" >
{{ svg "octicon-person" }} {{ .locale.Tr "user.follow" }}
< / button >
2023-07-06 18:59:24 +00:00
{{ end }}
< / li >
2023-08-14 23:07:38 +00:00
< li class = "block" >
{{ if $.IsBlocked }}
< button class = "ui basic red button link-action" data-url = " {{ .ContextUser.HomeLink }} ?action=unblock&redirect_to= {{ $.Link }} " >
{{ svg "octicon-person" }} {{ .locale.Tr "user.unblock" }}
< / button >
{{ else }}
< button type = "submit" class = "ui basic orange button delete-button"
data-modal-id="block-user" data-url="{{ .ContextUser.HomeLink }} ?action=block">
{{ svg "octicon-blocked" }} {{ .locale.Tr "user.block" }}
< / button >
{{ end }}
< / li >
2023-07-06 18:59:24 +00:00
{{ end }}
< / ul >
< / div >
< / div >