Fix column width; sort by datetime instead of id

This commit is contained in:
Laura Hausmann 2022-11-20 19:57:06 +01:00
parent 6a37419252
commit cd5b050b83
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -5,7 +5,7 @@
@{
ViewData["title"] = "now playing";
var db = new Database.DbConn();
var albums = db.AlbumHistory.OrderByDescending(p => p.EntryId).Take(10);
var albums = db.AlbumHistory.OrderByDescending(p => p.DateTime).Take(10);
}
<p>Here you can see what kind of music I've been listening to lately. This table is updated every couple minutes from multiple data sources.</p>
@ -18,7 +18,7 @@
<th style="width:10ch">Date</th>
<th>Artist</th>
<th>Album</th>
<th style="width: 20ch">Link</th>
<th style="width:12ch">Link</th>
@foreach (var album in albums.Take(25)) {
<tr>
<td>@album.DateTime.ToString("yyyy-MM-dd")</td>