2022-02-05 21:52:46 +00:00
|
|
|
{{ define "scrobble.tmpl" }}
|
2022-02-05 19:59:41 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
{{ template "head.tmpl" . }}
|
|
|
|
<body>
|
|
|
|
{{ template "header.tmpl" . }}
|
|
|
|
<main>
|
|
|
|
|
2022-02-05 21:52:46 +00:00
|
|
|
{{ $scrobbleType := .scrobbleType }}
|
|
|
|
|
2022-02-06 12:06:19 +00:00
|
|
|
{{ if .user.Me }}
|
|
|
|
Logged in as {{.user.Me}} <a href="/logout"><button>Log Out</button></a>
|
2022-02-05 19:59:41 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-05 21:52:46 +00:00
|
|
|
{{if .searchResults}}
|
|
|
|
|
|
|
|
<p><a href="/">Add A Post</a> > <a href="/scrobble?type=movie">Add {{ .scrobbleTypeName }}</a> > {{.searchEngine}} Results</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
{{ $scrobbleType := .scrobbleType }}
|
|
|
|
{{range $result := .searchResults}}
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<a href="/scrobble?type={{$scrobbleType}}&item={{$result.GetID}}">{{$result.GetDisplayName}}</a>
|
|
|
|
<a href="{{$result.GetCanonicalURL}}" target="_blank">(🔍more info)</a>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{{ else if .item}}
|
|
|
|
|
2022-02-06 12:06:19 +00:00
|
|
|
<form method="POST" action="/scrobble/preview">
|
|
|
|
|
2022-02-05 21:52:46 +00:00
|
|
|
<p><a href="/">Add A Post</a> > <a href="/scrobble?type=movie">Add {{ .scrobbleTypeName }}</a> > {{.item.GetDisplayName}}</p>
|
|
|
|
|
|
|
|
<h3>{{.item.GetDisplayName}}</h3>
|
|
|
|
|
|
|
|
<div class="float-left">
|
|
|
|
|
|
|
|
{{if .item.GetThumbnailURL}}
|
|
|
|
<img class="thumbnail" src="{{.item.GetThumbnailURL}}"/>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
2022-02-19 15:47:25 +00:00
|
|
|
<label>When: </label> <input type="datetime-local" name='when' value="{{.now}}"/><br/>
|
2022-02-05 21:52:46 +00:00
|
|
|
|
2022-02-06 12:06:19 +00:00
|
|
|
<label>Rating: (out of 5)</label> <input type="number" name='rating'/><br/>
|
2022-02-05 21:52:46 +00:00
|
|
|
|
|
|
|
<label>Note/Content: </label> <br>
|
|
|
|
<textarea rows="6" name='content'></textarea>
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<button type="submit">Preview > ></button>
|
|
|
|
|
|
|
|
</div>
|
2022-02-06 12:06:19 +00:00
|
|
|
<input type="hidden" name="item" value="{{.item.GetID}}"/>
|
|
|
|
<input type="hidden" name="type" value="{{.scrobbleType}}"/>
|
|
|
|
</form>
|
2022-02-05 21:52:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ else }}
|
2022-02-06 12:06:19 +00:00
|
|
|
<form method="GET" action="/scrobble">
|
2022-02-05 21:52:46 +00:00
|
|
|
<h2><a href="/">Add A Post</a> Add {{ .scrobbleTypeName }}</h2>
|
|
|
|
|
|
|
|
<p>Search <b>{{.searchEngine}}</b> for items to scrobble<p>
|
|
|
|
|
|
|
|
<input type="text" name="q" placeholder="{{.scrobblePlaceholder}}">
|
|
|
|
|
|
|
|
<button type="submit">Next >></button>
|
|
|
|
|
2022-02-06 12:06:19 +00:00
|
|
|
<input type="hidden" name="type" value="{{.scrobbleType}}"/>
|
|
|
|
</form>
|
|
|
|
|
2022-02-05 21:52:46 +00:00
|
|
|
{{end}}
|
2022-02-05 19:59:41 +00:00
|
|
|
</main>
|
2022-02-13 15:49:22 +00:00
|
|
|
{{ template "footer.tmpl" . }}
|
2022-02-05 19:59:41 +00:00
|
|
|
</body>
|
2022-02-05 21:52:46 +00:00
|
|
|
</html>
|
|
|
|
{{end}}
|