Skip to content

Commit

Permalink
add cookie and banner
Browse files Browse the repository at this point in the history
  • Loading branch information
paridhi-parajuli committed Feb 20, 2025
1 parent e1d3334 commit f85ebd7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ CUSTOM_SCRIPT_ID=_fed_an_ua_tag

FEATURE_NEW_EXPLORATION = 'TRUE'
SHOW_CONFIGURABLE_COLOR_MAP = 'TRUE'
COOKIE_CONSENT_FORM = 'FALSE'

ENABLE_USWDS_PAGE_FOOTER = 'FALSE'
ENABLE_COOKIE_CONSENT_FORM = TRUE
46 changes: 46 additions & 0 deletions veda.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ let subNavItems = [
},
]

const defaultGuidance = {
left: {
title: 'Official websites use .gov',
text: 'A **.gov** website belongs to an official government organization in the United States.',
iconAlt: 'Dot gov icon',
icon: '/img/icon-dot-gov.svg'
},
right: {
title: 'Secure .gov websites use HTTPS',
text: "A **lock icon** or **https://** means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.",
iconAlt: 'HTTPS icon',
icon: '/img/icon-https.svg'
}
};

if (config.GOOGLE_FORM) {
subNavItems = [
Expand Down Expand Up @@ -124,4 +138,36 @@ module.exports = {
mainNavItems: defaultMenuLinks,
subNavItems: subNavItems
},
cookieConsentForm: {
title: 'Cookie Consent',
copy: 'We use cookies to enhance your browsing experience and to help us understand how our website is used. These cookies allow us to collect data on site usage and improve our services based on your interactions. To learn more about it, see our [Privacy Policy](https://www.nasa.gov/privacy/#cookies)',
theme: {
card: {
sideBarColor: '#082a64',
textColor: '#1B2631',
linkColor: '#175074'
},
acceptButton: {
default: { backgroundColor: '#082a64', textColor: 'white' },
hover: { backgroundColor: '#061A3A', textColor: '#white' }
},
declineButton: {
default: { borderColor: '#082a64', textColor: '#082a64' },
hover: { borderColor: '#061A3A', textColor: '#2c3e50' }
},
iconColor: { default: '#082a64', hover: '#061A3A' }
}
},
banner: {
headerText: 'An official website of the United States government',
headerActionText: "Here's how you know",
ariaLabel: 'Banner for official government website',
flagImgSrc: '/img/us_flag_small.png',
flagImgAlt: 'US flag',
leftGuidance: defaultGuidance.left,
rightGuidance: defaultGuidance.right,
className: '',
defaultIsOpen: false,
contentId: 'gov-banner-content'
},
};

0 comments on commit f85ebd7

Please sign in to comment.