history_entries.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. <a href="#"
  14. role="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" }}</a>
  21. </li>
  22. {{ end }}
  23. <li>
  24. <a 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. >
  44. <header class="item-header" dir="auto">
  45. <h2 id="entry-title-{{ .ID }}" class="item-title">
  46. <a href="{{ route "readEntry" "entryID" .ID }}">
  47. {{ if ne .Feed.Icon.IconID 0 }}
  48. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
  49. {{ else }}
  50. <span class="sr-only">{{ .Feed.Title }}</span>
  51. {{ end }}
  52. {{ .Title }}
  53. </a>
  54. </h2>
  55. <span class="category">
  56. <a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">
  57. {{ .Feed.Category.Title }}
  58. </a>
  59. </span>
  60. </header>
  61. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  62. </article>
  63. {{ end }}
  64. </div>
  65. <div class="pagination-bottom">
  66. {{ template "pagination" .pagination }}
  67. </div>
  68. {{ end }}
  69. {{ end }}