common.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. // Code generated by go generate; DO NOT EDIT.
  2. package template // import "miniflux.app/template"
  3. var templateCommonMap = map[string]string{
  4. "entry_pagination": `{{ define "entry_pagination" }}
  5. <div class="pagination">
  6. <div class="pagination-prev">
  7. {{ if .prevEntry }}
  8. <a href="{{ .prevEntryRoute }}{{ if .searchQuery }}?q={{ .searchQuery }}{{ end }}" title="{{ .prevEntry.Title }}" data-page="previous">{{ t "pagination.previous" }}</a>
  9. {{ else }}
  10. {{ t "pagination.previous" }}
  11. {{ end }}
  12. </div>
  13. <div class="pagination-next">
  14. {{ if .nextEntry }}
  15. <a href="{{ .nextEntryRoute }}{{ if .searchQuery }}?q={{ .searchQuery }}{{ end }}" title="{{ .nextEntry.Title }}" data-page="next">{{ t "pagination.next" }}</a>
  16. {{ else }}
  17. {{ t "pagination.next" }}
  18. {{ end }}
  19. </div>
  20. </div>
  21. {{ end }}`,
  22. "item_meta": `{{ define "item_meta" }}
  23. <div class="item-meta">
  24. <ul>
  25. <li>
  26. <a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}" title="{{ .entry.Feed.SiteURL }}">{{ truncate .entry.Feed.Title 35 }}</a>
  27. </li>
  28. <li>
  29. <time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed .user.Timezone .entry.Date }}</time>
  30. </li>
  31. {{ if .hasSaveEntry }}
  32. <li>
  33. <a href="#"
  34. title="{{ t "entry.save.title" }}"
  35. data-save-entry="true"
  36. data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
  37. data-label-loading="{{ t "entry.state.saving" }}"
  38. data-label-done="{{ t "entry.save.completed" }}"
  39. >{{ t "entry.save.label" }}</a>
  40. </li>
  41. {{ end }}
  42. <li>
  43. <a href="{{ .entry.URL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ t "entry.original.label" }}</a>
  44. </li>
  45. {{ if .entry.CommentsURL }}
  46. <li>
  47. <a href="{{ .entry.CommentsURL }}" title="{{ t "entry.comments.title" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "entry.comments.label" }}</a>
  48. </li>
  49. {{ end }}
  50. <li>
  51. <a href="#"
  52. data-toggle-bookmark="true"
  53. data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
  54. data-label-loading="{{ t "entry.state.saving" }}"
  55. data-label-star="☆&nbsp;{{ t "entry.bookmark.toggle.on" }}"
  56. data-label-unstar="★&nbsp;{{ t "entry.bookmark.toggle.off" }}"
  57. data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
  58. >{{ if .entry.Starred }}★&nbsp;{{ t "entry.bookmark.toggle.off" }}{{ else }}☆&nbsp;{{ t "entry.bookmark.toggle.on" }}{{ end }}</a>
  59. </li>
  60. <li>
  61. <a href="#"
  62. title="{{ t "entry.status.title" }}"
  63. data-toggle-status="true"
  64. data-label-read="✔&#xfe0e;&nbsp;{{ t "entry.status.read" }}"
  65. data-label-unread="✘&nbsp;{{ t "entry.status.unread" }}"
  66. data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
  67. >{{ if eq .entry.Status "read" }}✘&nbsp;{{ t "entry.status.unread" }}{{ else }}✔&#xfe0e;&nbsp;{{ t "entry.status.read" }}{{ end }}</a>
  68. </li>
  69. </ul>
  70. </div>
  71. {{ end }}`,
  72. "layout": `{{ define "base" }}
  73. <!DOCTYPE html>
  74. <html>
  75. <head>
  76. <meta charset="utf-8">
  77. <title>{{template "title" .}} - Miniflux</title>
  78. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  79. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  80. <meta name="mobile-web-app-capable" content="yes">
  81. <meta name="apple-mobile-web-app-title" content="Miniflux">
  82. <link rel="manifest" href="{{ route "webManifest" }}">
  83. <meta name="robots" content="noindex,nofollow">
  84. <meta name="referrer" content="no-referrer">
  85. <!-- Favicons -->
  86. <link rel="icon" type="image/png" sizes="16x16" href="{{ route "appIcon" "filename" "favicon-16.png" }}">
  87. <link rel="icon" type="image/png" sizes="32x32" href="{{ route "appIcon" "filename" "favicon-32.png" }}">
  88. <!-- Android icons -->
  89. <link rel="icon" type="image/png" sizes="128x128" href="{{ route "appIcon" "filename" "icon-128.png" }}">
  90. <link rel="icon" type="image/png" sizes="192x192" href="{{ route "appIcon" "filename" "icon-192.png" }}">
  91. <!-- iOS icons -->
  92. <link rel="apple-touch-icon" sizes="120x120" href="{{ route "appIcon" "filename" "icon-120.png" }}">
  93. <link rel="apple-touch-icon" sizes="152x152" href="{{ route "appIcon" "filename" "icon-152.png" }}">
  94. <link rel="apple-touch-icon" sizes="167x167" href="{{ route "appIcon" "filename" "icon-167.png" }}">
  95. <link rel="apple-touch-icon" sizes="180x180" href="{{ route "appIcon" "filename" "icon-180.png" }}">
  96. {{ if .csrf }}
  97. <meta name="X-CSRF-Token" value="{{ .csrf }}">
  98. {{ end }}
  99. <meta name="theme-color" content="{{ theme_color .theme }}">
  100. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .theme }}?{{ .theme_checksum }}">
  101. <script type="text/javascript" src="{{ route "javascript" "name" "app" }}?{{ .app_js_checksum }}" defer></script>
  102. <script type="text/javascript" src="{{ route "javascript" "name" "sw" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script>
  103. </head>
  104. <body data-entries-status-url="{{ route "updateEntriesStatus" }}">
  105. {{ if .user }}
  106. <header class="header">
  107. <nav>
  108. <div class="logo">
  109. <a href="{{ route "unread" }}">Mini<span>flux</span></a>
  110. </div>
  111. <ul>
  112. <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}">
  113. <a href="{{ route "unread" }}" data-page="unread">{{ t "menu.unread" }}
  114. {{ if gt .countUnread 0 }}
  115. <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
  116. {{ end }}
  117. </a>
  118. </li>
  119. <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g b" }}">
  120. <a href="{{ route "starred" }}" data-page="starred">{{ t "menu.starred" }}</a>
  121. </li>
  122. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g h" }}">
  123. <a href="{{ route "history" }}" data-page="history">{{ t "menu.history" }}</a>
  124. </li>
  125. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g f" }}">
  126. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "menu.feeds" }}
  127. {{ if gt .countErrorFeeds 0 }}
  128. <span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span>
  129. {{ end }}
  130. </a>
  131. </li>
  132. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g c" }}">
  133. <a href="{{ route "categories" }}" data-page="categories">{{ t "menu.categories" }}</a>
  134. </li>
  135. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}">
  136. <a href="{{ route "settings" }}" data-page="settings">{{ t "menu.settings" }}</a>
  137. </li>
  138. <li>
  139. <a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ t "menu.logout" }}</a>
  140. </li>
  141. </ul>
  142. <div class="search">
  143. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  144. <a href="#" data-action="search">&laquo;&nbsp;{{ t "search.label" }}</a>
  145. </div>
  146. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  147. <input type="search" name="q" id="search-input" placeholder="{{ t "search.placeholder" }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  148. </form>
  149. </div>
  150. </nav>
  151. </header>
  152. {{ end }}
  153. {{ if .flashMessage }}
  154. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  155. {{ end }}
  156. {{ if .flashErrorMessage }}
  157. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  158. {{ end }}
  159. <main>
  160. {{template "content" .}}
  161. </main>
  162. <template id="keyboard-shortcuts">
  163. <div id="modal-left">
  164. <a href="#" class="btn-close-modal">x</a>
  165. <h3>{{ t "page.keyboard_shortcuts.title" }}</h3>
  166. <div class="keyboard-shortcuts">
  167. <p>{{ t "page.keyboard_shortcuts.subtitle.sections" }}</p>
  168. <ul>
  169. <li>{{ t "page.keyboard_shortcuts.go_to_unread" }} = <strong>g + u</strong></li>
  170. <li>{{ t "page.keyboard_shortcuts.go_to_starred" }} = <strong>g + b</strong></li>
  171. <li>{{ t "page.keyboard_shortcuts.go_to_history" }} = <strong>g + h</strong></li>
  172. <li>{{ t "page.keyboard_shortcuts.go_to_feeds" }} = <strong>g + f</strong></li>
  173. <li>{{ t "page.keyboard_shortcuts.go_to_categories" }} = <strong>g + c</strong></li>
  174. <li>{{ t "page.keyboard_shortcuts.go_to_settings" }} = <strong>g + s</strong></li>
  175. <li>{{ t "page.keyboard_shortcuts.show_keyboard_shortcuts" }} = <strong>?</strong></li>
  176. </ul>
  177. <p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p>
  178. <ul>
  179. <li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>j</strong>, <strong>◄</strong></li>
  180. <li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>k</strong>, <strong>►</strong></li>
  181. <li>{{ t "page.keyboard_shortcuts.go_to_feed" }} = <strong>g + f</strong></li>
  182. </ul>
  183. <p>{{ t "page.keyboard_shortcuts.subtitle.pages" }}</p>
  184. <ul>
  185. <li>{{ t "page.keyboard_shortcuts.go_to_previous_page" }} = <strong>h</strong></li>
  186. <li>{{ t "page.keyboard_shortcuts.go_to_next_page" }} = <strong>l</strong></li>
  187. </ul>
  188. <p>{{ t "page.keyboard_shortcuts.subtitle.actions" }}</p>
  189. <ul>
  190. <li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong></li>
  191. <li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li>
  192. <li>{{ t "page.keyboard_shortcuts.toggle_read_status" }} = <strong>m</strong></li>
  193. <li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li>
  194. <li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
  195. <li>{{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = <strong>f</strong></li>
  196. <li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li>
  197. <li>{{ t "page.keyboard_shortcuts.remove_feed" }} = <strong>#</strong></li>
  198. <li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li>
  199. <li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li>
  200. </ul>
  201. </div>
  202. </div>
  203. </template>
  204. </body>
  205. </html>
  206. {{ end }}
  207. `,
  208. "pagination": `{{ define "pagination" }}
  209. <div class="pagination">
  210. <div class="pagination-prev">
  211. {{ if .ShowPrev }}
  212. <a href="{{ .Route }}{{ if gt .PrevOffset 0 }}?offset={{ .PrevOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}{{ else }}{{ if .SearchQuery }}?q={{ .SearchQuery }}{{ end }}{{ end }}" data-page="previous">{{ t "pagination.previous" }}</a>
  213. {{ else }}
  214. {{ t "pagination.previous" }}
  215. {{ end }}
  216. </div>
  217. <div class="pagination-next">
  218. {{ if .ShowNext }}
  219. <a href="{{ .Route }}?offset={{ .NextOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}" data-page="next">{{ t "pagination.next" }}</a>
  220. {{ else }}
  221. {{ t "pagination.next" }}
  222. {{ end }}
  223. </div>
  224. </div>
  225. {{ end }}
  226. `,
  227. }
  228. var templateCommonMapChecksums = map[string]string{
  229. "entry_pagination": "4faa91e2eae150c5e4eab4d258e039dfdd413bab7602f0009360e6d52898e353",
  230. "item_meta": "34deb081a054f2948ad808bdb2c8603d6ab00c58f2f50c4ead0b47ae092888eb",
  231. "layout": "4a5339267f67b5999a22ece7584df4c75785bc3bf95d44e1891da763aaea7991",
  232. "pagination": "3386e90c6e1230311459e9a484629bc5d5bf39514a75ef2e73bbbc61142f7abb",
  233. }