Kavita/UI/Web/src/_card-item-common.scss
2025-05-02 05:56:58 -06:00

276 lines
5 KiB
SCSS

$image-height: 14.556875rem;
$image-width: 10rem;
.error-banner {
width: $image-width;
height: 1.125rem;
background-color: var(--toast-error-bg-color);
font-size: 0.75rem;
color: white;
text-transform: uppercase;
text-align: center;
position: absolute;
top: 0.0rem;
right: 0.0rem;
}
.selected-highlight {
outline: 0.125rem solid var(--primary-color);
}
.progress-banner {
width: $image-width;
height: 0.3125rem;
.progress {
color: var(--card-progress-bar-color);
background-color: transparent;
}
}
.download {
width: 5rem;
height: 5rem;
position: absolute;
top: 25%;
right: 30%;
}
.badge-container {
border-radius: 0.25rem;
display: block;
height: $image-height;
left: 0;
overflow: hidden;
pointer-events: none;
position: absolute;
top: 0;
width: 10rem;
}
.not-read-badge {
position: absolute;
top: calc(-1 * (var(--card-progress-triangle-size) / 2));
right: -0.875rem;
z-index: 1000;
height: var(--card-progress-triangle-size);
width: var(--card-progress-triangle-size);
background-color: var(--primary-color);
transform: rotate(45deg);
}
.bulk-mode {
position: absolute;
top: 0;
left: 0;
visibility: hidden;
transition: all ease-in-out 300ms;
&.always-show {
visibility: visible !important;
width: $image-width;
height: $image-height;
}
input[type="checkbox"] {
width: 1.25rem;
height: 1.25rem;
color: var(--checkbox-bg-color);
border-radius: 50%;
border: 0.125rem solid #f0f0f0;
background-color: var(--elevation-layer11-dark);
transform: scale(0.85);
transition: all ease-in-out 300ms;
left: 0.4375rem;
position: relative;
top: 0.3125rem;
box-shadow: 0 0 0.3125rem 0.125rem hsl(0deg 0% 0% / 69%);
&:hover {
cursor: pointer;
}
&:checked {
border: unset;
transform: scale(1);
background-color: var(--primary-color);
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
&:focus {
box-shadow: 0 0 0.3125rem 0.125rem hsl(0deg 0% 0% / 69%);
}
}
&:hover {
~ .card-overlay {
background-color: var(--card-overlay-hover-bg-color);
}
}
}
.meta-title {
display: none;
visibility: hidden;
pointer-events: none;
border-width: 0;
}
.overlay {
&:hover {
.bulk-mode {
visibility: visible;
z-index: 110;
}
&:hover {
visibility: visible;
.overlay-information {
visibility: visible;
display: block;
}
& + .meta-title {
display: -webkit-box;
visibility: visible;
pointer-events: none;
}
}
.overlay-information {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 14.556875rem;
transition: 300ms ease-in-out all;
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
&:hover {
background-color: var(--card-overlay-hover-bg-color);
cursor: pointer;
}
.overlay-information--centered {
position: absolute;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 0.9375rem;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 115;
&:hover {
background-color: var(--primary-color) !important;
cursor: pointer;
}
}
}
}
.count {
top: 0.3125rem;
right: 0.625rem;
position: absolute;
}
}
.card-actions {
z-index: 115;
}
.library {
font-size: 0.8125rem;
text-decoration: none;
margin-top: 0.0rem;
}
.card-title-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 0.3125rem;
:first-child {
min-width: 1.375rem;
}
.card-title {
font-size: 0.8rem;
margin: 0;
text-align: center;
max-width: 5.625rem;
a {
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.card-actions {
min-width: 0.98875rem;
}
.card-format {
min-width: 1.375rem;
}
::ng-deep app-card-actionables .dropdown .dropdown-toggle {
padding: 0 0.3125rem;
}
.meta-title {
.card-title {
max-width: unset;
}
}
.card-title {
font-size: 0.8rem;
margin: 0;
padding: 0.625rem 0;
text-align: center;
max-width: 7.5rem;
a {
overflow: hidden;
text-overflow: ellipsis;
}
}
.card-body > div:nth-child(2) {
height: 2.5rem;
overflow: hidden;
-webkit-line-clamp: 2;
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
font-size: 0.8rem;
}
.overlay-information {
visibility: hidden;
display: none;
.card-title {
padding: 0.625rem;
}
}
.chapter,
.volume,
.series,
.expected {
.overlay-information--centered {
div {
height: 2rem;
width: 2rem;
i {
font-size: 1.4rem;
line-height: 2rem;
}
}
}
}