diff --git a/gatsby-node.js b/gatsby-node.js
index d73f7d6f..acd2fd96 100644
--- a/gatsby-node.js
+++ b/gatsby-node.js
@@ -1,4 +1,4 @@
-import people from './src/data.js';
+import people from './src/data';
import { tags, countries } from './src/util/stats';
function sourceNodes({ actions, createNodeId, createContentDigest }) {
diff --git a/src/components/Person.js b/src/components/Person.js
index 6a80cb0c..78a69ed7 100644
--- a/src/components/Person.js
+++ b/src/components/Person.js
@@ -1,5 +1,6 @@
import React from 'react';
import { name } from 'country-emoji';
+import styled from 'styled-components';
import iphone from '../images/iphone.png';
import android from '../images/android.png';
import windows from '../images/windows.svg';
@@ -10,9 +11,9 @@ export default function Person({ person, currentTag }) {
const url = new URL(person.url);
const img = `https://logo.clearbit.com/${url.host}`;
return (
-
-
-
+
+
+
{person.description}
-
-
+
{person.tags.map(tag => (
-
))}
-
-
+
+
{person.country}
@@ -69,7 +69,79 @@ export default function Person({ person, currentTag }) {
)}
{person.github && {person.github}}
-
-
+
+
);
}
+
+// Component Styles
+const PersonWrapper = styled.div`
+ border: 1px solid var(--vape);
+ border-radius: 5.34334px;
+ box-shadow: 10px -10px 0 var(--blue2);
+ display: grid;
+ grid-template-rows: 1fr auto auto;
+`;
+
+const PersonInner = styled.div`
+ padding: 2rem;
+ h3 {
+ margin: 0;
+ }
+ ul li {
+ font-size: 1.2rem;
+ &.currentTag {
+ color: var(--yellow);
+ }
+ }
+ header {
+ display: grid;
+ grid-template-rows: auto auto;
+ grid-template-columns: auto 1fr;
+ grid-gap: 0 1rem;
+ img {
+ grid-row: 1 / -1;
+ background: var(--lightblue);
+ font-size: 1rem;
+ }
+ .displayLink {
+ text-decoration: none;
+ color: var(--vape);
+ letter-spacing: 1px;
+ font-size: 1.2rem;
+ :hover {
+ color: var(--pink);
+ }
+ }
+`;
+
+const PersonDeets = styled.div`
+ display: flex;
+ border-block-start: 1px solid var(--vape);
+ > * {
+ flex: 1;
+ border-inline-start: 1px solid var(--vape);
+ text-align: center;
+ padding: 1rem;
+ display: grid;
+ align-items: center;
+ justify-content: center;
+ grid-template-columns: auto auto;
+ }
+ a {
+ color: var(--vape);
+ }
+ :first-child {
+ border-inline-start: none;
+ }
+ .at {
+ color: var(--yellow);
+ margin-right: 2px;
+ }
+ .country {
+ font-size: 3rem;
+ }
+ .phone {
+ padding: 0;
+ }
+`;
diff --git a/src/components/Topics.js b/src/components/Topics.js
index d7426561..d46e0752 100644
--- a/src/components/Topics.js
+++ b/src/components/Topics.js
@@ -1,4 +1,5 @@
import React, { useContext } from 'react';
+import styled from 'styled-components';
import FilterContext from '../context/FilterContext';
export default function Topics() {
@@ -7,9 +8,9 @@ export default function Topics() {
);
console.log(countries);
return (
-
+
{tags.map(tag => (
-
+ {tag.count}
+
))}
{countries.map(tag => (
-
+ {tag.emoji}
+ {tag.count}
+
))}
-
+
);
}
+
+// Component Styles
+const Tags = styled.div`
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ flex-wrap: wrap;
+`;
+
+const TagLabel = styled.label`
+ background: var(--pink);
+ margin: 2px;
+ border-radius: 3px;
+ font-size: 1.7rem;
+ padding: 5px;
+ color: hsla(0, 100%, 100%, 0.8);
+ transition: background-color 0.2s;
+ cursor: pointer;
+ display: grid;
+ grid-template-columns: 1fr auto;
+ align-items: center;
+ input {
+ display: none;
+ }
+ &.currentTag {
+ background: var(--yellow);
+ color: hsla(0, 100%, 0%, 0.8);
+ }
+`;
+
+const TagEmoji = styled.span`
+ transform: scale(1.45);
+`;
+
+const TagCount = styled.span`
+ background: var(--blue);
+ font-size: 1rem;
+ color: white;
+ padding: 2px;
+ border-radius: 2px;
+ margin-left: 5px;
+`;
diff --git a/src/components/header.js b/src/components/header.js
index a431ca31..89e862fd 100644
--- a/src/components/header.js
+++ b/src/components/header.js
@@ -2,9 +2,10 @@ import { Link } from 'gatsby';
import PropTypes from 'prop-types';
import React from 'react';
import Helmet from 'react-helmet';
+import styled from 'styled-components';
const Header = ({ siteTitle }) => (
-
+
{siteTitle}
@@ -17,7 +18,7 @@ const Header = ({ siteTitle }) => (
software and configs.
-
+
);
Header.propTypes = {
@@ -29,3 +30,11 @@ Header.defaultProps = {
};
export default Header;
+
+// Component Styles
+const HeaderWrapper = styled.header`
+ text-align: center;
+ h1 {
+ font-size: 6rem;
+ }
+`;
diff --git a/src/components/layout.css b/src/components/layout.css
deleted file mode 100644
index 62a34533..00000000
--- a/src/components/layout.css
+++ /dev/null
@@ -1,201 +0,0 @@
-html {
- --purple: #1e1f5c;
- --blue: #203447;
- --lightblue: #1f4662;
- --blue2: #1C2F40;
- --yellow: #ffc600;
- --pink: #EB4471;
- --vape: #d7d7d7;
- background: var(--blue);
- color: var(--vape);
- font-family: 'Fira Mono', monospace;
- font-weight: 100;
- font-size: 10px;
-}
-
-::selection {
- background: var(--yellow);
- color: var(--blue);
-}
-
-body {
- font-size: 2rem;
-}
-
-h1,h2,h3,h4,h5,h6 {
- font-weight: 500;
-}
-
-
-h1 a {
- text-align: center;
-}
-
-
-a {
- color: var(--yellow);
- text-decoration-color: var(--pink);
- font-style: italic;
-}
-
-code {
- background: var(--lightblue);
-}
-
-.site {
- max-width: 1900px;
- margin: 5rem;
-}
-
-.header {
- text-align: center;
-}
-
-.header h1 {
- font-size: 6rem;
-}
-
-main {
- display: grid;
- grid-gap: 3rem;
- max-width: 1900px;
- padding: 0 3rem;
- margin: 5rem auto;
-}
-
-.people {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
- grid-gap: 5rem;
-}
-
-.person {
- border: 1px solid var(--vape);
- border-radius: 5.34334px;
- box-shadow: 10px -10px 0 var(--blue2);
- display: grid;
- grid-template-rows: 1fr auto auto;
-}
-
-.person h3 {
- margin: 0;
-}
-
-.personInner {
- padding: 2rem;
-}
-
-.person .tag {
- font-size: 1.2rem;
-}
-
-.personHeader {
- display: grid;
- grid-template-rows:auto auto;
- grid-template-columns: auto 1fr;
- grid-gap: 0 1rem;
-}
-
-.personHeader img {
- grid-row: 1 / -1;
- background: var(--lightblue);
- font-size: 1rem;
-}
-
-.name {
- display: block;
-}
-
-.name.last {
- font-size: 5rem;
-}
-
-.deets {
- display: flex;
- border-block-start: 1px solid var(--vape);
-}
-
-.deets > * {
- flex: 1;
- border-inline-start: 1px solid var(--vape);
- text-align: center;
- padding: 1rem;
- display: grid;
- align-items: center;
- justify-content: center;
- grid-template-columns: auto auto;
-}
-
-.deets a {
- color: var(--vape);
-}
-
-.deets .at {
- color: var(--yellow);
- margin-right: 2px;
-}
-
-.deets :first-child {
- border-inline-start: none;
-}
-
-.deets .country {
- font-size: 3rem;
-}
-.deets .phone {
- padding: 0;
-}
-
-.displayLink {
- text-decoration: none;
- color: var(--vape);
- letter-spacing: 1px;
- font-size: 1.2rem;
-}
-
-.displayLink:hover {
- color: var(--pink);
-}
-
-
-.tags {
- list-style-type: none;
- margin: 0;
- padding: 0;
- display: flex;
- flex-wrap: wrap;
-}
-
-.tag {
- background: var(--pink);
- margin: 2px;
- border-radius: 3px;
- font-size: 1.7rem;
- padding: 5px;
- color: hsla(0, 100%, 100%, 0.8);
- transition: background-color 0.2s;
- cursor: pointer;
- display: grid;
- grid-template-columns: 1fr auto;
- align-items: center;
-}
-
-.tag input { display: none; }
-
-.tag.currentTag {
- background: var(--yellow);
- color: hsla(0, 100%, 0%, 0.8);
-}
-
-.tag .emoji {
- transform: scale(1.45);
-}
-
-.tag .count {
- background: var(--blue);
- font-size: 1rem;
- color: white;
- padding: 2px;
- border-radius: 2px;
- margin-left: 5px;
-}
diff --git a/src/components/layout.js b/src/components/layout.js
index 11ebc19f..4189f2f7 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -9,9 +9,9 @@ import React from 'react';
import PropTypes from 'prop-types';
import { useStaticQuery, graphql } from 'gatsby';
+import styled, { createGlobalStyle } from 'styled-components';
import Header from './header';
import 'normalize.css';
-import './layout.css';
const Layout = ({ children }) => {
const data = useStaticQuery(graphql`
@@ -26,15 +26,16 @@ const Layout = ({ children }) => {
return (
<>
+
-
+
{children}
-
+
>
);
};
@@ -44,3 +45,48 @@ Layout.propTypes = {
};
export default Layout;
+
+// Global Styles
+const GlobalStyle = createGlobalStyle`
+ html {
+ --purple: #1e1f5c;
+ --blue: #203447;
+ --lightblue: #1f4662;
+ --blue2: #1C2F40;
+ --yellow: #ffc600;
+ --pink: #EB4471;
+ --vape: #d7d7d7;
+ background: var(--blue);
+ color: var(--vape);
+ font-family: 'Fira Mono', monospace;
+ font-weight: 100;
+ font-size: 10px;
+ }
+ ::selection {
+ background: var(--yellow);
+ color: var(--blue);
+ }
+ body {
+ font-size: 2rem;
+ }
+ h1,h2,h3,h4,h5,h6 {
+ font-weight: 500;
+ }
+ a {
+ color: var(--yellow);
+ text-decoration-color: var(--pink);
+ font-style: italic;
+ }
+ code {
+ background: var(--lightblue);
+ }
+`;
+
+// Component Styles
+const Main = styled.main`
+ display: grid;
+ grid-gap: 3rem;
+ max-width: 1900px;
+ padding: 0 3rem;
+ margin: 5rem auto;
+`;
diff --git a/src/pages/index.js b/src/pages/index.js
index 5adc8e05..8de2bd75 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -1,5 +1,6 @@
import React, { useContext } from 'react';
import { useStaticQuery, graphql } from 'gatsby';
+import styled from 'styled-components';
import FilterContext from '../context/FilterContext';
import Layout from '../components/layout';
@@ -35,13 +36,20 @@ function IndexPage() {
return (
-
+
{people.map(person => (
))}
-
+
);
}
export default IndexPage;
+
+// Component Styles
+const People = styled.div`
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
+ grid-gap: 5rem;
+`;