layout.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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" }}">
  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 data-entries-status-url="{{ route "updateEntriesStatus" }}">
  34. {{ if .user }}
  35. <header class="header">
  36. <nav>
  37. <div class="logo">
  38. <a href="{{ route "unread" }}">Mini<span>flux</span></a>
  39. </div>
  40. <ul>
  41. <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}">
  42. <a href="{{ route "unread" }}" data-page="unread">{{ t "menu.unread" }}
  43. {{ if gt .countUnread 0 }}
  44. <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
  45. {{ end }}
  46. </a>
  47. </li>
  48. <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g b" }}">
  49. <a href="{{ route "starred" }}" data-page="starred">{{ t "menu.starred" }}</a>
  50. </li>
  51. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g h" }}">
  52. <a href="{{ route "history" }}" data-page="history">{{ t "menu.history" }}</a>
  53. </li>
  54. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g f" }}">
  55. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "menu.feeds" }}
  56. {{ if gt .countErrorFeeds 0 }}
  57. <span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span>
  58. {{ end }}
  59. </a>
  60. </li>
  61. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g c" }}">
  62. <a href="{{ route "categories" }}" data-page="categories">{{ t "menu.categories" }}</a>
  63. </li>
  64. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}">
  65. <a href="{{ route "settings" }}" data-page="settings">{{ t "menu.settings" }}</a>
  66. </li>
  67. <li>
  68. <a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ t "menu.logout" }}</a>
  69. </li>
  70. </ul>
  71. <div class="search">
  72. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  73. <a href="#" data-action="search">&laquo;&nbsp;{{ t "search.label" }}</a>
  74. </div>
  75. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  76. <input type="search" name="q" id="search-input" placeholder="{{ t "search.placeholder" }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  77. </form>
  78. </div>
  79. </nav>
  80. </header>
  81. {{ end }}
  82. {{ if .flashMessage }}
  83. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  84. {{ end }}
  85. {{ if .flashErrorMessage }}
  86. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  87. {{ end }}
  88. <main>
  89. {{template "content" .}}
  90. </main>
  91. <template id="keyboard-shortcuts">
  92. <div id="modal-left">
  93. <a href="#" class="btn-close-modal">x</a>
  94. <h3>{{ t "page.keyboard_shortcuts.title" }}</h3>
  95. <div class="keyboard-shortcuts">
  96. <p>{{ t "page.keyboard_shortcuts.subtitle.sections" }}</p>
  97. <ul>
  98. <li>{{ t "page.keyboard_shortcuts.go_to_unread" }} = <strong>g + u</strong></li>
  99. <li>{{ t "page.keyboard_shortcuts.go_to_starred" }} = <strong>g + b</strong></li>
  100. <li>{{ t "page.keyboard_shortcuts.go_to_history" }} = <strong>g + h</strong></li>
  101. <li>{{ t "page.keyboard_shortcuts.go_to_feeds" }} = <strong>g + f</strong></li>
  102. <li>{{ t "page.keyboard_shortcuts.go_to_categories" }} = <strong>g + c</strong></li>
  103. <li>{{ t "page.keyboard_shortcuts.go_to_settings" }} = <strong>g + s</strong></li>
  104. <li>{{ t "page.keyboard_shortcuts.show_keyboard_shortcuts" }} = <strong>?</strong></li>
  105. </ul>
  106. <p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p>
  107. <ul>
  108. <li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>j</strong>, <strong>◄</strong></li>
  109. <li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>k</strong>, <strong>►</strong></li>
  110. </ul>
  111. <p>{{ t "page.keyboard_shortcuts.subtitle.pages" }}</p>
  112. <ul>
  113. <li>{{ t "page.keyboard_shortcuts.go_to_previous_page" }} = <strong>h</strong></li>
  114. <li>{{ t "page.keyboard_shortcuts.go_to_next_page" }} = <strong>l</strong></li>
  115. </ul>
  116. <p>{{ t "page.keyboard_shortcuts.subtitle.actions" }}</p>
  117. <ul>
  118. <li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong></li>
  119. <li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li>
  120. <li>{{ t "page.keyboard_shortcuts.toggle_read_status" }} = <strong>m</strong></li>
  121. <li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li>
  122. <li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li>
  123. <li>{{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = <strong>f</strong></li>
  124. <li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li>
  125. <li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li>
  126. <li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li>
  127. </ul>
  128. </div>
  129. </div>
  130. </template>
  131. </body>
  132. </html>
  133. {{ end }}