Add CalVer versioning and rebuild the song page's fact line
Versions are YYYY.MM.DD-N, injected with -ldflags from a git tag, so no file in the repo carries the number and a local build honestly says dev. The version shows in the footer, the startup log and /healthz. The song page's metadata was five different kinds of fact — artist, genre, duration, provenance and a badge about the viewer — in one flat run with two competing pills. Now the artist has its own line in the display face, and the facts sit in four labelled cells like the spine of a cassette insert. The submitter links to their profile, "oma kappale" became "lähetti: sinä", and the clock time is gone: nobody needs the minute a song was published.
This commit is contained in:
+12
-7
@@ -1,13 +1,18 @@
|
||||
{{define "content"}}
|
||||
{{$s := .Data}}
|
||||
<h1>{{$s.Title}}</h1>
|
||||
<p class="songmeta">
|
||||
<strong>{{$s.Artist}}</strong>
|
||||
<span class="badge genre">{{$s.GenreLabel}}</span>
|
||||
<span>{{$s.Length}}</span>
|
||||
<span>lähetti {{$s.Submitter}} {{fidate $s.CreatedAt}}</span>
|
||||
{{if $s.Own}}<span class="badge admin">oma kappale</span>{{end}}
|
||||
</p>
|
||||
<p class="by">{{$s.Artist}}</p>
|
||||
|
||||
<!-- Four different kinds of fact, so four labelled cells rather than one run of text. "Oma
|
||||
kappale" belongs here as the submitter, not as a badge: it is a fact about you. -->
|
||||
<dl class="spec">
|
||||
<div><dt>Genre</dt><dd>{{$s.GenreLabel}}</dd></div>
|
||||
<div><dt>Kesto</dt><dd>{{$s.Length}}</dd></div>
|
||||
<div><dt>Lähetti</dt>
|
||||
<dd>{{if $s.Own}}sinä{{else}}<a href="/profile/{{$s.SubmitterID}}">{{$s.Submitter}}</a>{{end}}</dd>
|
||||
</div>
|
||||
<div><dt>Julkaistu</dt><dd>{{fiday $s.CreatedAt}}</dd></div>
|
||||
</dl>
|
||||
|
||||
{{if $s.CanEdit}}
|
||||
<details class="editbox">
|
||||
|
||||
Reference in New Issue
Block a user