common.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. // Code generated by go generate; DO NOT EDIT.
  2. package 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 "Previous" }}</a>
  9. {{ else }}
  10. {{ t "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 "Next" }}</a>
  16. {{ else }}
  17. {{ t "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 "Save this article" }}"
  35. data-save-entry="true"
  36. data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
  37. data-label-loading="{{ t "Saving..." }}"
  38. data-label-done="{{ t "Done!" }}"
  39. >{{ t "Save" }}</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 "Original" }}</a>
  44. </li>
  45. {{ if .entry.CommentsURL }}
  46. <li>
  47. <a href="{{ .entry.CommentsURL }}" title="{{ t "View Comments" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Comments" }}</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 "Saving..." }}"
  55. data-label-star="☆ {{ t "Star" }}"
  56. data-label-unstar="★ {{ t "Unstar" }}"
  57. data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
  58. >{{ if .entry.Starred }}★ {{ t "Unstar" }}{{ else }}☆ {{ t "Star" }}{{ end }}</a>
  59. </li>
  60. <li>
  61. <a href="#"
  62. title="{{ t "Change entry status" }}"
  63. data-toggle-status="true"
  64. data-label-read="✔ {{ t "Read" }}"
  65. data-label-unread="✘ {{ t "Unread" }}"
  66. data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
  67. >{{ if eq .entry.Status "read" }}✘ {{ t "Unread" }}{{ else }}✔ {{ t "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 "Keyboard Shortcut: %s" "g u" }}">
  113. <a href="{{ route "unread" }}" data-page="unread">{{ t "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 "Keyboard Shortcut: %s" "g b" }}">
  120. <a href="{{ route "starred" }}" data-page="starred">{{ t "Starred" }}</a>
  121. </li>
  122. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g h" }}">
  123. <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a>
  124. </li>
  125. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g f" }}">
  126. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }}</a>
  127. </li>
  128. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g c" }}">
  129. <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a>
  130. </li>
  131. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g s" }}">
  132. <a href="{{ route "settings" }}" data-page="settings">{{ t "Settings" }}</a>
  133. </li>
  134. <li>
  135. <a href="{{ route "logout" }}" title="{{ t "Logged as %s" .user.Username }}">{{ t "Logout" }}</a>
  136. </li>
  137. </ul>
  138. <div class="search">
  139. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  140. <a href="#" data-action="search">&laquo;&nbsp;{{ t "Search" }}</a>
  141. </div>
  142. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  143. <input type="search" name="q" id="search-input" placeholder="{{ t "Search..." }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  144. </form>
  145. </div>
  146. </nav>
  147. </header>
  148. {{ end }}
  149. {{ if .flashMessage }}
  150. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  151. {{ end }}
  152. {{ if .flashErrorMessage }}
  153. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  154. {{ end }}
  155. <main>
  156. {{template "content" .}}
  157. </main>
  158. <template id="keyboard-shortcuts">
  159. <div id="modal-left">
  160. <a href="#" class="btn-close-modal">x</a>
  161. <h3>{{ t "Keyboard Shortcuts" }}</h3>
  162. <div class="keyboard-shortcuts">
  163. <p>{{ t "Sections Navigation" }}</p>
  164. <ul>
  165. <li>{{ t "Go to unread" }} = <strong>g + u</strong></li>
  166. <li>{{ t "Go to bookmarks" }} = <strong>g + b</strong></li>
  167. <li>{{ t "Go to history" }} = <strong>g + h</strong></li>
  168. <li>{{ t "Go to feeds" }} = <strong>g + f</strong></li>
  169. <li>{{ t "Go to categories" }} = <strong>g + c</strong></li>
  170. <li>{{ t "Go to settings" }} = <strong>g + s</strong></li>
  171. <li>{{ t "Show keyboard shortcuts" }} = <strong>?</strong></li>
  172. </ul>
  173. <p>{{ t "Items Navigation" }}</p>
  174. <ul>
  175. <li>{{ t "Go to previous item" }} = <strong>p {{ t "or" }} j {{ t "or" }} ◄</strong></li>
  176. <li>{{ t "Go to next item" }} = <strong>n {{ t "or" }} k {{ t "or" }} ►</strong></li>
  177. </ul>
  178. <p>{{ t "Pages Navigation" }}</p>
  179. <ul>
  180. <li>{{ t "Go to previous page" }} = <strong>h</strong></li>
  181. <li>{{ t "Go to next page" }} = <strong>l</strong></li>
  182. </ul>
  183. <p>{{ t "Actions" }}</p>
  184. <ul>
  185. <li>{{ t "Open selected item" }} = <strong>o</strong></li>
  186. <li>{{ t "Open original link" }} = <strong>v</strong></li>
  187. <li>{{ t "Toggle read/unread" }} = <strong>m</strong></li>
  188. <li>{{ t "Mark current page as read" }} = <strong>A</strong></li>
  189. <li>{{ t "Download original content" }} = <strong>d</strong></li>
  190. <li>{{ t "Toggle bookmark" }} = <strong>f</strong></li>
  191. <li>{{ t "Save article" }} = <strong>s</strong></li>
  192. <li>{{ t "Set focus on search form" }} = <strong>/</strong></li>
  193. <li>{{ t "Close modal dialog" }} = <strong>Esc</strong></li>
  194. </ul>
  195. </div>
  196. </div>
  197. </template>
  198. </body>
  199. </html>
  200. {{ end }}
  201. `,
  202. "pagination": `{{ define "pagination" }}
  203. <div class="pagination">
  204. <div class="pagination-prev">
  205. {{ if .ShowPrev }}
  206. <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 "Previous" }}</a>
  207. {{ else }}
  208. {{ t "Previous" }}
  209. {{ end }}
  210. </div>
  211. <div class="pagination-next">
  212. {{ if .ShowNext }}
  213. <a href="{{ .Route }}?offset={{ .NextOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}" data-page="next">{{ t "Next" }}</a>
  214. {{ else }}
  215. {{ t "Next" }}
  216. {{ end }}
  217. </div>
  218. </div>
  219. {{ end }}
  220. `,
  221. }
  222. var templateCommonMapChecksums = map[string]string{
  223. "entry_pagination": "756ef122f3ebc73754b5fc4304bf05e59da0ab4af030b2509ff4c9b4a74096ce",
  224. "item_meta": "2da78476f6c7fb8742c969ad1bfc20b7b61fddf97d79a77baf3cabda52f6fb49",
  225. "layout": "952632cafa23e02e3ae74c33a6606e127ab7bff0b82a2aa848967da8966475a5",
  226. "pagination": "b592d58ea9d6abf2dc0b158621404cbfaeea5413b1c8b8b9818725963096b196",
  227. }