forked from mirror/oddmu
41 lines
1.4 KiB
HTML
41 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, initial-scale=1.0, user-scalable=no">
|
|
<base href="/view/{{.Dir}}">
|
|
<title>Preview: {{.Title}}</title>
|
|
<style>
|
|
html { max-width: 70ch; padding: 1ch; margin: auto; color: #111; background-color: #ffe }
|
|
body { hyphens: auto }
|
|
header a { margin-right: 1ch }
|
|
form { display: inline-block }
|
|
input#search { width: 12ch }
|
|
button { background-color: #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="#edit">Skip to edit form</a>
|
|
</header>
|
|
<main>
|
|
<h1>Previewing {{.Title}}</h1>
|
|
{{.HTML}}
|
|
</main>
|
|
<hr>
|
|
<section id="edit">
|
|
<h2>Editing {{.Title}}</h2>
|
|
<form action="/save/{{.Path}}" method="POST">
|
|
<textarea name="body" rows="20" cols="80" lang="{{.Language}}" autofocus>{{printf "# %s\n\n%s" .Title .Body}}</textarea>
|
|
<p><label><input type="checkbox" name="notify" checked> Add link to <a href="changes">the list of changes</a>.</label></p>
|
|
<p><input type="submit" value="Save">
|
|
<button formaction="/preview/{{.Path}}" type="submit">Preview</button>
|
|
<a href="/view/{{.Path}}"><button type="button">Cancel</button></a></p>
|
|
</form>
|
|
</section>
|
|
</body>
|
|
</html>
|