Spotify.NET/SpotifyAPI.Web.Examples/Example.ASP/Pages/Index.cshtml
2020-05-22 12:23:25 +02:00

46 lines
864 B
Plaintext

@page
@model IndexModel
@inject SpotifyClientBuilder spotifyBuilder
@{
ViewData["Title"] = "Home";
ViewData["Page"] = "index";
}
<div class="text-center">
<h1 class="display-4">
Welcome,
</h1>
<table class="pure-table">
<thead>
<tr>
<th>Image</th>
<th>Name</th>
</tr>
</thead>
<tbody>
@{
foreach (var item in Model.Playlists.Items)
{
<tr>
<td>
@if(item.Images.Any()) {
<img width="100" height="100" src="@item.Images[0].Url">
}
</td>
<td>
@item.Name
</td>
</tr>
}
}
</tbody>
</table>
@if(Model.Previous != null) {
<a href="@Model.Previous">Previous</a>
}
@if(Model.Next != null) {
<a href="@Model.Next">Next</a>
}
</div>