layout.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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 "Keyboard Shortcut: %s" "g u" }}">
  42. <a href="{{ route "unread" }}" data-page="unread">{{ t "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 "Keyboard Shortcut: %s" "g b" }}">
  49. <a href="{{ route "starred" }}" data-page="starred">{{ t "Starred" }}</a>
  50. </li>
  51. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g h" }}">
  52. <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a>
  53. </li>
  54. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g f" }}">
  55. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }}</a>
  56. </li>
  57. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g c" }}">
  58. <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a>
  59. </li>
  60. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g s" }}">
  61. <a href="{{ route "settings" }}" data-page="settings">{{ t "Settings" }}</a>
  62. </li>
  63. <li>
  64. <a href="{{ route "logout" }}" title="{{ t "Logged as %s" .user.Username }}">{{ t "Logout" }}</a>
  65. </li>
  66. </ul>
  67. <div class="search">
  68. <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
  69. <a href="#" data-action="search">&laquo;&nbsp;{{ t "Search" }}</a>
  70. </div>
  71. <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}">
  72. <input type="search" name="q" id="search-input" placeholder="{{ t "Search..." }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>
  73. </form>
  74. </div>
  75. </nav>
  76. </header>
  77. {{ end }}
  78. {{ if .flashMessage }}
  79. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  80. {{ end }}
  81. {{ if .flashErrorMessage }}
  82. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  83. {{ end }}
  84. <main>
  85. {{template "content" .}}
  86. </main>
  87. <template id="keyboard-shortcuts">
  88. <div id="modal-left">
  89. <a href="#" class="btn-close-modal">x</a>
  90. <h3>{{ t "Keyboard Shortcuts" }}</h3>
  91. <div class="keyboard-shortcuts">
  92. <p>{{ t "Sections Navigation" }}</p>
  93. <ul>
  94. <li>{{ t "Go to unread" }} = <strong>g + u</strong></li>
  95. <li>{{ t "Go to bookmarks" }} = <strong>g + b</strong></li>
  96. <li>{{ t "Go to history" }} = <strong>g + h</strong></li>
  97. <li>{{ t "Go to feeds" }} = <strong>g + f</strong></li>
  98. <li>{{ t "Go to categories" }} = <strong>g + c</strong></li>
  99. <li>{{ t "Go to settings" }} = <strong>g + s</strong></li>
  100. <li>{{ t "Show keyboard shortcuts" }} = <strong>?</strong></li>
  101. </ul>
  102. <p>{{ t "Items Navigation" }}</p>
  103. <ul>
  104. <li>{{ t "Go to previous item" }} = <strong>p {{ t "or" }} j {{ t "or" }} ◄</strong></li>
  105. <li>{{ t "Go to next item" }} = <strong>n {{ t "or" }} k {{ t "or" }} ►</strong></li>
  106. </ul>
  107. <p>{{ t "Pages Navigation" }}</p>
  108. <ul>
  109. <li>{{ t "Go to previous page" }} = <strong>h</strong></li>
  110. <li>{{ t "Go to next page" }} = <strong>l</strong></li>
  111. </ul>
  112. <p>{{ t "Actions" }}</p>
  113. <ul>
  114. <li>{{ t "Open selected item" }} = <strong>o</strong></li>
  115. <li>{{ t "Open original link" }} = <strong>v</strong></li>
  116. <li>{{ t "Toggle read/unread" }} = <strong>m</strong></li>
  117. <li>{{ t "Mark current page as read" }} = <strong>A</strong></li>
  118. <li>{{ t "Download original content" }} = <strong>d</strong></li>
  119. <li>{{ t "Toggle bookmark" }} = <strong>f</strong></li>
  120. <li>{{ t "Save article" }} = <strong>s</strong></li>
  121. <li>{{ t "Set focus on search form" }} = <strong>/</strong></li>
  122. <li>{{ t "Close modal dialog" }} = <strong>Esc</strong></li>
  123. </ul>
  124. </div>
  125. </div>
  126. </template>
  127. </body>
  128. </html>
  129. {{ end }}