history_entries.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {{ define "title"}}{{ t "page.history.title" }} ({{ .total }}){{ end }}
  2. {{ define "page_header"}}
  3. <section class="page-header" aria-labelledby="page-header-title page-header-title-count">
  4. <h1 id="page-header-title">
  5. {{ t "page.history.title" }}
  6. <span aria-hidden="true">({{ .total }})</span>
  7. </h1>
  8. <span id="page-header-title-count" class="sr-only">{{ plural "page.read_entry_count" .total .total }}</span>
  9. <nav aria-label="{{ t "page.history.title" }} {{ t "menu.title" }}">
  10. <ul>
  11. {{ if .entries }}
  12. <li>
  13. <button
  14. class="page-button"
  15. data-confirm="true"
  16. data-url="{{ route "flushHistory" }}"
  17. data-label-question="{{ t "confirm.question" }}"
  18. data-label-yes="{{ t "confirm.yes" }}"
  19. data-label-no="{{ t "confirm.no" }}"
  20. data-label-loading="{{ t "confirm.loading" }}">{{ icon "delete" }}{{ t "menu.flush_history" }}</button>
  21. </li>
  22. {{ end }}
  23. <li>
  24. <a class="page-link" href="{{ route "sharedEntries" }}">{{ icon "share" }}{{ t "menu.shared_entries" }}</a>
  25. </li>
  26. </ul>
  27. </nav>
  28. </section>
  29. {{ end }}
  30. {{ define "content"}}
  31. {{ if not .entries }}
  32. <p role="alert" class="alert alert-info">{{ t "alert.no_history" }}</p>
  33. {{ else }}
  34. <div class="pagination-top">
  35. {{ template "pagination" .pagination }}
  36. </div>
  37. <div class="items">
  38. {{ range .entries }}
  39. <article
  40. class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}"
  41. data-id="{{ .ID }}"
  42. aria-labelledby="entry-title-{{ .ID }}"
  43. tabindex="-1"
  44. >
  45. <header class="item-header" dir="auto">
  46. <h2 id="entry-title-{{ .ID }}" class="item-title">
  47. <a href="{{ route "readEntry" "entryID" .ID }}">
  48. {{ if ne .Feed.Icon.IconID 0 }}
  49. <img src="{{ route "feedIcon" "externalIconID" .Feed.Icon.ExternalIconID }}" width="16" height="16" loading="lazy" alt="">
  50. {{ end }}
  51. {{ .Title }}
  52. </a>
  53. </h2>
  54. <span class="category">
  55. <a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">
  56. {{ .Feed.Category.Title }}
  57. </a>
  58. </span>
  59. </header>
  60. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  61. </article>
  62. {{ end }}
  63. </div>
  64. <div class="pagination-bottom">
  65. {{ template "pagination" .pagination }}
  66. </div>
  67. {{ end }}
  68. {{ end }}