From 6f5b8ccab1530a7daac763112be1f2641501d738 Mon Sep 17 00:00:00 2001 From: sitek94 Date: Wed, 23 Dec 2020 00:37:43 +0100 Subject: [PATCH] remove unused code and update social links --- config/website.js | 15 +-- gatsby-config.js | 11 -- netlify.toml | 5 - package.json | 1 - src/components/footer.js | 5 +- src/components/mobile-nav.js | 13 +- src/components/seo/index.js | 18 --- src/components/seo/schema-org.js | 7 - src/components/share.js | 58 -------- src/components/social.js | 63 +++------ src/components/testing-cta.js | 219 ------------------------------- src/data/courses.js | 132 ------------------- src/pages/about.mdx | 7 - src/templates/post.js | 12 -- src/templates/project-page.js | 4 - 15 files changed, 29 insertions(+), 541 deletions(-) delete mode 100644 src/components/share.js delete mode 100644 src/components/testing-cta.js delete mode 100644 src/data/courses.js diff --git a/config/website.js b/config/website.js index d545b04..90b1a70 100644 --- a/config/website.js +++ b/config/website.js @@ -2,7 +2,7 @@ module.exports = { siteTitle: 'Maciek Sitkowski', // Navigation and Site Title siteTitleAlt: 'The personal website of Maciek Sitkowski', // Alternative Site title for SEO siteTitleShort: 'macieksitkowski', // short_name for manifest - siteUrl: process.env.ROOT_URL || 'https://kentcdodds.com', // Domain of your site. No trailing slash! + siteUrl: process.env.ROOT_URL || 'https://macieksitkowski.com', // Domain of your site. No trailing slash! lang: 'en', // Language Tag on element pathPrefix: '/', siteLogo: 'images/logo.png', // Used for SEO and manifest, path to your image you placed in the 'static' folder @@ -15,10 +15,7 @@ module.exports = { lives with his wife and four kids in Utah. `, author: 'Maciek Sitkowski', // Author for schemaORGJSONLD - organization: 'Maciek Sitkowski Tech LLC', - // siteFBAppID: '123456789', // Facebook App ID - Optional - userTwitter: '@kentcdodds', // Twitter Username ogSiteName: 'Maciek Sitkowski', // Facebook Site Name ogLanguage: 'en_US', @@ -27,10 +24,8 @@ module.exports = { backgroundColor: '#231C42', // Social component - twitter: 'https://twitter.com/kentcdodds/', - twitterHandle: '@kentcdodds', - github: 'https://github.com/kentcdodds/', - linkedin: 'https://www.linkedin.com/in/kentcdodds/', - youtube: 'https://www.youtube.com/channel/UCz-BYvuntVRt_VpfR6FKXJw', - rss: 'https://kentcdodds.com/blog/rss.xml', + github: 'https://github.com/sitek94/', + // linkedin: 'https://www.linkedin.com/in/kentcdodds/', + youtube: 'https://www.youtube.com/channel/UC1rKQAm9EWiHtI4ADYusG0w', + freeCodeCamp: 'https://forum.freecodecamp.org/u/sitek94/summary', } diff --git a/gatsby-config.js b/gatsby-config.js index 684050f..7aa8932 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -32,7 +32,6 @@ module.exports = { siteMetadata: { siteUrl, title: config.siteTitle, - twitterHandle: config.twitterHandle, description: config.siteDescription, keywords: [ 'Software Engineer', @@ -45,15 +44,6 @@ module.exports = { name: config.author, minibio: config.minibio, }, - organization: { - name: config.organization, - url: siteUrl, - logo: config.siteLogo, - }, - social: { - twitter: config.twitterHandle, - fbAppID: '', - }, }, plugins: [ { @@ -111,7 +101,6 @@ module.exports = { }, }, 'gatsby-plugin-workerize-loader', - 'gatsby-plugin-twitter', 'gatsby-plugin-sharp', 'gatsby-transformer-sharp', 'gatsby-plugin-emotion', diff --git a/netlify.toml b/netlify.toml index fcfa0ff..5445831 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,8 +1,3 @@ -[[headers]] - for = "/rss.xml" - [headers.values] - Access-Control-Allow-Origin = "*" - [[plugins]] package = "netlify-plugin-gatsby-cache" diff --git a/package.json b/package.json index b98650a..92d8489 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "gatsby-plugin-robots-txt": "^1.5.3", "gatsby-plugin-sharp": "^2.10.1", "gatsby-plugin-sitemap": "^2.8.0", - "gatsby-plugin-twitter": "^2.6.0", "gatsby-plugin-typography": "^2.8.0", "gatsby-plugin-workerize-loader": "^1.5.0", "gatsby-remark-autolink-headers": "^2.7.0", diff --git a/src/components/footer.js b/src/components/footer.js index 0983f4e..bc81d0f 100644 --- a/src/components/footer.js +++ b/src/components/footer.js @@ -3,7 +3,7 @@ import {css} from '@emotion/react' import theme from '../../config/theme' import {bpMaxSM} from '../lib/breakpoints' import SubscribeForm from './forms/subscribe' -import {Twitter, GitHub, YouTube, RSS} from './social' +import {GitHub, YouTube, FreeCodeCamp} from './social' import Container from './container' import particlesOptions from 'lib/particles.json' @@ -65,10 +65,9 @@ const Footer = ({subscribeForm = , maxWidth}) => ( `} >
- + -
diff --git a/src/components/mobile-nav.js b/src/components/mobile-nav.js index 2257a58..f31ac31 100644 --- a/src/components/mobile-nav.js +++ b/src/components/mobile-nav.js @@ -99,17 +99,14 @@ const Toggle = ({color = 'white'}) => { } `} > - - Blog + + About - + Projects - - Courses - - - About + + Contact diff --git a/src/components/seo/index.js b/src/components/seo/index.js index 7c3ae97..7919323 100644 --- a/src/components/seo/index.js +++ b/src/components/seo/index.js @@ -36,14 +36,6 @@ function SEO({ - - - {/* Twitter Card tags */} - - - - - @@ -75,15 +66,6 @@ function SEOWithQuery(props) { author { name } - organization { - name - url - logo - } - social { - twitter - fbAppID - } } } } diff --git a/src/components/seo/schema-org.js b/src/components/seo/schema-org.js index 3142321..7c4dd30 100644 --- a/src/components/seo/schema-org.js +++ b/src/components/seo/schema-org.js @@ -10,7 +10,6 @@ export default React.memo( description, image, isBlogPost, - organization, title, url, }) => { @@ -58,12 +57,6 @@ export default React.memo( '@type': 'Person', name: author.name, }, - publisher: { - '@type': 'Organization', - url: organization.url, - logo: organization.logo, - name: organization.name, - }, mainEntityOfPage: { '@type': 'WebSite', '@id': canonicalUrl, diff --git a/src/components/share.js b/src/components/share.js deleted file mode 100644 index fa7ad0c..0000000 --- a/src/components/share.js +++ /dev/null @@ -1,58 +0,0 @@ -import * as React from 'react' -import {css} from '@emotion/react' -import theme from '../../config/theme' - -import {TwitterShareButton, FacebookShareButton} from 'react-share' - -const Share = ({url, title, twitterHandle}) => ( -
-
- Share article - - Twitter - - - Facebook - -
-) - -export default Share diff --git a/src/components/social.js b/src/components/social.js index 18cbdfb..8d45265 100644 --- a/src/components/social.js +++ b/src/components/social.js @@ -3,36 +3,6 @@ import Link from './link' import {css} from '@emotion/react' import config from '../../config/website' -export const Twitter = ({ - color = `rgba(255,255,255,0.7)`, - url = `${config.twitter}`, -}) => ( - - - - - -) - export const LinkedIn = ({ color = `rgba(255,255,255,0.7)`, url = `${config.linkedin}`, @@ -50,8 +20,8 @@ export const LinkedIn = ({ > ) -export const RSS = ({ +export const FreeCodeCamp = ({ color = `rgba(255,255,255,0.7)`, - url = `${config.rss}`, + url = `${config.freeCodeCamp}`, }) => ( - - - - + free-code-camp + ) diff --git a/src/components/testing-cta.js b/src/components/testing-cta.js deleted file mode 100644 index d5decf7..0000000 --- a/src/components/testing-cta.js +++ /dev/null @@ -1,219 +0,0 @@ -import * as React from 'react' -import styled from '@emotion/styled' -import {css} from '@emotion/react' -import {bpMaxSM} from 'lib/breakpoints' -import {fonts} from 'lib/typography' -import ReactCountdown from 'react-countdown-now' -import theme from '../../config/theme' -import Link from 'components/link' -import Trophy from 'components/courses/testing-js/trophy' - -export default function TestingCta({ - title = `Your Essential Guide to Flawless Testing`, - button = `Start Now`, - byline = `Jump on this self-paced workshop and learn the smart, efficient way to test any JavaScript application.`, - background = '#fff', - saleEndDate, -}) { - return ( - - - - TestingJavaScript.com - - {title} - {byline} - - - - - - - - - {saleEndDate ? ( - <> - {/* prettier-ignore */} -
- - SAVE 40% -
- { - return completed ? null : ( - -
- {days} - days -
-
- {hours} - hrs -
-
- {minutes} - mins -
-
- {seconds} - secs -
-
- ) - }} - /> - - ) : ( -
-

Write well tested JavaScript.

- {/* prettier-ignore */} - -
- )} - - - - ) -} - -const Banner = styled.div({ - display: 'flex', - borderRadius: 8, - overflow: 'hidden', - maxWidth: 800, - margin: '0 auto', - border: '1px solid #F6F6F6', - [bpMaxSM]: { - flexDirection: 'column', - }, -}) - -const Content = styled.div({ - width: '100%', - padding: '40px 0 40px 40px', - [bpMaxSM]: { - padding: '32px 16px', - textAlign: 'center', - }, -}) - -const Title = styled.h3({ - fontSize: 28, - lineHeight: '32px', - fontFamily: fonts.bold, - marginTop: '1rem', - marginBottom: 0, - div: { - color: '#485FEA', - }, -}) - -const Byline = styled.p({ - margin: '0.75rem 0', - paddingBottom: '1rem', - fontSize: 16, - opacity: 0.8, -}) - -const Button = styled.a({ - padding: '10px 16px', - color: 'white !important', - backgroundImage: 'linear-gradient(180deg, #566FF8 0%, #394FDC 100%)', - borderRadius: '5px', - fontSize: '17px', - fontFamily: fonts.semibold, - border: 'none', - transition: 'all 250ms ease', - ':hover': { - transition: 'all 250ms ease', - backgroundImage: - 'linear-gradient(180deg, #4A60DE 0%, #2F43C2 100%) !important', - border: 'none !important', - }, -}) - -const Box = styled.div({ - width: '100%', - maxWidth: 340, - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'flex-end', - padding: '0 20px', - position: 'relative', - overflow: 'hidden', - [bpMaxSM]: { - paddingTop: '7rem', - maxWidth: '100%', - }, -}) - -const Card = styled.div({ - border: '1px solid #F6F6F6', - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - padding: '50px 16px', - background: '#FFFFFF', - boxShadow: '0 7px 19px 0 rgba(0,0,0,0.04), 0 12px 47px 0 rgba(0,0,0,0.05)', - borderRadius: '8px 8px 0 0', - maxWidth: 250, - maxHeight: 200, - width: '100%', - height: '100%', - '.card-content': { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'center', - textAlign: 'center', - h3: { - fontSize: 20, - marginTop: '1.5rem', - }, - }, -}) - -const TrophyContainer = styled.div({ - position: 'absolute', - maxWidth: 86, - top: 16, -}) - -const Countdown = styled.div({ - color: '#485FEA', - padding: 10, - background: '#F5F5F8', - borderRadius: 5, - display: 'grid', - gridTemplateColumns: '1fr 1fr 1fr 1fr', - width: '100%', - textAlign: 'center', - fontFamily: fonts.semibold, - div: { - width: '100%', - fontSize: 20, - fontVariantNumeric: 'tabular-nums', - span: { - fontSize: 9, - opacity: 0.8, - textTransform: 'uppercase', - display: 'block', - }, - }, -}) diff --git a/src/data/courses.js b/src/data/courses.js deleted file mode 100644 index f7c28c3..0000000 --- a/src/data/courses.js +++ /dev/null @@ -1,132 +0,0 @@ -import * as React from 'react' -import TestingTrophy from 'components/courses/testing-js/trophy' - -export default [ - { - title: 'Epic React', - summary: - 'The Most Comprehensive Guide to React for Professional Developers', - url: 'https://epicreact.dev', - cta: 'Visit', - tags: ['react'], - }, - { - title: 'Testing JavaScript', - summary: - 'Learn the smart, efficient way to test any JavaScript application', - url: 'https://testingjavascript.com/', - cta: 'Visit', - image: , - tags: ['testing'], - }, - { - title: "The Beginner's Guide to React", - summary: - 'This course is for React newbies and anyone looking to build a solid foundation. It’s designed to teach you everything you need to start building web applications in React right away.', - url: 'https://egghead.io/courses/the-beginner-s-guide-to-react', - cta: 'Get Started with React', - tags: ['react'], - reviews: [ - { - content: - 'Great course and a great teacher. I have been a React dev for two years but still learned a lot!', - author: 'Bret Funk', - }, - ], - }, - { - title: 'Use Suspense to Simplify Your Async UI', - summary: - 'In this course, I teach how Suspense works under the hood, preparing you for the future of asynchronous state management in React.', - url: 'https://egghead.io/courses/use-suspense-to-simplify-your-async-ui', - cta: 'Meet new possibilities in React', - tags: ['react'], - reviews: [ - { - content: - 'Absolutely love this course, the thought that Kent has put into it, and the new possibilities of React Suspense itself, of course. Thanks for making this!', - author: 'Maxim Zubarev', - }, - ], - }, - { - title: 'Simplify React Apps with React Hooks', - summary: - 'In this course, I will take a modern React codebase that uses classes and refactor the entire thing to use function components as much as possible. We’ll look at state, side effects, async code, caching, and more!', - url: 'https://egghead.io/courses/simplify-react-apps-with-react-hooks', - cta: 'Simplify your React apps', - tags: ['react'], - reviews: [ - { - content: - 'I really love that real-world examples are presented on an existing codebase. This is exactly what I needed to better understand, beyond simple todo apps and contrived examples.', - author: 'David Poindexter', - }, - ], - }, - { - title: 'Advanced React Component Patterns', - summary: - 'Once you’ve nailed the fundamentals of React, that’s when things get really fun. This course teaches you advanced patterns in React that you can use to make components that are simple, flexible, and enjoyable to work with.', - url: 'https://egghead.io/courses/advanced-react-component-patterns', - cta: 'Ship flexible React components', - tags: ['react'], - reviews: [ - { - content: - "Just wow. That was a lot of info to unpack in one hour. I did a straight walkthrough with no code. Now I'm going to go back and rewatch every video while creating my own components. I would love to write about this. I'm currently working on a fairly complex React project and this is so helpful! Another great course from Kent C. Dodds!!", - author: 'Babs Craig', - }, - ], - }, - { - title: `JavaScript Testing Practices and Principles`, - summary: `Learn the principles and best practices for writing maintainable test applications to catch errors before your product reaches the end user!`, - url: `https://frontendmasters.com/courses/testing-practices-principles/`, - cta: `Gain a solid foundation on testing`, - tags: ['testing'], - reviews: [], - }, - { - title: `Testing React Applications`, - summary: `Fix errors before your app reaches the end user by writing maintainable unit test & integration tests for your React applications!`, - url: `https://frontendmasters.com/courses/testing-react/`, - cta: `Ship React Applications with Confidence`, - tags: ['react', 'testing'], - reviews: [], - }, - { - title: `Code Transformation and Linting with ASTs`, - summary: `Learn to use Abstract Syntax Trees (ASTs) to make stylistic code changes, reveal logical problems, and prevent bugs from entering your codebase.`, - url: `https://frontendmasters.com/courses/linting-asts/`, - cta: `Bend JavaScript to your will 💪`, - tags: ['babel', 'eslint', 'asts'], - reviews: [], - }, - - { - title: 'How to Write an Open Source JavaScript Library', - summary: - 'From Github and npm, to releasing beta versions, semantic versioning, code coverage, continuous integration, and providing your library with a solid set of unit tests, there are a ton of things to learn.

This series will guide you through a set of steps to publish a JavaScript open source library.', - url: - 'https://egghead.io/courses/how-to-write-an-open-source-javascript-library', - cta: 'Publish your first JavaScript library', - tags: ['open source', 'javascript', 'github', 'npm', 'versioning'], - reviews: [ - { - content: - 'I liked the level of detail. Kent covers a lot of concepts in short videos, always explaining clearly and concisely everything.', - author: 'Johnny Zabala', - }, - ], - }, - { - title: 'How to Contribute to an Open Source Project on GitHub', - summary: - '“Feel free to submit a PR!” - words often found in GitHub issues, but met with confusion and fear by many. Getting started with contributing open source is not always straightforward and can be tricky. With this series, you’ll be equipped with the the tools, knowledge, and understanding you need to be productive and contribute to the wonderful world of open source projects.', - url: - 'https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github', - cta: 'Contribute to open source project', - tags: ['open source', 'github'], - }, -] diff --git a/src/pages/about.mdx b/src/pages/about.mdx index 6a92a8b..0cf9f3c 100644 --- a/src/pages/about.mdx +++ b/src/pages/about.mdx @@ -22,13 +22,6 @@ I've written code for and [my open source code](https://github.com/kentcdodds) has been used by millions of people all over the globe. -**I now work for myself full-time as an educator.** I create content all about -Web Development on various platforms including: -[egghead.io](https://kcd.im/egghead), [Frontend Masters](https://kcd.im/fem), -[YouTube](https://kcd.im/youtube), [Twitter](https://kcd.im/twitter), and my own -sites like [TestingJavaScript.com](https://testingjavascript.com) 🏆 and -[EpicReact.Dev](https://epicreact.dev) 🚀 - While in school at BYU, I met my wife Brooke. We live in Utah with our four kids and dog 👧👦👦👦🐶. diff --git a/src/templates/post.js b/src/templates/post.js index 8f4c0dc..3c1c33b 100644 --- a/src/templates/post.js +++ b/src/templates/post.js @@ -6,7 +6,6 @@ import SEO from 'components/seo' import {css} from '@emotion/react' import Container from 'components/container' import Layout from 'components/layout' -import Share from 'components/share' import SubscribeForm from 'components/forms/subscribe' import BlogPostFooter from 'components/blog-post-footer' import Markdown from 'react-markdown' @@ -51,10 +50,6 @@ export default function PostPage({data: {site, mdx}}) { css={css` width: 100%; display: flex; - twitter-widget { - margin-left: auto; - margin-right: auto; - } `} >

- - - diff --git a/src/templates/project-page.js b/src/templates/project-page.js index f3f33e0..a849ca6 100644 --- a/src/templates/project-page.js +++ b/src/templates/project-page.js @@ -23,10 +23,6 @@ export default function ProjectPage({data: {site, mdx}}) { css={css` width: 100%; display: flex; - twitter-widget { - margin-left: auto; - margin-right: auto; - } `} >