From 8e46a70b2506c8478ba116ad0828e23dd2394acd Mon Sep 17 00:00:00 2001 From: stiti Date: Sat, 25 May 2024 16:18:50 +0200 Subject: [PATCH] Correction du CSS + bugs --- .../application/controllers/Playlists.php | 7 +-- .../application/views/playlist_view.php | 4 +- .../assets/css/playlist_view.css | 48 +++++++++++++++++++ 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/CodeIgniter-3.1.13/application/controllers/Playlists.php b/CodeIgniter-3.1.13/application/controllers/Playlists.php index 33c35ff..aa54577 100644 --- a/CodeIgniter-3.1.13/application/controllers/Playlists.php +++ b/CodeIgniter-3.1.13/application/controllers/Playlists.php @@ -124,10 +124,11 @@ class Playlists extends CI_Controller { } public function generate_random() { - $songs = $this->Model_music->get_random_songs(10); // 10 chansons aléatoires + $nbrMusiqueAleatoire = 10; + $songs = $this->Model_music->get_random_songs($nbrMusiqueAleatoire); // 10 chansons aléatoires $new_playlist = array( - 'name' => 'Random Playlist ' . date('Y-m-d H:i:s'), - 'description' => 'A randomly generated playlist', + 'name' => 'Playlist aléatoire du ' . date('Y-m-d H:i:s'), + 'description' => 'Une playlist avec ' . $nbrMusiqueAleatoire . ' musiques aléatoires.', 'utilisateur_id' => $this->session->userdata('user_id') ); diff --git a/CodeIgniter-3.1.13/application/views/playlist_view.php b/CodeIgniter-3.1.13/application/views/playlist_view.php index af0f891..6ff4bb5 100644 --- a/CodeIgniter-3.1.13/application/views/playlist_view.php +++ b/CodeIgniter-3.1.13/application/views/playlist_view.php @@ -3,7 +3,7 @@ Détails de la Playlist - +
@@ -48,7 +48,7 @@ Ajouter une musique Ajouter un album - Retour à la Liste des Playlists + Retour
diff --git a/CodeIgniter-3.1.13/assets/css/playlist_view.css b/CodeIgniter-3.1.13/assets/css/playlist_view.css index 2fa1db7..4db6041 100644 --- a/CodeIgniter-3.1.13/assets/css/playlist_view.css +++ b/CodeIgniter-3.1.13/assets/css/playlist_view.css @@ -67,3 +67,51 @@ p { background-color: #545b62; } +/* Style pour le conteneur principal */ +.container { + margin: 0 auto; + padding: 20px; + background-color: #f9f9f9; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +} + +/* Style pour le titre de la playlist */ +.container h1 { + font-size: 24px; + margin-bottom: 20px; + color: #333; +} + + +/* Style pour les labels */ +label { + font-weight: bold; +} + +/* Style pour les champs de texte */ +input[type="text"], +textarea { + width: 100%; + padding: 10px; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 16px; +} + +/* Style pour le bouton Enregistrer */ +.btn-primary { + display: inline-block; + padding: 10px 20px; + background-color: #7700ff; + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 16px; +} + +/* Style pour le bouton Enregistrer au survol */ +.btn-primary:hover { + background-color: #3c0c72; +}