Skip to content

Commit

Permalink
[FE-136] Terra UI branding - Public Health Genomics (#4589)
Browse files Browse the repository at this point in the history
Co-authored-by: Katrina P <68349264+kpierre13@users.noreply.github.com>
  • Loading branch information
samanthahv and kpierre13 authored Feb 5, 2024
1 parent 2b56596 commit df88673
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 10 deletions.
10 changes: 10 additions & 0 deletions src/images/brands/publicHealth/Terra-PHG-Color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/images/brands/publicHealth/Terra-PHG-White.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 93 additions & 0 deletions src/libs/brands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import fcLogo from 'src/images/brands/firecloud/FireCloud-Logo.svg';
import fcLogoWhite from 'src/images/brands/firecloud/FireCloud-Logo-White.svg';
import projectSingularLogo from 'src/images/brands/projectSingular/project-singular-logo-black.svg';
import projectSingularLogoWhite from 'src/images/brands/projectSingular/project-singular-logo-white.svg';
import publicHealthBackground from 'src/images/brands/publicHealth/Terra-PHG-background.png';
import publicHealthLogo from 'src/images/brands/publicHealth/Terra-PHG-Color.svg';
import publicHealthLogoWhite from 'src/images/brands/publicHealth/Terra-PHG-White.svg';
import rareXLogo from 'src/images/brands/rareX/rarex-logo-color.svg';
import rareXLogoWhite from 'src/images/brands/rareX/rarex-logo-white.svg';
import terraLogo from 'src/images/brands/terra/logo.svg';
Expand Down Expand Up @@ -61,13 +64,48 @@ export interface BrandConfiguration {
/** Optional URL for landing page background image */
landingPageBackground?: string;

landingPageCards?: {
/** Card link */
link: string;

/** Card title */
title: string;

/** Card body */
body: string;

/** Card link pathParams */
linkPathParams?: object;

/** Card link queryParams */
linkQueryParams?: object;
}[];

/** Optionally filter which datasets show up in the Data Catalog */
catalogDataCollectionsToInclude?: string[];

/** Theme for components */
theme: Theme;
}

export const landingPageCardsDefault = [
{
link: 'workspaces',
title: 'View Workspaces',
body: 'Workspaces connect your data to popular analysis tools powered by the cloud. Use Workspaces to share data, code, and results easily and securely.',
},
{
link: 'library-showcase',
title: 'View Examples',
body: 'Browse our gallery of showcase Workspaces to see how science gets done.',
},
{
link: 'library-datasets',
title: 'Browse Data',
body: 'Access data from a rich ecosystem of data portals.',
},
];

const baseColors: Theme['colorPalette'] = {
primary: '#74ae43',
secondary: '#6d6e70',
Expand Down Expand Up @@ -290,6 +328,61 @@ export const brands: Record<string, BrandConfiguration> = {
colorPalette: { ...baseColors, primary: '#521b93', secondary: '#011c48', accent: '#521b93' },
},
},
publicHealth: {
name: 'Terra for Public Health Genomics',
queryName: 'publicHealth',
welcomeHeader: 'Terra for Public Health Genomics',
description:
'Terra is a secure cloud-based data platform enabling pathogen genomic data analysis in public health, clinical, and academic settings.',
hostName: 'publichealth.terra.bio',
docLinks: [
{
link: 'https://dockstore.org/organizations/Theiagen',
text: 'Theiagen Workflow Repository',
},
{
link: 'https://docs.google.com/document/d/e/2PACX-1vTPQC-bYMRxXQ4Gz9ESH_Eo-E6UXD2qOL7_3iMxJaQF3pOyW3tUyu7G9Nvk-JTf8xDkOyhftvd9L-sa/pub',
text: 'Terra Cloud Costs FAQs',
},
{
link: 'mailto:publichealthgenomics@broadinstitute.org',
text: 'Contact us',
},
{
link: 'https://support.terra.bio/hc/en-us',
text: 'Terra Support',
},
],
logos: {
color: publicHealthLogo,
white: publicHealthLogoWhite,
},
landingPageBackground: publicHealthBackground,
landingPageCards: [
{
link: 'workspaces',
title: 'My Workspaces',
body: 'Workspaces connect your data to popular analysis tools powered by the cloud. Use Workspaces to share data, code, and results easily and securely.',
},
{
link: 'workspaces',
title: 'Examples',
body: 'Browse example pathogen genomic data and analysis tools together.',
linkPathParams: {},
linkQueryParams: { tab: 'public', 'tagsFilter[]': 'pathogen genomics' },
},
],
theme: {
colorPalette: {
...baseColors,
primary: '#006DB6',
secondary: '#004D81',
accent: '#4D72AA',
light: '#E6F1F8',
dark: '#333F52',
},
},
},
rareX: {
name: `The RARE${nonBreakingHyphen}X Data Analysis Platform`,
queryName: `the rare${nonBreakingHyphen}x data analysis platform`,
Expand Down
16 changes: 6 additions & 10 deletions src/pages/LandingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import hexButton from 'src/images/hex-button.svg';
import terraHero from 'src/images/terra-hero.png';
import { Ajax } from 'src/libs/ajax';
import { getEnabledBrand, isFirecloud, isTerra } from 'src/libs/brand-utils';
import { landingPageCardsDefault } from 'src/libs/brands';
import colors from 'src/libs/colors';
import { withErrorHandling } from 'src/libs/error';
import Events from 'src/libs/events';
Expand Down Expand Up @@ -51,11 +52,11 @@ const makeRightArrowWithBackgroundIcon = () =>
[icon('arrowRight', { color: 'white' })]
);

const makeCard = (link, title, body) =>
const makeCard = _.map(({ link, title, body, linkPathParams, linkQueryParams }) =>
h(
Clickable,
{
href: Nav.getLink(link),
href: Nav.getLink(link, linkPathParams, linkQueryParams),
style: { ...Style.elements.card.container, ...styles.card },
hover: { boxShadow: '0 3px 7px 0 rgba(0,0,0,0.5), 0 5px 3px 0 rgba(0,0,0,0.2)' },
},
Expand All @@ -65,7 +66,8 @@ const makeCard = (link, title, body) =>
div({ style: { flexGrow: 1 } }),
makeRightArrowWithBackgroundIcon(),
]
);
)
);

const makeDocLinks = _.map(({ link, text }) =>
div({ style: { marginBottom: '1rem', fontSize: 18 } }, [
Expand Down Expand Up @@ -133,13 +135,7 @@ export const LandingPage = () => {
),
// width is set to prevent text from overlapping the background image and decreasing legibility
div({ style: { maxWidth: 'calc(100% - 460px)' } }, makeDocLinks(getEnabledBrand().docLinks)),
div({ style: { display: 'flex', margin: '2rem 0 1rem 0' } }, [
makeCard('workspaces', 'View Workspaces', [
'Workspaces connect your data to popular analysis tools powered by the cloud. Use Workspaces to share data, code, and results easily and securely.',
]),
makeCard('library-showcase', 'View Examples', 'Browse our gallery of showcase Workspaces to see how science gets done.'),
makeCard('library-datasets', 'Browse Data', 'Access data from a rich ecosystem of data portals.'),
]),
div({ style: { display: 'flex', margin: '2rem 0 1rem 0' } }, makeCard(getEnabledBrand().landingPageCards || landingPageCardsDefault)),
isTerra() &&
div(
{
Expand Down

0 comments on commit df88673

Please sign in to comment.