| 1 |
{{ define "base" }} |
| 2 |
<!DOCTYPE html> |
| 3 |
<html lang="{{ replace .language "_" "-"}}"> |
| 4 |
<head> |
| 5 |
<meta charset="utf-8"> |
| 6 |
<title>{{template "title" .}} - Miniflux</title> |
| 7 |
|
| 8 |
<meta name="apple-mobile-web-app-title" content="Miniflux"> |
| 9 |
<meta name="googlebot" content="notranslate"> |
| 10 |
<meta name="mobile-web-app-capable" content="yes"> |
| 11 |
<meta name="referrer" content="no-referrer"> |
| 12 |
<meta name="robots" content="noindex,nofollow"> |
| 13 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"> |
| 14 |
<meta name="theme-color" content="{{ theme_color .theme "light" }}" media="(prefers-color-scheme: light)"> |
| 15 |
<meta name="theme-color" content="{{ theme_color .theme "dark" }}" media="(prefers-color-scheme: dark)"> |
| 16 |
|
| 17 |
<link rel="manifest" href="{{ routePath "/manifest.json" }}" crossorigin="use-credentials"> |
| 18 |
|
| 19 |
<link rel="icon" type="image/png" sizes="16x16" href="{{ iconPath "icon-16.png" }}"> |
| 20 |
<link rel="icon" type="image/png" sizes="32x32" href="{{ iconPath "icon-32.png" }}"> |
| 21 |
<link rel="icon" type="image/png" sizes="128x128" href="{{ iconPath "icon-128.png" }}"> |
| 22 |
<link rel="icon" type="image/png" sizes="192x192" href="{{ iconPath "icon-192.png" }}"> |
| 23 |
<link rel="apple-touch-icon" sizes="120x120" href="{{ iconPath "icon-120.png" }}"> |
| 24 |
<link rel="apple-touch-icon" sizes="152x152" href="{{ iconPath "icon-152.png" }}"> |
| 25 |
<link rel="apple-touch-icon" sizes="167x167" href="{{ iconPath "icon-167.png" }}"> |
| 26 |
<link rel="apple-touch-icon" sizes="180x180" href="{{ iconPath "icon-180.png" }}"> |
| 27 |
|
| 28 |
{{ $cspNonce := nonce }} |
| 29 |
{{ csp .user $cspNonce | safeHTML }} |
| 30 |
<link rel="stylesheet" nonce="{{ $cspNonce }}" type="text/css" href="{{ routePath "/stylesheets/%s/%s.css" .theme_checksum .theme }}"> |
| 31 |
<script nonce="{{ $cspNonce }}" src="{{ routePath "/js/%s/%s.js" .app_js_checksum "app" }}" type="module"></script> |
| 32 |
{{ if .user -}} |
| 33 |
{{ if .user.Stylesheet -}} |
| 34 |
<style nonce="{{ $cspNonce }}">{{ .user.Stylesheet | safeCSS }}</style> |
| 35 |
{{ end -}} |
| 36 |
{{ if .user.CustomJS -}} |
| 37 |
<script type="module" nonce="{{ $cspNonce }}">{{ .user.CustomJS | safeJS }}</script> |
| 38 |
{{ end -}} |
| 39 |
{{ end -}} |
| 40 |
</head> |
| 41 |
<body |
| 42 |
data-service-worker-url="{{ routePath "/js/%s/%s.js" .sw_js_checksum "service-worker" }}" |
| 43 |
{{ if .csrf }}data-csrf-token="{{ .csrf }}"{{ end }} |
| 44 |
data-add-subscription-url="{{ routePath "/subscribe" }}" |
| 45 |
data-entries-status-url="{{ routePath "/entry/status" }}" |
| 46 |
data-refresh-all-feeds-url="{{ routePath "/feeds/refresh" }}" |
| 47 |
{{ if .webAuthnEnabled }} |
| 48 |
data-webauthn-register-begin-url="{{ routePath "/webauthn/register/begin" }}" |
| 49 |
data-webauthn-register-finish-url="{{ routePath "/webauthn/register/finish" }}" |
| 50 |
data-webauthn-login-begin-url="{{ routePath "/webauthn/login/begin" }}" |
| 51 |
data-webauthn-login-finish-url="{{ routePath "/webauthn/login/finish" }}" |
| 52 |
data-webauthn-delete-all-url="{{ routePath "/webauthn/deleteall" }}" |
| 53 |
{{ end }} |
| 54 |
{{ if .user }} |
| 55 |
{{ if not .user.KeyboardShortcuts }}data-disable-keyboard-shortcuts="true"{{ end }} |
| 56 |
data-mark-as-read-on-view="{{ if .user.MarkReadOnView }}true{{ else }}false{{ end }}" |
| 57 |
{{ end }}> |
| 58 |
|
| 59 |
{{ if .user }} |
| 60 |
<a class="skip-to-content-link" href="#main">{{ t "skip_to_content" }}</a> |
| 61 |
<header class="header"> |
| 62 |
<nav> |
| 63 |
<div class="logo" data-toggle-button-label="{{ t "menu.title" }}"> |
| 64 |
<a aria-label="{{ t "menu.home_page" }}" href="{{ routePath (printf "/%s" .user.DefaultHomePage) }}"> |
| 65 |
Mini<span>flux</span> |
| 66 |
</a> |
| 67 |
{{ icon "chevron-down"}} |
| 68 |
</div> |
| 69 |
<ul id="header-menu"> |
| 70 |
<li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}"> |
| 71 |
<a href="{{ routePath "/unread" }}" |
| 72 |
data-page="unread" |
| 73 |
{{ if gt .countUnread 0 }} |
| 74 |
aria-label="{{ t "menu.unread" }}, {{ plural "page.unread_entry_count" .countUnread .countUnread }}" |
| 75 |
{{ end }} |
| 76 |
> |
| 77 |
{{ icon "entries" }}{{ t "menu.unread" }} |
| 78 |
{{ if gt .countUnread 0 }} |
| 79 |
<span class="unread-counter-wrapper" aria-hidden="true">(<span class="unread-counter">{{ .countUnread }}</span>)</span> |
| 80 |
{{ end }} |
| 81 |
</a> |
| 82 |
</li> |
| 83 |
<li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g b" }}"> |
| 84 |
<a href="{{ routePath "/starred" }}" data-page="starred">{{ icon "star" }}{{ t "menu.starred" }}</a> |
| 85 |
</li> |
| 86 |
<li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g h" }}"> |
| 87 |
<a href="{{ routePath "/history" }}" data-page="history">{{ icon "history" }}{{ t "menu.history" }}</a> |
| 88 |
</li> |
| 89 |
<li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g f" }}"> |
| 90 |
<a href="{{ routePath "/feeds" }}" data-page="feeds">{{ icon "feeds" }}{{ t "menu.feeds" }} |
| 91 |
{{ if gt .countErrorFeeds 0 }} |
| 92 |
<span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span> |
| 93 |
{{ end }} |
| 94 |
</a> |
| 95 |
<a href="{{ routePath "/subscribe" }}" title="{{ t "tooltip.keyboard_shortcuts" "+" }}" aria-label="{{ t "menu.add_feed" }}"> |
| 96 |
(+) |
| 97 |
</a> |
| 98 |
</li> |
| 99 |
<li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g c" }}"> |
| 100 |
<a href="{{ routePath "/categories" }}" data-page="categories">{{ icon "categories" }}{{ t "menu.categories" }}</a> |
| 101 |
</li> |
| 102 |
<li {{ if eq .menu "search" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "/" }}"> |
| 103 |
<a href="{{ routePath "/search" }}" data-page="search">{{ icon "search" }}{{ t "menu.search" }}</a> |
| 104 |
</li> |
| 105 |
<li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}"> |
| 106 |
<a href="{{ routePath "/settings" }}" data-page="settings">{{ icon "settings" }}{{ t "menu.settings" }}</a> |
| 107 |
</li> |
| 108 |
{{ if not hasAuthProxy }} |
| 109 |
<li> |
| 110 |
<form action="{{ routePath "/logout" }}" method="post" class="logout-form"> |
| 111 |
<input type="hidden" name="csrf" value="{{ .csrf }}"> |
| 112 |
<button type="submit" class="logout-button" title="{{ t "tooltip.logged_user" .user.Username }}">{{ icon "logout" }}{{ t "menu.logout" }}</button> |
| 113 |
</form> |
| 114 |
</li> |
| 115 |
{{ end }} |
| 116 |
</ul> |
| 117 |
</nav> |
| 118 |
</header> |
| 119 |
{{ end }} |
| 120 |
{{ if .flashSuccessMessage }} |
| 121 |
<div role="alert" class="flash-message alert alert-success">{{ .flashSuccessMessage }}</div> |
| 122 |
{{ end }} |
| 123 |
{{ if .flashErrorMessage }} |
| 124 |
<div role="alert" class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div> |
| 125 |
{{ end }} |
| 126 |
|
| 127 |
{{template "page_header" .}} |
| 128 |
|
| 129 |
<main id="main"> |
| 130 |
{{template "content" .}} |
| 131 |
</main> |
| 132 |
<dialog id="keyboard-shortcuts-modal" closedby="any"> |
| 133 |
<form method="dialog"> |
| 134 |
<button class="btn-close-modal" aria-label="Close" autofocus>x</button> |
| 135 |
</form> |
| 136 |
<h3 tabindex="-1" id="dialog-title">{{ t "page.keyboard_shortcuts.title" }}</h3> |
| 137 |
|
| 138 |
<div class="keyboard-shortcuts"> |
| 139 |
<p>{{ t "page.keyboard_shortcuts.subtitle.sections" }}</p> |
| 140 |
<ul> |
| 141 |
<li>{{ t "page.keyboard_shortcuts.go_to_unread" }} = <strong>g + u</strong></li> |
| 142 |
<li>{{ t "page.keyboard_shortcuts.go_to_starred" }} = <strong>g + b</strong></li> |
| 143 |
<li>{{ t "page.keyboard_shortcuts.go_to_history" }} = <strong>g + h</strong></li> |
| 144 |
<li>{{ t "page.keyboard_shortcuts.go_to_feeds" }} = <strong>g + f</strong></li> |
| 145 |
<li>{{ t "page.keyboard_shortcuts.go_to_categories" }} = <strong>g + c</strong></li> |
| 146 |
<li>{{ t "page.keyboard_shortcuts.go_to_settings" }} = <strong>g + s</strong></li> |
| 147 |
<li>{{ t "page.keyboard_shortcuts.show_keyboard_shortcuts" }} = <strong>?</strong></li> |
| 148 |
<li>{{ t "menu.add_feed" }} = <strong>+</strong></li> |
| 149 |
</ul> |
| 150 |
|
| 151 |
<p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p> |
| 152 |
<ul> |
| 153 |
<li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>k</strong>, <strong>⏴</strong></li> |
| 154 |
<li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>j</strong>, <strong>⏵</strong></li> |
| 155 |
<li>{{ t "page.keyboard_shortcuts.go_to_feed" }} = <strong>F</strong></li> |
| 156 |
<li>{{ t "page.keyboard_shortcuts.go_to_top_item" }} = <strong>g + g</strong></li> |
| 157 |
<li>{{ t "page.keyboard_shortcuts.go_to_bottom_item" }} = <strong>G</strong></li> |
| 158 |
</ul> |
| 159 |
|
| 160 |
<p>{{ t "page.keyboard_shortcuts.subtitle.pages" }}</p> |
| 161 |
<ul> |
| 162 |
<li>{{ t "page.keyboard_shortcuts.go_to_previous_page" }} = <strong>h</strong></li> |
| 163 |
<li>{{ t "page.keyboard_shortcuts.go_to_next_page" }} = <strong>l</strong></li> |
| 164 |
</ul> |
| 165 |
|
| 166 |
<p>{{ t "page.keyboard_shortcuts.subtitle.actions" }}</p> |
| 167 |
<ul> |
| 168 |
<li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong>, <strong>Enter</strong></li> |
| 169 |
<li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li> |
| 170 |
<li>{{ t "page.keyboard_shortcuts.open_original_same_window" }} = <strong>V</strong></li> |
| 171 |
<li>{{ t "page.keyboard_shortcuts.open_comments" }} = <strong>c</strong></li> |
| 172 |
<li>{{ t "page.keyboard_shortcuts.open_comments_same_window" }} = <strong>C</strong></li> |
| 173 |
<li>{{ t "page.keyboard_shortcuts.toggle_read_status_next" }} = <strong>m</strong></li> |
| 174 |
<li>{{ t "page.keyboard_shortcuts.toggle_read_status_prev" }} = <strong>M</strong></li> |
| 175 |
<li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li> |
| 176 |
<li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li> |
| 177 |
<li>{{ t "page.keyboard_shortcuts.toggle_star_status" }} = <strong>f</strong></li> |
| 178 |
<li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li> |
| 179 |
<li>{{ t "page.keyboard_shortcuts.toggle_entry_attachments" }} = <strong>a</strong></li> |
| 180 |
<li>{{ t "page.keyboard_shortcuts.scroll_item_to_top" }} = <strong>z + t</strong></li> |
| 181 |
<li>{{ t "page.keyboard_shortcuts.refresh_all_feeds" }} = <strong>R</strong></li> |
| 182 |
<li>{{ t "page.keyboard_shortcuts.remove_feed" }} = <strong>#</strong></li> |
| 183 |
<li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li> |
| 184 |
<li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li> |
| 185 |
</ul> |
| 186 |
</div> |
| 187 |
</dialog> |
| 188 |
|
| 189 |
<template id="icon-read">{{ icon "read" }}</template> |
| 190 |
<template id="icon-unread">{{ icon "unread" }}</template> |
| 191 |
<template id="icon-star">{{ icon "star" }}</template> |
| 192 |
<template id="icon-unstar">{{ icon "unstar" }}</template> |
| 193 |
<template id="icon-save">{{ icon "save" }}</template> |
| 194 |
</body> |
| 195 |
</html> |
| 196 |
{{ end }} |