feat(artists): change albums table to grid on artist pages
This commit is contained in:
parent
80b0499550
commit
9b4baad5fb
14 changed files with 180 additions and 88 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue