layout.html 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. {{ define "base" }}
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title>{{template "title" .}} - Miniflux</title>
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  9. <meta name="mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-title" content="Miniflux">
  11. <link rel="manifest" href="{{ route "webManifest" }}" crossorigin="use-credentials"/>
  12. <meta name="robots" content="noindex,nofollow">
  13. <meta name="referrer" content="no-referrer">
  14. <meta name="google" content="notranslate">
  15. <!-- Favicons -->
  16. <link rel="icon" type="image/png" sizes="16x16" href="{{ route "appIcon" "filename" "favicon-16.png" }}">
  17. <link rel="icon" type="image/png" sizes="32x32" href="{{ route "appIcon" "filename" "favicon-32.png" }}">
  18. <!-- Android icons -->
  19. <link rel="icon" type="image/png" sizes="128x128" href="{{ route "appIcon" "filename" "icon-128.png" }}">
  20. <link rel="icon" type="image/png" sizes="192x192" href="{{ route "appIcon" "filename" "icon-192.png" }}">
  21. <!-- iOS icons -->
  22. <link rel="apple-touch-icon" sizes="120x120" href="{{ route "appIcon" "filename" "icon-120.png" }}">
  23. <link rel="apple-touch-icon" sizes="152x152" href="{{ route "appIcon" "filename" "icon-152.png" }}">
  24. <link rel="apple-touch-icon" sizes="167x167" href="{{ route "appIcon" "filename" "icon-167.png" }}">
  25. <link rel="apple-touch-icon" sizes="180x180" href="{{ route "appIcon" "filename" "icon-180.png" }}">
  26. {{ if .csrf }}
  27. <meta name="X-CSRF-Token" value="{{ .csrf }}">
  28. {{ end }}
  29. <meta name="theme-color" content="{{ theme_color .theme }}">
  30. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .theme }}?{{ .theme_checksum }}">
  31. {{ if and .user .user.Stylesheet }}
  32. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" "custom_css" }}">
  33. {{ end }}
  34. <script type="text/javascript" src="{{ route "javascript" "name" "app" }}?{{ .app_js_checksum }}" defer></script>
  35. <script type="text/javascript" src="{{ route "javascript" "name" "service-worker" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script>
  36. </head>
  37. <body
  38. data-entries-status-url="{{ route "updateEntriesStatus" }}"
  39. data-refresh-all-feeds-url="{{ route "refreshAllFeeds" }}"
  40. {{ if .user }}{{ if not .user.KeyboardShortcuts }}data-disable-keyboard-shortcuts="true"{{ end }}{{ end }}>
  41. <div class="toast-wrap">
  42. <span class="toast-msg"></span>
  43. </div>
  44. {{ if .user }}
  45. <header class="header">
  46. <nav>
  47. <div class="logo">
  48. <a href="{{ route "unread" }}">Mini<span>flux</span></a>
  49. </div>
  50. <ul>
  51. <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}">
  52. <a href="{{ route "unread" }}" data-page="unread">{{ t "menu.unread" }}
  53. {{ if gt .countUnread 0 }}
  54. <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
  55. {{ end }}
  56. </a>
  57. </li>
  58. <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g b" }}">
  59. <a href="{{ route "starred" }}" data-page="starred">{{ t "menu.starred" }}</a>
  60. </li>
  61. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g h" }}">
  62. <a href="{{ route "history" }}" data-page="history">{{ t "menu.history" }}</a>
  63. </li>
  64. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g f" }}">
  65. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "menu.feeds" }}
  66. {{ if gt .countErrorFeeds 0 }}
  67. <span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span>
  68. {{ end }}
  69. </a>
  70. </li>
  71. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g c" }}">
  72. <a href="{{ route "categories" }}" data-page="categories">{{ t "menu.categories" }}</a>
  73. </li>
  74. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}">
  75. <a href="{{ route "settings" }}" data-page="settings">{{ t "menu.settings" }}</a>
  76. </li>
  77. <li>
  78. <a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ t "menu.logout" }}</a>
  79. </li>
  80. </ul>
  81. <div class="search">
  82. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  83. <a href="#" data-action="search">&laquo;&nbsp;{{ t "search.label" }}</a>
  84. </div>
  85. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  86. <input type="search" name="q" id="search-input" placeholder="{{ t "search.placeholder" }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  87. </form>
  88. </div>
  89. </nav>
  90. </header>
  91. {{ end }}
  92. {{ if .flashMessage }}
  93. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  94. {{ end }}
  95. {{ if .flashErrorMessage }}
  96. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  97. {{ end }}
  98. <main>
  99. {{template "content" .}}
  100. </main>
  101. <template id="keyboard-shortcuts">
  102. <div id="modal-left">
  103. <a href="#" class="btn-close-modal">x</a>
  104. <h3>{{ t "page.keyboard_shortcuts.title" }}</h3>
  105. <div class="keyboard-shortcuts">
  106. <p>{{ t "page.keyboard_shortcuts.subtitle.sections" }}</p>
  107. <ul>
  108. <li>{{ t "page.keyboard_shortcuts.go_to_unread" }} = <strong>g + u</strong></li>
  109. <li>{{ t "page.keyboard_shortcuts.go_to_starred" }} = <strong>g + b</strong></li>
  110. <li>{{ t "page.keyboard_shortcuts.go_to_history" }} = <strong>g + h</strong></li>
  111. <li>{{ t "page.keyboard_shortcuts.go_to_feeds" }} = <strong>g + f</strong></li>
  112. <li>{{ t "page.keyboard_shortcuts.go_to_categories" }} = <strong>g + c</strong></li>
  113. <li>{{ t "page.keyboard_shortcuts.go_to_settings" }} = <strong>g + s</strong></li>
  114. <li>{{ t "page.keyboard_shortcuts.show_keyboard_shortcuts" }} = <strong>?</strong></li>
  115. </ul>
  116. <p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p>
  117. <ul>
  118. <li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>k</strong>, <strong>◄</strong></li>
  119. <li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>j</strong>, <strong>►</strong></li>
  120. <li>{{ t "page.keyboard_shortcuts.go_to_feed" }} = <strong>F</strong></li>
  121. </ul>
  122. <p>{{ t "page.keyboard_shortcuts.subtitle.pages" }}</p>
  123. <ul>
  124. <li>{{ t "page.keyboard_shortcuts.go_to_previous_page" }} = <strong>h</strong></li>
  125. <li>{{ t "page.keyboard_shortcuts.go_to_next_page" }} = <strong>l</strong></li>
  126. </ul>
  127. <p>{{ t "page.keyboard_shortcuts.subtitle.actions" }}</p>
  128. <ul>
  129. <li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong></li>
  130. <li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li>
  131. <li>{{ t "page.keyboard_shortcuts.open_original_same_window" }} = <strong>V</strong></li>
  132. <li>{{ t "page.keyboard_shortcuts.open_comments" }} = <strong>c</strong></li>
  133. <li>{{ t "page.keyboard_shortcuts.open_comments_same_window" }} = <strong>C</strong></li>
  134. <li>{{ t "page.keyboard_shortcuts.toggle_read_status" }} = <strong>m</strong></li>
  135. <li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li>
  136. <li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
  137. <li>{{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = <strong>f</strong></li>
  138. <li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li>
  139. <li>{{ t "page.keyboard_shortcuts.scroll_item_to_top" }} = <strong>z + t</strong></li>
  140. <li>{{ t "page.keyboard_shortcuts.refresh_all_feeds" }} = <strong>R</strong></li>
  141. <li>{{ t "page.keyboard_shortcuts.remove_feed" }} = <strong>#</strong></li>
  142. <li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li>
  143. <li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li>
  144. </ul>
  145. </div>
  146. </div>
  147. </template>
  148. <template id="icon_read">
  149. {{ template "icon_read" }}
  150. </template>
  151. <template id="icon_unread">
  152. {{ template "icon_unread" }}
  153. </template>
  154. <template id="icon_star">
  155. {{ template "icon_star" }}
  156. </template>
  157. <template id="icon_unstar">
  158. {{ template "icon_unstar" }}
  159. </template>
  160. </body>
  161. </html>
  162. {{ end }}