Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(data): dataLoader #50

Merged
merged 11 commits into from
Feb 15, 2024
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit-msg

This file was deleted.

2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Ignore artifacts:
# src
dist/data/dataLoader.min.json
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
printWidth: 300
printWidth: 400
useTabs: true
tabWidth: 2
semi: true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint": "npm run pa11y",
"format": "npx prettier --write dist/**/*",
"commit": "git cz",
"build": "cross-env ELEVENTY_ENV=prod eleventy"
"build": "cross-env ELEVENTY_ENV=prod eleventy && node src/utils/dataLoader.js"
},
"config": {
"commitizen": {
Expand Down
80 changes: 0 additions & 80 deletions src/_data/affiliates.json

This file was deleted.

80 changes: 80 additions & 0 deletions src/_data/affiliations/dc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
const data = {
address1: "915 15th St. NW",
address2: "Washington, D.C. 20005",
affiliation_name: "ACLU of the District of Columbia",
donation_url: "https://action.aclu.org/give/district-columbia-join-renew-today?initms_aff=dc&initms_chan=eml&utm_medium=eml&initms=22XXXX_affcampaign_footerdonate_gradead_sail&utm_source=sail&utm_campaign=affcampaign&utm_content=22XXXX_civilliberties_footerdonate_gradead&af={sb_query_string_encrypted}&ms_aff=dc&ms_chan=eml&ms=22XXXX_affcampaign_footerdonate_gradead_sail",
facebook_url: "https://www.facebook.com/aclu.dc/",
instagram_url: "https://www.instagram.com/acluofdc",
logo_url: "https://media.sailthru.com/64d/1k4/4/d/5e947c1762b9b.png",
logo_width: "150",
twitter_url: "https://twitter.com/ACLU_DC",
website_url: "https://www.acludc.org/",
signatures: [
{
ed: {
title: "Executive Director",
name: "Monica Hopkins",
pronouns: "She, her, hers",
headshot: "https://media.sailthru.com/64d/1k4/3/2/5e5d757ab2965.jpg",
},
},
{
advo: {
title: "Political Director",
name: "Nassim Moshiree",
pronouns: "She, her, hers",
headshot: "https://media.sailthru.com/64d/1k4/4/s/5ea8913ea14ef.png",
},
},
{
comms: {
title: "Strategic Communications Director",
name: "Suzanne Ito",
pronouns: "She, her, hers",
headshot: "https://media.sailthru.com/64d/1k4/4/s/5ea8914c77a38.jpg",
},
},
{
dev: {
title: "Development Director ",
name: "Brigid Slipka",
pronouns: "She, her, hers",
headshot: "https://media.sailthru.com/64d/1k4/4/s/5ea8915478ed6.jpg",
},
},
{
legal: {
title: "Legal Director",
name: "Scott Michelman",
pronouns: "He, him, his",
headshot: "https://media.sailthru.com/64d/1k4/4/s/5ea89146470b0.jpg",
},
},
{
custom1: {
title: "Communications Director",
name: "Amber Taylor",
pronouns: "She, her, hers",
headshot: "https://media.sailthru.com/64d/1k4/5/5/5eb1d173406b3.jpg",
},
},
{
custom2: {
title: "",
name: "",
pronouns: "",
headshot: "",
},
},
{
custom3: {
title: "",
name: "",
pronouns: "",
headshot: "",
},
},
],
};

module.exports = data;
80 changes: 80 additions & 0 deletions src/_data/affiliations/nat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
const data = {
address1: "125 Broad St.",
address2: "New York, NY 10004",
affiliation_name: "ACLU",
donation_url: "https://action.aclu.org/give/protect-rights-freedoms-we-believe-4-multistep?initms_aff=nat&initms_chan=eml&utm_medium=eml&initms=21XXXX_affcampaign_footerdonate_gradead_sail&utm_source=sail&utm_campaign=affcampaign&utm_content=21XXXX_civilliberties_footerdonate_gradead&af={sb_query_string_encrypted}&ms_aff=nat&ms_chan=eml&ms=21XXXX_affcampaign_footerdonate_gradead_sail",
facebook_url: "https://www.facebook.com/aclu",
instagram_url: "https://www.instagram.com/aclu_nationwide/",
logo_url: "https://media.sailthru.com/64d/1k3/a/o/5db1cbcdd662a.png",
logo_width: "150",
twitter_url: "https://twitter.com/aclu",
website_url: "https://www.aclu.org/",
signatures: [
{
ed: {
title: "Executive Director",
name: "Anthony Romero",
pronouns: "He, him, his",
headshot: "https://media.sailthru.com/64d/1k3/a/o/5db2043ae79b8.jpg",
},
},
{
advo: {
title: "Political Director",
name: "Ronald Newman",
pronouns: "He, him, his",
headshot: "https://media.sailthru.com/64d/1k3/a/o/5db2052e87d81.jpg",
},
},
{
comms: {
title: "Chief Communications Officer",
name: "Rebecca Lowell Edwards",
pronouns: "She, her, hers",
headshot: "",
},
},
{
dev: {
title: "Director of Development",
name: "Liz FitzGerald",
pronouns: "She, her, hers",
headshot: "",
},
},
{
legal: {
title: "Legal Director",
name: "David Cole",
pronouns: "",
headshot: "https://media.sailthru.com/64d/1k3/a/o/5db2048b5dfce.jpg",
},
},
{
custom1: {
title: "Affiliate Digital Campaigns Manager",
name: "Pavel Sanchez",
pronouns: "He, him, his",
headshot: "",
},
},
{
custom2: {
title: "Director of Digital Campaigns",
name: "Joe Coakley",
pronouns: "He, him, his",
headshot: "",
},
},
{
custom3: {
title: "",
name: "",
pronouns: "",
headshot: "",
},
},
],
};

module.exports = data;
66 changes: 66 additions & 0 deletions src/_includes/partials/new/footer.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<table role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" class="emailwrapto100pc" width="600">
<tbody>
<tr>
<td style="text-align:left;font-family: Arial,'Helvetica Neue',sans-serif;font-size:13px;color:#505050;line-height:19px;padding:25px 15px 15px 15px;">
<table role="presentation" width="56%" cellpadding="0" cellspacing="0" border="0" align="center" class="footer-left">
<tbody>
<tr>
<td align="center" valign="top" class="footer-left" style="font-family: Arial,'Helvetica Neue',sans-serif;font-size:16px;line-height:20px;color:#888888;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" role="presentation">
<tr>
<td align="center">
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" bgcolor="#0055aa">
<a role="button" class="button-text" href="{donation_url}" style="font-family: Arial, sans-serif; color: #ffffff; padding: 12px 18px; border: 1px solid #0055aa; display: inline-block;font-size:18px;font-weight:bold;text-align:center;text-decoration:none;text-transform: uppercase;">Donate Now</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" align="right" class="footer-right">
<tbody>
<tr>
<td align="center" valign="top" class="footer-right" style="padding:40px 0px 0px 0px;font-family: Arial,'Helvetica Neue',sans-serif;font-size:16px;line-height:20px;color:#888888;text-align:center;">
<a href="{facebook_url}"><img src="{facebook_logo}" border="0" alt="Facebook" width="33"/></a> &nbsp; &nbsp;
<a href="{twitter_url}"><img src="{twitter_logo}" border="0" alt="Twitter" width="33"/></a> &nbsp; &nbsp;
<a href="{instagram_url}"><img src="{instagram_logo}" border="0" alt="Instagram" width="33"/></a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="center" class="footer-text" style="color:#888888;font-family: Arial,'Helvetica Neue',sans-serif;font-size:14px;line-height:20px;padding:15px;">
<!-- START FOOTER INFO -->
This email was sent to: <strong>{email}</strong>
<br />
<br />
<span style="font-family: Arial,'Helvetica Neue',sans-serif;">You are receiving this message because you signed up<br />to receive emails from the {if affiliation == "ca"}{affiliates.cd.affiliate_name},<br />{affiliates.cn.affiliation_name}, {affiliates.cs.affiliate_name}{else}American Civil Liberties Union{/if}.</span>
<br />
<br />
{if affiliation == "ca"}<a href="{ca_email_pref}" style="color:#888888;">Unsubscribe</a>{else}<a href="{email_pref}" style="color:#888888;">Unsubscribe</a>{/if}
<br />
<br />
Please note: If you forward or distribute, the links will open a page with your information filled in.
<br />
<br />
We respect your right to privacy &ndash; <a href="{privacy_statement}" style="color:#888888;">view our policy.</a>
<br />
<br />
This email was sent by:<br />
{affiliation_name}<br />
{address_1}<br />
{address_2}<br />
<br />
<!-- END FOOTER INFO -->
</td>
</tr>
</tbody>
</table>
Loading
Loading