diff --git a/src/components/Layout.module.css b/src/components/Layout.module.css index 7a964b3..8726f1f 100644 --- a/src/components/Layout.module.css +++ b/src/components/Layout.module.css @@ -1,14 +1,12 @@ .screen { margin: calc(var(--spacer) * var(--line-height)) auto 0 auto; - padding-left: 2%; - padding-right: 2%; + padding-left: 5vw; + padding-right: 5vw; } @media (min-width: 55rem) { .screen { - padding-left: 4%; - padding-right: 4%; - max-width: calc(var(--projectImageMaxWidth) + 8%); + max-width: calc(var(--projectImageMaxWidth) + 10vw); } } @@ -16,11 +14,32 @@ .screen > article { display: grid; grid-template-columns: - [full-start] minmax(var(--spacer), 1fr) + [full-start] minmax(calc(var(--spacer) / 2), 1fr) [main-start] minmax(0, 38rem) [main-end] - minmax(var(--spacer), 1fr) [full-end]; + minmax(calc(var(--spacer) / 2), 1fr) [full-end]; } .screen > article > * { grid-column: main; } + +.grid { + display: grid; + gap: calc(var(--spacer) * 2); + grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); +} + +@media (min-width: 55rem) { + .grid { + grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr)); + } +} + +.fullContainer { + grid-column: full !important; +} + +.fullWidth { + margin-left: calc(50% - 50vw); + margin-right: calc(50% - 50vw); +} diff --git a/src/components/atoms/FullWidth.module.css b/src/components/atoms/FullWidth.module.css deleted file mode 100644 index 876893d..0000000 --- a/src/components/atoms/FullWidth.module.css +++ /dev/null @@ -1,8 +0,0 @@ -.fullContainer { - grid-column: full !important; -} - -.fullWidth { - margin-left: calc(50% - 50vw); - margin-right: calc(50% - 50vw); -} diff --git a/src/components/atoms/ProjectImage.module.css b/src/components/atoms/ProjectImage.module.css index 6883c4a..07590e3 100644 --- a/src/components/atoms/ProjectImage.module.css +++ b/src/components/atoms/ProjectImage.module.css @@ -20,8 +20,16 @@ a:focus .frame { margin-bottom: calc(var(--spacer) * 3); } +.projectImage:last-of-type { + margin-bottom: 0; +} + @media (min-width: 1200px) { .projectImage:not(:only-of-type) { margin-bottom: calc(var(--spacer) * 6); } + + .projectImage:last-of-type { + margin-bottom: 0; + } } diff --git a/src/components/molecules/Networks.module.css b/src/components/molecules/Networks.module.css index d468090..09de436 100644 --- a/src/components/molecules/Networks.module.css +++ b/src/components/molecules/Networks.module.css @@ -1,12 +1,7 @@ .networks { margin-top: calc(var(--spacer) * var(--line-height)); - margin-left: auto; - margin-right: auto; width: 100%; text-align: center; - display: flex; - flex-wrap: wrap; - justify-content: center; } .title { @@ -24,8 +19,6 @@ margin-bottom: calc(var(--spacer) / 2); text-align: center; display: inline-block; - flex: 0 1; - min-width: 2.5rem; } .link, @@ -41,7 +34,7 @@ .link:hover svg, .link:focus svg { - stroke: var(--brand-cyan); + stroke: var(--link-color); } .link:hover .title, diff --git a/src/components/molecules/ProjectNav.module.css b/src/components/molecules/ProjectNav.module.css index 1358631..783a889 100644 --- a/src/components/molecules/ProjectNav.module.css +++ b/src/components/molecules/ProjectNav.module.css @@ -1,5 +1,5 @@ .projectNav { - composes: fullWidth from '../atoms/FullWidth.module.css'; + composes: fullWidth from '../Layout.module.css'; white-space: nowrap; overflow-y: hidden; overflow-x: auto; diff --git a/src/components/organisms/Header.module.css b/src/components/organisms/Header.module.css index a3eaa97..1ab18af 100644 --- a/src/components/organisms/Header.module.css +++ b/src/components/organisms/Header.module.css @@ -1,6 +1,6 @@ .header { position: relative; - padding: var(--spacer); + padding: calc(var(--spacer) / 2); padding-top: 30vh; min-height: calc(100vh - var(--spacer)); max-height: 1000px; diff --git a/src/components/organisms/Repositories.jsx b/src/components/organisms/Repositories.jsx index fc458a2..270417e 100644 --- a/src/components/organisms/Repositories.jsx +++ b/src/components/organisms/Repositories.jsx @@ -2,11 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' import Repository from '../molecules/Repository' -import { - section, - sectionTitle, - repos as styleRepos -} from './Repositories.module.css' +import { sectionTitle, repos as styleRepos } from './Repositories.module.css' Repositories.propTypes = { repos: PropTypes.array @@ -16,13 +12,13 @@ export default function Repositories({ repos }) { if (!repos) return null return ( -
-

Open Source Projects

+ <> +

Open Source Projects

{repos.map((repo) => ( ))}
-
+ ) } diff --git a/src/components/organisms/Repositories.module.css b/src/components/organisms/Repositories.module.css index b5c506e..be11afe 100644 --- a/src/components/organisms/Repositories.module.css +++ b/src/components/organisms/Repositories.module.css @@ -1,24 +1,11 @@ -.section { - margin: calc(var(--spacer) * 3) auto 0 auto; - max-width: calc(var(--projectImageMaxWidth) + var(--spacer) * 2); - padding-left: var(--spacer); - padding-right: var(--spacer); -} - .sectionTitle { font-size: var(--font-size-h3); + margin-top: calc(var(--spacer) * 6); margin-bottom: calc(var(--spacer) * 2); text-align: center; } .repos { - display: grid; - grid-template-columns: 1fr; - gap: calc(var(--spacer) * 2); -} - -@media (min-width: 18rem) { - .repos { - grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); - } + composes: grid from '../../components/Layout.module.css'; + grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); } diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 781340a..4d1fb1f 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -4,9 +4,9 @@ import { Link, graphql } from 'gatsby' import shortid from 'shortid' import SEO from '../components/atoms/SEO' import ProjectImage from '../components/atoms/ProjectImage' +import { grid } from '../components/Layout.module.css' import { project as styleProject, - projects as styleProjects, title as styleTitle, imageCount as styleImageCount } from './index.module.css' @@ -67,7 +67,7 @@ export default function Home({ data, pageContext }) { <> -
+
{projects.map(({ node }) => ( ))} diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 0a9e630..0a1f81d 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -1,15 +1,3 @@ -.projects { - display: grid; - gap: calc(var(--spacer) * 2); - grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); -} - -@media (min-width: 55rem) { - .projects { - grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr)); - } -} - .title { font-size: var(--font-size-h4); opacity: 0; diff --git a/src/pages/{ProjectsYaml.slug}.jsx b/src/pages/{ProjectsYaml.slug}.jsx index c4b4f43..68b9447 100644 --- a/src/pages/{ProjectsYaml.slug}.jsx +++ b/src/pages/{ProjectsYaml.slug}.jsx @@ -1,7 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' import { graphql } from 'gatsby' -import { fullContainer } from '../components/atoms/FullWidth.module.css' +import { fullContainer } from '../components/Layout.module.css' import ProjectImage from '../components/atoms/ProjectImage' import ProjectTechstack from '../components/molecules/ProjectTechstack' import ProjectLinks from '../components/molecules/ProjectLinks' diff --git a/src/pages/{ProjectsYaml.slug}.module.css b/src/pages/{ProjectsYaml.slug}.module.css index e00839a..53e0f4e 100644 --- a/src/pages/{ProjectsYaml.slug}.module.css +++ b/src/pages/{ProjectsYaml.slug}.module.css @@ -14,7 +14,7 @@ } .meta { - margin-top: -2rem; + margin-top: calc(var(--spacer) * 4); margin-bottom: calc(var(--spacer) * 5); display: grid; grid-template-columns: 1fr;