layout.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {{ define "base" }}
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  8. <meta name="mobile-web-app-capable" content="yes">
  9. <meta name="apple-mobile-web-app-title" content="Miniflux">
  10. <link rel="manifest" href="{{ route "webManifest" }}">
  11. <meta name="robots" content="noindex,nofollow">
  12. <meta name="referrer" content="no-referrer">
  13. <!-- Favicons -->
  14. <link rel="icon" type="image/png" sizes="16x16" href="{{ route "appIcon" "filename" "favicon-16.png" }}">
  15. <link rel="icon" type="image/png" sizes="32x32" href="{{ route "appIcon" "filename" "favicon-32.png" }}">
  16. <!-- Android icons -->
  17. <link rel="icon" type="image/png" sizes="128x128" href="{{ route "appIcon" "filename" "icon-128.png" }}">
  18. <link rel="icon" type="image/png" sizes="192x192" href="{{ route "appIcon" "filename" "icon-192.png" }}">
  19. <!-- iOS icons -->
  20. <link rel="apple-touch-icon" sizes="120x120" href="{{ route "appIcon" "filename" "icon-120.png" }}">
  21. <link rel="apple-touch-icon" sizes="152x152" href="{{ route "appIcon" "filename" "icon-152.png" }}">
  22. <link rel="apple-touch-icon" sizes="167x167" href="{{ route "appIcon" "filename" "icon-167.png" }}">
  23. <link rel="apple-touch-icon" sizes="180x180" href="{{ route "appIcon" "filename" "icon-180.png" }}">
  24. {{ if .csrf }}
  25. <meta name="X-CSRF-Token" value="{{ .csrf }}">
  26. {{ end }}
  27. <title>{{template "title" .}} - Miniflux</title>
  28. {{ if .user }}
  29. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .user.Theme }}">
  30. {{ else }}
  31. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" "default" }}">
  32. {{ end }}
  33. <script type="text/javascript" src="{{ route "javascript" "name" "app" }}" defer></script>
  34. <script type="text/javascript" src="{{ route "javascript" "name" "sw" }}" defer id="service-worker-script"></script>
  35. </head>
  36. <body data-entries-status-url="{{ route "updateEntriesStatus" }}">
  37. {{ if .user }}
  38. <header class="header">
  39. <nav>
  40. <div class="logo">
  41. <a href="{{ route "unread" }}">Mini<span>flux</span></a>
  42. </div>
  43. <ul>
  44. <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g u" }}">
  45. <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }}
  46. {{ if gt .countUnread 0 }}
  47. <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
  48. {{ end }}
  49. </a>
  50. </li>
  51. <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g b" }}">
  52. <a href="{{ route "starred" }}" data-page="starred">{{ t "Starred" }}</a>
  53. </li>
  54. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g h" }}">
  55. <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a>
  56. </li>
  57. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g f" }}">
  58. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }}</a>
  59. </li>
  60. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g c" }}">
  61. <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a>
  62. </li>
  63. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g s" }}">
  64. <a href="{{ route "settings" }}" data-page="settings">{{ t "Settings" }}</a>
  65. </li>
  66. <li>
  67. <a href="{{ route "logout" }}" title="{{ t "Logged as %s" .user.Username }}">{{ t "Logout" }}</a>
  68. </li>
  69. </ul>
  70. <div class="search">
  71. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  72. <a href="#" data-action="search">&laquo;&nbsp;{{ t "Search" }}</a>
  73. </div>
  74. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  75. <input type="search" name="q" id="search-input" placeholder="{{ t "Search..." }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  76. </form>
  77. </div>
  78. </nav>
  79. </header>
  80. {{ end }}
  81. {{ if .flashMessage }}
  82. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  83. {{ end }}
  84. {{ if .flashErrorMessage }}
  85. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  86. {{ end }}
  87. <main>
  88. {{template "content" .}}
  89. </main>
  90. <template id="keyboard-shortcuts">
  91. <div id="modal-left">
  92. <a href="#" class="btn-close-modal">x</a>
  93. <h3>{{ t "Keyboard Shortcuts" }}</h3>
  94. <div class="keyboard-shortcuts">
  95. <p>{{ t "Sections Navigation" }}</p>
  96. <ul>
  97. <li>{{ t "Go to unread" }} = <strong>g + u</strong></li>
  98. <li>{{ t "Go to bookmarks" }} = <strong>g + b</strong></li>
  99. <li>{{ t "Go to history" }} = <strong>g + h</strong></li>
  100. <li>{{ t "Go to feeds" }} = <strong>g + f</strong></li>
  101. <li>{{ t "Go to categories" }} = <strong>g + c</strong></li>
  102. <li>{{ t "Go to settings" }} = <strong>g + s</strong></li>
  103. <li>{{ t "Show keyboard shortcuts" }} = <strong>?</strong></li>
  104. </ul>
  105. <p>{{ t "Items Navigation" }}</p>
  106. <ul>
  107. <li>{{ t "Go to previous item" }} = <strong>p {{ t "or" }} j {{ t "or" }} ◄</strong></li>
  108. <li>{{ t "Go to next item" }} = <strong>n {{ t "or" }} k {{ t "or" }} ►</strong></li>
  109. </ul>
  110. <p>{{ t "Pages Navigation" }}</p>
  111. <ul>
  112. <li>{{ t "Go to previous page" }} = <strong>h</strong></li>
  113. <li>{{ t "Go to next page" }} = <strong>l</strong></li>
  114. </ul>
  115. <p>{{ t "Actions" }}</p>
  116. <ul>
  117. <li>{{ t "Open selected item" }} = <strong>o</strong></li>
  118. <li>{{ t "Open original link" }} = <strong>v</strong></li>
  119. <li>{{ t "Toggle read/unread" }} = <strong>m</strong></li>
  120. <li>{{ t "Mark current page as read" }} = <strong>A</strong></li>
  121. <li>{{ t "Download original content" }} = <strong>d</strong></li>
  122. <li>{{ t "Toggle bookmark" }} = <strong>f</strong></li>
  123. <li>{{ t "Save article" }} = <strong>s</strong></li>
  124. <li>{{ t "Set focus on search form" }} = <strong>/</strong></li>
  125. <li>{{ t "Close modal dialog" }} = <strong>Esc</strong></li>
  126. </ul>
  127. </div>
  128. </div>
  129. </template>
  130. </body>
  131. </html>
  132. {{ end }}