acdform/templ/home.html

48 lines
2.9 KiB
HTML

{{define "navigation"}}
<nav class="navbar" role="navigation">
<div class="navbar-start">
<a class="navbar-item button is-rounded is-danger" href="/">Submit</a>
<a class="navbar-item button is-rounded is-info" href="/list">View Data</a>
<a class="navbar-item button is-rounded has-background-link-light" href="/list.json">JSON</a>
</div>
</nav>
{{end}}
{{define "home"}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Submission form for picrews</title>
{{template "stylesheet"}}
</head>
<body>
{{template "navigation"}}
<form action="/submit" method="post">
<label for="furl"><b>Picrew URL</b><br/><sup><i>(picrews only currently, other character makers will be considered when the actual site is live)</i></sup></label><br/>
<input id="furl" name="furl" type="url" placeholder="https://picrew.me/image_maker/*****" class="input is-link" required maxlength="128"><br/>
<label for="ftags"><b>What tags would you give to this picrew?</b> (like what features does it have, etc, especially features that are less common)<br/>
<sup><i>(separate individual tags with commas, tags with a space <q>curly hair</q> keep the space as is <code>curly hair</code>)</i></sup></label><br/>
<textarea id="ftags" name="ftags" class="input is-info" required placeholder="curly hair, dark skin, animal ears" rows="4" maxlength="2000"></textarea><br>
<hr/>
{{if .NoCookie}}
<label><i><b>Who are you?</b> (this is optional and mostly just for curiosity, and you only have to fill it the first time)</i><br/>
<sup><i>(we'll set a cookie to not show this to you in the future, if you don't give us a name the cookie will not be able to identify you)</i></sup></label><br/>
<label for="fuser"><b>Name</b> (can be your username, or anything really)</label><br/>
<input id="fuser" name="fuser" type="text" class="input" placeholder="@yourname" maxlength="100"><br/>
<label for="fwhere"><b>How did you find this form?</b></label><br/>
<textarea id="fwhere" name="fwhere" type="text" class="input" placeholder="(you can be as specific or nonspecific as you want)" rows="2" maxlength="1000"></textarea><br/>
{{else}}
<p>Name cached as {{if eq .Whomst "anon"}}Anonymous{{else}}<code>{{.Whomst}}</code>{{end}} <a href="/nocookie">click here to clear</a></p>
<input hidden="true" type="text" name="fname" value="{{.Whomst}}">
{{end}}
<hr/>
<label>are you an evil robot that desires to stuff our mailbox with junk? if so click the box below, <i><b class="has-text-warning-dark has-background-danger-light">otherwise leave it unchecked</b></i> (your submittion will be ignored if you check it)</label><br/>
<label for="frobot"><b>I am a robot</b></label>
<input type="checkbox" id="frobot" name="robot?" class="checkbox is-small"><label></label><br/><hr/>
<input type="submit" value="Submit" class="button is-dark"><br/>
</form>
</body>
</html>
{{end}}