Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Gatsby theme to get sign up button + other goodies #620

Merged
merged 5 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Logo.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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
Expand Down
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);
}
Expand Down
15 changes: 2 additions & 13 deletions src/layouts/MainLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -79,7 +68,7 @@ const MainLayout = ({ children }) => {
</script>
) : null}
</Helmet>
<GlobalHeader editUrl={editUrl} search />
<GlobalHeader search />
<MobileHeader
css={css`
@media (min-width: 761px) {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/developer-champion.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
grid-gap: 2rem;

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

Expand All @@ -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 {
Expand Down
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';
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 0 additions & 14 deletions src/pages/kubecon-europe-2020.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -58,8 +49,3 @@
.highlightDiv {
margin: auto;
}

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