vaujdui
This commit is contained in:
@@ -5,14 +5,17 @@
|
||||
<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') ?>">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title is-4 has-text-dark">Liste des Albums</h1>
|
||||
<div class="columns is-multiline is-centered">
|
||||
<h1 class="title">Liste des Albums</h1>
|
||||
|
||||
<!-- Liste des albums -->
|
||||
<div class="columns is-multiline">
|
||||
<?php foreach ($albums as $album): ?>
|
||||
<div class="column is-one-quarter-desktop is-half-tablet is-full-mobile">
|
||||
<div class="column is-one-quarter">
|
||||
<div class="card">
|
||||
<div class="card-image">
|
||||
<figure class="image is-4by3">
|
||||
@@ -22,13 +25,13 @@
|
||||
<div class="card-content">
|
||||
<div class="media">
|
||||
<div class="media-content">
|
||||
<p class="title is-4 album-title"><?= anchor("albums/view/{$album->id}", $album->name) ?></p>
|
||||
<p class="subtitle is-6"><?= "{$album->year} - {$album->artistName}" ?></p>
|
||||
<?php if (isset($is_logged_in) && $is_logged_in): ?>
|
||||
<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): ?>
|
||||
<form method="post" action="<?= site_url('playlist/selectPlaylist') ?>">
|
||||
<input type="hidden" name="itemId" value="<?= $album->id ?>">
|
||||
<input type="hidden" name="itemType" value="album">
|
||||
<button type="submit" class="button is-link is-fullwidth">Ajouter à la playlist</button>
|
||||
<button type="submit" class="button is-link">Ajouter à la playlist</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -38,7 +41,64 @@
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<!-- Pagination -->
|
||||
<nav class="pagination" role="navigation" aria-label="pagination">
|
||||
<?= $pagination ?>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<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 */
|
||||
}
|
||||
|
||||
.pagination a, .pagination span {
|
||||
padding: 8px 12px;
|
||||
margin: 0 2px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ddd;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.pagination a:hover {
|
||||
background-color: #f0f0f0;
|
||||
border-color: #bbb;
|
||||
}
|
||||
|
||||
.pagination .is-current {
|
||||
background-color: #3273dc;
|
||||
border-color: #3273dc;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user