zotan.pw-web/Pages/NowPlaying.cshtml

30 lines
1 KiB
Plaintext
Raw Normal View History

2022-11-20 03:06:41 +01:00
@page "/np"
2022-11-26 13:23:58 +01:00
@using zotanpw.Backend.database
2022-11-20 03:06:41 +01:00
@model NowPlayingModel
@{
ViewData["title"] = "now playing";
2023-02-03 21:45:07 +01:00
ViewData["og-desc"] = "Here you can see what kind of music I've been listening to lately.";
2022-11-20 16:44:40 +01:00
var db = new Database.DbConn();
var albums = db.AlbumHistory.OrderByDescending(p => p.DateTime).Take(30);
2022-11-20 03:06:41 +01:00
}
<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>
<p style="background-color:#333; padding:5px 7px;">Links to my music library / webplayer are accessible to authorized users only. If you think this includes you, but something isn't working, <a href="/#contact">DM me</a>.</p>
<table>
2022-11-20 17:12:56 +01:00
<th style="width:10ch">Date</th>
2022-11-22 11:27:55 +01:00
<th style="width: 20ch;">Artist</th>
2022-11-20 03:06:41 +01:00
<th>Album</th>
<th style="width:12ch">Link</th>
2022-11-22 00:46:24 +01:00
@foreach (var album in albums) {
2022-11-20 16:44:40 +01:00
<tr>
<td>@album.DateTime.ToString("yyyy-MM-dd")</td>
<td>@album.Artist</td>
<td>@album.Title</td>
<td>
<a href="@album.Link" target="_blank">@album.Source</a>
</td>
</tr>
}
2023-02-03 21:45:07 +01:00
</table>