Thirty-seven entries in the root, most of them .go files. The assets had to come along: //go:embed cannot reach outside its own directory, so templates/, static/ and migrations/ live beside the code that embeds them, and testdata/ beside the test that reads it. storage/ stays put — runtime data, not source. go build now needs -o. Without it the output would be named after the package directory and collide with src/ itself.
20 lines
660 B
HTML
20 lines
660 B
HTML
{{define "content"}}
|
|
<h1>Jono</h1>
|
|
|
|
{{if .Data.Items}}
|
|
<p class="muted">Arvostelemattomat kappaleet, vanhimmasta uusimpaan. Muiden pisteet paljastuvat
|
|
kun tallennat omasi.</p>
|
|
<div class="songgrid">
|
|
{{range .Data.Items}}{{template "songcard" .}}{{end}}
|
|
</div>
|
|
<p class="pager">
|
|
{{if .Data.Cursor}}<a href="/">← Alkuun</a>{{end}}
|
|
{{with .Data.NextCursor}}<a href="/?cursor={{.}}">Lisää →</a>{{end}}
|
|
</p>
|
|
{{else}}
|
|
<p class="empty">Kaikki kuunneltu.</p>
|
|
<p>Olet arvostellut kaiken, mitä muut ovat lähettäneet.
|
|
<a href="/submit">Lähetä kappale</a> tai lue <a href="/songs">mitä muut sanoivat</a>.</p>
|
|
{{end}}
|
|
{{end}}
|