mirror of
https://github.com/kremalicious/portfolio.git
synced 2025-02-14 21:10:41 +01:00
more layout style consolidation
This commit is contained in:
parent
10e5927e8e
commit
dc249eccac
@ -1,14 +1,12 @@
|
|||||||
.screen {
|
.screen {
|
||||||
margin: calc(var(--spacer) * var(--line-height)) auto 0 auto;
|
margin: calc(var(--spacer) * var(--line-height)) auto 0 auto;
|
||||||
padding-left: 2%;
|
padding-left: 5vw;
|
||||||
padding-right: 2%;
|
padding-right: 5vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 55rem) {
|
@media (min-width: 55rem) {
|
||||||
.screen {
|
.screen {
|
||||||
padding-left: 4%;
|
max-width: calc(var(--projectImageMaxWidth) + 10vw);
|
||||||
padding-right: 4%;
|
|
||||||
max-width: calc(var(--projectImageMaxWidth) + 8%);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,11 +14,32 @@
|
|||||||
.screen > article {
|
.screen > article {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns:
|
grid-template-columns:
|
||||||
[full-start] minmax(var(--spacer), 1fr)
|
[full-start] minmax(calc(var(--spacer) / 2), 1fr)
|
||||||
[main-start] minmax(0, 38rem) [main-end]
|
[main-start] minmax(0, 38rem) [main-end]
|
||||||
minmax(var(--spacer), 1fr) [full-end];
|
minmax(calc(var(--spacer) / 2), 1fr) [full-end];
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen > article > * {
|
.screen > article > * {
|
||||||
grid-column: main;
|
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);
|
||||||
|
}
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
.fullContainer {
|
|
||||||
grid-column: full !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fullWidth {
|
|
||||||
margin-left: calc(50% - 50vw);
|
|
||||||
margin-right: calc(50% - 50vw);
|
|
||||||
}
|
|
@ -20,8 +20,16 @@ a:focus .frame {
|
|||||||
margin-bottom: calc(var(--spacer) * 3);
|
margin-bottom: calc(var(--spacer) * 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.projectImage:last-of-type {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
.projectImage:not(:only-of-type) {
|
.projectImage:not(:only-of-type) {
|
||||||
margin-bottom: calc(var(--spacer) * 6);
|
margin-bottom: calc(var(--spacer) * 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.projectImage:last-of-type {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
.networks {
|
.networks {
|
||||||
margin-top: calc(var(--spacer) * var(--line-height));
|
margin-top: calc(var(--spacer) * var(--line-height));
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
@ -24,8 +19,6 @@
|
|||||||
margin-bottom: calc(var(--spacer) / 2);
|
margin-bottom: calc(var(--spacer) / 2);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
flex: 0 1;
|
|
||||||
min-width: 2.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.link,
|
.link,
|
||||||
@ -41,7 +34,7 @@
|
|||||||
|
|
||||||
.link:hover svg,
|
.link:hover svg,
|
||||||
.link:focus svg {
|
.link:focus svg {
|
||||||
stroke: var(--brand-cyan);
|
stroke: var(--link-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.link:hover .title,
|
.link:hover .title,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.projectNav {
|
.projectNav {
|
||||||
composes: fullWidth from '../atoms/FullWidth.module.css';
|
composes: fullWidth from '../Layout.module.css';
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.header {
|
.header {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: var(--spacer);
|
padding: calc(var(--spacer) / 2);
|
||||||
padding-top: 30vh;
|
padding-top: 30vh;
|
||||||
min-height: calc(100vh - var(--spacer));
|
min-height: calc(100vh - var(--spacer));
|
||||||
max-height: 1000px;
|
max-height: 1000px;
|
||||||
|
@ -2,11 +2,7 @@ import React from 'react'
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
import Repository from '../molecules/Repository'
|
import Repository from '../molecules/Repository'
|
||||||
import {
|
import { sectionTitle, repos as styleRepos } from './Repositories.module.css'
|
||||||
section,
|
|
||||||
sectionTitle,
|
|
||||||
repos as styleRepos
|
|
||||||
} from './Repositories.module.css'
|
|
||||||
|
|
||||||
Repositories.propTypes = {
|
Repositories.propTypes = {
|
||||||
repos: PropTypes.array
|
repos: PropTypes.array
|
||||||
@ -16,13 +12,13 @@ export default function Repositories({ repos }) {
|
|||||||
if (!repos) return null
|
if (!repos) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={section}>
|
<>
|
||||||
<h1 className={sectionTitle}>Open Source Projects</h1>
|
<h2 className={sectionTitle}>Open Source Projects</h2>
|
||||||
<div className={styleRepos}>
|
<div className={styleRepos}>
|
||||||
{repos.map((repo) => (
|
{repos.map((repo) => (
|
||||||
<Repository key={repo.name} repo={repo} />
|
<Repository key={repo.name} repo={repo} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
.sectionTitle {
|
||||||
font-size: var(--font-size-h3);
|
font-size: var(--font-size-h3);
|
||||||
|
margin-top: calc(var(--spacer) * 6);
|
||||||
margin-bottom: calc(var(--spacer) * 2);
|
margin-bottom: calc(var(--spacer) * 2);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repos {
|
.repos {
|
||||||
display: grid;
|
composes: grid from '../../components/Layout.module.css';
|
||||||
grid-template-columns: 1fr;
|
|
||||||
gap: calc(var(--spacer) * 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 18rem) {
|
|
||||||
.repos {
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ import { Link, graphql } from 'gatsby'
|
|||||||
import shortid from 'shortid'
|
import shortid from 'shortid'
|
||||||
import SEO from '../components/atoms/SEO'
|
import SEO from '../components/atoms/SEO'
|
||||||
import ProjectImage from '../components/atoms/ProjectImage'
|
import ProjectImage from '../components/atoms/ProjectImage'
|
||||||
|
import { grid } from '../components/Layout.module.css'
|
||||||
import {
|
import {
|
||||||
project as styleProject,
|
project as styleProject,
|
||||||
projects as styleProjects,
|
|
||||||
title as styleTitle,
|
title as styleTitle,
|
||||||
imageCount as styleImageCount
|
imageCount as styleImageCount
|
||||||
} from './index.module.css'
|
} from './index.module.css'
|
||||||
@ -67,7 +67,7 @@ export default function Home({ data, pageContext }) {
|
|||||||
<>
|
<>
|
||||||
<SEO />
|
<SEO />
|
||||||
|
|
||||||
<div className={styleProjects}>
|
<div className={grid}>
|
||||||
{projects.map(({ node }) => (
|
{projects.map(({ node }) => (
|
||||||
<Project key={shortid.generate()} node={node} images={images} />
|
<Project key={shortid.generate()} node={node} images={images} />
|
||||||
))}
|
))}
|
||||||
|
@ -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 {
|
.title {
|
||||||
font-size: var(--font-size-h4);
|
font-size: var(--font-size-h4);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { graphql } from 'gatsby'
|
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 ProjectImage from '../components/atoms/ProjectImage'
|
||||||
import ProjectTechstack from '../components/molecules/ProjectTechstack'
|
import ProjectTechstack from '../components/molecules/ProjectTechstack'
|
||||||
import ProjectLinks from '../components/molecules/ProjectLinks'
|
import ProjectLinks from '../components/molecules/ProjectLinks'
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.meta {
|
||||||
margin-top: -2rem;
|
margin-top: calc(var(--spacer) * 4);
|
||||||
margin-bottom: calc(var(--spacer) * 5);
|
margin-bottom: calc(var(--spacer) * 5);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user