Update blog images, remove deleted posts, and configure rotating featured post

This commit is contained in:
MichalC
2026-07-19 19:40:14 +02:00
parent d545e7fdcc
commit 5c56c6b05a
78 changed files with 238 additions and 177 deletions
+11 -1
View File
@@ -6,9 +6,11 @@ import Image from 'next/image';
import { Post } from '@/types/types';
import { cn } from '@/lib/utils';
import { Calendar, ArrowRight, ChevronLeft, ChevronRight } from 'lucide-react';
import { FeaturedPost } from '@/components/sections/FeaturedPost';
interface PostsGridProps {
posts: Post[];
featuredPost?: Post;
}
const POSTS_PER_PAGE = 6;
@@ -20,7 +22,7 @@ const categories = [
{ id: 'porady', label: 'Porady' },
];
export function PostsGrid({ posts }: PostsGridProps) {
export function PostsGrid({ posts, featuredPost }: PostsGridProps) {
const [activeCategory, setActiveCategory] = useState('wszystkie');
const [currentPage, setCurrentPage] = useState(1);
@@ -45,6 +47,14 @@ export function PostsGrid({ posts }: PostsGridProps) {
return (
<div className="py-12">
{/* Artykuł Wyróżniony (tylko na 1 stronie) */}
{featuredPost && currentPage === 1 && (
<div className="mb-16">
<h2 className="text-2xl font-bold text-primary font-heading mb-8">Artykuł wyróżniony</h2>
<FeaturedPost post={featuredPost} />
</div>
)}
{/* Filtry */}
<div className="flex flex-wrap items-center gap-3 mb-12">
{categories.map((category) => (