Skip to content

Commit

Permalink
Merge pull request #8399 from cfpb/ans_ask_app
Browse files Browse the repository at this point in the history
Move Ask-cfpb and job listing assets to apps
  • Loading branch information
anselmbradford committed May 10, 2024
2 parents 7af5c3c + 70f9465 commit 987b5e1
Show file tree
Hide file tree
Showing 27 changed files with 71 additions and 58 deletions.
9 changes: 7 additions & 2 deletions cfgov/ask_cfpb/jinja2/ask-cfpb/answer-page.html
@@ -1,7 +1,7 @@
{% extends 'v1/layouts/layout-2-1.html' %}
{% import 'v1/includes/macros/util/format/datetime.html' as dt %}
{% import 'v1/includes/templates/streamfield-sidefoot.html' as streamfield_sidefoot with context %}
{% import 'v1/includes/organisms/ask-search.html' as ask_search with context %}
{% import 'ask-cfpb/_ask-search.html' as ask_search with context %}

{% block title -%}
{{- seo_title or page.question or page.title | striptags }} | {{ _('Consumer Financial Protection Bureau') }}
Expand All @@ -13,7 +13,7 @@

{% block css -%}
{{ super() }}
<link rel="stylesheet" href="{{ static('css/on-demand/ask.css') }}">
<link rel="stylesheet" href="{{ static('apps/ask-cfpb/css/main.css') }}">
{%- endblock css %}

{% block content_modifiers -%}
Expand Down Expand Up @@ -114,3 +114,8 @@ <h3>{{ _('Browse related questions') }} </h3>
{% include '_disclaimer.html' %}
{% endif %}
{% endblock %}

{% block javascript scoped %}
{{ super() }}
<script src="{{ static('apps/ask-cfpb/js/main.js') }}"></script>
{% endblock javascript %}
9 changes: 7 additions & 2 deletions cfgov/ask_cfpb/jinja2/ask-cfpb/answer-search-results.html
@@ -1,11 +1,11 @@
{% import 'v1/includes/molecules/pagination.html' as pagination with context %}
{% import 'v1/includes/organisms/ask-search.html' as ask_search with context %}
{% import 'ask-cfpb/_ask-search.html' as ask_search with context %}

{% extends 'v1/layouts/layout-2-1.html' %}

{% block css -%}
{{ super() }}
<link rel="stylesheet" href="{{ static('css/on-demand/ask.css') }}">
<link rel="stylesheet" href="{{ static('apps/ask-cfpb/css/main.css') }}">
{%- endblock css %}

{% block content_modifiers -%}
Expand Down Expand Up @@ -101,3 +101,8 @@ <h4>
{% include '_disclaimer.html' %}
{% endif %}
{%- endblock %}

{% block javascript scoped %}
{{ super() }}
<script src="{{ static('apps/ask-cfpb/js/main.js') }}"></script>
{% endblock javascript %}
9 changes: 7 additions & 2 deletions cfgov/ask_cfpb/jinja2/ask-cfpb/landing-page.html
@@ -1,12 +1,12 @@
{% extends 'v1/layouts/layout-2-1.html' %}
{% import 'v1/includes/templates/render_block.html' as render_block with context %}
{% import 'v1/includes/organisms/ask-search.html' as ask_search with context %}
{% import 'ask-cfpb/_ask-search.html' as ask_search with context %}

{% set read_answer_text = _('Read answer') %}

{% block css -%}
{{ super() }}
<link rel="stylesheet" href="{{ static('css/on-demand/ask.css') }}">
<link rel="stylesheet" href="{{ static('apps/ask-cfpb/css/main.css') }}">
{%- endblock css %}

{% block content_modifiers -%}
Expand Down Expand Up @@ -45,3 +45,8 @@
{% include '_disclaimer.html' %}
{% endif %}
{%- endblock %}

{% block javascript scoped %}
{{ super() }}
<script src="{{ static('apps/ask-cfpb/js/main.js') }}"></script>
{% endblock javascript %}
2 changes: 1 addition & 1 deletion cfgov/ask_cfpb/jinja2/ask-cfpb/see-all.html
Expand Up @@ -4,7 +4,7 @@

{% block css -%}
{{ super() }}
<link rel="stylesheet" href="{{ static('css/on-demand/ask.css') }}">
<link rel="stylesheet" href="{{ static('apps/ask-cfpb/css/main.css') }}">
{%- endblock css %}

{% block content_modifiers -%}
Expand Down
Binary file modified cfgov/ask_cfpb/locale/es/LC_MESSAGES/django.mo
Binary file not shown.
41 changes: 26 additions & 15 deletions cfgov/ask_cfpb/locale/es/LC_MESSAGES/django.po
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-29 11:30-0400\n"
"POT-Creation-Date: 2024-05-08 18:25-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -18,6 +18,25 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:44
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:87
msgid "/ask-cfpb/search/"
msgstr "/es/obtener-respuestas/buscar/"

#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:47
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:63
msgid "Search for your question"
msgstr "Busque su pregunta"

#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:93
msgid "Search Ask CFPB for your question"
msgstr "Busque 'Obtener Respuestas' para su cuestionamiento"

#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:94
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:59
msgid "Search"
msgstr "Buscar"

#: ask_cfpb/jinja2/ask-cfpb/answer-page.html:7
msgid "Consumer Financial Protection Bureau"
msgstr ""
Expand All @@ -31,7 +50,7 @@ msgid "Read full answer"
msgstr "Leer más"

#: ask_cfpb/jinja2/ask-cfpb/answer-page.html:66
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:84
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:86
msgid "Don't see what you're looking for?"
msgstr "¿No encuentra lo que busca?"

Expand Down Expand Up @@ -86,31 +105,23 @@ msgstr "Por favor escriba su búsqueda arriba"
msgid "Read answer"
msgstr "Leer la respuesta"

#: ask_cfpb/jinja2/ask-cfpb/see-all.html:32
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:34
msgid "Read more"
msgstr "Leer más"

#: ask_cfpb/jinja2/ask-cfpb/see-all.html:47
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:49
msgid "Narrow your results"
msgstr "Búsqueda especial"

#: ask_cfpb/jinja2/ask-cfpb/see-all.html:53
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:55
msgid "Search term"
msgstr "Palabra a buscar"

#: ask_cfpb/jinja2/ask-cfpb/see-all.html:57
msgid "Search"
msgstr "Buscar"

#: ask_cfpb/jinja2/ask-cfpb/see-all.html:61
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:63
msgid "Clear search"
msgstr "Borrar búsqueda"

#: ask_cfpb/jinja2/ask-cfpb/see-all.html:85
msgid "/ask-cfpb/search/"
msgstr "/es/obtener-respuestas/buscar/"

#: ask_cfpb/jinja2/ask-cfpb/see-all.html:85
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:87
msgid "Search our full library of answers"
msgstr "Buscar en toda la lista de respuestas"

Expand Down
2 changes: 1 addition & 1 deletion cfgov/jobmanager/blocks.py
Expand Up @@ -33,7 +33,7 @@ class Meta:
template = "jobmanager/job_listing_list.html"

class Media:
css = ["job_listing_list.css"]
css = ["job-listing-list.css"]


class JobListingTable(blocks.StaticBlock):
Expand Down
4 changes: 2 additions & 2 deletions cfgov/jobmanager/jinja2/jobmanager/job_listing_page.html
Expand Up @@ -4,7 +4,7 @@

{% block css -%}
{{ super() }}
<link rel="stylesheet" href="{{ static('css/on-demand/job_listing_page.css') }}">
<link rel="stylesheet" href="{{ static('apps/careers/css/main.css') }}">
{%- endblock css %}

{% block content_main %}
Expand Down Expand Up @@ -211,7 +211,6 @@ <h2 class="m-slug-header__heading">

{% block javascript %}
{{ super() }}

<script type="application/ld+json">
{
"@context": "https://schema.org",
Expand Down Expand Up @@ -266,4 +265,5 @@ <h2 class="m-slug-header__heading">
}
</script>

<script src="{{ static('apps/careers/js/main.js') }}"></script>
{% endblock %}
Expand Up @@ -37,7 +37,7 @@

a {
display: block;
padding: unit((@grid_gutter-width / 4) / @base-font-size-px, em);
padding: unit(@grid_gutter-width / 4 / @base-font-size-px, em);
border-width: 0;
color: var(--black);
}
Expand Down
@@ -1,4 +1,6 @@
@import (reference) '../main.less';
@import (reference) '../../../css/main.less';
@import (less) './ask-search.less';
@import (less) './autocomplete.less';

/* ==========================================================================
consumerfinance.gov
Expand Down
Expand Up @@ -2,7 +2,7 @@
Scripts for Ask Autocomplete.
========================================================================== */

import Autocomplete from '../../molecules/Autocomplete';
import Autocomplete from './Autocomplete.js';
import { analyticsSendEvent } from '@cfpb/cfpb-analytics';

const URLS = {
Expand Down
3 changes: 3 additions & 0 deletions cfgov/unprocessed/apps/ask-cfpb/js/main.js
@@ -0,0 +1,3 @@
import './ask-analytics.js';
import './ask-autocomplete.js';
import '../../../js/routes/on-demand/summary.js';
1 change: 1 addition & 0 deletions cfgov/unprocessed/apps/careers/js/main.js
@@ -0,0 +1 @@
import '../../../js/routes/on-demand/summary.js';
2 changes: 0 additions & 2 deletions cfgov/unprocessed/css/main.less
Expand Up @@ -64,7 +64,6 @@
/* Molecule pieces
========================================================================== */

@import (less) 'molecules/autocomplete.less';
@import (less) 'molecules/call-to-action.less';
@import (less) 'molecules/file-input.less';
@import (less) 'molecules/form-field-with-button.less';
Expand All @@ -82,7 +81,6 @@

/* Organism pieces
========================================================================== */
@import (less) 'organisms/ask-search.less';
@import (less) 'organisms/audio-player.less';
@import (less) 'organisms/footer.less';
@import (less) 'organisms/filterable-list-controls.less';
Expand Down
@@ -1,4 +1,5 @@
@import (reference) '../main.less';
@import (reference) 'cfpb-core.less';
@import (reference) 'cfpb-grid.less';

.m-jobs-list .m-list--links {
// Tablet and above.
Expand Down
3 changes: 0 additions & 3 deletions cfgov/unprocessed/js/routes/ask-cfpb/single.js

This file was deleted.

2 changes: 0 additions & 2 deletions cfgov/unprocessed/js/routes/es/single.js

This file was deleted.

1 change: 0 additions & 1 deletion cfgov/unprocessed/js/routes/on-demand/summary.js
@@ -1,3 +1,2 @@
import { Summary } from '@cfpb/cfpb-expandables';

Summary.init();
Binary file modified cfgov/v1/locale/es/LC_MESSAGES/django.mo
Binary file not shown.
24 changes: 5 additions & 19 deletions cfgov/v1/locale/es/LC_MESSAGES/django.po
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-12 18:37-0400\n"
"POT-Creation-Date: 2024-05-08 18:25-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -32,7 +32,7 @@ msgstr "(anteriormente Twitter)"
msgid "https://www.facebook.com/CFPB"
msgstr "https://www.facebook.com/CFPBespanol"

#: v1/jinja2/v1/blog/blog_page.html:32
#: v1/jinja2/v1/blog/blog_page.html:33
#, python-format
msgid ""
"Join the conversation. Follow CFPB on %(twitter_link)s and %(facebook_link)s."
Expand Down Expand Up @@ -91,7 +91,6 @@ msgstr "Enviar una queja"
#: v1/jinja2/v1/includes/molecules/global-search.html:36
#: v1/jinja2/v1/includes/molecules/global-search.html:69
#: v1/jinja2/v1/includes/molecules/global-search.html:81
#: v1/jinja2/v1/includes/organisms/ask-search.html:94
msgid "Search"
msgstr "Buscar"

Expand Down Expand Up @@ -165,19 +164,6 @@ msgstr "Comparta esta información en"
msgid "Visit us on"
msgstr "Visítenos en"

#: v1/jinja2/v1/includes/organisms/ask-search.html:44
msgid "/ask-cfpb/search/"
msgstr "/es/obtener-respuestas/buscar/"

#: v1/jinja2/v1/includes/organisms/ask-search.html:47
#: v1/jinja2/v1/includes/organisms/ask-search.html:63
msgid "Search for your question"
msgstr "Busque su pregunta"

#: v1/jinja2/v1/includes/organisms/ask-search.html:93
msgid "Search Ask CFPB for your question"
msgstr "Busque 'Obtener Respuestas' para su cuestionamiento"

#: v1/jinja2/v1/includes/organisms/expandable.html:53
msgid "Show"
msgstr "Mostrar"
Expand All @@ -198,8 +184,8 @@ msgstr "https://www.usa.gov/es/"
msgid "USA.gov"
msgstr "USA.gov/es"

#: v1/jinja2/v1/includes/organisms/secondary-nav-fig.html:34
#: v1/jinja2/v1/includes/organisms/secondary-nav-fig.html:37
#: v1/jinja2/v1/includes/organisms/secondary-nav-fig.html:33
#: v1/jinja2/v1/includes/organisms/secondary-nav-fig.html:36
#, fuzzy
#| msgid "Featured content"
msgid "Table of contents"
Expand Down Expand Up @@ -233,7 +219,7 @@ msgstr "Este sitio no es compatible con su navegador web."
msgid "Please try a newer browser or confirm that JavaScript is enabled."
msgstr "Intente con un navegador web más nuevo o confirme que JavaScript está habilitado."

#: v1/jinja2/v1/layouts/base.html:260
#: v1/jinja2/v1/layouts/base.html:261
msgid "Skip to main content"
msgstr "Ir al contenido principal"

Expand Down
4 changes: 2 additions & 2 deletions esbuild/scripts.js
Expand Up @@ -11,9 +11,7 @@ const jsPaths = [
`${routes}/common.js`,

// js for entire sub-paths
`${routes}/ask-cfpb/single.js`,
`${routes}/credit-cards/single.js`,
`${routes}/es/single.js`,
// js for specific pages, based on url
`${routes}/data-research/prepaid-accounts/search-agreements/index.js`,

Expand All @@ -23,6 +21,8 @@ const jsPaths = [
// apps
...getAll(`${apps}/admin/js`),
...getAll(`${apps}/analytics-gtm/js`),
`${apps}/ask-cfpb/js/main.js`,
`${apps}/careers/js/main.js`,
`${apps}/ccdb-search/js/main.js`,
`${apps}/financial-well-being/js/home.js`,
`${apps}/financial-well-being/js/results.js`,
Expand Down
2 changes: 2 additions & 0 deletions esbuild/styles.js
Expand Up @@ -10,6 +10,8 @@ const css = `${unprocessed}/css`;
const apps = `${unprocessed}/apps`;

const styledApps = [
'ask-cfpb',
'careers',
'ccdb-search',
'financial-well-being',
'find-a-housing-counselor',
Expand Down

0 comments on commit 987b5e1

Please sign in to comment.