tailwind c ss
This commit is contained in:
@@ -4,40 +4,28 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{.Title}}</title>
|
||||
<style>
|
||||
body { font-family: system-ui, sans-serif; margin: 0; background: #f5f7fb; color: #1f2937; }
|
||||
nav { background: #111827; color: #fff; padding: 12px 16px; display: flex; gap: 12px; }
|
||||
nav a { color: #e5e7eb; text-decoration: none; }
|
||||
nav a.active { color: #fff; font-weight: 600; }
|
||||
.container { max-width: 920px; margin: 20px auto; padding: 0 16px; }
|
||||
.card { background: #fff; border-radius: 10px; padding: 20px; }
|
||||
form { display: grid; gap: 10px; max-width: 420px; }
|
||||
input { padding: 10px; border: 1px solid #d1d5db; border-radius: 8px; }
|
||||
button { padding: 10px 14px; border: 0; border-radius: 8px; background: #111827; color: #fff; cursor: pointer; }
|
||||
.muted { color: #6b7280; font-size: 0.95rem; }
|
||||
.row { display: flex; gap: 10px; flex-wrap: wrap; }
|
||||
</style>
|
||||
<link rel="stylesheet" href="/static/css/app.css?v={{.BuildHash}}">
|
||||
<link rel="stylesheet" href="/static/ui/ui.css?v={{.BuildHash}}">
|
||||
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
|
||||
<script type="module" src="/static/ui/ui.esm.js?v={{.BuildHash}}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<a href="/" class="{{if eq .NavSection "public"}}active{{end}}">Public</a>
|
||||
<a href="/private" class="{{if eq .NavSection "private"}}active{{end}}">Private</a>
|
||||
<nav class="flex gap-3 bg-slate-900 px-4 py-3 text-white">
|
||||
<a href="/" class="text-slate-200 hover:text-white {{if eq .NavSection "public"}}font-semibold text-white{{end}}">Public</a>
|
||||
<a href="/private" class="text-slate-200 hover:text-white {{if eq .NavSection "private"}}font-semibold text-white{{end}}">Private</a>
|
||||
{{if and .CurrentUser (eq .CurrentUser.Role "admin")}}
|
||||
<a href="/admin" class="{{if eq .NavSection "admin"}}active{{end}}">Admin</a>
|
||||
<a href="/admin" class="text-slate-200 hover:text-white {{if eq .NavSection "admin"}}font-semibold text-white{{end}}">Admin</a>
|
||||
{{end}}
|
||||
{{if .CurrentUser}}
|
||||
<form action="/logout" method="post" style="margin-left:auto;">
|
||||
<button type="submit">Logout</button>
|
||||
<form action="/logout" method="post" class="ml-auto">
|
||||
<button type="submit" class="btn-primary">Logout</button>
|
||||
</form>
|
||||
{{end}}
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<div class="mx-auto my-5 max-w-5xl px-4">
|
||||
{{template "_flash.html" .}}
|
||||
<div class="card">
|
||||
<div class="rounded-xl bg-white p-5 shadow-sm">
|
||||
{{template "content" .}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user