diff --git a/src/components/Post/PostImage.module.scss b/src/components/Post/PostImage.module.scss
index da0a36e3..e486a81b 100644
--- a/src/components/Post/PostImage.module.scss
+++ b/src/components/Post/PostImage.module.scss
@@ -23,12 +23,7 @@
}
.postImage {
- @include breakoutviewport();
-
- max-width: none;
display: block;
- margin-top: $spacer * 1.5;
- margin-bottom: $spacer * 1.5;
a & {
position: relative;
diff --git a/src/components/atoms/Transitions.ts b/src/components/atoms/Transitions.ts
index c2b4c86d..bfb1a527 100644
--- a/src/components/atoms/Transitions.ts
+++ b/src/components/atoms/Transitions.ts
@@ -7,24 +7,25 @@ export const fadeIn = {
}
}
+const transition = { type: 'spring' }
+
+const enter = {
+ y: 0,
+ ...transition
+}
+
export const moveInTop = {
- enter: {
- y: 0,
- transition: { type: 'spring' }
- },
+ ...enter,
exit: {
y: '-2rem',
- transition: { type: 'spring' }
+ ...transition
}
}
export const moveInBottom = {
- enter: {
- y: 0,
- transition: { type: 'spring' }
- },
+ ...enter,
exit: {
y: '2rem',
- transition: { type: 'spring' }
+ ...transition
}
}
diff --git a/src/pages/photos.module.scss b/src/pages/photos.module.scss
index 76dbaebd..6ab9415a 100644
--- a/src/pages/photos.module.scss
+++ b/src/pages/photos.module.scss
@@ -2,25 +2,33 @@
@import 'mixins';
.photos {
- @include breakoutviewport;
+ @include breakoutviewport--full;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: $spacer;
padding-left: $spacer;
padding-right: $spacer;
- @media (min-width: $screen-md) {
- padding-left: 0;
- padding-right: 0;
+ @media (min-width: $screen-sm) {
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
}
.photo {
- flex: 0 0 48%;
- margin-bottom: 4%;
-
a {
display: block;
}
+
+ figure {
+ > div {
+ margin: 0;
+ }
+ }
+
+ figcaption {
+ font-size: $font-size-base;
+ padding-left: $spacer / 2;
+ padding-right: $spacer / 2;
+ }
}
diff --git a/src/pages/photos.tsx b/src/pages/photos.tsx
index 54269099..92ba02eb 100644
--- a/src/pages/photos.tsx
+++ b/src/pages/photos.tsx
@@ -1,10 +1,9 @@
import React from 'react'
import { graphql, Link } from 'gatsby'
-import Image from '../components/atoms/Image'
-import Page from '../templates/Page'
-
-import styles from './photos.module.scss'
import { FluidObject } from 'gatsby-image'
+import Page from '../templates/Page'
+import PostImage from '../components/Post/PostImage'
+import styles from './photos.module.scss'
const page = {
frontmatter: {
@@ -34,7 +33,11 @@ const PhotoThumbs = ({ edges }: { edges: PhotoNode[] }) =>