common.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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.Title }}">{{ domain .entry.Feed.SiteURL }}</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. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  78. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  79. <meta name="mobile-web-app-capable" content="yes">
  80. <meta name="apple-mobile-web-app-title" content="Miniflux">
  81. <link rel="manifest" href="{{ route "webManifest" }}">
  82. <meta name="robots" content="noindex,nofollow">
  83. <meta name="referrer" content="no-referrer">
  84. <link rel="icon" type="image/png" href="{{ route "appIcon" "filename" "favicon.png" }}">
  85. <link rel="apple-touch-icon" href="{{ route "appIcon" "filename" "touch-icon-iphone.png" }}">
  86. <link rel="apple-touch-icon" sizes="72x72" href="{{ route "appIcon" "filename" "touch-icon-ipad.png" }}">
  87. <link rel="apple-touch-icon" sizes="114x114" href="{{ route "appIcon" "filename" "touch-icon-iphone-retina.png" }}">
  88. <link rel="apple-touch-icon" sizes="144x144" href="{{ route "appIcon" "filename" "touch-icon-ipad-retina.png" }}">
  89. <link rel="shortcut icon" type="image/x-icon" href="{{ route "favicon" }}">
  90. {{ if .csrf }}
  91. <meta name="X-CSRF-Token" value="{{ .csrf }}">
  92. {{ end }}
  93. <title>{{template "title" .}} - Miniflux</title>
  94. {{ if .user }}
  95. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .user.Theme }}">
  96. {{ else }}
  97. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" "default" }}">
  98. {{ end }}
  99. <script type="text/javascript" src="{{ route "javascript" }}" defer></script>
  100. </head>
  101. <body data-entries-status-url="{{ route "updateEntriesStatus" }}">
  102. {{ if .user }}
  103. <header class="header">
  104. <nav>
  105. <div class="logo">
  106. <a href="{{ route "unread" }}">Mini<span>flux</span></a>
  107. </div>
  108. <ul>
  109. <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g u" }}">
  110. <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }}
  111. {{ if gt .countUnread 0 }}
  112. <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
  113. {{ end }}
  114. </a>
  115. </li>
  116. <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g b" }}">
  117. <a href="{{ route "starred" }}" data-page="starred">{{ t "Starred" }}</a>
  118. </li>
  119. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g h" }}">
  120. <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a>
  121. </li>
  122. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g f" }}">
  123. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }}</a>
  124. </li>
  125. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g c" }}">
  126. <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a>
  127. </li>
  128. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g s" }}">
  129. <a href="{{ route "settings" }}" data-page="settings">{{ t "Settings" }}</a>
  130. </li>
  131. <li>
  132. <a href="{{ route "logout" }}" title="{{ t "Logged as %s" .user.Username }}">{{ t "Logout" }}</a>
  133. </li>
  134. </ul>
  135. <div class="search">
  136. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  137. <a href="#" data-action="search">&laquo;&nbsp;{{ t "Search" }}</a>
  138. </div>
  139. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  140. <input type="search" name="q" id="search-input" placeholder="{{ t "Search..." }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  141. </form>
  142. </div>
  143. </nav>
  144. </header>
  145. {{ end }}
  146. {{ if .flashMessage }}
  147. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  148. {{ end }}
  149. {{ if .flashErrorMessage }}
  150. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  151. {{ end }}
  152. <main>
  153. {{template "content" .}}
  154. </main>
  155. <template id="keyboard-shortcuts">
  156. <div id="modal-left">
  157. <a href="#" class="btn-close-modal">x</a>
  158. <h3>{{ t "Keyboard Shortcuts" }}</h3>
  159. <div class="keyboard-shortcuts">
  160. <p>{{ t "Sections Navigation" }}</p>
  161. <ul>
  162. <li>{{ t "Go to unread" }} = <strong>g + u</strong></li>
  163. <li>{{ t "Go to bookmarks" }} = <strong>g + b</strong></li>
  164. <li>{{ t "Go to history" }} = <strong>g + h</strong></li>
  165. <li>{{ t "Go to feeds" }} = <strong>g + f</strong></li>
  166. <li>{{ t "Go to categories" }} = <strong>g + c</strong></li>
  167. <li>{{ t "Go to settings" }} = <strong>g + s</strong></li>
  168. <li>{{ t "Show keyboard shortcuts" }} = <strong>?</strong></li>
  169. </ul>
  170. <p>{{ t "Items Navigation" }}</p>
  171. <ul>
  172. <li>{{ t "Go to previous item" }} = <strong>p {{ t "or" }} j {{ t "or" }} ◄</strong></li>
  173. <li>{{ t "Go to next item" }} = <strong>n {{ t "or" }} k {{ t "or" }} ►</strong></li>
  174. </ul>
  175. <p>{{ t "Pages Navigation" }}</p>
  176. <ul>
  177. <li>{{ t "Go to previous page" }} = <strong>h</strong></li>
  178. <li>{{ t "Go to next page" }} = <strong>l</strong></li>
  179. </ul>
  180. <p>{{ t "Actions" }}</p>
  181. <ul>
  182. <li>{{ t "Open selected item" }} = <strong>o</strong></li>
  183. <li>{{ t "Open original link" }} = <strong>v</strong></li>
  184. <li>{{ t "Toggle read/unread" }} = <strong>m</strong></li>
  185. <li>{{ t "Mark current page as read" }} = <strong>A</strong></li>
  186. <li>{{ t "Download original content" }} = <strong>d</strong></li>
  187. <li>{{ t "Toggle bookmark" }} = <strong>f</strong></li>
  188. <li>{{ t "Save article" }} = <strong>s</strong></li>
  189. <li>{{ t "Set focus on search form" }} = <strong>/</strong></li>
  190. <li>{{ t "Close modal dialog" }} = <strong>Esc</strong></li>
  191. </ul>
  192. </div>
  193. </div>
  194. </template>
  195. </body>
  196. </html>
  197. {{ end }}
  198. `,
  199. "pagination": `{{ define "pagination" }}
  200. <div class="pagination">
  201. <div class="pagination-prev">
  202. {{ if .ShowPrev }}
  203. <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>
  204. {{ else }}
  205. {{ t "Previous" }}
  206. {{ end }}
  207. </div>
  208. <div class="pagination-next">
  209. {{ if .ShowNext }}
  210. <a href="{{ .Route }}?offset={{ .NextOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}" data-page="next">{{ t "Next" }}</a>
  211. {{ else }}
  212. {{ t "Next" }}
  213. {{ end }}
  214. </div>
  215. </div>
  216. {{ end }}
  217. `,
  218. }
  219. var templateCommonMapChecksums = map[string]string{
  220. "entry_pagination": "756ef122f3ebc73754b5fc4304bf05e59da0ab4af030b2509ff4c9b4a74096ce",
  221. "item_meta": "6cff8ae243f19dac936e523867d2975f70aa749b2a461ae63f6ebbca94cf7419",
  222. "layout": "27b21c2d8ce341edcc11bf557f73fcd08dad1dfc8d0788c94addbc87f94f2f19",
  223. "pagination": "b592d58ea9d6abf2dc0b158621404cbfaeea5413b1c8b8b9818725963096b196",
  224. }