forked from mirror/oddmu
This allows us to use the same code as for the uploadHandler. The template works just the same. The Dir field is added to the Search struct, unlike the Dir func for the Page struct since the Dir for a Search cannot be computed based on the items found.
43 lines
1.4 KiB
HTML
43 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="{{.Language}}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="format-detection" content="telephone=no">
|
|
<meta name="viewport" content="width=device-width">
|
|
<title>{{.Title}}</title>
|
|
<style>
|
|
html { max-width: 65ch; padding: 1ch; margin: auto; color: #111; background: #ffe; }
|
|
body { hyphens: auto; }
|
|
header a { margin-right: 1ch; }
|
|
form { display: inline-block; }
|
|
input#search { width: 12ch; }
|
|
button { background: #eee; color: inherit; border-radius: 4px; border-width: 1px; }
|
|
footer { border-top: 1px solid #888 }
|
|
img { max-width: 100%; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<a href="#main">Skip navigation</a>
|
|
<a href="/view/index">Home</a>
|
|
<a href="/edit/{{.Name}}" accesskey="e">Edit</a>
|
|
<a href="/add/{{.Name}}" accesskey="a">Add</a>
|
|
<a href="/upload/{{.Dir}}" accesskey="u">Upload</a>
|
|
<form role="search" action="/search/{{.Dir}}" method="GET">
|
|
<label for="search">Search:</label>
|
|
<input id="search" type="text" spellcheck="false" name="q" accesskey="f" placeholder="term #tag title:term blog:true" required>
|
|
<button>Go</button>
|
|
</form>
|
|
</header>
|
|
<main id="main">
|
|
<h1>{{.Title}}</h1>
|
|
{{.Html}}
|
|
</main>
|
|
<footer>
|
|
<address>
|
|
Comments? Send mail to Your Name <<a href="mailto:you@example.org">you@example.org</a>>
|
|
</address>
|
|
</footer>
|
|
</body>
|
|
</html>
|