Skip to content

Commit

Permalink
Grid (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
icco authored Dec 10, 2024
2 parents c1ab7cd + 29e6291 commit 6a0d991
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
22 changes: 20 additions & 2 deletions posts/718.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,26 @@ permalink: "/post/718"

This #yearinreview is two years late. But I want to get something down for the history books. 2022 was a good year. The pandemic was easing up, I visited friends and family. Mel and I continued living in Beacon. Work was fun but tumultuous (but no where near as 2023 would be). I picked a bunch of random photos from the year. Trying to keep it to one or two per month. Decided to go with no description because this post is... late. No metrics, no goals, etc. Just some #photos.

[![](https://icco.imgix.net/photos/2024/0J50YER307VSP.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YER307VSP.jpg) [![](https://icco.imgix.net/photos/2024/0J50YDKN87R1N.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YDKN87R1N.jpg) [![](https://icco.imgix.net/photos/2024/0J50YDH747T34.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YDH747T34.jpg) [![](https://icco.imgix.net/photos/2024/0J50YENM87T6J.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YENM87T6J.jpg) [![](https://icco.imgix.net/photos/2024/0J50YEKT87S2X.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YEKT87S2X.jpg) [![](https://icco.imgix.net/photos/2024/0J50YEHPR7SPH.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YEHPR7SPH.jpg) [![](https://icco.imgix.net/photos/2024/0J50YEFQW7S6G.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YEFQW7S6G.jpg) [![](https://icco.imgix.net/photos/2024/0J50YEDJ47TRK.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YEDJ47TRK.jpg) [![](https://icco.imgix.net/photos/2024/0J50YEBKM7RQP.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YEBKM7RQP.jpg) [![](https://icco.imgix.net/photos/2024/0J50YE9RG7TP9.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YE9RG7TP9.jpg) [![](https://icco.imgix.net/photos/2024/0J50YE7D87VBV.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YE7D87VBV.jpg) [![](https://icco.imgix.net/photos/2024/0J50YE5N07VAV.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YE5N07VAV.jpg) [![](https://icco.imgix.net/photos/2024/0J50YE46R7VW4.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YE46R7VW4.jpg) [![](https://icco.imgix.net/photos/2024/0J50YDZ987VN4.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YDZ987VN4.jpg) [![](https://icco.imgix.net/photos/2024/0J50YDX6M7VYW.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YDX6M7VYW.jpg) [![](https://icco.imgix.net/photos/2024/0J50YDV5C7R5N.jpg?w=500)](https://icco.imgix.net/photos/2024/0J50YDV5C7R5N.jpg)

<PhotoGrid
urls={[
"https://icco.imgix.net/photos/2024/0J50YER307VSP.jpg",
"https://icco.imgix.net/photos/2024/0J50YDKN87R1N.jpg",
"https://icco.imgix.net/photos/2024/0J50YDH747T34.jpg",
"https://icco.imgix.net/photos/2024/0J50YENM87T6J.jpg",
"https://icco.imgix.net/photos/2024/0J50YEKT87S2X.jpg",
"https://icco.imgix.net/photos/2024/0J50YEHPR7SPH.jpg",
"https://icco.imgix.net/photos/2024/0J50YEFQW7S6G.jpg",
"https://icco.imgix.net/photos/2024/0J50YEDJ47TRK.jpg",
"https://icco.imgix.net/photos/2024/0J50YEBKM7RQP.jpg",
"https://icco.imgix.net/photos/2024/0J50YE9RG7TP9.jpg",
"https://icco.imgix.net/photos/2024/0J50YE7D87VBV.jpg",
"https://icco.imgix.net/photos/2024/0J50YE5N07VAV.jpg",
"https://icco.imgix.net/photos/2024/0J50YE46R7VW4.jpg",
"https://icco.imgix.net/photos/2024/0J50YDZ987VN4.jpg",
"https://icco.imgix.net/photos/2024/0J50YDX6M7VYW.jpg",
"https://icco.imgix.net/photos/2024/0J50YDV5C7R5N.jpg"
]}
/>

Lots of love,

Expand Down
3 changes: 3 additions & 0 deletions src/components/MDXContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { type MDXComponents } from "mdx/types"
import Link from "next/link"
import { useMDXComponent } from "next-contentlayer2/hooks"

import PhotoGrid from "./PhotoGrid"

export const components: MDXComponents = {
a: ({ href, children }) => <Link href={href as string}>{children}</Link>,
PhotoGrid,
}

export function MDXContent({ code }: { code: string }) {
Expand Down
24 changes: 24 additions & 0 deletions src/components/PhotoGrid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from "react"

interface PhotoGridProps {
urls: string[]
}

const PhotoGrid: React.FC<PhotoGridProps> = ({ urls }) => {
return (
<div className="columns-2 md:columns-3 gap-2 not-prose">
{urls.map((url, index) => (
<a href={url} key={index}>
<img
src={url + "?w=500"}
alt={`Grid item ${index + 1}`}
width={500}
className="w-full my-2"
/>
</a>
))}
</div>
)
}

export default PhotoGrid

0 comments on commit 6a0d991

Please sign in to comment.