mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-01 09:34:21 +00:00
Add notification support
This commit is contained in:
parent
51a4b16af5
commit
f68d72ae0e
13 changed files with 271 additions and 29 deletions
|
@ -1,4 +1,5 @@
|
|||
<div class="navigation">
|
||||
<a href="/timeline">home</a>
|
||||
<a href="/notifications">notifications{{if gt .NotificationCount 0}} ({{.NotificationCount}}){{end}}</a>
|
||||
<a href="/signout">sign out</a>
|
||||
</div>
|
||||
|
|
59
templates/notification.tmpl
Normal file
59
templates/notification.tmpl
Normal file
|
@ -0,0 +1,59 @@
|
|||
{{template "header.tmpl"}}
|
||||
{{template "navigation.tmpl" .NavbarData}}
|
||||
<div class="page-title"> Notifications </div>
|
||||
|
||||
{{range .Notifications}}
|
||||
<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" />
|
||||
<div>
|
||||
<div>
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
<span class="icon dripicons-user-group"></span>
|
||||
followed you
|
||||
</div>
|
||||
<div class="notification-follow-uname">
|
||||
@{{.Account.Acct}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{else if eq .Type "mention"}}
|
||||
{{template "status" .Status}}
|
||||
|
||||
{{else if eq .Type "reblog"}}
|
||||
<div class="notification-retweet-container">
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
<div>
|
||||
<div>
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
<span class="icon dripicons-retweet retweeted"></span>
|
||||
retweeted your post
|
||||
</div>
|
||||
{{template "status" .Status}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{else if eq .Type "favourite"}}
|
||||
<div class="notification-like-container">
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
<div>
|
||||
<div>
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
<span class="icon dripicons-star liked"></span>
|
||||
liked your post
|
||||
</div>
|
||||
{{template "status" .Status}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="pagination">
|
||||
{{if .HasNext}}
|
||||
<a href="{{.NextLink}}">next</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "footer.tmpl"}}
|
|
@ -11,13 +11,17 @@
|
|||
{{block "status" .}}
|
||||
<div class="status-container">
|
||||
<div>
|
||||
{{if ne .Account.ID ""}}
|
||||
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="status">
|
||||
{{if ne .Account.ID ""}}
|
||||
<div class="status-name">
|
||||
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
|
||||
<span class="status-uname"> {{.Account.Acct}} </span>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="status-content"> {{WithEmojis .Content .Emojis}} </div>
|
||||
<div class="status-media-container">
|
||||
{{range .MediaAttachments}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{template "header.tmpl"}}
|
||||
{{template "navigation.tmpl" .NavbarData}}
|
||||
<div class="page-title"> Thread </div>
|
||||
{{template "navigation.tmpl"}}
|
||||
|
||||
{{range .Context.Ancestors}}
|
||||
{{template "status.tmpl" .}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{template "header.tmpl"}}
|
||||
{{template "navigation.tmpl" .NavbarData}}
|
||||
<div class="page-title"> Timeline </div>
|
||||
{{template "navigation.tmpl"}}
|
||||
|
||||
<form class="timeline-post-form" action="/post" method="POST" enctype="multipart/form-data">
|
||||
<label for="post-content"> New Post </label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue