diff --git a/api/api b/api/api index f4c2222..b204f8b 100755 Binary files a/api/api and b/api/api differ diff --git a/api/main.go b/api/main.go index 07d3b95..9566b95 100644 --- a/api/main.go +++ b/api/main.go @@ -26,6 +26,7 @@ func main() { client_id := os.Getenv("SPOTIFY_CLIENT_ID") redirect_uri := "https://cs2440.joshashton.dev/music" + //redirect_uri := "http://localhost/music" scope := "user-top-read" redirectURL := "https://accounts.spotify.com/authorize?" + strings.Join([]string{ diff --git a/music/core.php b/music/core.php index 66c494b..aa8dc93 100644 --- a/music/core.php +++ b/music/core.php @@ -17,12 +17,13 @@ $content = ''; foreach ($albums as $album) { $content = $content . '
| Name | diff --git a/music/css/styles.css b/music/css/styles.css index 8b13789..b38a13f 100644 --- a/music/css/styles.css +++ b/music/css/styles.css @@ -1 +1,87 @@ +* { + margin: 0; + padding: 0; +} +body { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + margin-bottom: 5%; +} + +h1 { + font-size: clamp(5vw, 7vw, 10vw); +} + +h3 { + font-size: clamp(1vw, 1.5vw, 2vw); + text-align: center; +} + +a { + color: white; +} + +table { + width: 100%; +} + +td { + border: 1px solid black; + text-align: center; + width: 400px; + padding: 5%; +} + +.center { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +#songs { + display: grid; + grid-template-columns: 20% 20% 20% 20%; + column-gap: 5%; + row-gap: 75px; + + width: 80%; + + justify-content: center; +} + +.song_card { + padding: 5%; + background-color: gray; + border-radius: 18px; +} + +.song_card img { + margin: 5%; + width: 60%; + height: auto; + + border: 1px solid black; +} + +#switcher { + position: absolute; + top: 0; + right: 0; + z-index: 300; + + margin: 3%; + padding: 2%; + background-color: #E1341E; + color: white; + font-weight: 1000; + font-size: 1.5vw; +} + +#switcher:hover { + background-color: #E75D4B; +} diff --git a/music/explore.php b/music/explore.php index 4e3da73..341e02a 100644 --- a/music/explore.php +++ b/music/explore.php @@ -79,6 +79,7 @@ function get_access_token($auth_code, $client_id, $client_secret) $data = array( 'grant_type' => 'authorization_code', 'code' => $auth_code, + // 'redirect_uri' => 'http://localhost/music' 'redirect_uri' => 'https://cs2440.joshashton.dev/music' ); @@ -145,6 +146,7 @@ function get_albums($auth_code, $client_id, $client_secret) 'album_name' => $song['album']['name'], 'album_id' => $song['album']['id'], 'artist' => $song['artists'][0]['name'], + 'artist_id' => $song['artists'][0]['id'], ); } @@ -153,15 +155,21 @@ function get_albums($auth_code, $client_id, $client_secret) $song_data = $_SESSION['data']; } + echo '
|---|