Add external link icons & all outstanding changes from Living copy (#1173)

* Refactor Footer component

- Make Footer component align to normal folder structure
- Make links in Footer use LinkTypeWrapper, which will allow icon to be added to all external links in one place

* Add Trussworks link to LinkTypeWrapper

* Add icon to SurveyButton comp

* Add launch icon to About page cards

* Add launch icon to FederalRegister link

* Refactor Methodology page

- Add Source and Available for fields to dataset Cards
- refactor data structure for dataset Cards to handle more than 1 source
- update constants file
- modify SASS for source list items
- update snapshots

* Add copy changes; How you can help and territories

* Update methodology section with copy changes

* Swap out all email links with <LinkTypeWrapper>

- update tests
This commit is contained in:
Vim 2022-01-26 16:12:33 -05:00 committed by GitHub
commit e677df794d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1867 additions and 968 deletions

View file

@ -15,12 +15,17 @@
@include u-height(6);
z-index: 2;
@include u-text("gray-90");
@include u-text("blue-70v");
@include u-bg("yellow-20v");
&:hover {
@include u-bg("yellow-20");
@include u-text("gray-90");
}
.launchIcon {
height: .8rem;
// @include u-margin-bottom('neg-05');
}
}
}

View file

@ -2,6 +2,7 @@ declare namespace SurveyButtonNamespace {
export interface ISurveyButtonScss {
surveyButton: string;
surveyButtonContainer: string;
launchIcon: string;
}
}

View file

@ -6,6 +6,9 @@ import * as styles from './SurveyButton.module.scss';
import * as CONTACT_COPY from '../../data/copy/contact';
import J40MainGridContainer from '../J40MainGridContainer';
// @ts-ignore
import launchIcon from '/node_modules/uswds/dist/img/usa-icons-bg/launch--blue-70v.svg';
export const onClickHandler = () => {
Object.assign(document.createElement('a'), {target: '_blank', href: 'https://www.surveymonkey.com/r/cejst-survey'}).click();
};
@ -19,6 +22,11 @@ const SurveyButton = () => {
className={styles.surveyButton}
onClick={() => onClickHandler()}>
{intl.formatMessage(CONTACT_COPY.PAGE_INTRO.SURVEY_TEXT)}
<img
className={styles.launchIcon}
src={launchIcon}
alt={'launch icon'}
/>
</Button>
</J40MainGridContainer>
);

View file

@ -12,6 +12,10 @@ exports[`rendering of the SurveyButton checks if component renders 1`] = `
type="button"
>
Help improve the site & data
<img
alt="launch icon"
src="test-file-stub"
/>
</button>
</div>
</DocumentFragment>