Skip to content

Commit

Permalink
change layout home
Browse files Browse the repository at this point in the history
  • Loading branch information
delafuentej committed Aug 13, 2022
1 parent fbfc897 commit 655fc0e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
16 changes: 7 additions & 9 deletions src/app/components/card/card.component.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<div class="col animated fadeIn">
<div class="row row-cols-1 row-cols-md-4 g-12">
<div class="row animated fadeIn">


<div *ngFor="let item of items" (click)="showArtist(item)" class="card m-1 pointer">
<img [src]=" item.images | noimg" class="card-img-top " alt={{item.name}}>
<div class=" card-body ">
<h5 class="card-title ">{{item.name}}</h5>
<p *ngFor="let artist of item.artists " class="card-text d-inline "><span class="badge rounded-pill bg-primary ">{{artist.name}}</span></p>
<p class="card-text "><small class="text-muted ">Last updated 3 mins ago</small></p>
</div>
<div *ngFor="let item of items " (click)="showArtist(item) " class=" col-md-3 card pointer ">
<img [src]=" item.images | noimg " class="card-img-top " alt={{item.name}}>
<div class=" card-body ">
<h5 class="card-title ">{{item.name}}</h5>
<p *ngFor="let artist of item.artists " class="card-text d-inline "><span class="badge rounded-pill bg-primary ">{{artist.name}}</span></p>
<p class="card-text "><small class="text-muted ">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
3 changes: 3 additions & 0 deletions src/app/components/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ export class SearchComponent {
this.loading=true
this.spotifyService.getArtists(searchTerm)
.subscribe((data:any)=>{

this.artists= data;
console.log(this.artists)
this.loading=false;



})

Expand Down
2 changes: 1 addition & 1 deletion src/app/services/spotify.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class SpotifyService {
const url=`https://api.spotify.com/v1/${query}`;

const headers= new HttpHeaders({
'Authorization':'Bearer BQBb6dDpcP0nOImj9lvaHx3Y6RsFKuhLBhuN0qTGwxD7O-qB6fIN3bWaFD4dWwNb5yrvm-DBZLzDtRw-gsdZDi1e-M4mbKdo3kQe_EXj1MUC7kiFi9lrDhC6f2jsAn1T0STq_zw1X4OZnVz8st-X502Nvb3JX3BKBM4w7Wgj5mNC'
'Authorization':'Bearer BQBHG7F8af2347CBydhWi9-ek6Y0yBXSfL3SgycN9C_vBCbFFDDZeHxgw4NZE3kv1736ma09Y2-q75oiTeVHo5jheL0kZaLwMXPoQeA0F8ytFJaQawI'
});

return this.http.get(url, {headers})
Expand Down

0 comments on commit 655fc0e

Please sign in to comment.