Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have all APR ratings contained within an APR rating group #8431

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cfgov/tccp/jinja2/tccp/includes/apr_rating.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
{% for i in range(rating + 1) -%}
{{ svg_icon("dollar-round") }}
{%- endfor %}
<span class="u-visually-hidden">
{{ rating + 1 }} dollar sign symbol{{ (rating + 1) | pluralize() }}
</span>
</dt>
<dd>
Pay {{ label }} interest
Expand Down
2 changes: 2 additions & 0 deletions cfgov/tccp/jinja2/tccp/includes/apr_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
{% if show_comparison %}
<td>
{% if tier_apr_rating is not none -%}
<dl>
{{ apr_rating(tier_apr_rating) }}
</dl>
{%- endif %}
</td>
{% endif %}
Expand Down
4 changes: 3 additions & 1 deletion cfgov/tccp/jinja2/tccp/includes/card_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ <h2>Cards you're looking for have these features:</h2>
<h3 class="m-card__heading">{{ card.institution_name }}</h3>
<p class="m-card__subtitle">{{ card.product_name }}</p>
</div>
{{ apr_rating(card.purchase_apr_for_tier_rating) }}
<dl>
{{ apr_rating(card.purchase_apr_for_tier_rating) }}
</dl>
<dl class="m-data-specs">
<div class="m-data-spec m-data-spec--apr">
<dt><strong>Purchase APR</strong></dt>
Expand Down
12 changes: 10 additions & 2 deletions cfgov/unprocessed/apps/tccp/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@
padding-bottom: unit((20px / @base-font-size-px), rem);
});
}

dl {
margin-bottom: 0;
}

&:hover {
> a {
box-shadow:
Expand Down Expand Up @@ -204,6 +209,11 @@

.m-card__footer {
margin-top: unit((5px / @base-font-size-px), rem);

// Tablet and above.
.respond-to-min(@bp-sm-min, {
margin-top: unit((20px / @base-font-size-px), rem);
});
}

.m-apr-rating {
Expand Down Expand Up @@ -253,12 +263,10 @@
grid-template-columns: 2fr 3fr;
column-gap: 20px;
row-gap: 15px;
margin-bottom: 0;

.respond-to-min(@bp-sm-min, {
grid-template-areas: 'apr fee transfer rewards requirements';
grid-template-columns: 5fr 4fr 6fr 7fr 7fr;
margin-bottom: unit((15px / @base-font-size-px), rem);
});
}

Expand Down
Loading