indiescrobble/templates/scrobble/begin.tmpl

39 lines
1008 B
Cheetah
Raw Permalink Normal View History

{{ define "scrobble/begin.tmpl" }}
<!DOCTYPE html>
<html lang="en">
{{ template "partial/head.tmpl" . }}
<body>
{{ template "partial/header.tmpl" . }}
<main>
{{ if .user }}
2022-02-13 15:49:22 +00:00
Logged in as {{.user.Me}} <a href="/logout"><button>Log Out</button></a>
<h2>Add A Scrobble</h2>
I want to add a:
<form method="GET" action="/scrobble">
{{range $type, $label := .scrobbleTypes }}
<label><input type="radio" name="type" value="{{ $type }}"/>{{$label}}</label><br/>
{{end}}
<button type="submit">Next &gt;&gt;</button>
</form>
{{else}}
<p>Welcome to indiescrobble! IndieScrobble is a <a href="https://micropub.spec.indieweb.org/">MicroPub</a> compliant tool
for posting about your watches, reads and scrobbles directly back to your site.</p>
2022-02-05 16:24:07 +00:00
<form action="/indieauth" method="POST">
<p>
<label>Your domain: </label>
<input type="text" name="domain"/>
<button type="submit">Log in</button>
</p>
</form>
{{ end }}
</main>
2022-02-13 15:49:22 +00:00
{{ template "footer.tmpl" . }}
</body>
</html>
{{end}}