feed_entries.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. {{ define "title"}}{{ .feed.Title }} ({{ .total }}){{ end }}
  2. {{ define "content"}}
  3. <section class="page-header">
  4. <h1 dir="auto">
  5. <a href="{{ .feed.SiteURL | safeURL }}" title="{{ .feed.SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ .feed.Title }}</a>
  6. ({{ .total }})
  7. </h1>
  8. <ul>
  9. {{ if .entries }}
  10. <li>
  11. <a href="#"
  12. data-action="markPageAsRead"
  13. data-label-question="{{ t "confirm.question" }}"
  14. data-label-yes="{{ t "confirm.yes" }}"
  15. data-label-no="{{ t "confirm.no" }}"
  16. data-label-loading="{{ t "confirm.loading" }}"
  17. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}</a>
  18. </li>
  19. <li>
  20. <a href="#"
  21. data-confirm="true"
  22. data-label-question="{{ t "confirm.question" }}"
  23. data-label-yes="{{ t "confirm.yes" }}"
  24. data-label-no="{{ t "confirm.no" }}"
  25. data-label-loading="{{ t "confirm.loading" }}"
  26. data-url="{{ route "markFeedAsRead" "feedID" .feed.ID }}">{{ icon "mark-all-as-read" }}{{ t "menu.mark_all_as_read" }}</a>
  27. </li>
  28. {{ end }}
  29. {{ if .showOnlyUnreadEntries }}
  30. <li>
  31. <a href="{{ route "feedEntriesAll" "feedID" .feed.ID }}">{{ icon "show-all-entries" }}{{ t "menu.show_all_entries" }}</a>
  32. </li>
  33. {{ else }}
  34. <li>
  35. <a href="{{ route "feedEntries" "feedID" .feed.ID }}">{{ icon "show-unread-entries" }}{{ t "menu.show_only_unread_entries" }}</a>
  36. </li>
  37. {{ end }}
  38. <li>
  39. <a href="{{ route "refreshFeed" "feedID" .feed.ID }}">{{ icon "refresh" }}{{ t "menu.refresh_feed" }}</a>
  40. </li>
  41. <li>
  42. <a href="{{ route "editFeed" "feedID" .feed.ID }}">{{ icon "edit" }}{{ t "menu.edit_feed" }}</a>
  43. </li>
  44. <li>
  45. <a href="#"
  46. data-confirm="true"
  47. data-action="remove-feed"
  48. data-label-question="{{ t "confirm.question" }}"
  49. data-label-yes="{{ t "confirm.yes" }}"
  50. data-label-no="{{ t "confirm.no" }}"
  51. data-label-loading="{{ t "confirm.loading" }}"
  52. data-url="{{ route "removeFeed" "feedID" .feed.ID }}"
  53. data-redirect-url="{{ route "feeds" }}">{{ icon "delete" }}{{ t "action.remove_feed" }}</a>
  54. </li>
  55. </ul>
  56. </section>
  57. {{ if ne .feed.ParsingErrorCount 0 }}
  58. <div class="alert alert-error">
  59. <h3>{{ t "alert.feed_error" }}</h3>
  60. <p>{{ t .feed.ParsingErrorMsg }}</p>
  61. </div>
  62. {{ end }}
  63. {{ if not .entries }}
  64. {{ if .showOnlyUnreadEntries }}
  65. <p class="alert">{{ t "alert.no_unread_entry" }}</p>
  66. {{ else }}
  67. <p class="alert">{{ t "alert.no_feed_entry" }}</p>
  68. {{ end }}
  69. {{ else }}
  70. <div class="pagination-top">
  71. {{ template "pagination" .pagination }}
  72. </div>
  73. <div class="items">
  74. {{ range .entries }}
  75. <article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
  76. <div class="item-header" dir="auto">
  77. <span class="item-title">
  78. {{ if ne .Feed.Icon.IconID 0 }}
  79. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
  80. {{ end }}
  81. <a href="{{ route "feedEntry" "feedID" .Feed.ID "entryID" .ID }}" title="{{ .Title }}">{{ .Title }}</a>
  82. </span>
  83. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  84. </div>
  85. {{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
  86. </article>
  87. {{ end }}
  88. </div>
  89. <section class="page-footer">
  90. {{ if .entries }}
  91. <ul>
  92. <li>
  93. <a href="#"
  94. data-action="markPageAsRead"
  95. data-label-question="{{ t "confirm.question" }}"
  96. data-label-yes="{{ t "confirm.yes" }}"
  97. data-label-no="{{ t "confirm.no" }}"
  98. data-label-loading="{{ t "confirm.loading" }}"
  99. data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}</a>
  100. </li>
  101. </ul>
  102. {{ end }}
  103. </section>
  104. <div class="pagination-bottom">
  105. {{ template "pagination" .pagination }}
  106. </div>
  107. {{ end }}
  108. {{ end }}