layout.html 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. <!-- Favicons -->
  15. <link rel="icon" type="image/png" sizes="16x16" href="{{ route "appIcon" "filename" "favicon-16.png" }}">
  16. <link rel="icon" type="image/png" sizes="32x32" href="{{ route "appIcon" "filename" "favicon-32.png" }}">
  17. <!-- Android icons -->
  18. <link rel="icon" type="image/png" sizes="128x128" href="{{ route "appIcon" "filename" "icon-128.png" }}">
  19. <link rel="icon" type="image/png" sizes="192x192" href="{{ route "appIcon" "filename" "icon-192.png" }}">
  20. <!-- iOS icons -->
  21. <link rel="apple-touch-icon" sizes="120x120" href="{{ route "appIcon" "filename" "icon-120.png" }}">
  22. <link rel="apple-touch-icon" sizes="152x152" href="{{ route "appIcon" "filename" "icon-152.png" }}">
  23. <link rel="apple-touch-icon" sizes="167x167" href="{{ route "appIcon" "filename" "icon-167.png" }}">
  24. <link rel="apple-touch-icon" sizes="180x180" href="{{ route "appIcon" "filename" "icon-180.png" }}">
  25. {{ if .csrf }}
  26. <meta name="X-CSRF-Token" value="{{ .csrf }}">
  27. {{ end }}
  28. <meta name="theme-color" content="{{ theme_color .theme }}">
  29. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .theme }}?{{ .theme_checksum }}">
  30. <script type="text/javascript" src="{{ route "javascript" "name" "app" }}?{{ .app_js_checksum }}" defer></script>
  31. <script type="text/javascript" src="{{ route "javascript" "name" "sw" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script>
  32. </head>
  33. <body
  34. data-entries-status-url="{{ route "updateEntriesStatus" }}"
  35. {{ if .user }}{{ if not .user.KeyboardShortcuts }}data-disable-keyboard-shortcuts="true"{{ end }}{{ end }}>
  36. <div class="toast-wrap">
  37. <span class="toast-msg"></span>
  38. </div>
  39. {{ if .user }}
  40. <header class="header">
  41. <nav>
  42. <div class="logo">
  43. <a href="{{ route "unread" }}">Mini<span>flux</span></a>
  44. </div>
  45. <ul>
  46. <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}">
  47. <a href="{{ route "unread" }}" data-page="unread">{{ t "menu.unread" }}
  48. {{ if gt .countUnread 0 }}
  49. <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
  50. {{ end }}
  51. </a>
  52. </li>
  53. <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g b" }}">
  54. <a href="{{ route "starred" }}" data-page="starred">{{ t "menu.starred" }}</a>
  55. </li>
  56. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g h" }}">
  57. <a href="{{ route "history" }}" data-page="history">{{ t "menu.history" }}</a>
  58. </li>
  59. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g f" }}">
  60. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "menu.feeds" }}
  61. {{ if gt .countErrorFeeds 0 }}
  62. <span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span>
  63. {{ end }}
  64. </a>
  65. </li>
  66. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g c" }}">
  67. <a href="{{ route "categories" }}" data-page="categories">{{ t "menu.categories" }}</a>
  68. </li>
  69. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}">
  70. <a href="{{ route "settings" }}" data-page="settings">{{ t "menu.settings" }}</a>
  71. </li>
  72. <li>
  73. <a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ t "menu.logout" }}</a>
  74. </li>
  75. </ul>
  76. <div class="search">
  77. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  78. <a href="#" data-action="search">&laquo;&nbsp;{{ t "search.label" }}</a>
  79. </div>
  80. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  81. <input type="search" name="q" id="search-input" placeholder="{{ t "search.placeholder" }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  82. </form>
  83. </div>
  84. </nav>
  85. </header>
  86. {{ end }}
  87. {{ if .flashMessage }}
  88. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  89. {{ end }}
  90. {{ if .flashErrorMessage }}
  91. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  92. {{ end }}
  93. <main>
  94. {{template "content" .}}
  95. </main>
  96. <template id="keyboard-shortcuts">
  97. <div id="modal-left">
  98. <a href="#" class="btn-close-modal">x</a>
  99. <h3>{{ t "page.keyboard_shortcuts.title" }}</h3>
  100. <div class="keyboard-shortcuts">
  101. <p>{{ t "page.keyboard_shortcuts.subtitle.sections" }}</p>
  102. <ul>
  103. <li>{{ t "page.keyboard_shortcuts.go_to_unread" }} = <strong>g + u</strong></li>
  104. <li>{{ t "page.keyboard_shortcuts.go_to_starred" }} = <strong>g + b</strong></li>
  105. <li>{{ t "page.keyboard_shortcuts.go_to_history" }} = <strong>g + h</strong></li>
  106. <li>{{ t "page.keyboard_shortcuts.go_to_feeds" }} = <strong>g + f</strong></li>
  107. <li>{{ t "page.keyboard_shortcuts.go_to_categories" }} = <strong>g + c</strong></li>
  108. <li>{{ t "page.keyboard_shortcuts.go_to_settings" }} = <strong>g + s</strong></li>
  109. <li>{{ t "page.keyboard_shortcuts.show_keyboard_shortcuts" }} = <strong>?</strong></li>
  110. </ul>
  111. <p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p>
  112. <ul>
  113. <li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>k</strong>, <strong>◄</strong></li>
  114. <li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>j</strong>, <strong>►</strong></li>
  115. <li>{{ t "page.keyboard_shortcuts.go_to_feed" }} = <strong>g + f</strong></li>
  116. </ul>
  117. <p>{{ t "page.keyboard_shortcuts.subtitle.pages" }}</p>
  118. <ul>
  119. <li>{{ t "page.keyboard_shortcuts.go_to_previous_page" }} = <strong>h</strong></li>
  120. <li>{{ t "page.keyboard_shortcuts.go_to_next_page" }} = <strong>l</strong></li>
  121. </ul>
  122. <p>{{ t "page.keyboard_shortcuts.subtitle.actions" }}</p>
  123. <ul>
  124. <li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong></li>
  125. <li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li>
  126. <li>{{ t "page.keyboard_shortcuts.toggle_read_status" }} = <strong>m</strong></li>
  127. <li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li>
  128. <li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
  129. <li>{{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = <strong>f</strong></li>
  130. <li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li>
  131. <li>{{ t "page.keyboard_shortcuts.remove_feed" }} = <strong>#</strong></li>
  132. <li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li>
  133. <li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li>
  134. </ul>
  135. </div>
  136. </div>
  137. </template>
  138. </body>
  139. </html>
  140. {{ end }}