style(case_display_block): Refactor series panel layout and improve styling

This commit is contained in:
Ross
2026-05-18 11:00:43 +01:00
parent 867d92bff9
commit b34970ed7f
+48 -58
View File
@@ -502,12 +502,9 @@
data-named-stacks='{{case.get_case_named_stacks}}'
></div>
</details>
<details class="series-panel multi-image-block" id="case-series-panel" open>
<details class="series-panel" id="case-series-panel" open>
<summary class="series-panel-summary">
<div>
<span class="series-panel-title">Series</span>
<span class="series-panel-subtitle">Compact cards by default. Open a card for more actions.</span>
</div>
<span class="series-panel-title">Series</span>
<span class="series-panel-badge">{{ case.get_ordered_series|length }} total</span>
</summary>
<div class="series-panel-body">
@@ -1733,11 +1730,12 @@
}
.series-panel {
border: 1px solid rgba(13,110,253,0.2);
border-radius: 1rem;
background: linear-gradient(180deg, rgba(13,110,253,0.05), rgba(255,255,255,0.02));
padding: .25rem;
border-radius: 0.75rem;
background: rgba(255,255,255,0.02);
padding: 0.5rem 0.75rem;
margin-top: 1rem;
overflow: hidden;
margin-bottom: 1rem;
max-width: 100%;
}
.series-panel-summary {
list-style: none;
@@ -1745,21 +1743,13 @@
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 1rem 1.1rem;
padding: 0.5rem 0;
cursor: pointer;
}
.series-panel-summary::-webkit-details-marker { display: none; }
.series-panel-title {
display: block;
font-size: 1rem;
font-size: 0.95rem;
font-weight: 700;
letter-spacing: .01em;
}
.series-panel-subtitle {
display: block;
color: var(--bs-secondary-color, #6c757d);
font-size: .85rem;
margin-top: .15rem;
}
.series-panel-badge {
display: inline-flex;
@@ -1776,8 +1766,8 @@
.series-panel-body {
display: flex;
flex-direction: column;
gap: 1rem;
padding: 0 1.1rem 1.1rem;
gap: 0.75rem;
padding: 0.5rem 0;
}
.series-toolbar {
display: flex;
@@ -1788,26 +1778,30 @@
min-width: 160px;
}
.series-card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1rem;
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
align-items: flex-start;
}
.series-block {
display: contents;
flex: 0 1 auto;
min-width: 260px;
max-width: 320px;
}
.series-card-shell {
display: flex;
flex-direction: column;
gap: .5rem;
padding: 1rem;
gap: 0.4rem;
padding: 0.7rem;
border: 1px solid rgba(255,255,255,0.1);
border-radius: .75rem;
border-radius: 0.6rem;
background: rgba(15,23,42,0.3);
height: 100%;
}
.series-card-main {
display: flex;
align-items: flex-start;
gap: .75rem;
gap: 0.5rem;
width: 100%;
border: 0;
background: transparent;
@@ -1827,16 +1821,19 @@
}
.series-card-thumb-wrap {
flex-shrink: 0;
width: 72px;
height: 72px;
width: 64px;
min-width: 64px;
height: 64px;
line-height: 0;
}
.series-card-thumb {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: .5rem;
border-radius: 0.4rem;
border: 1px solid rgba(255,255,255,0.1);
display: block;
background: rgba(255,255,255,0.04);
}
.series-card-thumb-placeholder {
width: 100%;
@@ -1844,49 +1841,50 @@
display: flex;
align-items: center;
justify-content: center;
color: var(--bs-secondary-color, #6c757d);
font-size: 1.25rem;
color: #6c757d;
font-size: 1rem;
background: rgba(255,255,255,0.04);
border: 1px solid rgba(255,255,255,0.1);
border-radius: .5rem;
border-radius: 0.4rem;
}
.series-card-content {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: .2rem;
gap: 0.15rem;
}
.series-card-heading {
font-size: .95rem;
font-size: 0.85rem;
font-weight: 600;
line-height: 1.2;
line-height: 1.15;
}
.series-card-series-number {
font-weight: 700;
}
.series-card-image-count {
font-size: .8rem;
font-size: 0.75rem;
color: #adb5bd;
}
.series-card-description {
font-size: .85rem;
line-height: 1.3;
font-size: 0.8rem;
line-height: 1.2;
color: #d4d8dd;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
.series-card-controls {
display: flex;
gap: .5rem;
gap: 0.4rem;
margin-top: auto;
}
.series-card-controls .btn {
flex: 1;
min-width: 0;
padding: .35rem .5rem;
font-size: .8rem;
padding: 0.3rem 0.4rem;
font-size: 0.75rem;
}
.series-block.highlight-series .series-card-shell,
.series-block:hover .series-card-shell {
@@ -1943,23 +1941,15 @@
.series-toolbar-btn {
width: 100%;
}
.series-card-grid {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
}
@media (max-width: 575.98px) {
.series-card-grid {
grid-template-columns: 1fr;
.series-block {
min-width: 100%;
max-width: 100%;
}
.series-card-thumb-wrap {
width: 60px;
height: 60px;
}
.series-card-controls {
flex-direction: column;
}
.series-card-controls .btn {
width: 100%;
width: 56px;
height: 56px;
}
}
@media (prefers-color-scheme: dark) {