Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
#684 - update main nav to be a loop
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-englander committed Mar 3, 2023
1 parent 0759aa5 commit 8d64864
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 62 deletions.
45 changes: 7 additions & 38 deletions components/BetaUsaGovHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,50 +79,19 @@

<!-- Start main navigation. -->
<ul class="usa-nav__primary usa-accordion">
<li class="usa-nav__primary-item">
<a
:href="sanitizedHeadingUrl($t('beta.header.nav.linkOneUrl'))"
class="usa-nav__link"
><span>{{ $t("beta.header.nav.linkOneText") }}</span></a
>
</li>
<li
id="usa-nav__about"
class="usa-nav__primary-item">
<a
:href="sanitizedHeadingUrl($t('beta.header.nav.linkTwoUrl'))"
class="usa-nav__link"
><span>{{ $t("beta.header.nav.linkTwoText") }}</span></a
>
</li>
<li
id="usa-nav__money"
class="usa-nav__primary-item">
<a
:href="sanitizedHeadingUrl($t('beta.header.nav.linkThreeUrl'))"
class="usa-nav__link"
><span>{{ $t("beta.header.nav.linkThreeText") }}</span></a
>
</li>
<li
id="usa-nav__law"
class="usa-nav__primary-item">
<a
:href="sanitizedHeadingUrl($t('beta.header.nav.linkFourUrl'))"
class="usa-nav__link"
><span>{{ $t("beta.header.nav.linkFourText") }}</span></a
>
</li>
<li
id="usa-nav__scams"
v-for="item in $t('beta.header.navMain')"
:id="`item-id-${item.linkID}`"
:key="`item-id-${item.linkID}`"
class="usa-nav__primary-item">
<a
:href="sanitizedHeadingUrl($t('beta.header.nav.linkFiveUrl'))"
class="usa-nav__link"
><span>{{ $t("beta.header.nav.linkFiveText") }}</span></a
>
:href="sanitizedHeadingUrl(item.linkURL)">
{{ item.linkText }}
</a>
</li>
</ul>

<div class="usa-nav__secondary">
<span class="usa-nav__secondary-links">
<span
Expand Down
39 changes: 27 additions & 12 deletions locales/en/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,33 @@
"header": {
"languageToggle": "Español",
"menu": "Menu",
"nav": {
"linkOneText": "All topics and services",
"linkOneUrl": "https://beta.usa.gov/#all_topics",
"linkTwoText": "About the U.S. and its government",
"linkTwoUrl": "https://beta.usa.gov/about-the-us/",
"linkThreeText": "Money",
"linkThreeUrl": "https://beta.usa.gov/money/",
"linkFourText": "Laws and legal issues",
"linkFourUrl": "https://beta.usa.gov/laws-and-legal-issues/",
"linkFiveText": "Scams and fraud",
"linkFiveUrl": "https://beta.usa.gov/scams-and-fraud/"
},
"navMain": [
{
"linkID": "mnav-10",
"linkText": "All topics and services",
"linkURL": "https://beta.usa.gov/#all_topics"
},
{
"linkID": "mnav-20",
"linkText": "About the U.S. and its government",
"linkURL": "https://beta.usa.gov/about-the-us/"
},
{
"linkID": "mnav-30",
"linkText": "Money",
"linkURL": "https://beta.usa.gov/money/"
},
{
"linkID": "mnav-40",
"linkText": "Laws and legal issues",
"linkURL": "https://beta.usa.gov/laws-and-legal-issues/"
},
{
"linkID": "mnav-50",
"linkText": "Scams and fraud",
"linkURL": "https://beta.usa.gov/scams-and-fraud/"
}
],
"secondaryNav": {
"linkOneText": "Call us at 1-844-USAGOV1",
"linkOneUrl": "https://beta.usa.gov/phone/"
Expand Down
39 changes: 27 additions & 12 deletions locales/es/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,18 +289,33 @@
"header": {
"languageToggle": "English",
"menu": "MENÚ",
"nav": {
"linkOneText": "Todos los temas y servicios",
"linkOneUrl": "https://beta.usa.gov/es#all_topics",
"linkTwoText": "Acerca de EE. UU. y directorios del Gobierno",
"linkTwoUrl": "https://beta.usa.gov/es/acerca-de-estados-unidos/",
"linkThreeText": "Dinero",
"linkThreeUrl": "https://beta.usa.gov/es/dinero",
"linkFourText": "Leyes y asuntos legales",
"linkFourUrl": "https://beta.usa.gov/es/leyes-y-asuntos-legales/",
"linkFiveText": "Estafas y fraudes",
"linkFiveUrl": "https://beta.usa.gov/es/estafas-y-fraudes/"
},
"navMain": [
{
"linkID": "mnav-10",
"linkText": "Todos los temas y servicios",
"linkURL": "https://beta.usa.gov/es#all_topics"
},
{
"linkID": "mnav-20",
"linkText": "Acerca de EE. UU. y directorios del Gobierno",
"linkURL": "https://beta.usa.gov/es/acerca-de-estados-unidos/"
},
{
"linkID": "mnav-30",
"linkText": "Dinero",
"linkURL": "https://beta.usa.gov/es/dinero"
},
{
"linkID": "mnav-40",
"linkText": "Leyes y asuntos legales",
"linkURL": "https://beta.usa.gov/es/leyes-y-asuntos-legales/"
},
{
"linkID": "mnav-50",
"linkText": "Estafas y fraudes",
"linkURL": "https://beta.usa.gov/es/estafas-y-fraudes/"
}
],
"secondaryNav": {
"linkOneText": "Llámenos al 1-844-USAGOV1",
"linkOneUrl": "https://beta.usa.gov/es/centro-de-llamadas"
Expand Down

0 comments on commit 8d64864

Please sign in to comment.