test changement css 4/?
This commit is contained in:
parent
b197a19e07
commit
cf2f31cf2a
application/views
@ -1,27 +1,22 @@
|
||||
<h5 class="title is-5">Liste des Albums</h5>
|
||||
<h5 class="title is-5 has-text-white">Liste des Albums</h5>
|
||||
<section class="columns is-multiline">
|
||||
|
||||
<?php
|
||||
foreach($albums as $album){
|
||||
echo "<div class='column is-one-quarter'>";
|
||||
echo "<article class='card'>";
|
||||
echo "<div class='card-image'>";
|
||||
echo '<figure class="image is-4by3">';
|
||||
echo '<img src="data:image/jpeg;base64,'.base64_encode($album->jpeg).'" alt="'.$album->name.'">';
|
||||
echo '</figure>';
|
||||
echo "</div>";
|
||||
echo "<div class='card-content'>";
|
||||
echo "<div class='media'>";
|
||||
echo "<div class='media-content'>";
|
||||
echo "<p class='title is-4'>";
|
||||
echo anchor("albums/view/{$album->id}", "{$album->name}");
|
||||
echo "</p>";
|
||||
echo "<p class='subtitle is-6'>{$album->year} - {$album->artistName}</p>";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
echo "</div>";
|
||||
echo "</article>";
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
<?php foreach($albums as $album): ?>
|
||||
<div class="column is-one-quarter">
|
||||
<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">
|
||||
<p class="title is-4
|
||||
<?= anchor("albums/view/{$album->id}", $album->name) ?></p>
|
||||
<p class="subtitle is-6"><?= "{$album->year} - {$album->artistName}" ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
@ -1,22 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?= $artist->artistName ?> - Details</title>
|
||||
<title><?= $album->albumName ?> - Details</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1><?= $artist->artistName ?></h1>
|
||||
<?php if (!empty($artist->genreName)): ?>
|
||||
<p><strong>Genre:</strong> <?= $artist->genreName ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($artist->jpeg)): ?>
|
||||
<img src="data:image/jpeg;base64,<?= base64_encode($artist->jpeg) ?>" alt="<?= $artist->artistName ?> Photo">
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>Albums</h2>
|
||||
<ul>
|
||||
<?php foreach ($albums as $album): ?>
|
||||
<li><?= anchor("albums/view/{$album->albumId}", $album->albumName) ?> (<?= $album->year ?>)</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title has-text-white"><?= $album->albumName ?></h1>
|
||||
<div class="columns">
|
||||
<div class="column is-one-third">
|
||||
<figure class="image is-square">
|
||||
<img src="data:image/jpeg;base64,<?= base64_encode($album->jpeg) ?>" alt="<?= $album->albumName ?> Cover">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="column">
|
||||
<p><strong>Artist:</strong> <?= $album->artistName ?></p>
|
||||
<p><strong>Genre:</strong> <?= $album->genreName ?></p>
|
||||
<p><strong>Year:</strong> <?= $album->year ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="title is-4 has-text-white">Songs</h2>
|
||||
<ul>
|
||||
<?php foreach ($songs as $song): ?>
|
||||
<li><?= anchor("music/view/{$song->trackId}", $song->trackName) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,44 +1,65 @@
|
||||
<div>
|
||||
<div>
|
||||
<div class="box">
|
||||
<div class="field">
|
||||
<!-- Champ de recherche -->
|
||||
<form method="GET" action="">
|
||||
<input type="text" name="query" placeholder="Rechercher..." value="<?= isset($_GET['query']) ? $_GET['query'] : '' ?>">
|
||||
<div class="control has-icons-left">
|
||||
<input class="input is-dark" type="text" name="query" placeholder="Rechercher..." value="<?= isset($_GET['query']) ? $_GET['query'] : '' ?>">
|
||||
<span class="icon is-left">
|
||||
<i class="fa fa-search"></i>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Bouton pour afficher/masquer les filtres -->
|
||||
<button type="button" onclick="toggleFilters()">Filtrer</button>
|
||||
<button class="button is-dark" type="button" onclick="toggleFilters()">Filtrer</button>
|
||||
</div>
|
||||
|
||||
<!-- Div contenant les filtres, cachée par défaut -->
|
||||
<div id="filters" style="display: none;">
|
||||
<form method="GET" action="">
|
||||
|
||||
<!-- Filtre par artiste -->
|
||||
<label for="">Artiste : </label>
|
||||
<select name="artist" id="artist" onchange="this.form.submit()">
|
||||
<option value=''>Tous</option>
|
||||
<?php foreach($artistes as $artiste): ?>
|
||||
<option value="<?= $artiste->name ?>" <?= isset($_GET['artist']) && $_GET['artist'] == $artiste->name ? 'selected' : '' ?>><?= $artiste->name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="field">
|
||||
<label class="label" for="artist">Artiste</label>
|
||||
<div class="control">
|
||||
<div class="select is-dark">
|
||||
<select name="artist" id="artist" onchange="this.form.submit()">
|
||||
<option value=''>Tous</option>
|
||||
<?php foreach($artistes as $artiste): ?>
|
||||
<option value="<?= $artiste->name ?>" <?= isset($_GET['artist']) && $_GET['artist'] == $artiste->name ? 'selected' : '' ?>><?= $artiste->name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filtre par genre -->
|
||||
<label for="">Genre : </label>
|
||||
<select name="genre" id="genre" onchange="this.form.submit()">
|
||||
<option value=''>Tous</option>
|
||||
<?php foreach($genres as $genre): ?>
|
||||
<option value="<?= $genre->name ?>" <?= isset($_GET['genre']) && $_GET['genre'] == $genre->name ? 'selected' : '' ?>><?= $genre->name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div class="field">
|
||||
<label class="label" for="genre">Genre</label>
|
||||
<div class="control">
|
||||
<div class="select is-dark">
|
||||
<select name="genre" id="genre" onchange="this.form.submit()">
|
||||
<option value=''>Tous</option>
|
||||
<?php foreach($genres as $genre): ?>
|
||||
<option value="<?= $genre->name ?>" <?= isset($_GET['genre']) && $_GET['genre'] == $genre->name ? 'selected' : '' ?>><?= $genre->name ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Filtre par ordre -->
|
||||
<label for="">Ordre : </label>
|
||||
<select name="order" id="order" onchange="this.form.submit()">
|
||||
<option value="">Ordre :</option>
|
||||
<option value="asc" <?= isset($_GET['order']) && $_GET['order'] == 'asc' ? 'selected' : '' ?>>Croissant</option>
|
||||
<option value="desc" <?= isset($_GET['order']) && $_GET['order'] == 'desc' ? 'selected' : '' ?>>Décroissant</option>
|
||||
</select>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="order">Ordre</label>
|
||||
<div class="control">
|
||||
<div class="select is-dark">
|
||||
<select name="order" id="order" onchange="this.form.submit()">
|
||||
<option value="">Ordre :</option>
|
||||
<option value="asc" <?= isset($_GET['order']) && $_GET['order'] == 'asc' ? 'selected' : '' ?>>Croissant</option>
|
||||
<option value="desc" <?= isset($_GET['order']) && $_GET['order'] == 'desc' ? 'selected' : '' ?>>Décroissant</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,32 +6,53 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<?= link_tag('assets/style.css') ?>
|
||||
<style>
|
||||
body {
|
||||
background-color: #121212;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.navbar {
|
||||
background-color: #000000;
|
||||
}
|
||||
.navbar-item {
|
||||
color: white;
|
||||
}
|
||||
.hero {
|
||||
background-color: #282828;
|
||||
color: white;
|
||||
}
|
||||
.card {
|
||||
background-color: #1e1e1e;
|
||||
color: white;
|
||||
}
|
||||
.button, .input, .select {
|
||||
background-color: #282828;
|
||||
color: white;
|
||||
border-color: #282828;
|
||||
}
|
||||
.button:hover, .input:hover, .select:hover {
|
||||
background-color: #3b3b3b;
|
||||
border-color: #3b3b3b;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar is-fixed-top has-background-dark" role="navigation" aria-label="main navigation">
|
||||
<nav class="navbar">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item has-text-white" href="#">
|
||||
<h2><strong>Dix heures</strong></h2>
|
||||
</a>
|
||||
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</a>
|
||||
<a class="navbar-item" href="#">Dix heures</a>
|
||||
</div>
|
||||
|
||||
<div id="navbarBasicExample" class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<a class="navbar-item" href="<?= site_url('albums'); ?>">Albums</a>
|
||||
<a class="navbar-item" href="<?= site_url('artistes'); ?>">Artistes</a>
|
||||
<a class="navbar-item" href="<?= site_url('music'); ?>">Music</a>
|
||||
<div class="navbar-menu">
|
||||
<div class="navbar-end">
|
||||
<a class="navbar-item" href="<?= site_url('albums') ?>">Albums</a>
|
||||
<a class="navbar-item" href="<?= site_url('artistes') ?>">Artistes</a>
|
||||
<a class="navbar-item" href="<?= site_url('music') ?>">Music</a>
|
||||
<?php if (isset($is_logged_in) && $is_logged_in): ?>
|
||||
<a class="navbar-item" href="<?= site_url('playlist'); ?>">Playlist</a>
|
||||
<a class="navbar-item" href="<?= site_url('connect/logout'); ?>">Déconnexion</a>
|
||||
<a class="navbar-item" href="<?= site_url('playlist') ?>">Playlist</a>
|
||||
<a class="navbar-item" href="<?= site_url('connect/logout') ?>">Déconnexion</a>
|
||||
<?php else: ?>
|
||||
<a class="navbar-item" href="<?= site_url('connect/login'); ?>">Connexion</a>
|
||||
<a class="navbar-item" href="<?= site_url('connect/login') ?>">Connexion</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<main class="container mt-5">
|
||||
<main class="container">
|
||||
|
Loading…
x
Reference in New Issue
Block a user