common.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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. "feed_list": `{{ define "feed_list" }}
  23. <div class="items">
  24. {{ range .feeds }}
  25. <article class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ end }}">
  26. <div class="item-header">
  27. <span class="item-title">
  28. {{ if .Icon }}
  29. <img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Title }}">
  30. {{ end }}
  31. {{ if .Disabled }} 🚫 {{ end }}
  32. <a href="{{ route "feedEntries" "feedID" .ID }}">{{ .Title }}</a>
  33. </span>
  34. <span class="feed-entries-counter">
  35. (<span title="{{ t "page.feeds.unread_counter" }}">{{ .UnreadCount }}</span>/<span title="{{ t "page.feeds.read_counter" }}">{{ .ReadCount }}</span>)
  36. </span>
  37. <span class="category">
  38. <a href="{{ route "categoryEntries" "categoryID" .Category.ID }}">{{ .Category.Title }}</a>
  39. </span>
  40. </div>
  41. <div class="item-meta">
  42. <ul>
  43. <li>
  44. <a href="{{ .SiteURL | safeURL }}" title="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ domain .SiteURL }}</a>
  45. </li>
  46. <li>
  47. {{ t "page.feeds.last_check" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time>
  48. </li>
  49. </ul>
  50. <ul>
  51. <li>
  52. <a href="{{ route "refreshFeed" "feedID" .ID }}">{{ t "menu.refresh_feed" }}</a>
  53. </li>
  54. <li>
  55. <a href="{{ route "editFeed" "feedID" .ID }}">{{ t "menu.edit_feed" }}</a>
  56. </li>
  57. <li>
  58. <a href="#"
  59. data-confirm="true"
  60. data-label-question="{{ t "confirm.question" }}"
  61. data-label-yes="{{ t "confirm.yes" }}"
  62. data-label-no="{{ t "confirm.no" }}"
  63. data-label-loading="{{ t "confirm.loading" }}"
  64. data-url="{{ route "removeFeed" "feedID" .ID }}">{{ t "action.remove" }}</a>
  65. </li>
  66. </ul>
  67. </div>
  68. {{ if ne .ParsingErrorCount 0 }}
  69. <div class="parsing-error">
  70. <strong title="{{ .ParsingErrorMsg }}" class="parsing-error-count">{{ plural "page.feeds.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong>
  71. - <small class="parsing-error-message">{{ .ParsingErrorMsg }}</small>
  72. </div>
  73. {{ end }}
  74. </article>
  75. {{ end }}
  76. </div>
  77. {{ end }}`,
  78. "feed_menu": `{{ define "feed_menu" }}
  79. <ul>
  80. <li>
  81. <a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a>
  82. </li>
  83. <li>
  84. <a href="{{ route "addSubscription" }}">{{ t "menu.add_feed" }}</a>
  85. </li>
  86. <li>
  87. <a href="{{ route "export" }}">{{ t "menu.export" }}</a>
  88. </li>
  89. <li>
  90. <a href="{{ route "import" }}">{{ t "menu.import" }}</a>
  91. </li>
  92. <li>
  93. <a href="{{ route "refreshAllFeeds" }}">{{ t "menu.refresh_all_feeds" }}</a>
  94. </li>
  95. </ul>
  96. {{ end }}`,
  97. "item_meta": `{{ define "item_meta" }}
  98. <div class="item-meta">
  99. <ul>
  100. <li>
  101. <a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}" title="{{ .entry.Feed.SiteURL }}">{{ truncate .entry.Feed.Title 35 }}</a>
  102. </li>
  103. <li>
  104. <time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed .user.Timezone .entry.Date }}</time>
  105. </li>
  106. </ul>
  107. <ul>
  108. {{ if .hasSaveEntry }}
  109. <li>
  110. <a href="#"
  111. title="{{ t "entry.save.title" }}"
  112. data-save-entry="true"
  113. data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
  114. data-label-loading="{{ t "entry.state.saving" }}"
  115. data-label-done="{{ t "entry.save.completed" }}"
  116. >{{ t "entry.save.label" }}</a>
  117. </li>
  118. {{ end }}
  119. <li>
  120. <a href="{{ .entry.URL | safeURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ t "entry.original.label" }}</a>
  121. </li>
  122. {{ if .entry.CommentsURL }}
  123. <li>
  124. <a href="{{ .entry.CommentsURL | safeURL }}" title="{{ t "entry.comments.title" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-comments-link="true">{{ t "entry.comments.label" }}</a>
  125. </li>
  126. {{ end }}
  127. <li>
  128. <a href="#"
  129. data-toggle-bookmark="true"
  130. data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
  131. data-label-loading="{{ t "entry.state.saving" }}"
  132. data-label-star="☆&nbsp;{{ t "entry.bookmark.toggle.on" }}"
  133. data-label-unstar="★&nbsp;{{ t "entry.bookmark.toggle.off" }}"
  134. data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
  135. >{{ if .entry.Starred }}★&nbsp;{{ t "entry.bookmark.toggle.off" }}{{ else }}☆&nbsp;{{ t "entry.bookmark.toggle.on" }}{{ end }}</a>
  136. </li>
  137. <li>
  138. <a href="#"
  139. title="{{ t "entry.status.title" }}"
  140. data-toggle-status="true"
  141. data-label-read="✔&#xfe0e;&nbsp;{{ t "entry.status.read" }}"
  142. data-label-unread="✘&nbsp;{{ t "entry.status.unread" }}"
  143. data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
  144. >{{ if eq .entry.Status "read" }}✘&nbsp;{{ t "entry.status.unread" }}{{ else }}✔&#xfe0e;&nbsp;{{ t "entry.status.read" }}{{ end }}</a>
  145. </li>
  146. </ul>
  147. </div>
  148. {{ end }}
  149. `,
  150. "layout": `{{ define "base" }}
  151. <!DOCTYPE html>
  152. <html>
  153. <head>
  154. <meta charset="utf-8">
  155. <title>{{template "title" .}} - Miniflux</title>
  156. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  157. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  158. <meta name="mobile-web-app-capable" content="yes">
  159. <meta name="apple-mobile-web-app-title" content="Miniflux">
  160. <link rel="manifest" href="{{ route "webManifest" }}" crossorigin="use-credentials"/>
  161. <meta name="robots" content="noindex,nofollow">
  162. <meta name="referrer" content="no-referrer">
  163. <meta name="google" content="notranslate">
  164. <!-- Favicons -->
  165. <link rel="icon" type="image/png" sizes="16x16" href="{{ route "appIcon" "filename" "favicon-16.png" }}">
  166. <link rel="icon" type="image/png" sizes="32x32" href="{{ route "appIcon" "filename" "favicon-32.png" }}">
  167. <!-- Android icons -->
  168. <link rel="icon" type="image/png" sizes="128x128" href="{{ route "appIcon" "filename" "icon-128.png" }}">
  169. <link rel="icon" type="image/png" sizes="192x192" href="{{ route "appIcon" "filename" "icon-192.png" }}">
  170. <!-- iOS icons -->
  171. <link rel="apple-touch-icon" sizes="120x120" href="{{ route "appIcon" "filename" "icon-120.png" }}">
  172. <link rel="apple-touch-icon" sizes="152x152" href="{{ route "appIcon" "filename" "icon-152.png" }}">
  173. <link rel="apple-touch-icon" sizes="167x167" href="{{ route "appIcon" "filename" "icon-167.png" }}">
  174. <link rel="apple-touch-icon" sizes="180x180" href="{{ route "appIcon" "filename" "icon-180.png" }}">
  175. {{ if .csrf }}
  176. <meta name="X-CSRF-Token" value="{{ .csrf }}">
  177. {{ end }}
  178. <meta name="theme-color" content="{{ theme_color .theme }}">
  179. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .theme }}?{{ .theme_checksum }}">
  180. <script type="text/javascript" src="{{ route "javascript" "name" "app" }}?{{ .app_js_checksum }}" defer></script>
  181. <script type="text/javascript" src="{{ route "javascript" "name" "sw" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script>
  182. </head>
  183. <body
  184. data-entries-status-url="{{ route "updateEntriesStatus" }}"
  185. {{ if .user }}{{ if not .user.KeyboardShortcuts }}data-disable-keyboard-shortcuts="true"{{ end }}{{ end }}>
  186. <div class="toast-wrap">
  187. <span class="toast-msg"></span>
  188. </div>
  189. {{ if .user }}
  190. <header class="header">
  191. <nav>
  192. <div class="logo">
  193. <a href="{{ route "unread" }}">Mini<span>flux</span></a>
  194. </div>
  195. <ul>
  196. <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}">
  197. <a href="{{ route "unread" }}" data-page="unread">{{ t "menu.unread" }}
  198. {{ if gt .countUnread 0 }}
  199. <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
  200. {{ end }}
  201. </a>
  202. </li>
  203. <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g b" }}">
  204. <a href="{{ route "starred" }}" data-page="starred">{{ t "menu.starred" }}</a>
  205. </li>
  206. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g h" }}">
  207. <a href="{{ route "history" }}" data-page="history">{{ t "menu.history" }}</a>
  208. </li>
  209. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g f" }}">
  210. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "menu.feeds" }}
  211. {{ if gt .countErrorFeeds 0 }}
  212. <span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span>
  213. {{ end }}
  214. </a>
  215. </li>
  216. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g c" }}">
  217. <a href="{{ route "categories" }}" data-page="categories">{{ t "menu.categories" }}</a>
  218. </li>
  219. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}">
  220. <a href="{{ route "settings" }}" data-page="settings">{{ t "menu.settings" }}</a>
  221. </li>
  222. <li>
  223. <a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ t "menu.logout" }}</a>
  224. </li>
  225. </ul>
  226. <div class="search">
  227. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  228. <a href="#" data-action="search">&laquo;&nbsp;{{ t "search.label" }}</a>
  229. </div>
  230. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  231. <input type="search" name="q" id="search-input" placeholder="{{ t "search.placeholder" }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  232. </form>
  233. </div>
  234. </nav>
  235. </header>
  236. {{ end }}
  237. {{ if .flashMessage }}
  238. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  239. {{ end }}
  240. {{ if .flashErrorMessage }}
  241. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  242. {{ end }}
  243. <main>
  244. {{template "content" .}}
  245. </main>
  246. <template id="keyboard-shortcuts">
  247. <div id="modal-left">
  248. <a href="#" class="btn-close-modal">x</a>
  249. <h3>{{ t "page.keyboard_shortcuts.title" }}</h3>
  250. <div class="keyboard-shortcuts">
  251. <p>{{ t "page.keyboard_shortcuts.subtitle.sections" }}</p>
  252. <ul>
  253. <li>{{ t "page.keyboard_shortcuts.go_to_unread" }} = <strong>g + u</strong></li>
  254. <li>{{ t "page.keyboard_shortcuts.go_to_starred" }} = <strong>g + b</strong></li>
  255. <li>{{ t "page.keyboard_shortcuts.go_to_history" }} = <strong>g + h</strong></li>
  256. <li>{{ t "page.keyboard_shortcuts.go_to_feeds" }} = <strong>g + f</strong></li>
  257. <li>{{ t "page.keyboard_shortcuts.go_to_categories" }} = <strong>g + c</strong></li>
  258. <li>{{ t "page.keyboard_shortcuts.go_to_settings" }} = <strong>g + s</strong></li>
  259. <li>{{ t "page.keyboard_shortcuts.show_keyboard_shortcuts" }} = <strong>?</strong></li>
  260. </ul>
  261. <p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p>
  262. <ul>
  263. <li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>k</strong>, <strong>◄</strong></li>
  264. <li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>j</strong>, <strong>►</strong></li>
  265. <li>{{ t "page.keyboard_shortcuts.go_to_feed" }} = <strong>g + f</strong></li>
  266. </ul>
  267. <p>{{ t "page.keyboard_shortcuts.subtitle.pages" }}</p>
  268. <ul>
  269. <li>{{ t "page.keyboard_shortcuts.go_to_previous_page" }} = <strong>h</strong></li>
  270. <li>{{ t "page.keyboard_shortcuts.go_to_next_page" }} = <strong>l</strong></li>
  271. </ul>
  272. <p>{{ t "page.keyboard_shortcuts.subtitle.actions" }}</p>
  273. <ul>
  274. <li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong></li>
  275. <li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li>
  276. <li>{{ t "page.keyboard_shortcuts.open_original_same_window" }} = <strong>V</strong></li>
  277. <li>{{ t "page.keyboard_shortcuts.open_comments" }} = <strong>c</strong></li>
  278. <li>{{ t "page.keyboard_shortcuts.open_comments_same_window" }} = <strong>C</strong></li>
  279. <li>{{ t "page.keyboard_shortcuts.toggle_read_status" }} = <strong>m</strong></li>
  280. <li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li>
  281. <li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
  282. <li>{{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = <strong>f</strong></li>
  283. <li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li>
  284. <li>{{ t "page.keyboard_shortcuts.remove_feed" }} = <strong>#</strong></li>
  285. <li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li>
  286. <li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li>
  287. </ul>
  288. </div>
  289. </div>
  290. </template>
  291. </body>
  292. </html>
  293. {{ end }}
  294. `,
  295. "pagination": `{{ define "pagination" }}
  296. <div class="pagination">
  297. <div class="pagination-prev">
  298. {{ if .ShowPrev }}
  299. <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>
  300. {{ else }}
  301. {{ t "pagination.previous" }}
  302. {{ end }}
  303. </div>
  304. <div class="pagination-next">
  305. {{ if .ShowNext }}
  306. <a href="{{ .Route }}?offset={{ .NextOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}" data-page="next">{{ t "pagination.next" }}</a>
  307. {{ else }}
  308. {{ t "pagination.next" }}
  309. {{ end }}
  310. </div>
  311. </div>
  312. {{ end }}
  313. `,
  314. "settings_menu": `{{ define "settings_menu" }}
  315. <ul>
  316. <li>
  317. <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a>
  318. </li>
  319. <li>
  320. <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a>
  321. </li>
  322. <li>
  323. <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a>
  324. </li>
  325. {{ if .user.IsAdmin }}
  326. <li>
  327. <a href="{{ route "users" }}">{{ t "menu.users" }}</a>
  328. </li>
  329. <li>
  330. <a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a>
  331. </li>
  332. {{ end }}
  333. <li>
  334. <a href="{{ route "about" }}">{{ t "menu.about" }}</a>
  335. </li>
  336. </ul>
  337. {{ end }}`,
  338. }
  339. var templateCommonMapChecksums = map[string]string{
  340. "entry_pagination": "4faa91e2eae150c5e4eab4d258e039dfdd413bab7602f0009360e6d52898e353",
  341. "feed_list": "db406e7cb81292ce1d974d63f63270384a286848b2e74fe36bf711b4eb5717dd",
  342. "feed_menu": "318d8662dda5ca9dfc75b909c8461e79c86fb5082df1428f67aaf856f19f4b50",
  343. "item_meta": "d046305e8935ecd8643a94d28af384df29e40fc7ce334123cd057a6522bac23f",
  344. "layout": "a1f67b8908745ee4f9cee6f7bbbb0b242d4dcc101207ad4a9d67242b45683299",
  345. "pagination": "3386e90c6e1230311459e9a484629bc5d5bf39514a75ef2e73bbbc61142f7abb",
  346. "settings_menu": "78e5a487ede18610b23db74184dab023170f9e083cc0625bc2c874d1eea1a4ce",
  347. }