@@ -5,9 +5,10 @@ import { ButtonPrimary, Clickable, Link } from 'src/components/common';
55import { HeroWrapper } from 'src/components/HeroWrapper' ;
66import { icon } from 'src/components/icons' ;
77import hexButton from 'src/images/hex-button.svg' ;
8+ import roadmapBgBanner from 'src/images/roadmap-bg-banner.png' ;
89import { Ajax } from 'src/libs/ajax' ;
910import { getEnabledBrand , isFirecloud , isTerra } from 'src/libs/brand-utils' ;
10- import { landingPageCardsDefault } from 'src/libs/brands' ;
11+ import { landingPageCardsDefault , roadMapCardDefault } from 'src/libs/brands' ;
1112import colors from 'src/libs/colors' ;
1213import { withErrorHandling } from 'src/libs/error' ;
1314import * as Nav from 'src/libs/nav' ;
@@ -30,6 +31,13 @@ const styles = {
3031 color : 'white' ,
3132 padding : '2rem 1rem' ,
3233 } ,
34+ roadmapBanner : {
35+ width : 710 ,
36+ backgroundImage : `url(${ roadmapBgBanner } )` ,
37+ backgroundSize : 'cover' ,
38+ backgroundRepeat : 'no-repeat' ,
39+ backgroundPosition : 'center' ,
40+ } ,
3341} ;
3442
3543const makeRightArrowWithBackgroundIcon = ( ) =>
@@ -49,22 +57,24 @@ const makeRightArrowWithBackgroundIcon = () =>
4957 [ icon ( 'arrowRight' , { color : 'white' } ) ]
5058 ) ;
5159
52- const makeCard = _ . map ( ( { link, title, body, linkPathParams, linkQueryParams } ) =>
53- h (
54- Clickable ,
55- {
56- href : Nav . getLink ( link , linkPathParams , linkQueryParams ) ,
57- style : { ...Style . elements . card . container , ...styles . card } ,
58- hover : { boxShadow : '0 3px 7px 0 rgba(0,0,0,0.5), 0 5px 3px 0 rgba(0,0,0,0.2)' } ,
59- } ,
60- [
61- h2 ( { style : { color : colors . accent ( ) , fontSize : 18 , fontWeight : 500 , lineHeight : '22px' , marginBottom : '0.5rem' } } , title ) ,
62- div ( { style : { lineHeight : '22px' } } , body ) ,
63- div ( { style : { flexGrow : 1 } } ) ,
64- makeRightArrowWithBackgroundIcon ( ) ,
65- ]
66- )
67- ) ;
60+ const makeCard = ( customStyles = { } , cardConfigs = [ ] , isExternalLink = false ) =>
61+ _ . map ( ( { link, title, body, linkPathParams, linkQueryParams } ) =>
62+ h (
63+ Clickable ,
64+ {
65+ href : isExternalLink ? link : Nav . getLink ( link , linkPathParams , linkQueryParams ) ,
66+ style : { ...Style . elements . card . container , ...customStyles } ,
67+ hover : { boxShadow : '0 3px 7px 0 rgba(0,0,0,0.5), 0 5px 3px 0 rgba(0,0,0,0.2)' } ,
68+ target : isExternalLink ? '_blank' : '' ,
69+ } ,
70+ [
71+ h2 ( { style : { color : colors . accent ( ) , fontSize : 18 , fontWeight : 500 , lineHeight : '22px' , marginBottom : '0.5rem' } } , title ) ,
72+ div ( { style : { lineHeight : '22px' } } , body ) ,
73+ div ( { style : { flexGrow : 1 } } ) ,
74+ makeRightArrowWithBackgroundIcon ( ) ,
75+ ]
76+ )
77+ ) ( cardConfigs ) ;
6878
6979const makeDocLinks = _ . map ( ( { link, text } ) =>
7080 div ( { style : { marginBottom : '1rem' , fontSize : 18 } } , [
@@ -132,7 +142,15 @@ export const LandingPage = () => {
132142 ) ,
133143 // width is set to prevent text from overlapping the background image and decreasing legibility
134144 div ( { style : { maxWidth : 'calc(100% - 460px)' } } , makeDocLinks ( getEnabledBrand ( ) . docLinks ) ) ,
135- div ( { style : { display : 'flex' , margin : '2rem 0 1rem 0' } } , makeCard ( getEnabledBrand ( ) . landingPageCards || landingPageCardsDefault ) ) ,
145+ div (
146+ { style : { display : 'flex' , margin : '2rem 0 1rem 0' } } ,
147+ makeCard ( { ...styles . card } , getEnabledBrand ( ) . landingPageCards || landingPageCardsDefault )
148+ ) ,
149+ getEnabledBrand ( ) . showRoadmap &&
150+ div (
151+ { style : { display : 'flex' , marginTop : '2rem' } } ,
152+ makeCard ( { ...styles . roadmapBanner } , [ getEnabledBrand ( ) . roadMapCard || roadMapCardDefault ] , true )
153+ ) ,
136154 ( isTerra ( ) || isFirecloud ( ) ) &&
137155 div ( { style : { width : 700 , marginTop : '4rem' } } , [
138156 'This project has been funded in whole or in part with Federal funds from the National Cancer Institute, National Institutes of Health, ' ,
0 commit comments