diff --git a/webdev-prosjekt1/src/App.css b/webdev-prosjekt1/src/App.css index 549c75c..a27a2e4 100644 --- a/webdev-prosjekt1/src/App.css +++ b/webdev-prosjekt1/src/App.css @@ -78,12 +78,43 @@ body { display: flex; gap: 10px; - width: calc(100% - 96px); - max-width: 1400px; + width: 100%; + max-width: 1020px; margin: 14px auto 0; - margin-left: 64px; - margin-right: 64px; + padding: 0 24px; +} + +@media (max-width: 700px) { + .main-header { + padding: 16px 24px 12px; + } + + .app-title-text { + font-size: 40px; + } + + .search-section { + max-width: 100%; + padding: 0 12px; + } + + .hero-section { + width: calc(100% - 48px); + } + + .hero-art { + width: 320px; + min-height: 380px; + } + + .hero-art img { + max-width: 290px; + } + + .art-glow { + width: 230px; + } } .hero-section { @@ -135,34 +166,46 @@ body { filter: blur(45px); } +.card-list { + width: 100%; + list-style: none; + padding: 0; + margin: 0; -@media (max-width: 700px) { - .main-header { - padding: 16px 24px 12px; - } + display: flex; + flex-direction: column; + gap: 12px; +} - .app-title-text { - font-size: 40px; - } +.results-section { + max-width: 1400px; + width: calc(100% - 96px); - .search-controls { - width: calc(100% - 48px); - } + margin: 20px auto 0; + padding: 0 0 60px; - .hero-section { - width: calc(100% - 48px); - } + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 24px; + align-items: start; +} - .hero-art { - width: 320px; - min-height: 380px; +@media (max-width: 900px) { + .results-section { + grid-template-columns: 1fr; + width: calc(100% - 48px); } +} - .hero-art img { - max-width: 290px; - } +.results-group { + display: flex; + flex-direction: column; + gap: 14px; +} - .art-glow { - width: 230px; - } +.results-heading { + margin: 0; + color: var(--primary_color); + font-size: 1.4rem; + letter-spacing: 0.04em; } diff --git a/webdev-prosjekt1/src/App.tsx b/webdev-prosjekt1/src/App.tsx index 34efd0d..e1c10f6 100644 --- a/webdev-prosjekt1/src/App.tsx +++ b/webdev-prosjekt1/src/App.tsx @@ -1,16 +1,20 @@ +import { useState } from 'react'; import './App.css'; import './variables.css'; import { Button } from './components/Button'; import { Searchbar } from './components/Searchbar'; +import { TrackCard } from './components/TrackCard'; +import { AlbumCard } from './components/AlbumCard'; +import { ArtistCard } from './components/ArtistCard'; import filterIcon from './assets/filter.png'; import musicWizImage from './assets/musicwiz.png'; import logoImage from './assets/music-wiz-logo.png'; -import { useState } from 'react'; import { useQuery } from '@tanstack/react-query'; import { search } from './api/spotify'; function App() { const [query, setQuery] = useState(''); + const hasSearched = query.trim().length > 0; const handleSearch = (nextQuery: string) => { setQuery(nextQuery); @@ -54,12 +58,43 @@ function App() {