cmd/web: copy the rest of the Tailwind style golink uses

Signed-off-by: Xe Iaso <xe@tailscale.com>
This commit is contained in:
Xe Iaso 2023-08-29 10:45:50 -04:00
parent 442be15765
commit 44f7daa250
2 changed files with 73 additions and 98 deletions

View file

@ -1196,13 +1196,9 @@ select {
float: right;
}
.m-4 {
margin: 1rem;
}
.mx-3 {
margin-left: 0.75rem;
margin-right: 0.75rem;
.mx-4 {
margin-left: 1rem;
margin-right: 1rem;
}
.mx-auto {
@ -1210,11 +1206,6 @@ select {
margin-right: auto;
}
.mx-4 {
margin-left: 1rem;
margin-right: 1rem;
}
.my-4 {
margin-top: 1rem;
margin-bottom: 1rem;
@ -1225,29 +1216,28 @@ select {
margin-bottom: 1.5rem;
}
.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
.ml-5 {
margin-left: 1.25rem;
}
.mt-6 {
margin-top: 1.5rem;
.mt-2 {
margin-top: 0.5rem;
}
.mt-4 {
margin-top: 1rem;
}
.ml-5 {
margin-left: 1.25rem;
.mt-6 {
margin-top: 1.5rem;
}
.mt-8 {
margin-top: 2rem;
.mb-6 {
margin-bottom: 1.5rem;
}
.mt-2 {
margin-top: 0.5rem;
.ml-1 {
margin-left: 0.25rem;
}
.block {
@ -1282,22 +1272,22 @@ select {
width: 100%;
}
.max-w-md {
max-width: 28rem;
.max-w-full {
max-width: 100%;
}
.max-w-lg {
max-width: 32rem;
}
.max-w-full {
max-width: 100%;
}
.max-w-sm {
max-width: 24rem;
}
.flex-1 {
flex: 1 1 0%;
}
.list-disc {
list-style-type: disc;
}
@ -1318,18 +1308,22 @@ select {
border-radius: 0.25rem;
}
.rounded-xl {
border-radius: 0.75rem;
}
.rounded-md {
border-radius: 0.375rem;
}
.rounded-xl {
border-radius: 0.75rem;
}
.border-0 {
border-width: 0px;
}
.border-b {
border-bottom-width: 1px;
}
.border-t {
border-top-width: 1px;
}
@ -1349,14 +1343,14 @@ select {
background-color: rgba(68, 67, 66, var(--tw-bg-opacity));
}
.p-8 {
padding: 2rem;
}
.p-4 {
padding: 1rem;
}
.p-8 {
padding: 2rem;
}
.px-1 {
padding-left: 0.25rem;
padding-right: 0.25rem;
@ -1377,41 +1371,26 @@ select {
padding-bottom: 0.25rem;
}
.py-2 {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.py-4 {
padding-top: 1rem;
padding-bottom: 1rem;
}
.px-6 {
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.py-6 {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
.py-1\.5 {
padding-top: 0.375rem;
padding-bottom: 0.375rem;
}
.py-2 {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.pb-1 {
padding-bottom: 0.25rem;
}
.pt-8 {
padding-top: 2rem;
.pb-2 {
padding-bottom: 0.5rem;
}
.pt-6 {
padding-top: 1.5rem;
.pt-4 {
padding-top: 1rem;
}
.text-right {
@ -1427,9 +1406,9 @@ select {
line-height: 2rem;
}
.text-xs {
font-size: 0.75rem;
line-height: 1rem;
.text-sm {
font-size: 0.875rem;
line-height: 1.25rem;
}
.text-xl {
@ -1437,30 +1416,20 @@ select {
line-height: 1.75rem;
}
.text-sm {
font-size: 0.875rem;
line-height: 1.25rem;
}
.font-bold {
font-weight: 700;
}
.font-semibold {
font-weight: 600;
}
.font-medium {
font-weight: 500;
}
.leading-6 {
line-height: 1.5rem;
.font-semibold {
font-weight: 600;
}
.text-white {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
.leading-6 {
line-height: 1.5rem;
}
.text-gray-900 {
@ -1468,6 +1437,11 @@ select {
color: rgba(31, 30, 30, var(--tw-text-opacity));
}
.text-white {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}
.underline {
text-decoration-line: underline;
}
@ -1508,11 +1482,6 @@ select {
background-color: rgba(112, 110, 109, var(--tw-bg-opacity));
}
.hover\:text-gray-800:hover {
--tw-text-opacity: 1;
color: rgba(35, 34, 34, var(--tw-text-opacity));
}
.hover\:text-gray-500:hover {
--tw-text-opacity: 1;
color: rgba(112, 110, 109, var(--tw-text-opacity));

View file

@ -8,21 +8,27 @@
<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 p-4">
<div class="container mx-auto min-h-screen">
<nav class="mt-4">
<a class="font-semibold underline text-gray-900 hover:text-gray-500" href="/">tclip</a>{{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}} <img class="w-8 p-8 rounded-xl" src="{{.UserInfo.ProfilePicURL}}" /></div>{{end}}
</nav>
<h1 class="mt-6 text-2xl font-bold pb-1">{{.Title}}</h1>
<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}} <img class="w-8 p-8 rounded-xl" src="{{.UserInfo.ProfilePicURL}}" /></div>{{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"}}
<footer class="bg-gray-100 border-t border-gray-200 py-2 my-6">
<div class="container mx-auto px-4 leading-6 text-right flex flex-row items-center">
From the nerds at
<a class="inline-block align-text-top px-1" href="https://tailscale.dev">Tailscale.</a>
</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" />
@ -35,9 +41,9 @@
<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>
</div>
</footer>
</div>
</a>
</div>
</footer>
</body>
</html>
{{end}}