Move scrobble rank from firstlast partial to view.
Eventually moving this to its own partial (probably)
This commit is contained in:
parent
62590fee37
commit
d81681e698
5 changed files with 25 additions and 17 deletions
|
|
@ -9,8 +9,10 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@partial partials/header
|
@partial partials/header
|
||||||
<h1>{{.album}}</h1>
|
<h1>{{.album.name}}</h1>
|
||||||
@partial partials/firstlast_listens(scrobbles: .album.scrobbles, rank: .album.rank, firstlast: .firstlast)
|
<div>{{.album.scrobbles}} scrobbles ({{.album.rank}} place)</div>
|
||||||
|
<div>{{.album.song_num}} songs</div>
|
||||||
|
@partial partials/firstlast_listens(firstlast: .firstlast)
|
||||||
<h3>Yearly Performance</h3>
|
<h3>Yearly Performance</h3>
|
||||||
@partial partials/timescale(range: .yearly)
|
@partial partials/timescale(range: .yearly)
|
||||||
<h2>Songs</h2>
|
<h2>Songs</h2>
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,14 @@
|
||||||
<body>
|
<body>
|
||||||
@partial partials/header
|
@partial partials/header
|
||||||
<h1>{{.artist.name}}</h1>
|
<h1>{{.artist.name}}</h1>
|
||||||
@partial partials/firstlast_listens(scrobbles: .artist.scrobbles, rank: .artist.rank, firstlast: .firstlast)
|
<div>
|
||||||
<h3>Yearly Performance</h3>
|
<div>{{.artist.scrobbles}} scrobbles ({{.artist.rank}} place)</div>
|
||||||
|
<div>{{.artist.song_num}} songs</div>
|
||||||
|
<div>{{.artist.album_num}} albums</div>
|
||||||
|
</div>
|
||||||
@partial partials/timescale(range: .yearly)
|
@partial partials/timescale(range: .yearly)
|
||||||
|
<br>
|
||||||
|
@partial partials/firstlast_listens(firstlast: .firstlast)
|
||||||
<h2>Albums</h2>
|
<h2>Albums</h2>
|
||||||
@partial partials/newtable(T: ColumnChoices, table_data: .albums, columns: columns)
|
@partial partials/newtable(T: ColumnChoices, table_data: .albums, columns: columns)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
@args scrobbles: i64, rank: []const u8, firstlast: *ZmplValue
|
@args firstlast: *ZmplValue
|
||||||
|
|
||||||
@zig {
|
@zig {
|
||||||
const songs = firstlast.items(.array);
|
const songs = firstlast.items(.array);
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{{scrobbles}} scrobbles ({{rank}} place)
|
|
||||||
<br>
|
|
||||||
First listen: <a href="/songs/{{songs[0].song.id}}">{{songs[0].song.name}}</a> ({{songs[0].date}})
|
First listen: <a href="/songs/{{songs[0].song.id}}">{{songs[0].song.name}}</a> ({{songs[0].date}})
|
||||||
<br>
|
<br>
|
||||||
Most recent listen: <a href="/songs/{{songs[1].song.id}}">{{songs[1].song.name}}</a> ({{songs[1].date}})
|
Most recent listen: <a href="/songs/{{songs[1].song.id}}">{{songs[1].song.name}}</a> ({{songs[1].date}})
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
@args range: *ZmplValue
|
@args range: *ZmplValue
|
||||||
|
|
||||||
|
<div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -16,3 +17,4 @@
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
@ -9,8 +9,9 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@partial partials/header
|
@partial partials/header
|
||||||
<h1>{{.song}}</h1>
|
<h1>{{.song.name}}</h1>
|
||||||
@partial partials/firstlast_listens(scrobbles: .song.scrobbles, rank: .song.rank, firstlast: .firstlast)
|
<div>{{.song.scrobbles}} scrobbles ({{.song.rank}} place)</div>
|
||||||
|
@partial partials/firstlast_listens(firstlast: .firstlast)
|
||||||
<h3>Yearly Performance</h3>
|
<h3>Yearly Performance</h3>
|
||||||
@partial partials/timescale(range: .yearly)
|
@partial partials/timescale(range: .yearly)
|
||||||
<h2>Scrobbles</h2>
|
<h2>Scrobbles</h2>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue