"use client"; import React from "react"; import { getAssetPath, ASSETS } from "../../lib/assetUtils"; const ContentContainer = ({ post, width = "200px", size = "responsive" }) => { // Get the corresponding icon based on the same logic as background images const getIconImage = (slug) => { const icons = [ getAssetPath(ASSETS.ICON_1), getAssetPath(ASSETS.ICON_2), getAssetPath(ASSETS.ICON_3), ]; if (!slug) return icons[0]; // Use the same cycling logic as background images to ensure matching const slugOrder = [ "building-community-trust", "operational-security-mutual-aid", "making-decisions-without-hierarchy", "resolving-active-conflicts", ]; const index = slugOrder.indexOf(slug); const finalIndex = index >= 0 ? index % icons.length : 0; return icons[finalIndex]; }; const iconImage = getIconImage(post.slug); // Choose styling based on size prop const containerClasses = size === "xs" ? "relative z-20 h-full flex flex-col gap-[var(--measures-spacing-012)]" : "relative z-20 h-full flex flex-col gap-[var(--measures-spacing-012)] sm:gap-[var(--measures-spacing-016)] md:gap-[18px] lg:gap-[var(--measures-spacing-024)]"; return (
{/* Content Container - gap between icon and text */}
{/* Icon */}
{/* eslint-disable-next-line @next/next/no-img-element */} {`Icon
{/* Text Container */}
{/* Title */}

{post.frontmatter.title}

{/* Description */}

{post.frontmatter.description}

{/* Metadata Container - horizontal with 8px gap */}
{/* Author Name */} {post.frontmatter.author} {/* Date */} {new Date(post.frontmatter.date).toLocaleDateString("en-US", { year: "numeric", month: "long", })}
); }; export default ContentContainer;