diff --git a/src/components/Breadcrumbs.js b/src/components/Breadcrumbs.js index 3c097917..2c17c381 100644 --- a/src/components/Breadcrumbs.js +++ b/src/components/Breadcrumbs.js @@ -16,6 +16,7 @@ const Breadcrumbs = ({ segments, separator }) => { diff --git a/src/components/GlobalStyles.js b/src/components/GlobalStyles.js index f8262be2..297118c6 100644 --- a/src/components/GlobalStyles.js +++ b/src/components/GlobalStyles.js @@ -20,7 +20,19 @@ import { SohneLeichtKursiv, } from './fonts'; -const fonts = styled.div` +const GlobalStyles = styled.div` + /* BRAND COLORS */ + --brand-highlight-green: #1ce783; + --brand-grey-black: #1d252c; + --brand-white: #f9fafa; + + --brand-primary-background-color: #e5e5e5; + --brand-secondary-background-color: var(--brand-grey-black); + + --brand-primary-text-color: var(--brand-grey-black); + --brand-secondary-text-color: var(--brand-white); + + /* FONTS */ @font-face { font-family: 'Söhne-Buch'; src: url(${SohneBuch}); @@ -95,4 +107,4 @@ const fonts = styled.div` } `; -export default fonts; +export default GlobalStyles; diff --git a/src/components/IOBanner.js b/src/components/IOBanner.js index beea8d59..8b1a61b8 100644 --- a/src/components/IOBanner.js +++ b/src/components/IOBanner.js @@ -128,7 +128,6 @@ const BannerHeaderContent = ({ search, setSearch, setIsSearchInputEmpty }) => { ); }; - const IOBanner = ({ search, setSearch, setIsSearchInputEmpty }) => { return (
{ --left-margin: calc(50% - 50vw); position: absolute; + top: var(--global-header-height); width: 100vw; left: var(--left-margin); height: var(--banner-height); diff --git a/src/components/InstallButton.js b/src/components/InstallButton.js index 9b4849b9..78606c07 100644 --- a/src/components/InstallButton.js +++ b/src/components/InstallButton.js @@ -85,7 +85,12 @@ const createInstallLink = ( const hasComponent = (quickstart, key) => quickstart[key] && quickstart[key].length > 0; -const InstallButton = ({ quickstart, location, ...props }) => { +const InstallButton = ({ + quickstart, + location, + style = 'PRIMARY', + ...props +}) => { const { treatment } = useTreatment('super_tiles'); const hasInstallableComponent = @@ -271,17 +276,29 @@ const InstallButton = ({ quickstart, location, ...props }) => { onClick={handleInstallClick} variant={Button.VARIANT.PRIMARY} css={css` - --button-background: #1d252c; - border-radius: 4px; - padding: 1rem; + --button-background: var( + ${style === 'PRIMARY' + ? '--brand-white' + : '--brand-secondary-background-color'} + ); + --button-text-color: var( + ${style === 'PRIMARY' + ? '--brand-primary-text-color' + : '--brand-secondary-text-color'} + ); background-color: var(--button-background); - font-family: 'Söhne-Leicht'; + border-radius: 4px; + color: var(--button-text-color); font-size: 14px; + line-height: 21px; font-weight: 400; + padding: 1rem; &:hover { background-color: var(--button-background); + color: var(--button-text-color); } + ${hasInstallableComponent && css` padding: 0; @@ -302,6 +319,7 @@ InstallButton.propTypes = { quickstart: quickstart.isRequired, onClick: PropTypes.func.isRequired, location: PropTypes.object.isRequired, + style: PropTypes.oneOf(['PRIMARY', 'SECONDARY']), }; export default InstallButton; diff --git a/src/components/BannerBackground.js b/src/components/LandingBanner/BannerBackground.js similarity index 78% rename from src/components/BannerBackground.js rename to src/components/LandingBanner/BannerBackground.js index ebe3216d..12d55be4 100644 --- a/src/components/BannerBackground.js +++ b/src/components/LandingBanner/BannerBackground.js @@ -1,26 +1,24 @@ import React from 'react'; import PropTypes from 'prop-types'; import { css } from '@emotion/react'; -import bannerOverlayRight from '../images/io-banner/banner-style-right.svg'; -import bannerOverlayLeft from '../images/io-banner/banner-style-left.svg'; -import { QUICKSTARTS_COLLAPSE_BREAKPOINT } from '../data/constants'; +import bannerOverlayRight from '../../images/io-banner/banner-style-right.svg'; +import bannerOverlayLeft from '../../images/io-banner/banner-style-left.svg'; +import { QUICKSTARTS_COLLAPSE_BREAKPOINT } from '../../data/constants'; const BannerBackground = ({ children }) => { return (
{ >
{ position: absolute; width: 157.03px; height: 148px; - left: 10px; + left: 5px; top: 50px; z-index: auto; `} @@ -67,7 +64,7 @@ const BannerBackground = ({ children }) => { {children}
{ {
); }; + BannerBackground.propTypes = { - children: PropTypes.node, + children: PropTypes.node.isRequired, }; export default BannerBackground; diff --git a/src/components/LandingBanner.js b/src/components/LandingBanner/index.js similarity index 71% rename from src/components/LandingBanner.js rename to src/components/LandingBanner/index.js index 5a0e2f58..4dc4ecc3 100644 --- a/src/components/LandingBanner.js +++ b/src/components/LandingBanner/index.js @@ -1,19 +1,17 @@ -import { Button, Icon, Link, useTessen } from '@newrelic/gatsby-theme-newrelic'; -import { QUICKSTARTS_REPO, SHIELD_LEVELS } from '../data/constants'; import React, { useEffect, useState } from 'react'; -import Breadcrumbs from '../components/Breadcrumbs'; -import InstallButton from '../components/InstallButton'; +import Breadcrumbs from '../../components/Breadcrumbs'; +import InstallButton from '../../components/InstallButton'; import { css } from '@emotion/react'; -import { quickstart } from '../types'; -import defaultImage from '../images/defaultQuickstartImage.png'; +import { quickstart } from '../../types'; +import defaultImage from '../../images/defaultQuickstartImage.png'; import BannerBackground from './BannerBackground'; +const IMAGE_DISPLAY_BREAKPOINT = '1200px'; + const LandingBanner = ({ quickstart, className }) => { const [imgStyle, setImgStyle] = useState({}); - const quickstartUrl = quickstart.packUrl || QUICKSTARTS_REPO; - const tessen = useTessen(); const breadcrumbs = [ { name: 'Instant Observability', @@ -24,15 +22,6 @@ const LandingBanner = ({ quickstart, className }) => { }, ]; - const trackQuickstart = (action, quickstart) => () => - tessen.track({ - eventName: 'instantObservability', - category: action, - quickstartName: quickstart.name, - quickstartId: quickstart.id, - quickstartUrl: quickstart.packUrl, - }); - // get image resolution from URL const getURLMeta = async (url) => { const img = new Image(); @@ -71,34 +60,37 @@ const LandingBanner = ({ quickstart, className }) => {
@@ -106,13 +98,13 @@ const LandingBanner = ({ quickstart, className }) => { {quickstart.logoUrl && (
{ font-weight: normal; grid-area: title; margin-bottom: 0; - padding-bottom: 0; - align-self: end; + + @media (max-width: 760px) { + font-size: 44px; + line-height: 46px; + letter-spacing: -0.015em; + } `} > {quickstart.title} @@ -147,10 +143,12 @@ const LandingBanner = ({ quickstart, className }) => { grid-area: summ; font-size: 24px; line-height: 32px; - margin-right: 3rem; @media (max-width: 760px) { max-width: 100%; + font-size: 18px; + line-height: 24px; + letter-spacing: -0.005em; } `} > @@ -160,13 +158,10 @@ const LandingBanner = ({ quickstart, className }) => {
{ src={quickstart.dashboards[0]?.screenshots[0] ?? defaultImage} alt={quickstart.title} css={css` - height: 200px; - width: 100%; + border: 28px solid #000000; + border-radius: 26px; + height: 250px; `} />
@@ -186,19 +182,10 @@ const LandingBanner = ({ quickstart, className }) => { `} >
diff --git a/src/components/LandingPageFooter.js b/src/components/LandingPageFooter.js index 2ff39391..b152191e 100644 --- a/src/components/LandingPageFooter.js +++ b/src/components/LandingPageFooter.js @@ -1,9 +1,5 @@ import React from 'react'; -import { - Link, - Button, - PageTools, -} from '@newrelic/gatsby-theme-newrelic'; +import { Link, Button, PageTools } from '@newrelic/gatsby-theme-newrelic'; import { css } from '@emotion/react'; import { quickstart } from '../types'; import SupportSection from './SupportSection'; @@ -13,158 +9,156 @@ import TickIconSVG from './Icons/TickIconSVG'; import GitHubIconSVG from './Icons/GitHubIconSVG'; const LandingPageFooter = ({ - quickstart, - trackQuickstart, - tessenSupportTrack, + quickstart, + trackQuickstart, + tessenSupportTrack, }) => { - const quickstartUrl = quickstart.packUrl || QUICKSTARTS_REPO; - return ( - <> -
+
- -
- Authors -
-

- {quickstart.authors.join(', ')} -

-
+ @media not all and (min-resolution: 0.001dpcm) and max-width: 760px { + @media { + grid-template-columns: repeat(1, 1fr); + margin-left: 40px; + margin-right: 23px; + } + } + &: * { + padding: 1rem; + } + `} + > +
+
Authors
+

{quickstart.authors.join(', ')}

+
- -
- Support -
-
- -
-
+
+
Support
+
+ +
+
- -
- Collaborate on this quickstart -
-
- -
-
- -
-
+ @media (max-width: 760px) { + width: 100%; + } + `} + as={Link} + variant={Button.VARIANT.OUTLINE} + to={quickstartUrl} + rel="noopener noreferrer" + onClick={trackQuickstart('QuickstartViewRepoClick', quickstart)} + > + + View repo + +
+
+
- - - ); + @media (max-width: 760px) { + width: 100%; + } + `} + > + + Build your own + +
+
+
+
Related Resources
+ +
+
+ + ); }; LandingPageFooter.propTypes = { - quickstart: quickstart.isRequired, + quickstart: quickstart.isRequired, }; -export default LandingPageFooter; \ No newline at end of file +export default LandingPageFooter; + diff --git a/src/components/QuickstartHowToUse.js b/src/components/QuickstartHowToUse.js index cef657f8..8dc8c908 100644 --- a/src/components/QuickstartHowToUse.js +++ b/src/components/QuickstartHowToUse.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Link, PageTools } from '@newrelic/gatsby-theme-newrelic'; +import { Link } from '@newrelic/gatsby-theme-newrelic'; import { css } from '@emotion/react'; import { quickstart } from '../types'; import { LOGIN_LINK, SIGNUP_LINK } from '../data/constants'; @@ -10,16 +10,6 @@ const QuickstartHowToUse = ({ quickstart, trackQuickstart, location }) => { <>
{ } `} > - -

- How to use this quickstart -

-
+

+ How to use this quickstart +

- -
    +
  • -
  • - - Sign Up - {' '} - for a free New Relic account or{' '} - - Log In - {' '} - to your existing account. -
  • -
  • {' '} + for a free New Relic account or{' '} + - Click the install button. -
  • -
  • - Install the quickstart to get started or improve how you monitor - your environment. They’re filled with pre-built resources like - dashboards, instrumentation, and alerts. -
  • -
-
- - - {' '} + to your existing account. + +
  • + Click the install button. +
  • +
  • - + > + Install the quickstart to get started or improve how you monitor + your environment. They’re filled with pre-built resources like + dashboards, instrumentation, and alerts. +
  • + + +
    ); diff --git a/src/components/QuickstartOverview.js b/src/components/QuickstartOverview.js index 7be56ded..109eb7dc 100644 --- a/src/components/QuickstartOverview.js +++ b/src/components/QuickstartOverview.js @@ -25,16 +25,16 @@ const QuickstartOverview = ({ quickstart }) => { {quickstart.description && (
    { skipHtml allowedElements={allowedElements} css={css` - @media screen and (max-width: 760px){ - width: fit-content; - margin: 40px 70px 40px 58px; - } + @media screen and (max-width: 760px) { + width: fit-content; + margin: 40px 70px 40px 58px; + } @media screen and (min-width: 760px) { - margin: 104px 155px 104px 168px; + margin: 104px 155px 104px 168px; } `} > diff --git a/src/components/WhatsIncluded/Alerts.js b/src/components/WhatsIncluded/Alerts.js index ee003ace..6b1ea823 100644 --- a/src/components/WhatsIncluded/Alerts.js +++ b/src/components/WhatsIncluded/Alerts.js @@ -1,64 +1,54 @@ -import { PageTools } from '@newrelic/gatsby-theme-newrelic'; import QuickstartAlerts from '../../components/QuickstartAlerts'; import EmptyTab from '../../components/EmptyTab'; import { css } from '@emotion/react'; const Alerts = ({ quickstart }) => { - - return ( -
    +
    + Alerts   +
    - -
    - Alerts   -
    - {quickstart.alerts.length}
    -
    - {quickstart.alerts?.length > 0 ? ( - - ) : ( - - )} -
    + {quickstart.alerts.length}
    - ) +
    + {quickstart.alerts?.length > 0 ? ( + + ) : ( + + )} +
    + ); }; -export default Alerts; \ No newline at end of file +export default Alerts; + diff --git a/src/components/WhatsIncluded/Dashboards.js b/src/components/WhatsIncluded/Dashboards.js index 4a43affa..5e2433e3 100644 --- a/src/components/WhatsIncluded/Dashboards.js +++ b/src/components/WhatsIncluded/Dashboards.js @@ -1,77 +1,61 @@ -import { PageTools } from '@newrelic/gatsby-theme-newrelic'; import { quickstart } from '../../types'; import QuickstartDashboards from '../../components/QuickstartDashboards'; import { css } from '@emotion/react'; import EmptyTab from '../../components/EmptyTab'; const Dashboards = ({ quickstart }) => { - - return ( -
    +

    What's included?

    +
    + Dashboard   +
    - -

    - What's included? -

    -
    - Dashboard -   -
    - {quickstart.dashboards.length}
    -
    - {quickstart.dashboards?.length > 0 ? ( - - ) : ( - - )} - -
    + {quickstart.dashboards.length}
    - ); +
    + {quickstart.dashboards?.length > 0 ? ( + + ) : ( + + )} +
    + ); }; Dashboards.propTypes = { - quickstart: quickstart.isRequired, + quickstart: quickstart.isRequired, }; -export default Dashboards; \ No newline at end of file +export default Dashboards; + diff --git a/src/components/WhatsIncluded/DataSources.js b/src/components/WhatsIncluded/DataSources.js index d2a5634c..ebfe196d 100644 --- a/src/components/WhatsIncluded/DataSources.js +++ b/src/components/WhatsIncluded/DataSources.js @@ -1,63 +1,54 @@ import QuickstartDataSources from '../QuickstartDataSources'; -import { PageTools } from '@newrelic/gatsby-theme-newrelic'; import EmptyTab from '../EmptyTab'; import { css } from '@emotion/react'; const DataSources = ({ quickstart }) => { - return ( -
    +
    + Data Sources   +
    - -
    - Data Sources   -
    - {quickstart.documentation.length}
    -
    - {quickstart.documentation?.length > 0 ? ( - - ) : ( - - )} -
    + {quickstart.documentation.length}
    - ) +
    + {quickstart.documentation?.length > 0 ? ( + + ) : ( + + )} +
    + ); }; -export default DataSources; \ No newline at end of file +export default DataSources; + diff --git a/src/layouts/index.js b/src/layouts/index.js index 14261e12..626483c9 100644 --- a/src/layouts/index.js +++ b/src/layouts/index.js @@ -7,16 +7,14 @@ const Layout = ({ children, pageContext }) => { if (pageContext.layout === 'QuickStartLayout') { return ( - - {children} + {children} ); } return (
    - - {children} + {children}
    ); }; diff --git a/src/templates/QuickstartDetails.js b/src/templates/QuickstartDetails.js index 776d3560..bd41758d 100644 --- a/src/templates/QuickstartDetails.js +++ b/src/templates/QuickstartDetails.js @@ -19,6 +19,14 @@ import Layout from '../components/Layout'; import QuickstartOverview from '../components/QuickstartOverview'; import LandingBanner from '../components/LandingBanner'; +const layoutContentSpacing = css` + --page-margin: 156px; + @media (max-width: 760px) { + --page-margin: 30px; + } + padding: 0 var(--page-margin); +`; + const QuickstartDetails = ({ data, location }) => { const [imgStyle, setImgStyle] = useState({}); @@ -103,12 +111,22 @@ const QuickstartDetails = ({ data, location }) => { tags={quickstart.keywords} meta={quickStartMeta} /> - + @@ -118,14 +136,9 @@ const QuickstartDetails = ({ data, location }) => { {/* What's included section here */}
    * { + padding-top: 3rem; } `} > @@ -135,6 +148,8 @@ const QuickstartDetails = ({ data, location }) => {
    { } `} >
    -
    +
    {/* How to use this quickstart here */}
    { {/* Get started component here */}