layout.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. <link rel="icon" type="image/png" href="{{ route "appIcon" "filename" "favicon.png" }}">
  14. <link rel="apple-touch-icon" href="{{ route "appIcon" "filename" "touch-icon-iphone.png" }}">
  15. <link rel="apple-touch-icon" sizes="72x72" href="{{ route "appIcon" "filename" "touch-icon-ipad.png" }}">
  16. <link rel="apple-touch-icon" sizes="114x114" href="{{ route "appIcon" "filename" "touch-icon-iphone-retina.png" }}">
  17. <link rel="apple-touch-icon" sizes="144x144" href="{{ route "appIcon" "filename" "touch-icon-ipad-retina.png" }}">
  18. <link rel="shortcut icon" type="image/x-icon" href="{{ route "favicon" }}">
  19. {{ if .csrf }}
  20. <meta name="X-CSRF-Token" value="{{ .csrf }}">
  21. {{ end }}
  22. <title>{{template "title" .}} - Miniflux</title>
  23. {{ if .user }}
  24. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" .user.Theme }}">
  25. {{ else }}
  26. <link rel="stylesheet" type="text/css" href="{{ route "stylesheet" "name" "white" }}">
  27. {{ end }}
  28. <script type="text/javascript" src="{{ route "javascript" }}" defer></script>
  29. </head>
  30. <body data-entries-status-url="{{ route "updateEntriesStatus" }}">
  31. {{ if .user }}
  32. <header class="header">
  33. <nav>
  34. <div class="logo">
  35. <a href="{{ route "unread" }}">Mini<span>flux</span></a>
  36. </div>
  37. <ul>
  38. <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g u" }}">
  39. <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }}</a>
  40. {{ if gt .countUnread 0 }}
  41. <span class="unread-counter" title="Unread articles">({{ .countUnread }})</span>
  42. {{ end }}
  43. </li>
  44. <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g b" }}">
  45. <a href="{{ route "starred" }}" data-page="starred">{{ t "Starred" }}</a>
  46. </li>
  47. <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g h" }}">
  48. <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a>
  49. </li>
  50. <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g f" }}">
  51. <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }}</a>
  52. </li>
  53. <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g c" }}">
  54. <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a>
  55. </li>
  56. <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g s" }}">
  57. <a href="{{ route "settings" }}" data-page="settings">{{ t "Settings" }}</a>
  58. </li>
  59. <li>
  60. <a href="{{ route "logout" }}" title="Logged as {{ .user.Username }}">{{ t "Logout" }}</a>
  61. </li>
  62. </ul>
  63. </nav>
  64. </header>
  65. {{ end }}
  66. {{ if .flashMessage }}
  67. <div class="flash-message alert alert-success">{{ .flashMessage }}</div>
  68. {{ end }}
  69. {{ if .flashErrorMessage }}
  70. <div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
  71. {{ end }}
  72. <main>
  73. {{template "content" .}}
  74. </main>
  75. <template id="keyboard-shortcuts">
  76. <div id="modal-left">
  77. <a href="#" class="btn-close-modal">x</a>
  78. <h3>{{ t "Keyboard Shortcuts" }}</h3>
  79. <div class="keyboard-shortcuts">
  80. <p>{{ t "Sections Navigation" }}</p>
  81. <ul>
  82. <li>{{ t "Go to unread" }} = <strong>g + u</strong></li>
  83. <li>{{ t "Go to bookmarks" }} = <strong>g + b</strong></li>
  84. <li>{{ t "Go to history" }} = <strong>g + h</strong></li>
  85. <li>{{ t "Go to feeds" }} = <strong>g + f</strong></li>
  86. <li>{{ t "Go to categories" }} = <strong>g + c</strong></li>
  87. <li>{{ t "Go to settings" }} = <strong>g + s</strong></li>
  88. <li>{{ t "Show keyboard shortcuts" }} = <strong>?</strong></li>
  89. </ul>
  90. <p>{{ t "Items Navigation" }}</p>
  91. <ul>
  92. <li>{{ t "Go to previous item" }} = <strong>p or j or ◄</strong></li>
  93. <li>{{ t "Go to next item" }} = <strong>n or k or ►</strong></li>
  94. </ul>
  95. <p>{{ t "Pages Navigation" }}</p>
  96. <ul>
  97. <li>{{ t "Go to previous page" }} = <strong>h</strong></li>
  98. <li>{{ t "Go to next page" }} = <strong>l</strong></li>
  99. </ul>
  100. <p>{{ t "Actions" }}</p>
  101. <ul>
  102. <li>{{ t "Open selected item" }} = <strong>o</strong></li>
  103. <li>{{ t "Open original link" }} = <strong>v</strong></li>
  104. <li>{{ t "Toggle read/unread" }} = <strong>m</strong></li>
  105. <li>{{ t "Mark current page as read" }} = <strong>A</strong></li>
  106. <li>{{ t "Download original content" }} = <strong>d</strong></li>
  107. <li>{{ t "Toggle bookmark" }} = <strong>f</strong></li>
  108. <li>{{ t "Close modal dialog" }} = <strong>Esc</strong></li>
  109. </ul>
  110. </div>
  111. </div>
  112. </template>
  113. </body>
  114. </html>
  115. {{ end }}