Skip to content

Commit 45123a1

Browse files
authored
Use DUOS in text and URL for Browse Data card (#5446)
1 parent 2cb664c commit 45123a1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/libs/brands.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Theme } from '@terra-ui-packages/components';
2-
import { ReactNode } from 'react';
3-
import React from 'react';
2+
import React, { ReactNode } from 'react';
43
import anvilLogo from 'src/images/brands/anvil/ANVIL-Logo.svg';
54
import anvilLogoWhite from 'src/images/brands/anvil/ANVIL-Logo-White.svg';
65
import baselineLogo from 'src/images/brands/baseline/baseline-logo-color.svg';
@@ -122,9 +121,9 @@ export const landingPageCardsDefault = [
122121
body: 'Browse our gallery of showcase Workspaces to see how science gets done.',
123122
},
124123
{
125-
link: 'library-datasets',
124+
link: 'https://duos.org',
126125
title: 'Browse Data',
127-
body: 'Access data from a rich ecosystem of data portals.',
126+
body: 'Access data from a rich ecosystem in DUOS.',
128127
},
129128
];
130129

src/pages/LandingPage.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,24 @@ const makeRightArrowWithBackgroundIcon = () =>
5858
);
5959

6060
const makeCard = (customStyles = {}, cardConfigs = [], isExternalLink = false) =>
61-
_.map(({ link, title, body, linkPathParams, linkQueryParams }) =>
62-
h(
61+
_.map(({ link, title, body, linkPathParams, linkQueryParams }) => {
62+
const isExternal = isExternalLink || link.startsWith('http://') || link.startsWith('https://');
63+
return h(
6364
Clickable,
6465
{
65-
href: isExternalLink ? link : Nav.getLink(link, linkPathParams, linkQueryParams),
66+
href: isExternal ? link : Nav.getLink(link, linkPathParams, linkQueryParams),
6667
style: { ...Style.elements.card.container, ...customStyles },
6768
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+
target: isExternal ? '_blank' : '',
6970
},
7071
[
7172
h2({ style: { color: colors.accent(), fontSize: 18, fontWeight: 500, lineHeight: '22px', marginBottom: '0.5rem' } }, title),
7273
div({ style: { lineHeight: '22px' } }, body),
7374
div({ style: { flexGrow: 1 } }),
7475
makeRightArrowWithBackgroundIcon(),
7576
]
76-
)
77-
)(cardConfigs);
77+
);
78+
})(cardConfigs);
7879

7980
const makeDocLinks = _.map(({ link, text }) =>
8081
div({ style: { marginBottom: '1rem', fontSize: 18 } }, [

0 commit comments

Comments
 (0)