Skip to content

Commit

Permalink
fix: arrange agencies in a two-column modal
Browse files Browse the repository at this point in the history
  • Loading branch information
lalver1 committed Nov 8, 2024
1 parent 2e2e4f4 commit 59869fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
36 changes: 19 additions & 17 deletions benefits/core/templates/core/includes/modal--agency-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,25 @@
<h3 id="{{ aria_labelledby_id }}" class="modal-title h1 p-0 mb-4 pb-lg-2s text-center">
{% translate "Please choose your transit provider:" %}
</h3>
<div class="card-row row d-flex flex-column flex-lg-row text-start text-lg-center justify-content-center">
{% for agency in active_agencies %}
<a href="{{ agency.eligibility_index_url }}" class="card m-0 d-inline-block">
<div class="card-body d-flex flex-row-reverse flex-lg-column justify-content-center align-items-center">
<img class="sm d-lg-none ms-auto"
src="{% get_static_prefix %}img/agencies/{{ agency.slug }}-sm.svg"
width="52"
height="36"
alt="{% blocktranslate with agency=agency.short_name %}{{ agency }} logo{% endblocktranslate %}">
<img class="lg d-none d-lg-block"
src="{% get_static_prefix %}img/agencies/{{ agency.slug }}-lg.svg"
width="148"
height="72"
alt="{% blocktranslate with agency=agency.short_name %}{{ agency }} logo{% endblocktranslate %}">
<h4 class="mt-lg-2 mb-0">{{ agency.long_name }}</h4>
</div>
</a>
<div class="row row-cols-1 row-cols-md-2 g-3 text-start text-lg-center justify-content-center">
{% for agency in active_agencies|slice:"0:4" %}
<div class="col">
<a href="{{ agency.eligibility_index_url }}" class="card m-0 d-inline-block">
<div class="card-body d-flex flex-row-reverse flex-lg-column justify-content-center align-items-center">
<img class="sm d-lg-none ms-auto"
src="{% get_static_prefix %}img/agencies/{{ agency.slug }}-sm.svg"
width="52"
height="36"
alt="{% blocktranslate with agency=agency.short_name %}{{ agency }} logo{% endblocktranslate %}">
<img class="lg d-none d-lg-block"
src="{% get_static_prefix %}img/agencies/{{ agency.slug }}-lg.svg"
width="148"
height="72"
alt="{% blocktranslate with agency=agency.short_name %}{{ agency }} logo{% endblocktranslate %}">
<h4 class="mt-lg-2 mb-0">{{ agency.long_name }}</h4>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
Expand Down
4 changes: 0 additions & 4 deletions benefits/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,6 @@ a.card:focus-visible {
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25) !important;
}

.card-row {
gap: var(--card-gap);
}

.card .card-body {
padding: 0 !important; /* override CA State Web Template */
}
Expand Down

0 comments on commit 59869fd

Please sign in to comment.