layout.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. </body>
  76. </html>
  77. {{ end }}