Update blog images, remove deleted posts, and configure rotating featured post
This commit is contained in:
@@ -288,12 +288,12 @@ export function KalkulatorClient({ products }: Props) {
|
||||
<p className="font-bold text-primary">Klimatyzacja</p>
|
||||
<p className="text-xs text-text-muted mt-1">Chłodzenie latem, opcjonalne grzanie zimą</p>
|
||||
</button>
|
||||
{/* <button onClick={() => setDeviceType('pompa')}
|
||||
<button onClick={() => setDeviceType('pompa')}
|
||||
className={`p-5 rounded-xl border-2 text-left transition-all ${deviceType === 'pompa' ? 'border-accent bg-accent/5' : 'border-border hover:border-accent'}`}>
|
||||
<span className="text-3xl mb-2 block">🔥</span>
|
||||
<p className="font-bold text-primary">Pompa ciepła</p>
|
||||
<p className="text-xs text-text-muted mt-1">Głównie ogrzewanie domu z niskim kosztem eksploatacji</p>
|
||||
</button> */}
|
||||
</button>
|
||||
</div>
|
||||
{deviceType === 'pompa' && !pumpFormSent && (
|
||||
<div className="mt-4 p-5 bg-white border border-border rounded-2xl flex flex-col gap-4">
|
||||
|
||||
@@ -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) => (
|
||||
|
||||
Reference in New Issue
Block a user