gotosocial/web/template/profile.tmpl
tobi 6418307c64
[feature] Add back/next buttons to profiles for paging through statuses (#708)
* add GetAccountWebStatuses to db

* add WebStatusesGet func to processor

* don't add limit to next/prev links if 0

* take query params for next/prev statuses

* add separate next + prev links for convenience

* show 'nothing here' message if no statuses exist

* add back / next links to profiles

* allow paging down only

* go fmt ./...

* 'recent public toots' -> 'latest public toots'
2022-07-13 09:57:47 +02:00

52 lines
2.1 KiB
Cheetah

{{ template "header.tmpl" .}}
<main>
<div class="profile">
<div class="headerimage">
{{ if .account.Header }}
<img
src="{{.account.Header}}"
alt="{{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}'s header"
/>
{{ end }}
</div>
<div class="basic">
<div id="profile-basic-filler2"></div>
<a href="{{.account.Avatar}}" class="avatar"><img src="{{.account.Avatar}}" alt="{{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}'s avatar"></a>
<div class="displayname">{{if .account.DisplayName}}{{.account.DisplayName}}{{else}}{{.account.Username}}{{end}}</div>
<div class="username">@{{.account.Username}}@{{.instance.AccountDomain}}</div>
</div>
<div class="detailed">
<div class="bio">
{{ if .account.Note }}{{ .account.Note | noescape }}{{else}}This GoToSocial user hasn't written a bio yet!{{end}}
</div>
</div>
<div class="accountstats">
<div class="entry">Joined <b>{{.account.CreatedAt | timestampShort}}</b></div>
<div class="entry">Followed by <b>{{.account.FollowersCount}}</b></div>
<div class="entry">Following <b>{{.account.FollowingCount}}</b></div>
<div class="entry">Posted <b>{{.account.StatusesCount}}</b></div>
</div>
</div>
<h2 id="recent">Latest public toots</h2>
{{ if not .statuses }}
<div class="nothinghere">Nothing here!</div>
{{ else }}
<div class="thread">
{{ range .statuses }}
<div class="toot expanded">
{{ template "status.tmpl" .}}
</div>
{{ end }}
</div>
{{ end }}
<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>
</main>
{{ template "footer.tmpl" .}}