Refactor ProspectContainer and ProspectGrid: adjust layout styles and add grid class for improved responsiveness
All checks were successful
Build And Push Dev Docker Image / docker (push) Successful in 1m32s

This commit is contained in:
troogs
2026-04-21 05:48:55 +02:00
parent d1852f28c8
commit 19c22e6ae8
3 changed files with 19 additions and 7 deletions

View File

@@ -16,18 +16,16 @@
.pc-main { .pc-main {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-basis: 0; height: 100%;
flex-grow: 1; width: 100%;
max-width: 480px; max-width: none;
border-radius: 12px; border-radius: 12px;
margin: 15px; margin: 0;
padding: 1rem 1rem 0 1rem; padding: 1rem 1rem 0 1rem;
} }
@media (max-width: 576px) { @media (max-width: 576px) {
.pc-main { .pc-main {
margin-left: 0;
margin-right: 0;
padding: .5rem .5rem 0 .5rem; padding: .5rem .5rem 0 .5rem;
} }
} }

View File

@@ -7,12 +7,14 @@
[Parameter] public Func<Task>? OnDataChanged { get; set; } [Parameter] public Func<Task>? OnDataChanged { get; set; }
[Parameter] public string GridClass { get; set; } = string.Empty;
} }
<h6>@(Prospects?.Count ?? 0) Ergebnisse</h6> <h6>@(Prospects?.Count ?? 0) Ergebnisse</h6>
@if (Prospects?.Any() == true) @if (Prospects?.Any() == true)
{ {
<div class="row m-0"> <div class="prospect-grid @GridClass">
<Repeater Items="@Prospects"> <Repeater Items="@Prospects">
<ProspectContainer <ProspectContainer
Prospect="context" Prospect="context"

View File

@@ -0,0 +1,12 @@
.prospect-grid {
/* Default card width range. Override via a modifier class on ProspectGrid. */
--pc-min-width: 200px;
--pc-max-width: 350px;
display: grid;
gap: 1rem;
width: 100%;
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--pc-min-width)), var(--pc-max-width)));
justify-content: center;
align-items: stretch;
}