mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-02 10:04:22 +00:00
Add user page and follow/unfollow calls
This commit is contained in:
parent
3d1e4cfa4c
commit
a1f49af1d9
11 changed files with 310 additions and 33 deletions
|
@ -6,7 +6,9 @@
|
|||
<div class="notification-container {{if .Pleroma}}{{if not .Pleroma.IsSeen}}unread{{end}}{{end}}">
|
||||
{{if eq .Type "follow"}}
|
||||
<div class="notification-follow-container">
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
<a href="/user/{{.Account.ID}}" >
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
</a>
|
||||
<div>
|
||||
<div>
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
|
@ -24,7 +26,9 @@
|
|||
|
||||
{{else if eq .Type "reblog"}}
|
||||
<div class="notification-retweet-container">
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
<a href="/user/{{.Account.ID}}" >
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
</a>
|
||||
<div>
|
||||
<div>
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
|
@ -37,7 +41,9 @@
|
|||
|
||||
{{else if eq .Type "favourite"}}
|
||||
<div class="notification-like-container">
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
<a href="/user/{{.Account.ID}}" >
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
</a>
|
||||
<div>
|
||||
<div>
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<div id="status-{{if .Reblog}}{{.Reblog.ID}}{{else}}{{.ID}}{{end}}" class="status-container-container">
|
||||
{{if .Reblog}}
|
||||
<div class="retweet-info">
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
<a href="/user/{{.Account.ID}}" >
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
</a>
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
<span class="icon dripicons-retweet retweeted"></span>
|
||||
retweeted
|
||||
|
@ -12,14 +14,18 @@
|
|||
<div class="status-container">
|
||||
<div>
|
||||
{{if not .HideAccountInfo}}
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
<a href="/user/{{.Account.ID}}" >
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="status">
|
||||
{{if not .HideAccountInfo}}
|
||||
<div class="status-name">
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
<span class="status-uname"> {{.Account.Acct}} </span>
|
||||
<a href="/user/{{.Account.ID}}" >
|
||||
<span class="status-uname"> {{.Account.Acct}} </span>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="status-reply-container">
|
||||
|
|
54
templates/user.tmpl
Normal file
54
templates/user.tmpl
Normal file
|
@ -0,0 +1,54 @@
|
|||
{{template "header.tmpl"}}
|
||||
{{template "navigation.tmpl" .NavbarData}}
|
||||
<div class="page-title"> User </div>
|
||||
|
||||
<div class="user-info-container">
|
||||
<div>
|
||||
<div class="user-profile-img-container">
|
||||
<img class="user-profile-img" src="{{.User.AvatarStatic}}" alt="profile-avatar" />
|
||||
</div>
|
||||
<div class="user-profile-details-container">
|
||||
<div>
|
||||
<span class="status-dname"> {{WithEmojis .User.DisplayName .User.Emojis}} </span>
|
||||
<span class="status-uname"> {{.User.Acct}} </span>
|
||||
</div>
|
||||
<div>
|
||||
<span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>
|
||||
{{if .User.Pleroma.Relationship.Following}}
|
||||
<form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
|
||||
<input type="submit" value="unfollow" class="btn-link">
|
||||
</form>
|
||||
{{end}}
|
||||
{{if .User.Pleroma.Relationship.Requested}}
|
||||
<form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
|
||||
<input type="submit" value="cancel request" class="btn-link">
|
||||
</form>
|
||||
{{end}}
|
||||
{{if not .User.Pleroma.Relationship.Following}}
|
||||
<form class="d-inline" action="/follow/{{.User.ID}}" method="post">
|
||||
<input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link">
|
||||
</form>
|
||||
{{end}}
|
||||
</div>
|
||||
<div>
|
||||
{{.User.StatusesCount}} statuses - {{.User.FollowingCount}} following - {{.User.FollowersCount}} followers
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-profile-decription">
|
||||
{{.User.Note}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{range .Statuses}}
|
||||
{{template "status.tmpl" .}}
|
||||
{{end}}
|
||||
|
||||
<div class="pagination">
|
||||
{{if .HasNext}}
|
||||
<a href="{{.NextLink}}">next</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{template "footer.tmpl"}}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue