Skip to content

Commit 7b32faa

Browse files
authored
Merge pull request #201 from newrelic/zstickles/cta-icons
Tile Icons & Home Page Get Started Updates
2 parents 174fd43 + 9ca85bc commit 7b32faa

File tree

5 files changed

+74
-13
lines changed

5 files changed

+74
-13
lines changed

src/components/FeatherIcon.js

+28
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,34 @@ const ICONS = {
4242
github: (
4343
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" />
4444
),
45+
barChart: (
46+
<>
47+
<line x1="18" y1="20" x2="18" y2="10" />
48+
<line x1="12" y1="20" x2="12" y2="4" />
49+
<line x1="6" y1="20" x2="6" y2="14" />
50+
</>
51+
),
52+
box: (
53+
<>
54+
<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" />
55+
<polyline points="3.27 6.96 12 12.01 20.73 6.96" />
56+
<line x1="12" y1="22.08" x2="12" y2="12" />
57+
</>
58+
),
59+
cpu: (
60+
<>
61+
<rect x="4" y="4" width="16" height="16" rx="2" ry="2" />
62+
<rect x="9" y="9" width="6" height="6" />
63+
<line x1="9" y1="1" x2="9" y2="4" />
64+
<line x1="15" y1="1" x2="15" y2="4" />
65+
<line x1="9" y1="20" x2="9" y2="23" />
66+
<line x1="15" y1="20" x2="15" y2="23" />
67+
<line x1="20" y1="9" x2="23" y2="9" />
68+
<line x1="20" y1="14" x2="23" y2="14" />
69+
<line x1="1" y1="9" x2="4" y2="9" />
70+
<line x1="1" y1="14" x2="4" y2="14" />
71+
</>
72+
),
4573
};
4674

4775
FeatherIcon.propTypes = {

src/components/GuideListing/GuideListing.module.scss

+1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131

3232
@media (max-width: 1180px) {
3333
grid-template-columns: 1fr;
34+
grid-gap: 3rem;
3435
}
3536
}

src/components/GuideTile.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
3+
import FeatherIcon from './FeatherIcon';
34
import cx from 'classnames';
45
import { navigate } from 'gatsby';
56
import styles from './GuideTile.module.scss';
67

7-
const GuideTile = ({ minutes, title, description, path, className }) => (
8-
<div className={cx(styles.tile, className)}>
8+
const GuideTile = ({ icon, minutes, title, description, path, className }) => (
9+
<div className={cx(styles.tile, className, { [styles.tileWithIcon]: icon })}>
10+
{icon && (
11+
<div className={styles.iconContainer}>
12+
<FeatherIcon name={icon} size="2.5rem" />
13+
</div>
14+
)}
15+
916
<div className={styles.timeEstimate}>{minutes} minutes</div>
1017
<div className={styles.main}>
1118
<h2>{title}</h2>
@@ -23,6 +30,7 @@ GuideTile.propTypes = {
2330
description: PropTypes.string.isRequired,
2431
path: PropTypes.string.isRequired,
2532
className: PropTypes.string,
33+
icon: PropTypes.string,
2634
};
2735

2836
export default GuideTile;

src/components/GuideTile.module.scss

+21
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@
88
padding: 0.5rem;
99
border: 1px solid var(--color-neutrals-300);
1010
border-radius: 0.25rem;
11+
position: relative;
12+
margin-top: 1rem;
1113

1214
button:hover {
1315
transform: translateY(-1px);
1416
}
1517
}
1618

19+
.tileWithIcon h2 {
20+
margin-top: 1rem;
21+
}
22+
1723
.timeEstimate {
1824
font-size: 0.75rem;
1925
grid-area: time;
@@ -28,6 +34,21 @@
2834
background-position: left center;
2935
}
3036

37+
.iconContainer {
38+
position: absolute;
39+
top: -2.75rem;
40+
left: 50%;
41+
margin-left: -2.75rem;
42+
width: 5.5rem;
43+
height: 5.5rem;
44+
border: 4px solid var(--color-white);
45+
background-color: var(--color-neutrals-200);
46+
border-radius: 50%;
47+
display: flex;
48+
align-items: center;
49+
justify-content: center;
50+
}
51+
3152
.main {
3253
grid-area: main;
3354
display: flex;

src/pages/index.js

+14-11
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,24 @@ import styles from './index.module.scss';
1515
const getStartedGuides = [
1616
{
1717
minutes: 5,
18-
title: 'Collect data from any source',
19-
description: `Learn how to ingest data from various sources. Whether you want to ingest data “out of the box,” or bring custom data into New Relic that isn't collected by default.`,
20-
path: '',
18+
title: 'Collect data',
19+
description: `Define, visualize, and get alerts on the data you want using custom events`,
20+
path: '/collect-data/custom-events',
21+
icon: 'barChart',
2122
},
2223
{
23-
minutes: 5,
24-
title: 'Instrument your data',
25-
description: `Use custom instrumentation to automatically produce complete information, without needing to modify your application code. Manage your environment through Observability as Code.`,
26-
path: '',
24+
minutes: 7,
25+
title: 'Automate data',
26+
description: `Add tags to applications you instrument for easier filtering and organization`,
27+
path: '/automate-workflows/add-tags-to-apps',
28+
icon: 'box',
2729
},
2830
{
29-
minutes: 5,
30-
title: 'Customize your data',
31-
description: `Build and customize on the programmable platform by learning how to customize existing apps, enhance open source projects, or build your own application to solve your specific problem.`,
32-
path: '',
31+
minutes: 12,
32+
title: 'Build custom apps',
33+
description: `Build a Hello World! app and publish it to your local New Relic One Catalog`,
34+
path: '/build-apps/build-hello-world-app',
35+
icon: 'cpu',
3336
},
3437
];
3538

0 commit comments

Comments
 (0)