Files
dalcode-website/components/home/BlogPreviewSection.tsx
T
2026-04-29 00:29:14 +08:00

89 lines
4.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Image from "next/image"
import Link from "next/link"
import { BLOG_POSTS } from "@/lib/blog-data"
export default function BlogPreviewSection() {
const featured = BLOG_POSTS.slice(0, 2)
return (
<section className="section overflow-hidden">
<div className="w-layout-blockcontainer container-default w-container">
<div data-w-id="b227046f-7b8d-96be-04ed-4ad8f3500f81" style={{"opacity": "0", "filter": "blur(8px)"}} className="title-left-content-right">
<div className="inner-container _480px">
<div className="subtitle">Insights</div>
<div className="mg-top-4x-extra-small">
<h2></h2>
</div>
<div className="mg-top-5x-extra-small">
<p> DAL Code Agent Skills </p>
</div>
</div>
<Link id="w-node-_99805214-dd54-e7f3-2549-05c0df1040fb-df1040fb" href="/blog" className="primary-button w-inline-block">
<div className="button-content">
<div></div>
<div className="button-icon-wrapper primary">
<svg xmlns="http://www.w3.org/2000/svg" width="100%" viewBox="0 0 17 17" fill="none" className="squared-icon">
<path d="M6.25391 3.45312L10.7458 8.01563L6.25391 12.5781" stroke="currentColor" strokeWidth="1.5" strokeLinecap="square">
</path>
</svg>
<div className="button-icon-bg">
</div>
<div className="button-icon-bg-inside">
</div>
</div>
</div>
</Link>
</div>
<div className="mg-top-regular">
<div data-w-id="f1b0018b-51d6-aaa6-2d43-c2ee184868a3" style={{"opacity": "0", "filter": "blur(8px)"}} className="w-dyn-list">
<div role="list" className="w-dyn-items">
{featured.map((post) => (
<div key={post.slug} role="listitem" className="flex-item w-dyn-item">
<div className="blog-featured-v1-wrapper">
<div className="border-wrapper">
<Link href={`/blog-posts/${post.slug}`} className="blog-card-v1 w-inline-block">
<div className="blog-v1-image-wrapper">
<Image alt={post.imageAlt} src={post.image} sizes="(max-width: 767px) 100vw, (max-width: 991px) 95vw, 939.96533203125px" className="image" fill style={{ objectFit: "cover" }} />
</div>
<div className="blog-v1-content">
<div className="inner-container _420px">
<h3 className="display-6">{post.title}</h3>
<div className="mg-top-4x-extra-small">
<p className="text-paragraph">{post.excerpt}</p>
</div>
<div className="mg-top-3x-extra-small">
<div className="blog-details-wrapper">
<div className="item-details">{post.date}</div>
<div className="item-details-divider">&middot;</div>
<div className="item-details">{post.category}</div>
</div>
</div>
</div>
<div className="bottom-right-button-wrapper">
<div className="icon-button">
<svg xmlns="http://www.w3.org/2000/svg" width="100%" viewBox="0 0 17 17" fill="none" className="squared-icon">
<path d="M6.25391 3.45312L10.7458 8.01563L6.25391 12.5781" stroke="currentColor" strokeWidth="1.5" strokeLinecap="square" />
</svg>
<div className="icon-button-bg" />
</div>
</div>
</div>
</Link>
</div>
<div data-wf--corner-gradient-outline--variant="base" className="corner-gradient-wrapper">
<div className="corner-gradient-horizontal top-left" />
<div className="corner-gradient-horizontal bottom-left" />
<div className="corner-gradient-horizontal top-right" />
<div className="corner-gradient-horizontal bottom-right" />
</div>
</div>
</div>
))}
</div>
</div>
</div>
</div>
</section>
)
}