diff --git a/ci/application/config/config.php b/ci/application/config/config.php index e901ca5..80d6f99 100644 --- a/ci/application/config/config.php +++ b/ci/application/config/config.php @@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | a PHP script and you can easily do that on your own. | */ -$config['base_url'] = '/~brigitte/SAEWEB2.2/ci'; +$config['base_url'] = 'https://dwarves.iut-fbleau.fr/~boutaric/test/ci/'; /* |-------------------------------------------------------------------------- diff --git a/ci/application/config/routes.php b/ci/application/config/routes.php index 2785ed9..e8e2296 100644 --- a/ci/application/config/routes.php +++ b/ci/application/config/routes.php @@ -49,6 +49,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); | Examples: my-controller/index -> my_controller/index | my-controller/my-method -> my_controller/my_method */ -$route['default_controller'] = 'albums'; +$route['default_controller'] = 'welcome'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; diff --git a/ci/application/controllers/Albums.php b/ci/application/controllers/Albums.php index 7b7e917..a62c2f7 100644 --- a/ci/application/controllers/Albums.php +++ b/ci/application/controllers/Albums.php @@ -3,22 +3,29 @@ defined('BASEPATH') OR exit('No direct script access allowed'); class Albums extends CI_Controller { - public function __construct(){ - parent::__construct(); - $this->load->model('model_music'); - } - public function index(){ - $albums = $this->model_music->getAlbums(); - $this->load->view('layout/header'); - $this->load->view('albums_list',['albums'=>$albums]); - $this->load->view('layout/footer'); - } + public function __construct(){ + parent::__construct(); + $this->load->model('model_music'); + } - public function view($album_id){ - $songs = $this->model_music->getSongOfAlbum($album_id); - $this->load->view('layout/header'); - $this->load->view('song_album_list',['songs'=>$songs]); - $this->load->view('layout/footer'); - } + public function index(){ + $albums = $this->model_music->getAlbums(); + $this->load->view('layout/header_album'); + $this->load->view('albums_list', ['albums' => $albums]); + $this->load->view('layout/footer_album'); + } + + public function view($album_id){ + $songs = $this->model_music->getSongsByAlbum($album_id); + if (empty($songs)) { + $songs = []; // Assurez-vous que $songs est un tableau vide si aucune chanson n'est trouvée + } + // Debugging: Log the $songs variable to see its content + log_message('debug', 'Songs: ' . print_r($songs, true)); + + $this->load->view('layout/header_album'); + $this->load->view('song_album_list', ['songs' => $songs]); + $this->load->view('layout/footer_album'); + } } - +?> diff --git a/ci/application/controllers/Artistes.php b/ci/application/controllers/Artistes.php index cfb25dc..61a5960 100644 --- a/ci/application/controllers/Artistes.php +++ b/ci/application/controllers/Artistes.php @@ -9,15 +9,9 @@ class artistes extends CI_Controller { } public function index(){ $artistes = $this->model_music->getArtists(); - $this->load->view('layout/header'); + $this->load->view('layout/header_artistes'); $this->load->view('artistes_list',['artistes'=>$artistes]); - $this->load->view('layout/footer'); - } - public function view($AlbumsOfArtistId){ - $AlbumsOfArtist = $this->model_music->getAlbumsOfArtist($AlbumsOfArtistId); - $this->load->view('layout/header'); - $this->load->view('albums_artist_list',['AlbumsOfArtist'=>$AlbumsOfArtist]); - $this->load->view('layout/footer'); + $this->load->view('layout/footer_artistes'); } } \ No newline at end of file diff --git a/ci/application/controllers/Chansons.php b/ci/application/controllers/Chansons.php index 894234c..992e9d6 100644 --- a/ci/application/controllers/Chansons.php +++ b/ci/application/controllers/Chansons.php @@ -9,9 +9,9 @@ class Albums extends CI_Controller { } public function index(){ $albums = $this->model_music->getAlbums(); - $this->load->view('layout/header'); + $this->load->view('layout/header_chanson'); $this->load->view('albums_list',['albums'=>$albums]); - $this->load->view('layout/footer'); + $this->load->view('layout/footer_chanson'); } } diff --git a/ci/application/controllers/Song.php b/ci/application/controllers/Song.php index 77b552a..0161f08 100644 --- a/ci/application/controllers/Song.php +++ b/ci/application/controllers/Song.php @@ -10,8 +10,8 @@ class Song extends CI_Controller { public function view($album_id){ $songs = $this->model_music->getSongOfAlbum($album_id); - $this->load->view('layout/header'); + $this->load->view('layout/header_song'); $this->load->view('song_album_list',['songs'=>$songs]); - $this->load->view('layout/footer'); + $this->load->view('layout/footer_song'); } } \ No newline at end of file diff --git a/ci/application/controllers/Welcome.php b/ci/application/controllers/Welcome.php index 5f82771..edd94e8 100644 --- a/ci/application/controllers/Welcome.php +++ b/ci/application/controllers/Welcome.php @@ -1,25 +1,15 @@ - * @see https://codeigniter.com/userguide3/general/urls.html - */ - public function index() - { - $this->load->view('welcome_message'); + public function __construct(){ + parent::__construct(); + $this->load->model('model_music'); } + public function index(){ + $this->load->view('layout/header'); + $this->load->view('layout/footer'); + } + } diff --git a/ci/application/views/albums_list.php b/ci/application/views/albums_list.php index 45d0462..ad8709b 100644 --- a/ci/application/views/albums_list.php +++ b/ci/application/views/albums_list.php @@ -1,14 +1,14 @@ -
Albums list
-
+
Liste des albums
+
"; - echo "
"; - echo anchor("Song/view/{$album->id}","{$album->name}"); - echo "
"; - echo ''; - echo "
{$album->year} - {$album->artistName}
-
"; + echo "
"; + echo "
"; + echo anchor("Song/view/{$album->id}", "{$album->name}"); + echo "
"; + echo '' . $album->name . ''; + echo ""; + echo "
"; } ?>
diff --git a/ci/application/views/artistes_list.php b/ci/application/views/artistes_list.php index b193ed5..906ebc5 100644 --- a/ci/application/views/artistes_list.php +++ b/ci/application/views/artistes_list.php @@ -11,4 +11,4 @@ foreach($artistes as $artistes){ //"; } ?> -
+ \ No newline at end of file diff --git a/ci/application/views/layout/footer.php b/ci/application/views/layout/footer.php index 63bbae9..41babbe 100644 --- a/ci/application/views/layout/footer.php +++ b/ci/application/views/layout/footer.php @@ -1,3 +1,48 @@ - - + + + + + MUSIC APP + + + + + + diff --git a/ci/application/views/layout/footer_album.php b/ci/application/views/layout/footer_album.php new file mode 100644 index 0000000..a95094d --- /dev/null +++ b/ci/application/views/layout/footer_album.php @@ -0,0 +1,47 @@ + + + + + MUSIC APP + + + + + + \ No newline at end of file diff --git a/ci/application/views/layout/footer_artistes.php b/ci/application/views/layout/footer_artistes.php new file mode 100644 index 0000000..a95094d --- /dev/null +++ b/ci/application/views/layout/footer_artistes.php @@ -0,0 +1,47 @@ + + + + + MUSIC APP + + + + + + \ No newline at end of file diff --git a/ci/application/views/layout/footer_song.php b/ci/application/views/layout/footer_song.php new file mode 100644 index 0000000..a95094d --- /dev/null +++ b/ci/application/views/layout/footer_song.php @@ -0,0 +1,47 @@ + + + + + MUSIC APP + + + + + + \ No newline at end of file diff --git a/ci/application/views/layout/header.php b/ci/application/views/layout/header.php index ea61208..d93a93a 100644 --- a/ci/application/views/layout/header.php +++ b/ci/application/views/layout/header.php @@ -1,28 +1,71 @@ - - - MUSIC APP - - - - - - -
- + + + MUSIC APP + + + +
+ +
+
+ SpotiFly +
+

SpotiFly : envole-toi au rythme de la musique !

+
+
+
+ +
+
+
+ Description de l'image 2 +
+

1 mois gratuit?

+

"Découvrez une expérience musicale sans limites avec notre offre exclusive : abonnez-vous dès aujourd'hui et bénéficiez d'un mois complet GRATUIT pour explorer notre vaste catalogue de musique. Plongez dans un univers de sonorités variées et profitez d'un accès illimité à vos artistes préférés, sans engagement ! Rejoignez-nous dès maintenant pour un mois d'exploration musicale sans pareil."

+
+
+
+
+
+ Description de l'image 3 +
+

La Cognition

+

Découvrez notre nouveaux cube v3 qui peut avoir la voix de votre choix.

+

Plongez dans une réalité où la cognition rencontre la technologie. Notre cube connecté va au-delà de l'ordinaire, réagissant à votre pensée et intégrant la puissance de la cognition pour une expérience holographique incomparable.

+
+
+
+
+
+ Description de l'image 4 +
+

Statistiques

+

"Découvrez les statistiques de notre application de musique : des millions d'utilisateurs s'immergent dans une expérience audio immersive, créant des milliers de playlists et explorant une multitude de genres musicaux, tout en bénéficiant d'un mois gratuit dès l'abonnement !"

+
+
+
+
+ + + + diff --git a/ci/application/views/layout/header_album.php b/ci/application/views/layout/header_album.php new file mode 100644 index 0000000..da01bbf --- /dev/null +++ b/ci/application/views/layout/header_album.php @@ -0,0 +1,33 @@ + + + + + MUSIC APP + + + + +
+ + + + + \ No newline at end of file diff --git a/ci/application/views/layout/header_artistes.php b/ci/application/views/layout/header_artistes.php new file mode 100644 index 0000000..c0224ff --- /dev/null +++ b/ci/application/views/layout/header_artistes.php @@ -0,0 +1,32 @@ + + + + + MUSIC APP + + + +
+ + + + + \ No newline at end of file diff --git a/ci/application/views/layout/header_song.php b/ci/application/views/layout/header_song.php new file mode 100644 index 0000000..c0224ff --- /dev/null +++ b/ci/application/views/layout/header_song.php @@ -0,0 +1,32 @@ + + + + + MUSIC APP + + + +
+ + + + + \ No newline at end of file diff --git a/ci/application/views/song_album_list.php b/ci/application/views/song_album_list.php index d7d07a4..9c3cc4a 100644 --- a/ci/application/views/song_album_list.php +++ b/ci/application/views/song_album_list.php @@ -12,4 +12,4 @@ foreach($songs as $song){ echo ""; } ?> - + \ No newline at end of file diff --git a/ci/assets/SpotiFly-removebg-preview.png b/ci/assets/SpotiFly-removebg-preview.png new file mode 100644 index 0000000..f3dfb60 Binary files /dev/null and b/ci/assets/SpotiFly-removebg-preview.png differ diff --git a/ci/assets/album.css b/ci/assets/album.css new file mode 100644 index 0000000..e489864 --- /dev/null +++ b/ci/assets/album.css @@ -0,0 +1,42 @@ +/* assets/albums_style.css */ +.container { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + margin: 0 auto; + padding: 20px; +} + +.album { + box-sizing: border-box; + width: 18%; + margin-bottom: 20px; + border: 1px solid #ccc; + border-radius: 10px; + padding: 10px; + text-align: center; + background-color: #f9f9f9; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + transition: transform 0.2s; +} + +.album img { + max-width: 100%; + height: auto; + border-bottom: 1px solid #ccc; + margin-bottom: 10px; + border-radius: 10px 10px 0 0; +} + +.album-title { + font-size: 1.2em; + font-weight: bold; + color: #333; + margin-top: 10px; +} + +.album:hover { + transform: scale(1.05); +} + + diff --git a/ci/assets/bouton.js b/ci/assets/bouton.js new file mode 100644 index 0000000..ff94a20 --- /dev/null +++ b/ci/assets/bouton.js @@ -0,0 +1,25 @@ +function scrollToTop() { + window.scrollTo({ + top: 0, + behavior: 'smooth' + }); +} + +// Afficher ou masquer le bouton de scroll en fonction de la position dans la page +document.addEventListener('scroll', function () { + const scrollTopBtn = document.getElementById('scrollTopBtn'); + if (window.scrollY > 200) { + scrollTopBtn.style.display = 'block'; + } else { + scrollTopBtn.style.display = 'none'; + } +}); +// Menu burger +document.addEventListener('DOMContentLoaded', function () { + const burgerMenu = document.querySelector('.burger-menu'); + const navLinks = document.querySelector('.nav-links'); + + burgerMenu.addEventListener('click', function () { + navLinks.classList.toggle('show'); + }); +}); \ No newline at end of file diff --git a/ci/assets/img/SpotiFly.png b/ci/assets/img/SpotiFly.png new file mode 100644 index 0000000..f3dfb60 Binary files /dev/null and b/ci/assets/img/SpotiFly.png differ diff --git a/ci/assets/img/Statistique.png b/ci/assets/img/Statistique.png new file mode 100644 index 0000000..ab6db2c Binary files /dev/null and b/ci/assets/img/Statistique.png differ diff --git a/ci/assets/img/argent.png b/ci/assets/img/argent.png new file mode 100644 index 0000000..7395997 Binary files /dev/null and b/ci/assets/img/argent.png differ diff --git a/ci/assets/img/fond.jpeg b/ci/assets/img/fond.jpeg new file mode 100644 index 0000000..4e2448a Binary files /dev/null and b/ci/assets/img/fond.jpeg differ diff --git a/ci/assets/img/logo_noir.png b/ci/assets/img/logo_noir.png new file mode 100644 index 0000000..4e092ae Binary files /dev/null and b/ci/assets/img/logo_noir.png differ diff --git a/ci/assets/style.css b/ci/assets/style.css index df6266e..115186a 100644 --- a/ci/assets/style.css +++ b/ci/assets/style.css @@ -1,20 +1,278 @@ -section.list -{ - display : flex; - justify-content : space-between; - flex-wrap:wrap; -} -section.list > div -{ -width : 30%; -} -section.list img { - display:inline-block; +body { + margin: 0; + padding: 0; + box-sizing: border-box; + background-color: white; + font-size: 16px; } -.short-text { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; +.navbar a { + color: white; + text-decoration: none; + margin: 0 5px; + +} +.navbar { + background-color: black; + padding: 20px; /* Ajuste la valeur de padding selon tes besoins */ + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + width: 100%; + top: 0; + z-index: 1000; +} +.bouton a{ + color: #FFF; + text-decoration: none; +} +.bouton { + display: flex; + text-decoration: none; + background-color: #1ed860; + font-weight: bold; + padding: 12px; + border-radius: 60px; + border: 2px; + margin: 0 40px; +} +.user{ + margin-right: 50px; + padding-left: center; + list-style: none; + display: flex; + text-decoration: none; + font-weight: bold; + justify-content: space-between; +} +.menu { + display: flex; + flex-direction: column; +} +.menu ul { + list-style: none; + display: flex; + flex-direction: row; + margin: 0; } +.menu li { + display: inline-block; + margin-right: 15px; +} + +.menu a { + text-decoration: none; + font-weight: bold; + color: #FFF; + font-family: Open Sans, 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + font-size: 1.2rem; +} +.menu_déroulant { + position: relative; +} + +.menu_déroulant_content { + display: none; + position: absolute; + top: 100%; + background-color: black; + min-width: 170px; + border-radius: 5px; +} + +.menu_déroulant:hover .menu_déroulant_content { + display: block; +} + +.menu_déroulant_content a { + color: #fff; + padding: 10px; + text-decoration: none; + display: block; +} + +.menu_déroulant_content a:hover { + color: #1ed860; +} +#Page { + text-align: center; + padding: 50px 0; + background: url(img/fond.jpeg); +} + +#Page img { + width: 400px; + height: 400PX; +} + +.text-page { + border-top: 2px solid #1ed860; + margin-top: 100px; + color: white; +} + +#header { + background-color: #1ed860; + padding: 2px 0; +} + +.content { + max-width: 1200px; + margin: 80px auto 0; + padding: 20px; +} +.mention_legale h2{ + color: #1ed860; + font-size: 2em; + margin-left: 400px; +} +.mention_legale{ + background-color: white; + border-radius: 20px; + margin: 60px auto 0; + padding: 40px; +} +.box { + display: flex; + flex-direction: column; + border-radius: 50px; + padding: 20px; + margin: 20px 0; +} +.box-img { + display: flex; + flex-direction: row-reverse; + align-items: center; + justify-content: space-between; +} +.box .box-img img{ + width: 250px; + height: 150px; + border-radius: 8px; + padding-right: 50px; + margin-left: 100px; + object-fit: initial; +} +.box-content{ + display: flex; + flex-direction: row; + align-items: center; +} +.text-content{ + flex: 1; +} +.box p{ + font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; + font-size: 1.2em; + margin-bottom: 10px; + text-align: center; +} +.box h2 { + color: #81b71a; + font-weight: bold; + font-family: 'Open Sans', 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + font-size: 3.5em; + margin-bottom: 10px; +} +.box h3{ + color: #1ed860; + font-weight: bold; + font-size: 2em; + margin-bottom: 10px; +} +.box p{ + text-align: justify; +} +.box img { + width: 200px; + height: 200px; + object-fit: cover; + border-radius: 8px; + margin-right: 50px; + margin-left: 40px; +} +.content-section h2 { + color: #1ed860; +} +body { + font-family: 'Arial', sans-serif; + margin: 0; + padding: 0; + font-size: 16px; +} +.logo img { + padding-left: 10px; + width: 200px; + height: 80px; + margin-right: auto; +} +img { + max-width: 100%; + height: auto; +} +.footer { + background-color: black; + color: white; + padding: 20px; + text-align: center; + margin-top: 20px; +} + + +.footer-content { + display: flex; + justify-content: space-around; +} + +.footer-section { + text-align: center; + margin: 10px; +} + +.footer-logo { + order: 1; +} + +.logo-reseaux { + display: flex; + align-items: center; + justify-content: center; + margin-top: 10px; +} + +.logo-reseaux img { + width: 40px; + height: 40px; +} + +.footer-section h3 { + margin-bottom: 10px; + font-size: 1.5em; +} + +.footer-section a { + color: white; +} + +.footer-section img { + width: 30px; + height: 30px; + margin-right: 5px; +} +#scrollTopBtn { + display: none; + position: fixed; + bottom: 20px; + right: 20px; + background-color: #1ed860; + border: none; + border-radius: 5px; + font-size: 25px; + padding: 10px; + cursor: pointer; +} + + +