2024-06-16 17:39:26 +02:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Liste des Albums - Dix heures</title>
|
|
|
|
<link rel="stylesheet" href="<?= base_url('assets/style.css') ?>">
|
2024-06-19 14:08:59 +02:00
|
|
|
|
2024-06-16 17:39:26 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<section class="section">
|
|
|
|
<div class="container">
|
2024-06-19 14:08:59 +02:00
|
|
|
<h1 class="title">Liste des Albums</h1>
|
|
|
|
|
|
|
|
<!-- Liste des albums -->
|
|
|
|
<div class="columns is-multiline">
|
2024-06-16 17:39:26 +02:00
|
|
|
<?php foreach ($albums as $album): ?>
|
2024-06-19 14:08:59 +02:00
|
|
|
<div class="column is-one-quarter">
|
2024-06-16 17:39:26 +02:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-image">
|
|
|
|
<figure class="image is-4by3">
|
|
|
|
<img src="data:image/jpeg;base64,<?= base64_encode($album->jpeg) ?>" alt="<?= $album->name ?>">
|
|
|
|
</figure>
|
|
|
|
</div>
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="media">
|
|
|
|
<div class="media-content">
|
2024-06-19 14:08:59 +02:00
|
|
|
<p class="title is-4"><?= anchor("albums/view/{$album->id}", $album->name) ?></p>
|
|
|
|
<p class="subtitle is-6"><?= $album->artistName ?> - <?= $album->year ?></p>
|
|
|
|
<?php if ($is_logged_in): ?>
|
2024-06-16 17:39:26 +02:00
|
|
|
<form method="post" action="<?= site_url('playlist/selectPlaylist') ?>">
|
|
|
|
<input type="hidden" name="itemId" value="<?= $album->id ?>">
|
|
|
|
<input type="hidden" name="itemType" value="album">
|
2024-06-19 14:08:59 +02:00
|
|
|
<button type="submit" class="button is-link">Ajouter à la playlist</button>
|
2024-06-16 17:39:26 +02:00
|
|
|
</form>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-06-05 08:41:16 +02:00
|
|
|
</div>
|
2024-06-05 08:37:40 +02:00
|
|
|
</div>
|
2024-06-16 17:39:26 +02:00
|
|
|
<?php endforeach; ?>
|
2024-06-05 08:37:40 +02:00
|
|
|
</div>
|
2024-06-19 14:08:59 +02:00
|
|
|
|
|
|
|
<!-- Pagination -->
|
|
|
|
<nav class="pagination" role="navigation" aria-label="pagination">
|
|
|
|
<?= $pagination ?>
|
|
|
|
</nav>
|
2024-06-05 08:37:40 +02:00
|
|
|
</div>
|
2024-06-16 17:39:26 +02:00
|
|
|
</section>
|
2024-06-19 14:08:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-16 17:39:26 +02:00
|
|
|
</body>
|
|
|
|
</html>
|
2024-06-19 14:08:59 +02:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.card {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.card-image {
|
|
|
|
flex-shrink: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.card-content {
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.card-footer {
|
|
|
|
flex-shrink: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.album-title, .artist-title, .music-title {
|
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
-webkit-line-clamp: 2; /* Limite à 2 lignes */
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
height: 3em; /* Ajuste en fonction de la taille de la police */
|
|
|
|
}
|
|
|
|
|
2024-06-19 15:47:11 +02:00
|
|
|
.pagination a, .pagination span {
|
|
|
|
padding: 8px 12px;
|
|
|
|
margin: 0 2px;
|
|
|
|
border-radius: 4px;
|
|
|
|
border: 1px solid #b02dff; /* Couleur violet clair */
|
|
|
|
color: #b02dff; /* Couleur violet clair */
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2024-06-19 14:08:59 +02:00
|
|
|
|
2024-06-19 15:47:11 +02:00
|
|
|
.pagination a:hover {
|
|
|
|
background-color: #f3e8ff; /* Couleur violet très clair */
|
|
|
|
border-color: #a86bff; /* Couleur violet moyen */
|
|
|
|
}
|
2024-06-19 14:08:59 +02:00
|
|
|
|
2024-06-19 15:47:11 +02:00
|
|
|
.pagination .is-current {
|
|
|
|
background-color: #8a4dff; /* Couleur violet de Bulma */
|
|
|
|
border-color: #8a4dff; /* Couleur violet de Bulma */
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
</style>
|