Make card layout / lists consistent #192

Merged
tobru merged 2 commits from 178-card-layout into main 2025-09-11 14:29:16 +00:00
3 changed files with 31 additions and 33 deletions
Showing only changes of commit 869d1cec85 - Show all commits

View file

@ -22,7 +22,7 @@
{% endblock page_title_extra %} {% endblock page_title_extra %}
{% block content %} {% block content %}
<section class="section"> <section class="section">
<div class="row"> <div class="row match-height mb-5">
<div class="col-12 col-md-5"> <div class="col-12 col-md-5">
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">

View file

@ -16,10 +16,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row service-cards-container mb-5"> <div class="row match-height service-cards-container mb-5">
{% for service in services %} {% for service in services %}
<div class="col-6 col-lg-3 col-md-4"> <div class="col-12 col-md-6 col-lg-3">
<div class="card h-100 d-flex flex-column"> <div class="card">
<div class="card-header d-flex align-items-center"> <div class="card-header d-flex align-items-center">
{% if service.logo %} {% if service.logo %}
<img src="{{ service.logo.url }}" <img src="{{ service.logo.url }}"
@ -33,9 +33,11 @@
<small class="text-muted">{{ service.category }}</small> <small class="text-muted">{{ service.category }}</small>
</div> </div>
</div> </div>
<div class="card-content">
<div class="card-body flex-grow-1"> <div class="card-body flex-grow-1">
{% if service.description %}<p class="card-text">{{ service.description|urlize }}</p>{% endif %} {% if service.description %}<p class="card-text">{{ service.description|urlize }}</p>{% endif %}
</div> </div>
</div>
<div class="card-footer d-flex justify-content-between align-items-center gap-2"> <div class="card-footer d-flex justify-content-between align-items-center gap-2">
{% if service.featured_links %} {% if service.featured_links %}
{% with featured_link=service.featured_links.0 %} {% with featured_link=service.featured_links.0 %}
@ -57,9 +59,11 @@
{% empty %} {% empty %}
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="card-content">
<p>{% translate "No services found." %}</p> <p>{% translate "No services found." %}</p>
</div> </div>
</div> </div>
</div>
{% endfor %} {% endfor %}
</div> </div>
</section> </section>

View file

@ -176,21 +176,15 @@ a.btn-keycloak {
} }
/* Service cards equal height styling */ /* Service cards equal height styling */
.service-cards-container > * {
display: flex;
align-items: stretch;
}
.service-cards-container .card { .service-cards-container .card {
height: 100%; width: 100%;
display: flex;
flex-direction: column;
} }
.service-cards-container .card-content {
.service-cards-container .card-body {
flex-grow: 1; flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
.service-cards-container .card-footer {
margin-top: auto;
} }
/* CRD Form mandatory field styling */ /* CRD Form mandatory field styling */