2023-01-05 12:43:00 +01:00
|
|
|
{{- /*
|
2023-04-04 11:33:11 +02:00
|
|
|
// GoToSocial
|
|
|
|
// Copyright (C) GoToSocial Authors admin@gotosocial.org
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2023-01-05 12:43:00 +01:00
|
|
|
*/ -}}
|
|
|
|
|
2022-04-15 14:33:01 +02:00
|
|
|
{{ template "header.tmpl" .}}
|
2023-05-11 17:46:32 +02:00
|
|
|
|
|
|
|
<main class="profile">
|
|
|
|
<div class="header">
|
|
|
|
<div class="header-image">
|
|
|
|
{{ if .account.Header }}
|
|
|
|
<img src="{{.account.Header}}" alt="" />
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="basic-info" aria-hidden="true">
|
|
|
|
<a class="avatar" href="{{.account.Avatar}}">
|
|
|
|
<img src="{{.account.Avatar}}" alt="">
|
|
|
|
</a>
|
|
|
|
<span class="displayname text-cutoff">
|
|
|
|
{{if .account.DisplayName}}
|
|
|
|
{{emojify .account.Emojis (escape .account.DisplayName)}}
|
|
|
|
{{else}}
|
|
|
|
{{.account.Username}}
|
|
|
|
{{end}}
|
|
|
|
</span>
|
2023-05-14 14:49:01 +02:00
|
|
|
<span class="username text-cutoff">@{{.account.Username}}@{{.instance.AccountDomain}}</span>
|
2023-05-11 17:46:32 +02:00
|
|
|
{{- /* Only render account role if 1. it's present and 2. it's not equal to the standard 'user' role */ -}}
|
|
|
|
{{ if and (.account.Role) (ne .account.Role.Name "user") }}
|
|
|
|
<div class="role {{ .account.Role.Name }}">
|
|
|
|
{{ .account.Role.Name }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="sr-only">
|
|
|
|
Profile for
|
|
|
|
{{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}.
|
2023-05-14 14:49:01 +02:00
|
|
|
Username @{{.account.Username}}, {{.instance.AccountDomain}}.
|
2023-05-11 17:46:32 +02:00
|
|
|
{{ if and (.account.Role) (ne .account.Role.Name "user") }}
|
|
|
|
Role: {{ .account.Role.Name }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="column-split">
|
|
|
|
|
|
|
|
<section class="about-user">
|
|
|
|
<div class="col-header">
|
2023-05-11 20:36:14 +02:00
|
|
|
<h1>About</h1>
|
2023-05-11 17:46:32 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="fields">
|
|
|
|
{{ range .account.Fields }}
|
|
|
|
<div class="field">
|
|
|
|
<b>{{emojify $.account.Emojis (noescape .Name)}}</b>
|
|
|
|
<span>{{emojify $.account.Emojis (noescape .Value)}}</span>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="bio">
|
|
|
|
{{ if .account.Note }}
|
|
|
|
{{emojify .account.Emojis (noescape .account.Note)}}
|
|
|
|
{{else}}
|
|
|
|
This GoToSocial user hasn't written a bio yet!
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="sr-only" role="group">
|
|
|
|
<span>Joined on {{.account.CreatedAt | timestampVague}}.</span>
|
|
|
|
<span>{{.account.StatusesCount}} post{{if .account.StatusesCount | eq 1 | not}}s{{end}}.</span>
|
|
|
|
<span>Followed by {{.account.FollowersCount}}.</span>
|
|
|
|
<span>Following {{.account.FollowingCount}}.</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="accountstats" aria-hidden="true">
|
|
|
|
<b>Joined</b><time datetime="{{.account.CreatedAt}}">{{.account.CreatedAt | timestampVague}}</time>
|
|
|
|
<b>Posts</b><span>{{.account.StatusesCount}}</span>
|
|
|
|
<b>Followed by</b><span>{{.account.FollowersCount}}</span>
|
|
|
|
<b>Following</b><span>{{.account.FollowingCount}}</span>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="toots">
|
|
|
|
{{ if .pinned_statuses }}
|
|
|
|
<div class="col-header">
|
2023-05-11 20:36:14 +02:00
|
|
|
<h2>Pinned posts</h2>
|
2023-05-11 17:46:32 +02:00
|
|
|
<a href="#recent">jump to recent</a>
|
|
|
|
</div>
|
|
|
|
<section class="thread">
|
|
|
|
{{ range .pinned_statuses }}
|
|
|
|
<article class="toot expanded" id="{{.ID}}">
|
|
|
|
{{ template "status.tmpl" .}}
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
</section>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<div class="col-header">
|
2023-05-11 20:36:14 +02:00
|
|
|
<h2 id="recent" tabindex="-1">Recent posts</h2>
|
2023-05-11 17:46:32 +02:00
|
|
|
{{ if .rssFeed }}
|
|
|
|
<a href="{{ .rssFeed }}" class="rss-icon" aria-label="RSS feed">
|
|
|
|
<i class="fa fa-rss-square" aria-hidden="true"></i>
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<section class="thread">
|
|
|
|
{{ if not .statuses }}
|
|
|
|
<div data-nosnippet class="nothinghere">Nothing here!</div>
|
|
|
|
{{ else }}
|
|
|
|
{{ range .statuses }}
|
|
|
|
<article class="toot expanded" id="{{.ID}}">
|
|
|
|
{{ template "status.tmpl" .}}
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<div class="backnextlinks">
|
|
|
|
{{ if .show_back_to_top }}
|
|
|
|
<a href="/@{{ .account.Username }}">Back to top</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .statuses_next }}
|
|
|
|
<a href="{{ .statuses_next }}" class="next">Show older</a>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
2022-04-15 14:33:01 +02:00
|
|
|
</main>
|
2023-05-11 17:46:32 +02:00
|
|
|
|
|
|
|
{{ template "footer.tmpl" .}}
|