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

Commit

Permalink
#582 - add footer signup comp.
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-englander committed Feb 1, 2023
1 parent 0faf9ff commit 2f1ebee
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 29 deletions.
30 changes: 2 additions & 28 deletions components/BetaUsaGovFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,8 @@
<BetaUsaGovFooterNav />
</nav>
</div>

<!-- Subscribe to the newsletter. -->
<div class="tablet:grid-col-4">
<div class="usa-sign-up">
<h2 class="usa-sign-up__heading">{{ $t("footer.GroupThree.header") }}</h2>
<form
class="usa-form"
action="https://connect.usa.gov/subscribe"
method="get">
<label
class="usa-label"
for="signup-email">
{{ $t("footer.GroupThree.formLabel") }}
</label>
<input
id="signup-email"
class="usa-input"
name="email"
type="email" />
<button
class="usa-button"
type="submit">
{{ $t("footer.GroupThree.buttonText") }}
</button>
</form>
</div>
</div>
<!-- Newsletter signup component-->
<BetaUsaGovFooterSignUp />
</div>
</div>
</div>
Expand Down Expand Up @@ -66,7 +41,6 @@
</div>
</span>
</div>

<!-- Footer social component. -->
<BetaUsaGovFooterSocial />
</div>
Expand Down
46 changes: 46 additions & 0 deletions components/BetaUsaGovFooterSignUp.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<template>
<!-- Subscribe to the newsletter. -->
<div class="tablet:grid-col-4">
<div class="usa-sign-up">
<h2 class="usa-sign-up__heading">{{ $t("footer.GroupThree.header") }}</h2>
<form
class="usa-form"
action="https://connect.usa.gov/subscribe"
method="get">
<label
class="usa-label"
for="signup-email">
{{ $t("footer.GroupThree.formLabel") }}
</label>
<input
id="signup-email"
class="usa-input"
name="email"
type="email" />
<button
class="usa-button"
type="submit">
{{ $t("footer.GroupThree.buttonText") }}
</button>
</form>
</div>
</div>
</template>

<script>
import sanitizeUrl from "~/mixins/SanitizeBears"
export default {
name: "BetaUsaGovFooterSignUp",
mixins: [sanitizeUrl],
methods: {
sanitizedBearsUrl(benefitUrl, defaultValue = "#") {
if (benefitUrl && benefitUrl.length > 0) {
return this.sanitizeUrl(benefitUrl)
} else {
return defaultValue
}
},
},
}
</script>
2 changes: 1 addition & 1 deletion components/BetaUsaGovFooterSocial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import sanitizeUrl from "~/mixins/SanitizeBears"
export default {
name: "BetaUsaGovFooterNav",
name: "BetaUsaGovFooterSocial",
mixins: [sanitizeUrl],
methods: {
sanitizedBearsUrl(benefitUrl, defaultValue = "#") {
Expand Down

0 comments on commit 2f1ebee

Please sign in to comment.