feat(artists): change albums table to grid on artist pages

This commit is contained in:
Cory Dransfeldt 2025-05-24 13:28:04 -07:00
parent 80b0499550
commit 9b4baad5fb
No known key found for this signature in database
14 changed files with 180 additions and 88 deletions

View file

@ -103,20 +103,13 @@ schema: artist
<?php endforeach; ?>
</ul>
<?php endif; ?>
<table>
<tr>
<th>Album</th>
<th>Plays</th>
<th>Year</th>
</tr>
<?php foreach ($artist["albums"] as $album): ?>
<tr>
<td><?= htmlspecialchars($album["name"]) ?></td>
<td><?= $album["total_plays"] > 0 ? $album["total_plays"] : "-" ?></td>
<td><?= $album["release_year"] ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php if (!empty($artist["albums"])): ?>
<h3>
<?= getTablerIcon('vinyl') ?>
Albums
</h3>
<?php renderMediaGrid($artist["albums"], $globals["cdn_url"]); ?>
<?php endif; ?>
</article>
<?php
$html = ob_get_clean();