mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-04 19:08:45 +00:00
Add bookmarks
- Add bookmark/unbookmark link on mouse hover - Add bookmarks section on user profile page
This commit is contained in:
parent
0b8c41ca7c
commit
da22d19fb4
8 changed files with 181 additions and 13 deletions
|
@ -46,6 +46,19 @@
|
|||
<input type="submit" value="mute" class="btn-link more-link">
|
||||
</form>
|
||||
{{end}}
|
||||
{{if .Bookmarked}}
|
||||
<form action="/unbookmark/{{.ID}}" method="post" target="_self">
|
||||
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
||||
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
|
||||
<input type="submit" value="unbookmark" class="btn-link more-link">
|
||||
</form>
|
||||
{{else}}
|
||||
<form action="/bookmark/{{.ID}}" method="post" target="_self">
|
||||
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
||||
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
|
||||
<input type="submit" value="bookmark" class="btn-link more-link">
|
||||
</form>
|
||||
{{end}}
|
||||
{{if eq $.Ctx.UserID .Account.ID}}
|
||||
<form action="/delete/{{.ID}}" method="post" target="_self">
|
||||
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
||||
|
|
|
@ -97,6 +97,11 @@
|
|||
<a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> -
|
||||
<a href="/user/{{.User.ID}}/media"> media </a>
|
||||
</div>
|
||||
{{if .IsCurrent}}
|
||||
<div>
|
||||
<a href="/user/{{.User.ID}}/bookmarks"> bookmarks </a>
|
||||
</div>
|
||||
{{end}}
|
||||
<div>
|
||||
<a href="/usersearch/{{.User.ID}}"> search statuses </a>
|
||||
</div>
|
||||
|
@ -111,6 +116,8 @@
|
|||
<div class="page-title"> Statuses </div>
|
||||
{{range .Statuses}}
|
||||
{{template "status.tmpl" (WithContext . $.Ctx)}}
|
||||
{{else}}
|
||||
<div class="no-data-found">No data found</div>
|
||||
{{end}}
|
||||
|
||||
{{else if eq .Type "following"}}
|
||||
|
@ -125,6 +132,16 @@
|
|||
<div class="page-title"> Statuses with media </div>
|
||||
{{range .Statuses}}
|
||||
{{template "status.tmpl" (WithContext . $.Ctx)}}
|
||||
{{else}}
|
||||
<div class="no-data-found">No data found</div>
|
||||
{{end}}
|
||||
|
||||
{{else if eq .Type "bookmarks"}}
|
||||
<div class="page-title"> Bookmarks </div>
|
||||
{{range .Statuses}}
|
||||
{{template "status.tmpl" (WithContext . $.Ctx)}}
|
||||
{{else}}
|
||||
<div class="no-data-found">No data found</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue