From 1500e632694189b198bd8328c875c6512dcca570 Mon Sep 17 00:00:00 2001 From: Joseph Milazzo Date: Tue, 5 Jan 2021 13:13:12 -0600 Subject: [PATCH] Cleaned up the card items --- src/app/nav-header/nav-header.component.html | 16 ++++---- .../series-detail/series-detail.component.ts | 5 ++- .../shared/card-item/card-item.component.html | 30 ++++++-------- .../shared/card-item/card-item.component.scss | 41 ++++++++++++++++++- 4 files changed, 64 insertions(+), 28 deletions(-) diff --git a/src/app/nav-header/nav-header.component.html b/src/app/nav-header/nav-header.component.html index 78cd8b650..fc14c59f3 100644 --- a/src/app/nav-header/nav-header.component.html +++ b/src/app/nav-header/nav-header.component.html @@ -2,17 +2,16 @@
Kavita -
- - -
+ - +
diff --git a/src/app/series-detail/series-detail.component.ts b/src/app/series-detail/series-detail.component.ts index f0e8a0455..85fb31a40 100644 --- a/src/app/series-detail/series-detail.component.ts +++ b/src/app/series-detail/series-detail.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; +import { NgbRatingConfig } from '@ng-bootstrap/ng-bootstrap'; import { Series } from '../_models/series'; import { Volume } from '../_models/volume'; import { SeriesService } from '../_services/series.service'; @@ -14,7 +15,9 @@ export class SeriesDetailComponent implements OnInit { series: Series | undefined; volumes: Volume[] = []; - constructor(private route: ActivatedRoute, private seriesService: SeriesService) { } + constructor(private route: ActivatedRoute, private seriesService: SeriesService, private ratingConfig: NgbRatingConfig) { + ratingConfig.max = 5; + } ngOnInit(): void { diff --git a/src/app/shared/card-item/card-item.component.html b/src/app/shared/card-item/card-item.component.html index f48009325..815ef8ede 100644 --- a/src/app/shared/card-item/card-item.component.html +++ b/src/app/shared/card-item/card-item.component.html @@ -1,24 +1,20 @@
- - {{title}} - +
+ {{title}} +
+ +
+ +
+ +
+
+
+
+
- {{title}} -
- -
- -
- -
-
-
-
- - -
\ No newline at end of file diff --git a/src/app/shared/card-item/card-item.component.scss b/src/app/shared/card-item/card-item.component.scss index 98f7b4f2a..ef8d62750 100644 --- a/src/app/shared/card-item/card-item.component.scss +++ b/src/app/shared/card-item/card-item.component.scss @@ -1,15 +1,52 @@ +$primary-color: #cc7b19; + .card { margin: 10px; // max-width: 130px; // max-height: 195px; max-width: 160px; - max-height: 320px; + //max-height: 320px; // 370 x 210 roughly } .card-title { margin-top: 5px; + line-height: 20px; + font-size: 13px; + text-overflow: ellipsis; + white-space: normal; + max-width: 150px; + height: 52px; + padding-top: 10px; +} + +.card-img-top { + height: 230px; +} + +.overlay { + height: 230px; + &:hover { + background-color: rgba(0, 0, 0, 0.4); + visibility: visible; + + .overlay-item { + visibility: visible; + } + } + + .overlay-item { + visibility: hidden; + } + + z-index: 10; +} + +.card-actions { + position: absolute; + top: 195px; + right: -5px; } .card-body { @@ -18,4 +55,4 @@ .dropdown-toggle:after { content: none !important; -} \ No newline at end of file +}