Files

127 lines
6.2 KiB
React
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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.
// components/BlogSection.jsx
"use client";
import { Calendar, Clock, ArrowLeft } from 'lucide-react';
import Link from 'next/link';
function BlogSection() {
const blogs = [
{
title: "تمرین تنفسی برای کاهش استرس",
subtitle: "تکنیک‌های ساده تنفسی برای کاهش فوری استرس و اضطراب",
link: "https://aramejan.com/blog/tmryn-tnfsy-bry-khhsh-strs.html",
readTime: "۵ دقیقه",
date: "۱۴۰۴/۱/۱۵",
category: "سلامت روان",
gradient: "from-primary-500/10 to-primary-600/10",
border: "border-primary-500/20"
},
{
title: "مدیتیشن چیست و چگونه شروع کنیم؟",
subtitle: "راهنمای کامل برای شناخت مدیتیشن و شروع این سفر زیبا",
link: "https://aramejan.com/blog/mdytyshn-chyh.html",
readTime: "۷ دقیقه",
date: "۱۴۰۴/۱۰/۱۰",
category: "آموزش",
gradient: "from-primary-500/10 to-primary-600/10",
border: "border-primary-500/20"
},
{
title: "مدیتیشن چیست و چگونه زندگی‌ات را متحول می‌کند؟",
subtitle: "راهنمای کامل برای شناخت انواع مدیتیشن",
link: "https://aramejan.com/blog/khls-shdn-z-strs-b-arm-lnd.html",
readTime: "۸ دقیقه",
date: "۱۴۰۴/۱۰/۰۵",
category: "تحول شخصی",
gradient: "from-primary-500/10 to-primary-600/10",
border: "border-primary-500/20"
}
];
return (
<section className="my-24">
{/* Header */}
<div className="text-center mb-16">
<div className="inline-flex items-center gap-2 bg-primary-500/10 text-primary-600 px-4 py-2 rounded-full text-sm font-medium mb-4">
<span className="text-lg">📝</span>
مقالات آموزشی
</div>
<h2 className="text-4xl md:text-5xl font-bold text-gray-900 mb-4">
آخرین <span className="text-primary-500">مقالات</span> آرامش
</h2>
<p className="text-xl text-gray-600 max-w-2xl mx-auto">
یادگیری عمیقتر درباره تکنیکهای آرامش، مدیتیشن و سلامت روان
</p>
</div>
{/* Blog Cards Grid */}
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8 mb-12">
{blogs.map((blog, index) => (
<article
key={index}
className={`bg-gradient-to-br ${blog.gradient} border ${blog.border} rounded-3xl overflow-hidden group hover:shadow-2xl transition-all duration-500 hover:-translate-y-2 animate-fadeInUp`}
style={{ animationDelay: `${index * 100}ms` }}
>
{/* Card Header */}
<div className="p-8">
{/* Category Badge */}
<div className="inline-block bg-primary-500/20 text-primary-600 px-3 py-1 rounded-full text-xs font-medium mb-4">
{blog.category}
</div>
{/* Title */}
<h3 className="text-xl font-bold text-gray-900 mb-3 group-hover:text-primary-600 transition-colors duration-300 line-clamp-2">
{blog.title}
</h3>
{/* Subtitle */}
<p className="text-gray-600 leading-relaxed mb-6 line-clamp-2">
{blog.subtitle}
</p>
{/* Meta Info */}
<div className="flex items-center justify-between text-sm text-gray-500">
<div className="flex items-center gap-4">
<div className="flex items-center gap-1">
<Calendar className="w-4 h-4" />
<span>{blog.date}</span>
</div>
<div className="flex items-center gap-1">
<Clock className="w-4 h-4" />
<span>{blog.readTime} مطالعه</span>
</div>
</div>
</div>
</div>
{/* Read More Button */}
<div className="border-t border-primary-500/10 p-6">
<a
href={blog.link}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-2 text-primary-600 hover:text-primary-700 font-medium group/link transition-colors duration-300"
>
<span>مطالعه مقاله</span>
<ArrowLeft className="w-4 h-4 group-hover/link:-translate-x-1 transition-transform duration-300" />
</a>
</div>
</article>
))}
</div>
{/* View All Button */}
<div className="text-center">
<Link
href="https://aramejan.com/blog/"
className="inline-flex items-center gap-2 bg-gradient-to-r from-primary-500 to-primary-600 text-white font-medium py-3 px-8 rounded-2xl hover:shadow-lg transition-all duration-300 transform hover:scale-105 group"
>
<span>مشاهده همه مقالات</span>
<ArrowLeft className="w-5 h-5 group-hover:-translate-x-1 transition-transform duration-300" />
</Link>
</div>
</section>
);
}
export default BlogSection;