Skip to content
Snippets Groups Projects
Commit 8fbce61c authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Fix display artist/playlist images

parent cdc14cdf
No related branches found
No related tags found
1 merge request!19Resolve "Improve artist/playlist images display"
@charset "UTF-8";
.spotify-image {
display: inline-block;
text-align: center;
justify-content: center;
align-items: center;
height: 1rem;
width: 1rem;
max-height: 1rem;
max-width: 1rem;
}
.spotify-image>img {
border: solid 1px #888;
text-align: center;
max-height: 1rem;
max-width: 1rem;
margin: auto;
}
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="playlist-generator"> <a class="navbar-brand" href="playlist-generator">
<?php if (count($templateData['user']->images)) { ?> <?php if (count($templateData['user']->images)) { ?>
<img src="<?php echo $templateData['user']->images[0]->url; ?>" alt="" class="rounded border" alt="<?php echo $templateData['user']->display_name; ?>" style="max-height: 2rem;"> <img src="<?php echo $templateData['user']->images[0]->url; ?>" class="rounded border" alt="<?php echo $templateData['user']->display_name; ?>" style="max-height: 2rem;">
<?php } ?> <?php } ?>
<?php echo $templateData['user']->display_name; ?> <?php echo $templateData['user']->display_name; ?>
</a> </a>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
> >
<label class="custom-control-label" for="check-top-artist-<?php echo $artist->id; ?>"> <label class="custom-control-label" for="check-top-artist-<?php echo $artist->id; ?>">
<?php if (count($artist->images)) { ?> <?php if (count($artist->images)) { ?>
<img src="<?php echo $artist->images[count($artist->images) - 1]->url; ?>" style="max-height: 1rem; max-width: 1rem;" /> <span class="spotify-image"><img src="<?php echo $artist->images[count($artist->images) - 1]->url; ?>" style="max-height: 1rem; max-width: 1rem;" /></span>
<?php } ?> <?php } ?>
<?php echo $artist->name; ?> <?php echo $artist->name; ?>
</label> </label>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
> >
<label class="custom-control-label" for="check-playlist-<?php echo $playlist->id; ?>"> <label class="custom-control-label" for="check-playlist-<?php echo $playlist->id; ?>">
<?php if (count($playlist->images)) { ?> <?php if (count($playlist->images)) { ?>
<img src="<?php echo $playlist->images[count($playlist->images) - 1]->url; ?>" style="max-height: 1rem; max-width: 1rem;" /> <span class="spotify-image"><img src="<?php echo $playlist->images[count($playlist->images) - 1]->url; ?>" style="max-height: 1rem; max-width: 1rem;" /></span>
<?php } ?> <?php } ?>
<?php echo $playlist->name; ?> <?php echo $playlist->name; ?>
</label> </label>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment