diff --git a/components/CardAlbum/index.jsx b/components/CardAlbum/index.jsx index 5594d74..8ba1485 100644 --- a/components/CardAlbum/index.jsx +++ b/components/CardAlbum/index.jsx @@ -27,7 +27,7 @@ export default function CardAlbum({ allData, inputSearchValue }) {
- + {el?.title}

{el?.title}

diff --git a/components/CardAlbum/styles.module.scss b/components/CardAlbum/styles.module.scss index 0c1b1bf..4db39b1 100644 --- a/components/CardAlbum/styles.module.scss +++ b/components/CardAlbum/styles.module.scss @@ -22,6 +22,14 @@ background-color: red; box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.346); border-radius: 10px; + + + img { + width: 100%; + height: 100%; + border-radius: 10px; + + } } diff --git a/components/FilterButtonAlbum/index.jsx b/components/FilterButtonAlbum/index.jsx index 3fbe3cb..daeb339 100644 --- a/components/FilterButtonAlbum/index.jsx +++ b/components/FilterButtonAlbum/index.jsx @@ -1,3 +1,5 @@ +import styles from "./styles.module.scss" + const FilterButtonAlbum = ({ albumFilterFunc, setPopAlbum, isPoppedAlbum }) => { function booleanValuefunc() { @@ -5,7 +7,13 @@ const FilterButtonAlbum = ({ albumFilterFunc, setPopAlbum, isPoppedAlbum }) => { albumFilterFunc(isPoppedAlbum); } -return ; +return + + + }; export default FilterButtonAlbum; \ No newline at end of file diff --git a/components/FilterButtonAlbum/styles.module.scss b/components/FilterButtonAlbum/styles.module.scss new file mode 100644 index 0000000..ba893e4 --- /dev/null +++ b/components/FilterButtonAlbum/styles.module.scss @@ -0,0 +1,3 @@ +.selected { + border: 2px solid red; +} \ No newline at end of file diff --git a/components/FilterButtonPlaylist/index.jsx b/components/FilterButtonPlaylist/index.jsx index fd77003..d9e688b 100644 --- a/components/FilterButtonPlaylist/index.jsx +++ b/components/FilterButtonPlaylist/index.jsx @@ -1,3 +1,6 @@ +import styles from "./styles.module.scss" + + const FilterButtonPlaylist = ({playlistFilterFunc, setPoppedPlaylist, isPoppedPlaylist}) => { function booleanPlaylistValue() { @@ -6,7 +9,7 @@ const FilterButtonPlaylist = ({playlistFilterFunc, setPoppedPlaylist, isPoppedPl } return ( - ) diff --git a/components/FilterButtonPlaylist/styles.module.scss b/components/FilterButtonPlaylist/styles.module.scss new file mode 100644 index 0000000..ba893e4 --- /dev/null +++ b/components/FilterButtonPlaylist/styles.module.scss @@ -0,0 +1,3 @@ +.selected { + border: 2px solid red; +} \ No newline at end of file diff --git a/components/Footer/index.jsx b/components/Footer/index.jsx new file mode 100644 index 0000000..b9d2eea --- /dev/null +++ b/components/Footer/index.jsx @@ -0,0 +1,21 @@ +import styles from "./styles.module.scss"; + + +const Footer = () => { + return ( + +
+

Made with Next.JS by

+ +
+
+ ) +} + +export default Footer; \ No newline at end of file diff --git a/components/Footer/styles.module.scss b/components/Footer/styles.module.scss new file mode 100644 index 0000000..168e0bc --- /dev/null +++ b/components/Footer/styles.module.scss @@ -0,0 +1,24 @@ +.Footer { + + li { + list-style: none; + display: inline-block; + padding: 0; + margin-right: 5px; + font-size: 10px; + } + + li a { + color: #263238; + } + + @media all and (max-width: 767px) { + + text-align: center; + + li a { + color: #fff; + } + } + +} \ No newline at end of file diff --git a/components/Navbar/index.jsx b/components/Navbar/index.jsx index 1c60e69..1bb9aab 100644 --- a/components/Navbar/index.jsx +++ b/components/Navbar/index.jsx @@ -26,6 +26,12 @@ const Navbar = () => { Search + +
  • + + Favorite + +
  • diff --git a/components/SongsList/index.jsx b/components/SongsList/index.jsx index 9becd13..83e596c 100644 --- a/components/SongsList/index.jsx +++ b/components/SongsList/index.jsx @@ -5,7 +5,7 @@ import React from "react"; export default function SongList({ album, playlist }) { return ( album ? -
    +
      {album?.songs.map((song) => (
    1. @@ -18,7 +18,7 @@ export default function SongList({ album, playlist }) {
        {playlist?.songs.map((song) => ( -
      1. +
      2. {song}
      3. ))} diff --git a/components/SongsList/styles.module.scss b/components/SongsList/styles.module.scss index 43c550f..f88080d 100644 --- a/components/SongsList/styles.module.scss +++ b/components/SongsList/styles.module.scss @@ -1,8 +1,22 @@ -.song_container { - padding: 20px 0; - -} -.song_container:hover { + +.SongList { + margin: 40px; + + ol { + list-style-position:inside; + } + + li { + border-bottom: 1px solid #CFD8DC; + padding: 20px 0; + } + li:last-child { + border-bottom: 0; + } + + li:hover { background-color: rgba(128, 128, 128, 0.100); - } \ No newline at end of file + } + +} \ No newline at end of file diff --git a/pages/album/[id].jsx b/pages/album/[id].jsx index 76d440d..3c30369 100644 --- a/pages/album/[id].jsx +++ b/pages/album/[id].jsx @@ -1,6 +1,14 @@ import SongList from "../../components/SongsList"; import styles from "./styles.module.scss"; import StarRating from '../../components/StarRating'; +import { useState} from "react"; + +import {putAlbum} from "../../utils"; +import Navbar from "../../components/Navbar"; +import Footer from "../../components/Footer"; + +import { AiFillHeart,AiOutlineHeart} from 'react-icons/ai'; + export const getStaticProps = async (context) => { const id = context.params.id; @@ -31,25 +39,90 @@ export const getStaticPaths = async () => { }; export default function AlbumId({ album }) { + +const [isPopped, setPopped] = useState(false); + + + + + const AddFavorite = async () => { + + if(album.favorite === true) { // Caso 1: favorite è true dall' API. Settalo a false + + setPopped(!isPopped); + await putAlbum(album.id , { + favorite: false + }) + + console.log("Caso 1: favorite è true dall' API. Settalo a false") + + } else { // Caso 2: favorite è false favorite dall' API. Settalo a true + + setPopped(!isPopped); + await putAlbum(album.id , { + favorite: true + }) + + console.log("Caso 2: favorite è false favorite dall' API. Settalo a true") + + } + + } + + + return ( <> -
        -
        -
        - -
        -
        -

        {album.title}

        -

        + +

        + +
        + + + +
        +
        + +
        +
        + {album.title} +
        + +
        +

        {album.title}

        +

        {album.artist} ft. {album.featuring.join(", ")} -

        -

        {album.year}

        -

        {album.genres.join(" ")}

        - +

        +

        {album.year}

        +

        {album.genres.join(" ")}

        + + +
        + +
        + +
        + + +
        + + + + +
        -
        - + + + + +