notification.tmpl 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {{with .Data}}
  2. {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
  3. <div class="notification-title-container">
  4. <span class="page-title">
  5. Notifications
  6. {{if and (not $.Ctx.AntiDopamineMode) (gt .UnreadCount 0)}}
  7. ({{.UnreadCount }})
  8. {{end}}
  9. </span>
  10. <a class="notification-refresh" href="/notifications" target="_self" accesskey="R" title="Refresh (R)">refresh</a>
  11. {{if .ReadID}}
  12. <form class="notification-read" action="/notifications/read?max_id={{.ReadID}}" method="post" target="_self">
  13. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  14. <input type="submit" value="read" class="btn-link" accesskey="C" title="Clear unread notifications (C)">
  15. </form>
  16. {{end}}
  17. </div>
  18. {{range .Notifications}}
  19. <div class="status-container-container {{if .Pleroma}}{{if not .Pleroma.IsSeen}}unread{{end}}{{end}}">
  20. {{if eq .Type "follow"}}
  21. <div class="notification-follow-container">
  22. <div class="status-profile-img-container">
  23. <a class="img-link" href="/user/{{.Account.ID}}">
  24. <img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="@{{.Account.Acct}}" alt="profile-avatar" height="48" />
  25. </a>
  26. </div>
  27. <div class="notification-follow">
  28. <div class="notification-info-text">
  29. <bdi class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </bdi>
  30. <span class="notification-text"> followed you -
  31. <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time>
  32. </span>
  33. </div>
  34. <div>
  35. <a href="/user/{{.Account.ID}}"> <span class="status-uname"> @{{.Account.Acct}} </span> </a>
  36. </div>
  37. </div>
  38. </div>
  39. {{else if eq .Type "mention"}}
  40. {{template "status" (WithContext .Status $.Ctx)}}
  41. {{else if eq .Type "reblog"}}
  42. <div class="retweet-info">
  43. <a class="img-link" href="/user/{{.Account.ID}}">
  44. <img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="@{{.Account.Acct}}" alt="avatar" height="48" />
  45. </a>
  46. <a href="/user/{{.Account.ID}}">
  47. <span class="status-uname"> @{{.Account.Acct}} </span>
  48. </a>
  49. <span class="notification-text"> retweeted your post -
  50. <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time>
  51. </span>
  52. </div>
  53. {{template "status" (WithContext .Status $.Ctx)}}
  54. {{else if eq .Type "favourite"}}
  55. <div class="retweet-info">
  56. <a class="img-link" href="/user/{{.Account.ID}}">
  57. <img class="status-profile-img" src="{{.Account.AvatarStatic}}" title="@{{.Account.Acct}}" alt="avatar" height="48" />
  58. </a>
  59. <a href="/user/{{.Account.ID}}">
  60. <span class="status-uname"> @{{.Account.Acct}} </span>
  61. </a>
  62. <span class="notification-text"> liked your post -
  63. <time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}">{{TimeSince .CreatedAt}}</time>
  64. </span>
  65. </div>
  66. {{template "status" (WithContext .Status $.Ctx)}}
  67. {{end}}
  68. </div>
  69. {{end}}
  70. <div class="pagination">
  71. {{if .NextLink}}
  72. <a href="{{.NextLink}}" target="_self">[next]</a>
  73. {{end}}
  74. </div>
  75. {{template "footer.tmpl"}}
  76. {{end}}