Skip to content

Commit

Permalink
Merge pull request #1978 from newrelic/new-io-banner
Browse files Browse the repository at this point in the history
New I/O Banner
  • Loading branch information
josephgregoryii authored Dec 28, 2021
2 parents 0e2a24b + 56cf039 commit 308c42d
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 71 deletions.
163 changes: 93 additions & 70 deletions src/components/IOBanner.js
Original file line number Diff line number Diff line change
@@ -1,97 +1,120 @@
import React from 'react';
import { css } from '@emotion/react';
import PropTypes from 'prop-types';
import { Button, Link, useTessen } from '@newrelic/gatsby-theme-newrelic';
import ioBanner from '../images/ioBanner.png';
import bannerOverlayRight from '../images/io-banner/banner-style-right.svg';
import bannerOverlayLeft from '../images/io-banner/banner-style-left.svg';

const IOBanner = ({ isMobile }) => {
const tessen = useTessen();
const MOBILE_BREAKPOINT = '530px';

const handleBannerButtonClick = () => {
tessen.track({
eventName: 'instantObservability',
category: 'BannerButtonClick',
});
};
const BannerHeaderContent = () => (
<div
css={css`
position: static;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
width: 568px;
height: 192px;
@media (max-width: ${MOBILE_BREAKPOINT}) {
padding: 48px 24px;
}
`}
>
<h2
css={css`
color: var(--color-brand-300);
`}
>
Instant Observability
</h2>
<h1
css={css`
color: var(--color-neutrals-050);
`}
>
Dashboards, alerts, and integrations all in one place
</h1>
<body
css={css`
color: var(--color-neutrals-050);
background: none;
`}
>
Our quickstarts bundle everything you need to start monitoring like a pro
right out of the box.
</body>
</div>
);

const IOBanner = () => {
return (
<section
<div
css={css`
position: relative;
margin-bottom: 1rem;
--banner-height: 308px;
--left-margin: calc(50% - 50vw);
position: absolute;
width: 100vw;
left: var(--left-margin);
height: var(--banner-height);
margin: 0 0 0 var(--left-margin);
background: var(--color-brand-500);
border: 1px solid var(--color-brand-600);
box-sizing: border-box;
`}
>
<img
css={css`
width: 100%;
@media (max-width: 500px) {
height: 150px;
object-fit: cover;
width: 100vw;
}
`}
src={ioBanner}
alt="New Relic IO"
/>
<div
css={css`
position: absolute;
height: 0;
width: 40%;
color: var(--color-white);
margin: 0;
top: ${isMobile ? '25%' : '15%'};
left: 5%;
margin: 60px 0 56px 0;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
`}
>
<h1
css={css`
color: var(--color-white);
font-size: ${isMobile ? '1rem' : 'max(.85rem, 1.5vw)'};
font-weight: 400;
`}
>
Instant Observability
</h1>
<p
<div
css={css`
font-size: 0.75rem;
@media screen and (max-width: 1303px) {
margin-bottom: 0.3rem;
}
@media screen and (max-width: 1250px) {
margin-right: auto;
@media (max-width: ${MOBILE_BREAKPOINT}) {
display: none;
}
`}
>
New Relic I/O equips you with integrations, dashboards, and other
observability building blocks to get value from your data faster
</p>
<Button
variant={Button.VARIANT.PRIMARY}
as={Link}
<img
css={css`
width: 100%;
`}
src={bannerOverlayLeft}
alt="banner-left"
loading="lazy"
/>
</div>
<BannerHeaderContent />
<div
css={css`
color: var(--color-neutrals-100);
background: none;
border: solid var(--color-neutrals-100) 1px;
@media (max-width: 850px) {
width: 55%;
font-size: 0.65rem;
margin-left: auto;
@media (max-width: ${MOBILE_BREAKPOINT}) {
display: none;
}
`}
to="https://docs.newrelic.com/docs/full-stack-observability/observe-everything/get-started/new-relic-quickstarts-overview/"
instrumentation={{ component: 'IOBanner' }}
onClick={handleBannerButtonClick}
>
Learn more
</Button>
<img
css={css`
width: 100%;
`}
src={bannerOverlayRight}
alt="banner-right"
loading="lazy"
/>
</div>
</div>
</section>
</div>
);
};

IOBanner.propTypes = {
isMobile: PropTypes.bool,
};

export default IOBanner;
8 changes: 8 additions & 0 deletions src/images/io-banner/banner-style-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/images/io-banner/banner-style-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/images/ioBanner.png
Binary file not shown.
5 changes: 4 additions & 1 deletion src/pages/instant-observability.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SegmentedControl from '../components/SegmentedControl';
import Overlay from '../components/Overlay';
import PackTile from '../components/PackTile';
import IOLogo from '../components/IOLogo';
import IOBanner from '../components/IOBanner';
import QuickstartFilter from '../components/quickstarts/QuickstartFilter';
import {
SearchInput,
Expand Down Expand Up @@ -254,16 +255,18 @@ const QuickstartsPage = ({ data, location }) => {
location={location}
type="quickstarts"
/>
<IOBanner />
<div
css={css`
--sidebar-width: 300px;
--banner-height: 308px;
display: grid;
grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
grid-template-areas: 'sidebar main';
grid-template-rows: 1fr auto;
min-height: calc(100vh - var(--global-header-height));
margin: 0 auto;
margin: var(--banner-height) auto;
max-width: var(--site-max-width);
@media screen and (max-width: 760px) {
Expand Down

0 comments on commit 308c42d

Please sign in to comment.