fix(genre.php.liquid): add and word as a separator at the proper point when listing top artists for a genre
This commit is contained in:
parent
53e160ebc1
commit
afa7144142
3 changed files with 198 additions and 263 deletions
|
@ -15,7 +15,12 @@ schema: genre
|
|||
foreach ($artists as $artist) {
|
||||
$artistLinks[] = '<a href="' . htmlspecialchars($artist["url"]) . '">' . htmlspecialchars($artist["name"]) . '</a>';
|
||||
}
|
||||
echo implode(', ', $artistLinks);
|
||||
if (count($artistLinks) > 1) {
|
||||
$last = array_pop($artistLinks);
|
||||
echo implode(', ', $artistLinks) . ' and ' . $last;
|
||||
} else {
|
||||
echo implode('', $artistLinks);
|
||||
}
|
||||
?>. I've listened to <mark><?= $genre["total_plays"] . ' ' . pluralize($genre["total_plays"], "play") ?></mark> tracks from this genre.</p>
|
||||
<hr />
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue