Files
supabase/apps/www/components/Blog/BlogGridItem.tsx
T
Jonathan Summers-MuirandClaude Sonnet 4.6 ae624aa0f2 www: redesign customer stories, blog layout, and footer (#43954)
- CustomerStoriesSection: animated accordion with brand colors
(black/dark panels for Resend/Hyper/Mobbin, muted rust for Firecrawl,
muted amber for E2B), raw brand-color icons for Firecrawl/E2B, author
avatar ring, consistent padding
- AI builder section: photo background cards for Lovable/Bolt,
full-width logo strip (Lovable, Figma, v0, Bolt, Tempo, Gumloop, Pika,
Udio)
- Blog: remove borders/grid lines, narrower featured post, smaller title
text, image border, restored list padding
- Footer: replace large SOC2/HIPAA seal section with compact footnote
next to copyright
- Fix icon SVG viewBoxes (Resend, E2B) and add brand fill color to E2B
icon

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES/NO

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 17:35:58 -04:00

77 lines
2.1 KiB
TypeScript

import dayjs from 'dayjs'
import Image from 'next/image'
import Link from 'next/link'
import authors from '@/lib/authors.json'
import type Author from '@/types/author'
import type PostTypes from '@/types/post'
import AuthorAvatars from './AuthorAvatars'
interface Props {
post: PostTypes
}
const BlogGridItem = ({ post }: Props) => {
const authorArray: string[] | undefined = post.author ? post.author.split(',') : []
const author = []
if (authorArray) {
for (let i = 0; i < authorArray.length; i++) {
author.push(
authors.find((authors: Author) => {
return authors.author_id === authorArray[i]
})
)
}
}
const resolveImagePath = (img: string | undefined): string | null => {
if (!img) return null
return img.startsWith('/') || img.startsWith('http') ? img : `/images/blog/${img}`
}
const imageUrl =
resolveImagePath(post.imgThumb) ||
resolveImagePath(post.imgSocial) ||
'/images/blog/blog-placeholder.png'
return (
<Link
href={post.path}
prefetch={false}
className="group flex flex-col h-full p-6"
>
<div className="relative w-full aspect-[16/10] overflow-hidden rounded-md border border-foreground/10">
<Image
fill
sizes="100%"
quality={100}
src={imageUrl}
className="object-cover"
alt={`${post.title} thumbnail`}
/>
</div>
<div className="flex flex-col gap-1 pt-4">
<h3 className="text-foreground text-lg group-hover:underline">{post.title}</h3>
<p className="text-foreground-lighter text-sm mt-1 line-clamp-2">{post.description}</p>
{post.date && (
<div className="text-foreground-lighter flex items-center space-x-1.5 text-[11px] mt-3">
<p>{dayjs(post.date).format('D MMM YYYY')}</p>
{post.readingTime && (
<>
<p>•</p>
<p>{post.readingTime}</p>
</>
)}
</div>
)}
<div className="mt-1.5">
<AuthorAvatars authors={author} />
</div>
</div>
</Link>
)
}
export default BlogGridItem