Skip to content

Commit

Permalink
refactor(agency-selector): add MST and SacRT specific logo dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran committed Aug 9, 2023
1 parent b11027a commit ed47e79
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions benefits/core/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def _agency_context(agency):
"info_url": agency.info_url,
"long_name": agency.long_name,
"phone": agency.phone,
"selector_logo_template": agency.selector_logo_template,
"short_name": agency.short_name,
"slug": agency.slug,
}
Expand Down
3 changes: 2 additions & 1 deletion benefits/core/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.4 on 2023-08-07 16:23
# Generated by Django 4.2.4 on 2023-08-09 21:08

from django.db import migrations, models
import django.db.models.deletion
Expand Down Expand Up @@ -109,6 +109,7 @@ class Migration(migrations.Migration):
("active", models.BooleanField(default=False)),
("jws_signing_alg", models.TextField()),
("index_template", models.TextField()),
("selector_logo_template", models.TextField()),
("eligibility_index_template", models.TextField()),
("enrollment_success_template", models.TextField()),
("help_template", models.TextField(null=True)),
Expand Down
2 changes: 2 additions & 0 deletions benefits/core/migrations/0002_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def load_data(app, *args, **kwargs):
jws_signing_alg=os.environ.get("MST_AGENCY_JWS_SIGNING_ALG", "RS256"),
payment_processor=mst_payment_processor,
index_template="core/index--mst.html",
selector_logo_template="core/includes/agency-selector-logo--mst.html",
eligibility_index_template="eligibility/index--mst.html",
enrollment_success_template="enrollment/success--mst.html",
help_template="core/includes/help--mst.html",
Expand All @@ -278,6 +279,7 @@ def load_data(app, *args, **kwargs):
jws_signing_alg=os.environ.get("SACRT_AGENCY_JWS_SIGNING_ALG", "RS256"),
payment_processor=sacrt_payment_processor,
index_template="core/index--sacrt.html",
selector_logo_template="core/includes/agency-selector-logo--sacrt.html",
eligibility_index_template="eligibility/index--sacrt.html",
enrollment_success_template="enrollment/success--sacrt.html",
)
Expand Down
1 change: 1 addition & 0 deletions benefits/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ class TransitAgency(models.Model):
# The JWS-compatible signing algorithm
jws_signing_alg = models.TextField()
index_template = models.TextField()
selector_logo_template = models.TextField()
eligibility_index_template = models.TextField()
enrollment_success_template = models.TextField()
help_template = models.TextField(null=True)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "core/includes/agency-selector-logo.html" %}

{% block small_logo_dimensions %}
width="46"
height="29"
{% endblock small_logo_dimensions %}

{% block large_logo_dimensions %}
width="117"
height="74"
{% endblock large_logo_dimensions %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "core/includes/agency-selector-logo.html" %}

{% block small_logo_dimensions %}
width="24"
height="24"
{% endblock small_logo_dimensions %}

{% block large_logo_dimensions %}
width="74"
height="74"
{% endblock large_logo_dimensions %}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h3 id="{{ aria_labelledby_id }}" class="modal-title">{% translate "Please choos
<div class="col">
<a href="{{ agency.eligibility_index_url }}" class="card mt-lg-4 mx-lg-auto">
<div class="card-body d-flex flex-row-reverse flex-lg-column justify-content-center align-items-center">
{% include "core/includes/agency-selector-logo.html" %}
{% include agency.selector_logo_template %}
<h4 class="card-title mt-lg-3 mb-0 mb-lg-3">{{ agency.long_name }}</h4>
</div>
</a>
Expand Down

0 comments on commit ed47e79

Please sign in to comment.