diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 01f1ece..cb9e14d 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -14,6 +14,7 @@ const routes: Routes = [ path: 'artists', loadChildren: () => import('./pages/artists/artists.module').then(m => m.ArtistsModule) }, + { path: 'tracks', loadChildren: () => import('./pages/tracks/tracks.module').then(m => m.TracksModule) diff --git a/client/src/app/models/artist.model.ts b/client/src/app/models/artist.model.ts index 3fe112a..53be8e3 100644 --- a/client/src/app/models/artist.model.ts +++ b/client/src/app/models/artist.model.ts @@ -1,10 +1,13 @@ export class Artist { + id: string; name: string; image: string; url: string; - constructor(name: string, image: string, url: string) { + constructor(id: string, name: string, image: string, url: string) { + this.id = id; this.name = name; this.image = image; this.url = url; } + } diff --git a/client/src/app/pages/artists/artist-details/artist-details.component.css b/client/src/app/pages/artists/artist-details/artist-details.component.css new file mode 100644 index 0000000..225741c --- /dev/null +++ b/client/src/app/pages/artists/artist-details/artist-details.component.css @@ -0,0 +1,20 @@ +.overlay { + display: flex; + -webkit-box-pack: center; + justify-content: center; + -webkit-box-align: center; + align-items: center; + position: absolute; + width: 100%; + height: 100%; + border-radius: 50%; + background-color: rgba(0, 0, 0, 0.5); + inset: 0; + color: rgb(255, 255, 255); + opacity: 0; + transition: all 0.25s cubic-bezier(0.3, 0, 0.4, 1) 0s; +} + +.img-container:hover .overlay { + opacity: 1; +} diff --git a/client/src/app/pages/artists/artist-details/artist-details.component.html b/client/src/app/pages/artists/artist-details/artist-details.component.html new file mode 100644 index 0000000..e4ba32f --- /dev/null +++ b/client/src/app/pages/artists/artist-details/artist-details.component.html @@ -0,0 +1,17 @@ +
diff --git a/client/src/app/pages/artists/artist-details/artist-details.component.ts b/client/src/app/pages/artists/artist-details/artist-details.component.ts new file mode 100644 index 0000000..de230f5 --- /dev/null +++ b/client/src/app/pages/artists/artist-details/artist-details.component.ts @@ -0,0 +1,35 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from "@angular/router"; +import { Observable } from "rxjs"; +import { Artist } from "../../../models/artist.model"; +import { NgxUiLoaderService } from "ngx-ui-loader"; +import { ArtistService } from "../../../services/artist.service"; + +@Component({ + selector: 'app-artist-details', + templateUrl: './artist-details.component.html', + styleUrls: ['./artist-details.component.css'] +}) +export class ArtistDetailsComponent implements OnInit { + id = ''; + isLoading: boolean = true; + artist$!: Observable