Skip to content

Commit

Permalink
Back out spanish homepage merges
Browse files Browse the repository at this point in the history
  • Loading branch information
wpears committed Oct 22, 2024
1 parent 97a44f7 commit bdd7e7d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 147 deletions.
6 changes: 0 additions & 6 deletions cfgov/cfgov/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,6 @@
("environment is", "local"),
("environment is", "test"),
],
# Spanish homepage
"SPANISH_HOMEPAGE": [
("environment is", "dev5"),
("environment is", "local"),
("environment is", "test"),
],
}

REGULATIONS_REFERENCE_MAPPING = [
Expand Down
Binary file removed cfgov/unprocessed/apps/homepage/img/fwb.png
Binary file not shown.
15 changes: 0 additions & 15 deletions cfgov/v1/jinja2/v1/home_page/_hardcoded_en.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,6 @@
},
] -%}

{%- set announcements = [
{
"heading": "The CFPB is standing up for you",
"content": "<ul><li><strong>4 million+</strong> consumer complaints received responses</li><li><strong>$20.7 billion+</strong> in financial relief as a result of CFPB actions</li><li><strong>205 million+</strong> people eligible for financial relief</li></ul>" | safe,
"link_text": "",
"link_url": ""
},
{
"heading": "Protecting you from junk fees",
"content": "<p>The CFPB is working to save households billions of dollars a year by reducing exploitative junk fees charged by banks and financial companies.</p>" | safe,
"link_text": "Read about junk fees",
"link_url": "/rules-policy/junk-fees/"
}
] -%}

{%- set breakout_cards_heading = "Get help planning for future goals" -%}

{%- set breakout_cards = [
Expand Down
100 changes: 0 additions & 100 deletions cfgov/v1/jinja2/v1/home_page/_hardcoded_es.html

This file was deleted.

32 changes: 19 additions & 13 deletions cfgov/v1/jinja2/v1/home_page/home_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,35 +90,41 @@ <h2 class="h1">{{ hardcoded.answers_heading }}</h2>
<section class="block">
<div class="o-info-unit-group">
<div class="content-l">
{% for announcement in hardcoded.announcements %}
<div class="content-l__col content-l__col-1-2">
<div class="m-info-unit">
{%- if announcement.link_url -%}
<a class="m-info-unit__heading-link" href="{{ announcement.link_url }}">
{%- endif -%}
<div class="m-info-unit__heading-text">
<h2>{{ announcement.heading }}</h2>
<h2>The CFPB is standing up for you</h2>
</div>
<div class="m-info-unit__content">
<ul>
<li><strong>4 million+</strong> consumer complaints received responses</li>
<li><strong>$20.7 billion+</strong> in financial relief as a result of CFPB actions</li>
<li><strong>205 million+</strong> people eligible for financial relief</li>
</ul>
</div>
</div>
</div>
<div class="content-l__col content-l__col-1-2">
<div class="m-info-unit">
<a class="m-info-unit__heading-link" href="/rules-policy/junk-fees/">
<div class="m-info-unit__heading-text">
<h2>Protecting you from junk fees</h2>
</div>
{%- if announcement.link_url -%}
</a>
{%- endif -%}
<div class="m-info-unit__content">
{{ announcement.content }}
{%- if announcement.link_url -%}
<p>The CFPB is working to save households billions of dollars a year by reducing exploitative junk fees charged by banks and financial companies.</p>
<ul class="m-list m-list--links u-mt15">
<li class="m-list__item">
<a class="a-link a-link--jump"
href="{{ announcement.link_url }}">
href="/rules-policy/junk-fees/">
<span class="a-link__text">
{{ announcement.link_text }}
Read about junk fees
</span>
</a>
</ul>
{%- endif -%}
</div>
</div>
</div>
{% endfor %}
</div>
</div>

Expand Down
1 change: 0 additions & 1 deletion cfgov/v1/jinja2/v1/includes/molecules/global-eyebrow.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
English
</a>
{% else %}
<!-- Temporary change for usability testing -->
<a href="/es/" hreflang="es" lang="es">
Español
</a>
Expand Down
16 changes: 4 additions & 12 deletions cfgov/v1/models/home_page.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from wagtail.admin.panels import ObjectList, TabbedInterface
from wagtail.models import Page

from flags.state import flag_enabled

from v1.models.base import CFGOVPage


Expand All @@ -18,16 +16,10 @@ class HomePage(CFGOVPage):

def get_template(self, request, *args, **kwargs):
try:
if flag_enabled("SPANISH_HOMEPAGE"):
return {
"en": "v1/home_page/home_page.html",
"es": "v1/home_page/home_page.html",
}[self.language]
else:
return {
"en": "v1/home_page/home_page.html",
"es": "v1/home_page/home_page_legacy.html",
}[self.language]
return {
"en": "v1/home_page/home_page.html",
"es": "v1/home_page/home_page_legacy.html",
}[self.language]
except KeyError as e:
raise NotImplementedError(
f"Unsupported HomePage language: {self.language}"
Expand Down

0 comments on commit bdd7e7d

Please sign in to comment.