Template
Redesign cart and collections, fix product pagination
- Cart drawer: single-column layout matching the site — no bag icon, no dividers, square images, tighter type, discount code form, estimated total, and a Go to Checkout button - Cart: per-line loading state so one row's update no longer disables every other row or the checkout button - Discounts: cartDiscountCodesUpdate mutation plus discountCodes on the cart fragment, wired to an applyDiscountCode store action - Products: fix "load more" returning the same first page — the query now takes an `after` cursor and getProductsPage exposes pageInfo - Collections: cards match the product cards (no border, radius, blurb, or CTA row) at 4-up on desktop and 2-up on mobile; section headers match the products section - Shop Pay: cart permalink with payment=shop_pay instead of the hosted shop-js element - Buttons converted to the shadcn Button component throughout - PDP: swipeable image carousel with dots on mobile, sticky info column, colour swatches never fall back to variant photos - Rename the store from Stride to Shop; larger header wordmark Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jWbNNJLksC1QG8z8845FX
This commit is contained in:
co-authored by
Claude Opus 5
parent
69f7435d6e
commit
e04f1e0405
@@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import Link from 'next/link';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
|
||||
interface CollectionImage {
|
||||
url: string;
|
||||
@@ -25,44 +24,26 @@ const CollectionCard: React.FC<CollectionCardProps> = ({ collection }) => {
|
||||
href={`/collections/${collection.handle}`}
|
||||
className="group block h-full"
|
||||
>
|
||||
<div className="card-modern bg-card rounded-3xl overflow-hidden h-full flex flex-col shadow-sm">
|
||||
{/* Collection Image */}
|
||||
<div className="aspect-[16/10] relative overflow-hidden bg-zinc-100">
|
||||
{collection.image ? (
|
||||
<img
|
||||
src={collection.image.url}
|
||||
alt={collection.image.altText || collection.title}
|
||||
className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
|
||||
/>
|
||||
) : (
|
||||
<div className="absolute inset-0 flex flex-col items-center justify-center text-zinc-300">
|
||||
<i className="ri-folder-line text-8xl mb-4"></i>
|
||||
<span className="text-xs tracking-widest font-mono">
|
||||
COLLECTION
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="absolute inset-0 bg-gradient-to-b from-black/10 via-transparent to-black/30"></div>
|
||||
</div>
|
||||
|
||||
{/* Collection Info */}
|
||||
<div className="p-8 flex flex-col flex-1">
|
||||
<h3 className="font-heading text-3xl font-semibold tracking-tighter text-foreground mb-4 group-hover:text-primary transition-colors">
|
||||
{collection.title}
|
||||
</h3>
|
||||
|
||||
{collection.description && (
|
||||
<p className="text-muted-foreground text-[15px] leading-relaxed line-clamp-3 flex-1">
|
||||
{collection.description}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<div className="mt-8 flex items-center text-sm font-semibold text-primary group-hover:gap-x-2 transition-all">
|
||||
EXPLORE COLLECTION
|
||||
<i className="ri-arrow-right-line ml-2 text-base transition-transform group-hover:translate-x-0.5"></i>
|
||||
{/* Collection Image */}
|
||||
<div className="relative aspect-square overflow-hidden bg-white">
|
||||
{collection.image ? (
|
||||
<img
|
||||
src={collection.image.url}
|
||||
alt={collection.image.altText || collection.title}
|
||||
className="w-full h-full object-cover transition-transform duration-500 group-hover:scale-[1.04]"
|
||||
/>
|
||||
) : (
|
||||
<div className="absolute inset-0 flex items-center justify-center text-zinc-300">
|
||||
<i className="ri-folder-line text-8xl"></i>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Collection Info */}
|
||||
<div className="flex flex-col flex-1 py-2.5">
|
||||
<h3 className="text-sm font-medium text-foreground line-clamp-1">
|
||||
{collection.title}
|
||||
</h3>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user