tclip/cmd/web/tmpl/base.html
Xe Iaso f83b0ba835 cmd/web: minor navbar fix
Signed-off-by: Xe Iaso <xe@tailscale.com>
2023-08-29 11:07:42 -04:00

50 lines
2.7 KiB
HTML

{{define "header"}}
<!DOCTYPE html>
<html>
<head>
<title>{{.Title}}</title>
<link rel="stylesheet" href="/static/css/font-files/inter.css" />
<link rel="stylesheet" href="/static/css/base.css" />
<link rel="stylesheet" href="/static/css/prism.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body id="top" class="flex flex-col min-h-screen">
<div class="bg-gray-100 border-b border-gray-200 pt-4 pb-2 mb-6">
<header class="container mx-auto px-4">
<h1 class="text-2xl font-bold pb-1"><a href="/">tclip/</a></h1>
A private pastebin for your tailnet
<nav>
{{if .UserInfo}}<a class="font-semibold underline text-gray-900 hover:text-gray-500" href="/paste/list">List</a> - <a class="font-semibold underline text-gray-900 hover:text-gray-500" href="/help">Help</a>{{end}}
{{if .UserInfo}}<div class="float-right">{{.UserInfo.DisplayName}} {{if ne .UserInfo.ProfilePicURL ""}} <img class="w-8 p-8 rounded-xl" src="{{.UserInfo.ProfilePicURL}}" /></div>{{end}}{{end}}
</nav>
</header>
</div>
<main class="container mx-auto px-4 flex-1">
<h1 class="text-2xl font-bold pb-2">{{.Title}}</h1>
{{end}}
{{define "footer"}}
</main>
<footer class="bg-gray-100 border-t border-gray-200 py-2 mt-6">
<div class="container mx-auto px-4 leading-6 text-right">
From the nerds at
<a class="inline-block align-text-top ml-1" href="https://tailscale.dev">
<svg width="18" height="18" viewBox="0 0 22 22" fill="none" role="img" aria-labelledby="tsTitle" xmlns="http://www.w3.org/2000/svg">
<title id="tsTitle">Tailscale</title>
<circle opacity="0.2" cx="3.4" cy="3.25" r="2.7" fill="currentColor" />
<circle cx="3.4" cy="11.3" r="2.7" fill="currentColor" />
<circle opacity="0.2" cx="3.4" cy="19.5" r="2.7" fill="currentColor" />
<circle cx="11.5" cy="11.3" r="2.7" fill="currentColor" />
<circle cx="11.5" cy="19.5" r="2.7" fill="currentColor" />
<circle opacity="0.2" cx="11.5" cy="3.25" r="2.7" fill="currentColor" />
<circle opacity="0.2" cx="19.5" cy="3.25" r="2.7" fill="currentColor" />
<circle cx="19.5" cy="11.3" r="2.7" fill="currentColor" />
<circle opacity="0.2" cx="19.5" cy="19.5" r="2.7" fill="currentColor" />
</svg>
</a>
</div>
</footer>
</body>
</html>
{{end}}