diff --git a/frontend/src/app/shared/components/cards/main-card/main-card.component.css b/frontend/src/app/shared/components/cards/main-card/main-card.component.css
index 6136304..dfb1f35 100644
--- a/frontend/src/app/shared/components/cards/main-card/main-card.component.css
+++ b/frontend/src/app/shared/components/cards/main-card/main-card.component.css
@@ -11,6 +11,7 @@
overflow: hidden;
margin-bottom: 15px;
}
+
.movie-card .card-img {
width: 100%;
height: auto;
@@ -38,6 +39,7 @@
.movie-card:hover .card-img {
transform: scale(1.1);
}
+
.movie-card .card-overlay {
position: absolute;
inset: 0;
@@ -54,10 +56,29 @@
max-height: 100px;
padding: 12px;
}
+
.movie-card:hover .card-title {
white-space: normal;
}
+/* ! OVER LAY 2 */
+.movie-card:hover .card-overlay-2 {
+ opacity: 0;
+ transition: 0.3s ease;
+}
+
+.movie-card .in-library {
+ position: absolute;
+ top: -7px;
+ right: 11px;
+ color: var(--white);
+}
+
+.movie-card .in-library span {
+ font-size: 37px;
+ color: var(--shz-gold-1);
+}
+
/* ! HOVER END*/
/* * BUTTONS */
@@ -77,6 +98,7 @@
.movie-card .bookmark {
left: 15px;
}
+
.movie-card .info {
left: 15px;
top: 60px;
@@ -94,9 +116,11 @@
background: rgba(0, 0, 0, 0.5);
transition: color 0.3s ease, background-color 0.3s ease;
}
+
.movie-card:hover :is(.bookmark, .rating, .info) {
--mv-card-scale: 1;
}
+
.bookmark,
.info {
display: flex;
@@ -112,6 +136,7 @@
/* color: var(--light-azure); */
color: var(--white);
}
+
.movie-card .rating span {
/* color: var(--light-azure); */
color: var(--white);
@@ -148,6 +173,7 @@
.movie-card:hover .card-title {
color: var(--yellow);
}
+
.movie-card .card-info {
display: flex;
font-family: -apple-system, "Segoe UI", BlinkMacSystemFont, sans-serif;
@@ -173,4 +199,4 @@
.movie-card .card-title,
.movie-card .card-info {
color: #fff;
-}
+}
\ No newline at end of file
diff --git a/frontend/src/app/shared/components/cards/main-card/main-card.component.html b/frontend/src/app/shared/components/cards/main-card/main-card.component.html
index b4785f2..fdef01e 100644
--- a/frontend/src/app/shared/components/cards/main-card/main-card.component.html
+++ b/frontend/src/app/shared/components/cards/main-card/main-card.component.html
@@ -1,8 +1,16 @@
-
![Movie Poster]()
+
![Movie Poster]()
-
+
+
+
{{formattedRate}}
@@ -21,15 +29,15 @@
-
-
diff --git a/frontend/src/app/shared/components/cards/main-card/main-card.component.ts b/frontend/src/app/shared/components/cards/main-card/main-card.component.ts
index 780b473..2411aae 100644
--- a/frontend/src/app/shared/components/cards/main-card/main-card.component.ts
+++ b/frontend/src/app/shared/components/cards/main-card/main-card.component.ts
@@ -4,6 +4,7 @@ import { MatDialog } from '@angular/material/dialog';
import { trigger, transition, style, animate } from '@angular/animations';
import { Entry } from '../../../models/entry.model';
import { LibraryService } from '../../../../core/services/library.service';
+import { Router } from '@angular/router';
@Component({
selector: 'app-main-card',
@@ -28,7 +29,8 @@ export class MainCardComponent implements OnInit {
constructor(
private libraryService: LibraryService,
- public dialog: MatDialog
+ public dialog: MatDialog,
+ private router: Router
) {}
ngOnInit(): void {
@@ -59,6 +61,7 @@ export class MainCardComponent implements OnInit {
entry.isInLibrary = true;
this.entry = entry;
this.libraryService.getAllEntries(true);
+ console.log(entry);
}
},
error: (error) => {
@@ -77,9 +80,7 @@ export class MainCardComponent implements OnInit {
this.entry.isInLibrary = false;
},
error: (error) => {
- // Handle error scenario
console.error('Error deleting entry:', error);
- // Optionally, display an error message to the user using a service or a component
},
});
}
@@ -101,7 +102,8 @@ export class MainCardComponent implements OnInit {
}
cardClick() {
- console.log(this.entry);
+ if (this.entry.isInLibrary)
+ this.router.navigate([`/entry/${this.entry.id}`]);
}
getTmdbLink() {
@@ -109,9 +111,15 @@ export class MainCardComponent implements OnInit {
return `https://www.themoviedb.org/${type}/${this.entry.entryId.tmdb_id}`;
}
- getPostPath() {
- if (this.entry.poster_path == null) return 'assets/images/default/default-poster.png';
+ get postPath() {
+ if (this.entry.poster_path == null)
+ return 'assets/images/default/default-poster.png';
- return `https://image.tmdb.org/t/p/w500` + this.entry.poster_path;
+ return `https://image.tmdb.org/t/p/w154` + this.entry.poster_path;
+ }
+
+ get runtime() {
+ if (this.entry.runtime == null) return '';
+ return this.entry.runtime;
}
}