Create GET function for a song view

This commit is contained in:
mitteneer 2025-05-29 15:33:10 -04:00
parent 3ff973e193
commit d638fa66c5
3 changed files with 106 additions and 21 deletions

View file

@ -1,3 +1,19 @@
<div>
<span>Content goes here</span>
</div>
@zig {
const ColumnChoices = []const enum{song, album, artist, artistlist, scrobbles, date};
const columns: ColumnChoices = &.{.song, .artistlist, .album, .date};
}
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
@partial partials/header
<h1>{{.song}}</h1>
@partial partials/firstlast_listens(scrobbles: .song.scrobbles, rank: .song.rank, firstlast: .firstlast)
<h3>Yearly Performance</h3>
@partial partials/timescale(range: .yearly)
<h2>Scrobbles</h2>
@partial partials/newtable(T: ColumnChoices, table_data: .scrobbles, columns: columns)
</body>
</html>