unread_entries.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {{ define "title"}}{{ t "page.unread.title" }} {{ if gt .countUnread 0 }}({{ .countUnread }}){{ end }} {{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1>{{ t "page.unread.title" }} (<span class="unread-counter">{{ .countUnread }}</span>)</h1>
  5. {{ if .entries }}
  6. <ul>
  7. <li>
  8. <a href="#"
  9. data-action="markPageAsRead"
  10. data-show-only-unread="1"
  11. data-label-question="{{ t "confirm.question" }}"
  12. data-label-yes="{{ t "confirm.yes" }}"
  13. data-label-no="{{ t "confirm.no" }}"
  14. data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_page_as_read" }}</a>
  15. </li>
  16. <li>
  17. <a href="#"
  18. data-confirm="true"
  19. data-url="{{ route "markAllAsRead" }}"
  20. data-redirect-url="{{ route "unread" }}"
  21. data-label-question="{{ t "confirm.question" }}"
  22. data-label-yes="{{ t "confirm.yes" }}"
  23. data-label-no="{{ t "confirm.no" }}"
  24. data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_all_as_read" }}</a>
  25. </li>
  26. </ul>
  27. {{ end }}
  28. </section>
  29. {{ if not .entries }}
  30. <p class="alert">{{ t "alert.no_unread_entry" }}</p>
  31. {{ else }}
  32. <div class="items hide-read-items">
  33. {{ range .entries }}
  34. <article class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
  35. <div class="item-header" dir="auto">
  36. <span class="item-title">
  37. {{ if ne .Feed.Icon.IconID 0 }}
  38. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
  39. {{ end }}
  40. <a href="{{ route "unreadEntry" "entryID" .ID }}">{{ .Title }}</a>
  41. </span>
  42. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  43. </div>
  44. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  45. </article>
  46. {{ end }}
  47. </div>
  48. <section class="page-footer">
  49. {{ if .entries }}
  50. <ul>
  51. <li>
  52. <a href="#"
  53. data-action="markPageAsRead"
  54. data-label-question="{{ t "confirm.question" }}"
  55. data-label-yes="{{ t "confirm.yes" }}"
  56. data-label-no="{{ t "confirm.no" }}"
  57. data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_page_as_read" }}</a>
  58. </li>
  59. </ul>
  60. {{ end }}
  61. </section>
  62. {{ template "pagination" .pagination }}
  63. {{ end }}
  64. {{ end }}