mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-02 10:04:22 +00:00
Add liked by and retweeted by page
This commit is contained in:
parent
c34bde2d52
commit
ac4ff88adb
12 changed files with 276 additions and 53 deletions
|
@ -1,6 +1,6 @@
|
|||
{{template "header.tmpl" .HeaderData}}
|
||||
<div class="page-title"> Error </div>
|
||||
<div class="error-text"> {{.}} </div>
|
||||
<div class="error-text"> {{.Error}} </div>
|
||||
<div>
|
||||
<a href="/timeline/home">Home</a>
|
||||
<a href="/signin">Sign In</a>
|
||||
|
|
7
templates/likedby.tmpl
Normal file
7
templates/likedby.tmpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{template "header.tmpl" .HeaderData}}
|
||||
{{template "navigation.tmpl" .NavbarData}}
|
||||
<div class="page-title"> Liked By </div>
|
||||
|
||||
{{template "userlist.tmpl" .Users}}
|
||||
|
||||
{{template "footer.tmpl"}}
|
7
templates/retweetedby.tmpl
Normal file
7
templates/retweetedby.tmpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{template "header.tmpl" .HeaderData}}
|
||||
{{template "navigation.tmpl" .NavbarData}}
|
||||
<div class="page-title"> Retweeted By </div>
|
||||
|
||||
{{template "userlist.tmpl" .Users}}
|
||||
|
||||
{{template "footer.tmpl"}}
|
|
@ -85,43 +85,54 @@
|
|||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="status-action">
|
||||
<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span> {{DisplayInteractionCount .RepliesCount}} </span>
|
||||
</a>
|
||||
{{if or (eq .Visibility "private") (eq .Visibility "direct")}}
|
||||
<a class="status-retweet" title="this status cannot be retweeted">
|
||||
<i class="fa fa-retweet"></i>
|
||||
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
|
||||
</a>
|
||||
{{else}}
|
||||
<div class="status-action-container">
|
||||
<div class="status-action">
|
||||
<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply">
|
||||
<i class="fa fa-reply"></i>
|
||||
</a>
|
||||
<a class="status-action-count" href="/thread/{{.ID}}#status-{{.ID}}">
|
||||
<span> {{DisplayInteractionCount .RepliesCount}} </span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="status-action">
|
||||
{{if or (eq .Visibility "private") (eq .Visibility "direct")}}
|
||||
<a class="status-retweet" title="this status cannot be retweeted">
|
||||
<i class="fa fa-retweet"></i>
|
||||
</a>
|
||||
{{else}}
|
||||
{{if .Reblogged}}
|
||||
<a class="status-retweet" href="/unretweet/{{.ID}}" title="undo retweet">
|
||||
<i class="fa fa-retweet retweeted"></i>
|
||||
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="status-retweet" href="/retweet/{{.ID}}" title="retweet">
|
||||
<i class="fa fa-retweet"></i>
|
||||
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .Favourited}}
|
||||
<a class="status-like" href="/unlike/{{.ID}}" title="unlike">
|
||||
<i class="fa fa-star liked"></i>
|
||||
<span> {{DisplayInteractionCount .FavouritesCount}} </span>
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="status-like" href="/like/{{.ID}}" title="like">
|
||||
<i class="fa fa-star-o"></i>
|
||||
<span> {{DisplayInteractionCount .FavouritesCount}} </span>
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}">
|
||||
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time>
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="status-action-count" href="/retweetedby/{{.ID}}" title="click to see the the list">
|
||||
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="status-action">
|
||||
{{if .Favourited}}
|
||||
<a class="status-like" href="/unlike/{{.ID}}" title="unlike">
|
||||
<i class="fa fa-star liked"></i>
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="status-like" href="/like/{{.ID}}" title="like">
|
||||
<i class="fa fa-star-o"></i>
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="status-action-count" href="/likedby/{{.ID}}" title="click to see the the list">
|
||||
<span> {{DisplayInteractionCount .FavouritesCount}} </span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="status-action">
|
||||
<a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}">
|
||||
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
17
templates/userlist.tmpl
Normal file
17
templates/userlist.tmpl
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div class="user-list-container">
|
||||
{{range .}}
|
||||
<div class="user-list-item">
|
||||
<div>
|
||||
<a class="img-link" href="/user/{{.ID}}">
|
||||
<img class="status-profile-img" src="{{.AvatarStatic}}" alt="avatar" />
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<div class="status-dname"> {{EmojiFilter .DisplayName .Emojis}} </div>
|
||||
<a class="img-link" href="/user/{{.ID}}">
|
||||
<div class="status-uname"> {{.Acct}} </div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue