Skip to content

Commit

Permalink
Merge pull request #620 from newrelic/jerel/upgrade-nr-gatsby-theme
Browse files Browse the repository at this point in the history
Upgrade Gatsby theme to get sign up button + other goodies
jerelmiller authored Aug 17, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 5d4a625 + 29a674f commit 3a47267
Showing 9 changed files with 18 additions and 39 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"@emotion/styled": "^10.0.27",
"@mdx-js/mdx": "^1.6.10",
"@mdx-js/react": "^1.6.14",
"@newrelic/gatsby-theme-newrelic": "^1.6.0",
"@newrelic/gatsby-theme-newrelic": "^1.7.0",
"classnames": "^2.2.6",
"date-fns": "^2.15.0",
"eslint-plugin-react-hooks": "^4.0.8",
4 changes: 2 additions & 2 deletions src/components/Logo.module.scss
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@
}

.brackets {
stroke: var(--logo-bracket-color, var(--color-brand-800));
stroke: var(--logo-bracket-color, var(--color-brand-500));
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;

:global(.dark-mode) & {
stroke: var(--logo-bracket-color, var(--color-brand-400));
stroke: var(--logo-bracket-color, var(--color-brand-300));
}
}
2 changes: 1 addition & 1 deletion src/components/RelatedContentModules/Contribute.js
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ const Contribute = ({ pageContext }) => {
<Button
as={ExternalLink}
href={`${repository}/tree/main/${fileRelativePath}`}
variant={Button.VARIANT.PLAIN}
variant={Button.VARIANT.NORMAL}
size={Button.SIZE.SMALL}
>
<Icon
2 changes: 1 addition & 1 deletion src/components/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:root {
--height-global-header: 30px;
--height-global-header: 36px;
--height-mobile-nav-bar: 60px;
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
15 changes: 2 additions & 13 deletions src/layouts/MainLayout.js
Original file line number Diff line number Diff line change
@@ -11,39 +11,28 @@ import MobileHeader from '../components/MobileHeader';
import Sidebar from '../components/Sidebar';
import CookieApprovalDialog from '../components/CookieApprovalDialog';
import '../components/styles.scss';
import usePageContext from '../hooks/usePageContext';
import { useLocation } from '@reach/router';

const gaTrackingId = 'UA-3047412-33';
const gdprConsentCookieName = 'newrelic-gdpr-consent';

const MainLayout = ({ children }) => {
const {
site: { layout, siteMetadata },
site: { layout },
} = useStaticQuery(graphql`
query {
site {
layout {
contentPadding
maxWidth
}
siteMetadata {
repository
}
}
}
`);

const location = useLocation();
const { fileRelativePath } = usePageContext();
const [cookieConsent, setCookieConsent] = useState(false);
const [isMobileNavOpen, setIsMobileNavOpen] = useState(false);
const isComponentDoc = fileRelativePath.includes(
'src/markdown-pages/components'
);
const editUrl = isComponentDoc
? null
: `${siteMetadata.repository}/blob/main/${fileRelativePath}`;

useEffect(() => {
const consentValue = Cookies.get(gdprConsentCookieName) === 'true';
@@ -79,7 +68,7 @@ const MainLayout = ({ children }) => {
</script>
) : null}
</Helmet>
<GlobalHeader editUrl={editUrl} search />
<GlobalHeader search />
<MobileHeader
css={css`
@media (min-width: 761px) {
6 changes: 3 additions & 3 deletions src/pages/developer-champion.module.scss
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
grid-gap: 2rem;

@media (max-width: 760px) {
grid-template-columns: 1fr
grid-template-columns: 1fr;
}
}

@@ -35,15 +35,15 @@
margin: auto;

@media (max-width: 760px) {
margin-bottom: 40px;
margin-bottom: 40px;
}
}

.pointIcon {
--feather-icon-stroke-width: 1;

margin-bottom: 2rem;
color: var(--color-brand-400);
color: var(--color-brand-500);
}

.nominateButton {
6 changes: 5 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { css } from '@emotion/core';
import { graphql, Link } from 'gatsby';

import SEO from '../components/Seo';
@@ -177,6 +178,9 @@ const IndexPage = ({ data, pageContext }) => {
as={ExternalLink}
variant={Button.VARIANT.PRIMARY}
href="https://forms.gle/Zkdub5e1x4MNqSKW9"
css={css`
margin-right: 0.5rem;
`}
>
Nominate a developer champion
<FeatherIcon
@@ -186,7 +190,7 @@ const IndexPage = ({ data, pageContext }) => {
</Button>
<Button
as={Link}
variant={Button.VARIANT.PLAIN}
variant={Button.VARIANT.LINK}
to="/developer-champion"
>
Learn more about developer champions
14 changes: 0 additions & 14 deletions src/pages/kubecon-europe-2020.module.scss
Original file line number Diff line number Diff line change
@@ -38,15 +38,6 @@
}
}

.pointIcon {
--feather-icon-stroke-width: 1;

margin: auto;
margin-bottom: 10px;
display: block;
color: var(--color-brand-800);
}

.externalLinkIcon {
margin-left: 0.5rem;
}
@@ -58,8 +49,3 @@
.highlightDiv {
margin: auto;
}

.highlightText {
color: var(--color-brand-800);
text-align: center;
}

0 comments on commit 3a47267

Please sign in to comment.