category_entries.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {{ define "title"}}{{ .category.Title }} ({{ .total }}){{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1 dir="auto">{{ .category.Title }} ({{ .total }})</h1>
  5. <ul>
  6. {{ if .entries }}
  7. <li>
  8. <a href="#"
  9. data-action="markPageAsRead"
  10. data-label-question="{{ t "confirm.question" }}"
  11. data-label-yes="{{ t "confirm.yes" }}"
  12. data-label-no="{{ t "confirm.no" }}"
  13. data-label-loading="{{ t "confirm.loading" }}"
  14. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}</a>
  15. </li>
  16. <li>
  17. <a href="#"
  18. data-confirm="true"
  19. data-label-question="{{ t "confirm.question" }}"
  20. data-label-yes="{{ t "confirm.yes" }}"
  21. data-label-no="{{ t "confirm.no" }}"
  22. data-label-loading="{{ t "confirm.loading" }}"
  23. data-url="{{ route "markCategoryAsRead" "categoryID" .category.ID }}">{{ icon "mark-all-as-read" }}{{ t "menu.mark_all_as_read" }}</a>
  24. </li>
  25. {{ end }}
  26. {{ if .showOnlyUnreadEntries }}
  27. <li>
  28. <a href="{{ route "categoryEntriesAll" "categoryID" .category.ID }}">{{ icon "show-all-entries" }}{{ t "menu.show_all_entries" }}</a>
  29. </li>
  30. {{ else }}
  31. <li>
  32. <a href="{{ route "categoryEntries" "categoryID" .category.ID }}">{{ icon "show-unread-entries" }}{{ t "menu.show_only_unread_entries" }}</a>
  33. </li>
  34. {{ end }}
  35. <li>
  36. <a href="{{ route "categoryFeeds" "categoryID" .category.ID }}">{{ icon "feeds" }}{{ t "menu.feeds" }}</a>
  37. </li>
  38. </ul>
  39. </section>
  40. {{ if not .entries }}
  41. <p class="alert">{{ t "alert.no_category_entry" }}</p>
  42. {{ else }}
  43. <div class="pagination-top">
  44. {{ template "pagination" .pagination }}
  45. </div>
  46. <div class="items">
  47. {{ range .entries }}
  48. <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
  49. <div class="item-header" dir="auto">
  50. <span class="item-title">
  51. {{ if ne .Feed.Icon.IconID 0 }}
  52. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
  53. {{ end }}
  54. <a href="{{ route "categoryEntry" "categoryID" .Feed.Category.ID "entryID" .ID }}" title="{{ .Title }}">{{ .Title }}</a>
  55. </span>
  56. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  57. </div>
  58. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  59. </article>
  60. {{ end }}
  61. </div>
  62. <section class="page-footer">
  63. {{ if .entries }}
  64. <ul>
  65. <li>
  66. <a href="#"
  67. data-action="markPageAsRead"
  68. data-label-question="{{ t "confirm.question" }}"
  69. data-label-yes="{{ t "confirm.yes" }}"
  70. data-label-no="{{ t "confirm.no" }}"
  71. data-label-loading="{{ t "confirm.loading" }}"
  72. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}</a>
  73. </li>
  74. </ul>
  75. {{ end }}
  76. </section>
  77. <div class="pagination-bottom">
  78. {{ template "pagination" .pagination }}
  79. </div>
  80. {{ end }}
  81. {{ end }}