This commit is contained in:
stiti 2024-05-31 12:07:09 +02:00
parent fc4a71158c
commit 5096daeda0
3 changed files with 8 additions and 5 deletions

View File

@ -37,7 +37,7 @@
<?php echo anchor("albums/view/{$album->id}", $album->name); ?>
</header>
<img src="data:image/jpeg;base64,<?php echo base64_encode($album->jpeg); ?>" alt="<?php echo $album->name; ?>">
<footer class="short-text"><?php echo $album->year; ?> - <?php echo $album->artistName; ?></footer>
<footer class="short-text"><?php echo $album->year; ?> - <?php echo $album->artistName; ?><br><br>
<?php if ($this->session->userdata('user_id')): ?>
<select id="playlist_<?php echo $album->id; ?>" class="select-playlist">
<?php foreach ($user_playlists as $playlist) : ?>
@ -46,6 +46,7 @@
</select>
<button onclick="addToPlaylist(<?php echo $album->id; ?>)" class="btn-add-to-playlist">Ajouter l'album à la playlist</button>
<?php endif; ?>
</footer>
</article>
</div>
<?php endforeach; ?>

View File

@ -52,7 +52,7 @@
<!-- Lien YouTube -->
<a href="https://www.youtube.com/results?search_query=<?php echo urlencode($musique->name . ' ' . $musique->artistName); ?>" class="youtube" target="_blank">YouTube</a>
</div>
<br>
<?php if ($this->session->userdata('user_id')): ?>
<select id="playlist_music_<?php echo $musique->id; ?>" class="select-playlist">
<?php foreach ($user_playlists as $playlist) : ?>

View File

@ -196,21 +196,23 @@ header.short-text a {
footer.short-text {
display: flex;
flex-direction: column;
align-items: center; /* Center the items vertically */
}
/* Style pour la liste déroulante */
.select-playlist {
display: inline-block; /* Transformer en élément inline-block */
padding: 8px 15px; /* Rembourrage intérieur */
font-size: 16px; /* Taille de la police */
border: 1px solid #ccc; /* Bordure */
border-radius: 4px; /* Coins arrondis */
background-color: #f0f0f0;
margin-right: 10px; /* Marge à droite pour l'espace entre la liste déroulante et le bouton */
margin-bottom: 10px; /* Ajout d'un espace en bas */
}
/* Style pour le bouton Ajouter à la playlist */
.btn-add-to-playlist {
display: inline-block; /* Transformer en élément inline-block */
background-color: #6021aa; /* Couleur de fond */
color: white; /* Couleur du texte */
padding: 10px 20px; /* Rembourrage intérieur */