Deletes obsolete question/answer/vote persistence and the compatibility answer endpoint. Existing databases drop the legacy tables through migration 009. Plumber replies now notify the root homeowner even when nested beneath another plumber reply. Post and reply forms prevent duplicate submissions and show progress while posting. Reviewed-on: #7 Co-authored-by: codegirl-007 <s.raide@gmail.com>
79 lines
3.5 KiB
HTML
79 lines
3.5 KiB
HTML
{{define "header"}}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<title>{{if .Title}}{{.Title}} · {{end}}Ask a Plumber First</title>
|
|
<meta name="description" content="Daily plumbing questions, ranked like a hunt. Ask a 22-year Bay Area plumber.">
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="/static/app.css">
|
|
<script src="/static/htmx.min.js" defer></script>
|
|
<script src="/static/app.js" defer></script>
|
|
</head>
|
|
<body>
|
|
<div id="submit-progress" class="submit-progress" role="progressbar"
|
|
aria-label="Posting" aria-valuetext="Posting" hidden>
|
|
<span class="submit-progress-bar"></span>
|
|
</div>
|
|
<a class="skip" href="#main">Skip to content</a>
|
|
<header class="top">
|
|
<div class="top-inner">
|
|
<a class="logo" href="/">
|
|
<svg class="mark" viewBox="0 0 32 32" aria-hidden="true">
|
|
<circle cx="16" cy="16" r="14" fill="none" stroke="currentColor" stroke-width="2.25"/>
|
|
<circle cx="16" cy="16" r="7.5" fill="none" stroke="currentColor" stroke-width="2.25"/>
|
|
<circle cx="16" cy="16" r="3" fill="currentColor"/>
|
|
</svg>
|
|
<span class="logo-text">
|
|
<span class="logo-name">Ask a Plumber First</span>
|
|
<span class="tagline">{{locationTag .User}}</span>
|
|
</span>
|
|
</a>
|
|
<nav class="top-nav" aria-label="Account">
|
|
{{if not (isAdmin .User)}}
|
|
<a class="btn btn-primary" href="/submit">Ask</a>
|
|
{{end}}
|
|
{{if .User}}
|
|
<details class="account-menu">
|
|
<summary class="btn btn-ghost account-menu-toggle" title="{{.User.Username}}">
|
|
{{if .User.AvatarURL}}
|
|
<img class="nav-avatar" src="{{.User.AvatarURL}}" alt="" width="28" height="28">
|
|
{{else}}
|
|
<span class="nav-avatar nav-avatar-ghost" aria-hidden="true">{{slice .User.Username 0 1}}</span>
|
|
{{end}}
|
|
<span class="who">{{.User.Username}}</span>
|
|
<span class="account-menu-caret" aria-hidden="true"></span>
|
|
</summary>
|
|
<div class="account-menu-panel" role="menu">
|
|
<a class="account-menu-item" role="menuitem" href="/profile">Profile</a>
|
|
{{if isAdmin .User}}
|
|
<a class="account-menu-item" role="menuitem" href="/admin/users">Users</a>
|
|
{{end}}
|
|
<form class="logout" method="post" action="/logout" role="none">
|
|
<input type="hidden" name="_csrf" value="{{.CSRF}}">
|
|
<button type="submit" class="account-menu-item" role="menuitem">Sign out</button>
|
|
</form>
|
|
</div>
|
|
</details>
|
|
{{else}}
|
|
<a class="btn btn-ghost" href="/login">Sign in</a>
|
|
{{end}}
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
<div id="flash">
|
|
{{if .Flash}}<p class="banner" role="status">{{.Flash}}</p>{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
{{define "footer"}}
|
|
<footer class="site-footer">
|
|
<p>This site is not a substitute for a licensed plumber. Advice is general and based on the question as written. If you have a gas leak, flooding, or another emergency, leave the area if needed and call 911.</p>
|
|
</footer>
|
|
</body>
|
|
</html>
|
|
{{end}}
|