Files
warpbox-dev/backend/templates/layouts/base.html

54 lines
2.2 KiB
HTML
Raw Normal View History

{{define "base"}}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{if .Title}}{{.Title}} - {{end}}{{.AppName}}</title>
<meta name="description" content="{{.Description}}">
<meta name="theme-color" content="#09090b">
<meta property="og:site_name" content="{{.AppName}}">
<meta property="og:title" content="{{if .Title}}{{.Title}}{{else}}{{.AppName}}{{end}}">
<meta property="og:description" content="{{.Description}}">
<meta property="og:type" content="website">
<meta property="og:url" content="{{.BaseURL}}">
{{if .ImageURL}}<meta property="og:image" content="{{.ImageURL}}">{{end}}
<meta name="twitter:card" content="summary_large_image">
{{if .ImageURL}}<meta name="twitter:image" content="{{.ImageURL}}">{{end}}
<link rel="stylesheet" href="/static/css/app.css">
<script defer src="/static/js/app.js"></script>
</head>
<body class="dark">
<a class="skip-link" href="#main">Skip to content</a>
<header class="site-header">
<nav class="nav" aria-label="Main navigation">
<a class="brand" href="/" aria-label="{{.AppName}} home">
<span class="brand-mark" aria-hidden="true">W</span>
<span>{{.AppName}}</span>
</a>
<div class="nav-links">
{{if .CurrentUser}}
<a class="button button-ghost" href="/app">My files</a>
<a class="button button-ghost" href="/account/settings">Account</a>
<form action="/logout" method="post" class="inline-form"><button class="button button-outline" type="submit">Logout</button></form>
{{else}}
<a class="button button-ghost" href="/login">Login</a>
{{end}}
<a class="button button-ghost" href="/api">API</a>
<a class="button button-outline" href="/healthz">Health</a>
</div>
</nav>
</header>
<main id="main">
{{template "content" .}}
</main>
<footer class="site-footer">
<span>{{.AppName}} · {{.CurrentYear}} · self-hosted</span>
<span class="footer-links"><a href="/">Upload</a>{{if .CurrentUser}}<a href="/app">My files</a>{{end}}<a href="/healthz">Health</a></span>
</footer>
</body>
</html>
{{end}}