terry-staging #14
@@ -23,7 +23,15 @@ export function pickBubble(post: Post): BubbleComponent {
|
||||
return FileDocBubble;
|
||||
}
|
||||
|
||||
export function MessageBubble({ post }: { post: Post }) {
|
||||
export function MessageBubble({
|
||||
post,
|
||||
fluid = false,
|
||||
}: {
|
||||
post: Post;
|
||||
/** When true, fill the parent container instead of applying the standalone
|
||||
* feed max-widths. Used by the desktop 3-column masonry on the home page. */
|
||||
fluid?: boolean;
|
||||
}) {
|
||||
const Bubble = pickBubble(post);
|
||||
const isVisual =
|
||||
Bubble === AlbumBubble ||
|
||||
@@ -34,7 +42,11 @@ export function MessageBubble({ post }: { post: Post }) {
|
||||
return (
|
||||
<div
|
||||
id={`post-${post.id}`}
|
||||
className="mx-auto w-full max-w-[358px] scroll-mt-[82px] md:max-w-[680px] md:scroll-mt-[98px] lg:max-w-[900px] xl:max-w-[1120px]"
|
||||
className={
|
||||
fluid
|
||||
? "w-full scroll-mt-[82px] md:scroll-mt-[98px]"
|
||||
: "mx-auto w-full max-w-[358px] scroll-mt-[82px] md:max-w-[680px] md:scroll-mt-[98px] lg:max-w-[900px] xl:max-w-[1120px]"
|
||||
}
|
||||
>
|
||||
<article
|
||||
className={`relative w-full overflow-hidden rounded-2xl bg-[#272632] text-left shadow-sm ${
|
||||
|
||||
@@ -464,13 +464,25 @@ export function Home() {
|
||||
viewAllLabel={t("viewAll")}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-2.5 flex flex-col gap-3 md:mt-7">
|
||||
<div className="mt-2.5 flex flex-col gap-3 md:hidden">
|
||||
{latestPosts.slice(0, 5).map((post, index) => (
|
||||
<Reveal key={post.id} delay={Math.min(index, 8) * 0.05}>
|
||||
<MessageBubble post={post} />
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
{/* Desktop: 3-column masonry that matches the Figma layout. */}
|
||||
<div className="mt-7 hidden gap-4 md:block md:columns-3">
|
||||
{latestPosts.map((post, index) => (
|
||||
<Reveal
|
||||
key={post.id}
|
||||
delay={Math.min(index, 8) * 0.05}
|
||||
className="mb-4 break-inside-avoid"
|
||||
>
|
||||
<MessageBubble post={post} fluid />
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</Reveal>
|
||||
|
||||
Reference in New Issue
Block a user