shared_entries.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {{ define "title"}}{{ t "page.shared_entries.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.shared_entries.title" }}
  6. <span aria-hidden="true">({{ .total }})</span>
  7. </h1>
  8. <span id="page-header-title-count" class="sr-only">{{ plural "page.shared_entries_count" .total .total }}</span>
  9. {{ if .entries }}
  10. <nav aria-label="{{ t "page.shared_entries.title" }} {{ t "menu.title" }}">
  11. <ul>
  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. <li>
  23. <a class="page-link" href="{{ route "sharedEntries" }}">{{ icon "share" }}{{ t "menu.shared_entries" }}</a>
  24. </li>
  25. </ul>
  26. </nav>
  27. {{ end }}
  28. </section>
  29. {{ end }}
  30. {{ define "content"}}
  31. {{ if not .entries }}
  32. <p role="alert" class="alert alert-info">{{ t "alert.no_shared_entry" }}</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. {{ if .ShareCode }}
  54. <a href="{{ route "sharedEntry" "shareCode" .ShareCode }}"
  55. title="{{ t "entry.shared_entry.title" }}"
  56. {{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}>{{ icon "share" }}</a>
  57. {{ end }}
  58. </h2>
  59. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  60. </header>
  61. <div class="item-meta">
  62. <ul class="item-meta-info">
  63. <li class="item-meta-info-site-url">
  64. <a href="{{ route "feedEntries" "feedID" .Feed.ID }}" title="{{ .Feed.SiteURL }}">{{ truncate .Feed.Title 35 }}</a>
  65. </li>
  66. <li class="item-meta-info-timestamp">
  67. <time datetime="{{ isodate .Date }}" title="{{ isodate .Date }}">{{ elapsed $.user.Timezone .Date }}</time>
  68. </li>
  69. </ul>
  70. <ul class="item-meta-icons">
  71. <li class="item-meta-icons-delete">
  72. {{ icon "delete" }}
  73. <a href="#"
  74. data-confirm="true"
  75. data-url="{{ route "unshareEntry" "entryID" .ID }}"
  76. data-label-question="{{ t "confirm.question" }}"
  77. data-label-yes="{{ t "confirm.yes" }}"
  78. data-label-no="{{ t "confirm.no" }}"
  79. data-label-loading="{{ t "confirm.loading" }}">{{ t "entry.unshare.label" }}</a>
  80. </li>
  81. </ul>
  82. </div>
  83. </article>
  84. {{ end }}
  85. </div>
  86. <div class="pagination-bottom">
  87. {{ template "pagination" .pagination }}
  88. </div>
  89. {{ end }}
  90. {{ end }}