shared_entries.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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="items">
  35. {{ range .entries }}
  36. <article
  37. class="item entry-item {{ if $.user.EntrySwipe }}entry-swipe{{ end }} item-status-{{ .Status }}"
  38. data-id="{{ .ID }}"
  39. aria-labelledby="entry-title-{{ .ID }}"
  40. tabindex="-1"
  41. >
  42. <header class="item-header" dir="auto">
  43. <h2 id="entry-title-{{ .ID }}" class="item-title">
  44. <a href="{{ route "readEntry" "entryID" .ID }}">
  45. {{ if ne .Feed.Icon.IconID 0 }}
  46. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="">
  47. {{ end }}
  48. {{ .Title }}
  49. </a>
  50. {{ if .ShareCode }}
  51. <a href="{{ route "sharedEntry" "shareCode" .ShareCode }}"
  52. title="{{ t "entry.shared_entry.title" }}"
  53. target="_blank">{{ icon "share" }}</a>
  54. {{ end }}
  55. </h2>
  56. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  57. </header>
  58. <div class="item-meta">
  59. <ul class="item-meta-info">
  60. <li class="item-meta-info-site-url">
  61. <a href="{{ route "feedEntries" "feedID" .Feed.ID }}" title="{{ .Feed.SiteURL }}">{{ truncate .Feed.Title 35 }}</a>
  62. </li>
  63. <li class="item-meta-info-timestamp">
  64. <time datetime="{{ isodate .Date }}" title="{{ isodate .Date }}">{{ elapsed $.user.Timezone .Date }}</time>
  65. </li>
  66. </ul>
  67. <ul class="item-meta-icons">
  68. <li class="item-meta-icons-delete">
  69. {{ icon "delete" }}
  70. <a href="#"
  71. data-confirm="true"
  72. data-url="{{ route "unshareEntry" "entryID" .ID }}"
  73. data-label-question="{{ t "confirm.question" }}"
  74. data-label-yes="{{ t "confirm.yes" }}"
  75. data-label-no="{{ t "confirm.no" }}"
  76. data-label-loading="{{ t "confirm.loading" }}">{{ t "entry.unshare.label" }}</a>
  77. </li>
  78. </ul>
  79. </div>
  80. </article>
  81. {{ end }}
  82. </div>
  83. {{ end }}
  84. {{ end }}