Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📐Refactor mood component HTML - Update album art display #400

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Frontend/src/app/pages/mood/mood.component.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<div class="col-start-1 col-span-5 row-start-2 row-span-4 pl-2 pr-2" style="height: 72vh;">
<div style="background-color: rgba(0, 0, 0, 0.7);" class="rounded-lg overflow-hidden h-full relative p-8">
<div class="rounded-lg overflow-hidden h-full relative p-8">
<app-back-button></app-back-button>
<app-page-title class="text-5xl font-bold text-center mb-6">{{title}}</app-page-title>

<div class="grid grid-cols-5 gap-3">
<div *ngFor="let album of albums" class="album-art flex flex-col items-center hover:cursor-pointer" (click)="playTrack(album.title,album.artist)">
<img [src]="album.imageUrl" alt="{{ album.title }}" class="w-32 h-32 object-cover rounded-md">
<div *ngFor="let album of albums" class="album-art flex flex-col items-center hover:cursor-pointer group">
<div class="relative">
<img [src]="album.imageUrl" alt="{{ album.title }}" class="w-32 h-32 object-cover rounded-md">
<app-play-icon [switchMood]="false" (click)="playTrack(album.title,album.artist)" [width]="'7vh'" class="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100">
</app-play-icon>
</div>
<p class="text-center text-white text-lg font-semibold">{{ album.title }}</p>
<p class="text-center text-sm text-white text-gray-500">{{ album.artist }}</p>
</div>
</div>
</div>
</div>
</div>
3 changes: 2 additions & 1 deletion Frontend/src/app/pages/mood/mood.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ import { Track } from '../../services/search.service';
import { ProviderService } from "../../services/provider.service";
import { YouTubeService } from "../../services/youtube.service";
import { SpotifyService } from "../../services/spotify.service"; // <-- Use Track interface
import { PlayIconComponent } from '../../components/organisms/play-icon/play-icon.component';

@Component({
selector: 'app-mood',
standalone: true,
imports: [NgForOf, NgIf, NgClass, NgSwitch, NgSwitchCase, NavbarComponent, SearchBarComponent, ProfileComponent, MoodDropDownComponent, BackButtonComponent, PageTitleComponent],
imports: [NgForOf, NgIf, NgClass, NgSwitch, NgSwitchCase, NavbarComponent, SearchBarComponent, ProfileComponent, MoodDropDownComponent, BackButtonComponent, PageTitleComponent,PlayIconComponent],
templateUrl: './mood.component.html',
styleUrls: ['./mood.component.css']
})
Expand Down
Loading