Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
fix: correct breaking layout changes from theme bump
Browse files Browse the repository at this point in the history
  • Loading branch information
tabathadelane committed Nov 7, 2022
1 parent b940515 commit 2673e0d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
13 changes: 6 additions & 7 deletions src/components/LandingBanner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import InstallButton from '../InstallButton';
import { graphql } from 'gatsby';
import { css } from '@emotion/react';
import { quickstart } from '../../types';
import { QUICKSTART_IMAGE_DISPLAY_BREAKPOINT } from '@data/constants';
import QuickstartImg from '../QuickstartImg';
import defaultImage from '../../images/defaultQuickstartImage.png';
import BannerBackground from './BannerBackground';
import SafeImage from '../SafeImage';

const IMAGE_DISPLAY_BREAKPOINT = '1248px';

const LandingBanner = ({ quickstart, className, location }) => {
const bannerImg = useDetermineBannerImg(quickstart, {
publicURL: defaultImage,
Expand Down Expand Up @@ -58,7 +57,7 @@ const LandingBanner = ({ quickstart, className, location }) => {
color: white;
}
@media (max-width: ${IMAGE_DISPLAY_BREAKPOINT}) {
@media (max-width: ${QUICKSTART_IMAGE_DISPLAY_BREAKPOINT}) {
grid-template-areas:
'breadcrumbs'
'title'
Expand Down Expand Up @@ -90,7 +89,7 @@ const LandingBanner = ({ quickstart, className, location }) => {
background-color: var(--color-white);
border-radius: 0 0 7px 7px;
padding: 5px;
@media (max-width: ${IMAGE_DISPLAY_BREAKPOINT}) {
@media (max-width: ${QUICKSTART_IMAGE_DISPLAY_BREAKPOINT}) {
display: none;
}
`}
Expand All @@ -115,7 +114,7 @@ const LandingBanner = ({ quickstart, className, location }) => {
grid-area: title;
margin-bottom: 0;
@media (max-width: ${IMAGE_DISPLAY_BREAKPOINT}) {
@media (max-width: ${QUICKSTART_IMAGE_DISPLAY_BREAKPOINT}) {
font-size: 4vw;
}
Expand All @@ -134,7 +133,7 @@ const LandingBanner = ({ quickstart, className, location }) => {
grid-area: summ;
font-size: 1.25vw;
@media (max-width: ${IMAGE_DISPLAY_BREAKPOINT}) {
@media (max-width: ${QUICKSTART_IMAGE_DISPLAY_BREAKPOINT}) {
font-size: 2vw;
}
Expand All @@ -156,7 +155,7 @@ const LandingBanner = ({ quickstart, className, location }) => {
margin: 0 auto 1rem;
padding-top: 1rem;
@media (max-width: ${IMAGE_DISPLAY_BREAKPOINT}) {
@media (max-width: ${QUICKSTART_IMAGE_DISPLAY_BREAKPOINT}) {
display: none;
}
`}
Expand Down
1 change: 1 addition & 0 deletions src/components/LandingPageFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const LandingPageFooter = ({
<RelatedResources
css={css`
padding: 0;
border: none;
`}
resources={quickstart.relatedResources}
/>
Expand Down
2 changes: 2 additions & 0 deletions src/data/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export const RESERVED_QUICKSTART_IDS = {
};

export const QUICKSTARTS_COLLAPSE_BREAKPOINT = '760px';
export const QUICKSTART_IMAGE_DISPLAY_BREAKPOINT = '1248px';

export const MIN_WIDTH_BREAKPOINT = '355px';

// breakpoints for index.js and slick carousel
Expand Down
11 changes: 10 additions & 1 deletion src/layouts/QuickStartLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import GlobalFooter from '@newrelic/gatsby-theme-newrelic/src/components/GlobalF
import GetStartedFooter from '@components/GetStartedFooter';
import Layout from '@components/Layout';
import PropTypes from 'prop-types';
import { QUICKSTARTS_COLLAPSE_BREAKPOINT } from '@data/constants';
import {
QUICKSTARTS_COLLAPSE_BREAKPOINT,
QUICKSTART_IMAGE_DISPLAY_BREAKPOINT,
} from '@data/constants';
import React from 'react';
import { css } from '@emotion/react';

Expand All @@ -19,13 +22,19 @@ const QuickStartLayout = ({ children }) => {
<Layout
css={css`
--sidebar-width: 0;
grid-area: unset;
`}
>
<Layout.Main
css={css`
min-height: 100vh;
max-width: unset;
padding: 0;
@media (max-width: ${QUICKSTART_IMAGE_DISPLAY_BREAKPOINT}) {
width: 100vw;
}
> * {
}
`}
Expand Down

0 comments on commit 2673e0d

Please sign in to comment.