43 lines
1.4 KiB
HTML
43 lines
1.4 KiB
HTML
{{define "layout"}}<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{.Title}} - Uncensored Send</title>
|
|
{{- with .Preview}}
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:title" content="{{$.Title}} - Uncensored Send">
|
|
<meta property="og:description" content="{{.Description}}">
|
|
{{- if .URL}}
|
|
<meta property="og:url" content="{{.URL}}">
|
|
{{- end}}
|
|
{{- if .Author}}
|
|
<meta name="author" content="{{.Author}}">
|
|
{{- end}}
|
|
<meta name="description" content="{{.Description}}">
|
|
<meta name="twitter:card" content="summary">
|
|
{{- end}}
|
|
<link rel="stylesheet" href="{{.Base}}static/style.css">
|
|
{{if .Favicon}}<link rel="icon" href="{{.Favicon}}">{{end}}
|
|
</head>
|
|
<body data-base="{{.Base}}"{{if .Wide}} class="wide"{{end}}>
|
|
<header>
|
|
<a class="brand" href="{{.Base}}">Uncensored Send</a>
|
|
<nav>
|
|
<a href="{{.Base}}">Upload</a>
|
|
{{if .User}}
|
|
<a href="{{.Base}}files">{{if .Admin}}Administration{{else}}My files{{end}}</a>
|
|
<span class="who">{{.User}}</span>
|
|
<form method="post" action="{{.Base}}logout"><button type="submit" class="link">Log out</button></form>
|
|
{{else}}
|
|
<a href="{{.Base}}login">Log in</a>
|
|
{{end}}
|
|
</nav>
|
|
</header>
|
|
<main>
|
|
{{template "content" .}}
|
|
</main>
|
|
{{if .Script}}<script src="{{.Base}}static/app.js" defer></script>{{end}}
|
|
</body>
|
|
</html>{{end}}
|