astro-component-kit 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -36
- package/package.json +17 -4
- package/src/components/index.ts +18 -202
- package/src/components/lib/Galaxy3D.astro +249 -137
- package/src/components/lib/app/AppSidebar.astro +249 -0
- package/src/components/lib/app/AppTopbar.astro +284 -0
- package/src/components/lib/app/ArrivalsBoard.astro +176 -0
- package/src/components/lib/app/AuthCard.astro +213 -0
- package/src/components/lib/app/DataTable.astro +346 -0
- package/src/components/lib/app/GuestProfileCard.astro +133 -0
- package/src/components/lib/app/HousekeepingBoard.astro +189 -0
- package/src/components/lib/app/PageHeader.astro +157 -0
- package/src/components/lib/app/PlanUsageCard.astro +112 -0
- package/src/components/lib/app/RoomRack.astro +207 -0
- package/src/components/lib/app/SettingsSection.astro +96 -0
- package/src/components/lib/app/SwitchRow.astro +71 -0
- package/src/components/lib/app/TeamMembers.astro +190 -0
- package/src/components/lib/app/app-icons.ts +52 -0
- package/src/components/lib/app/index.ts +19 -0
- package/src/components/lib/buttons/NeonBorderButton.astro +162 -0
- package/src/components/lib/buttons/RippleButton.astro +199 -0
- package/src/components/lib/buttons/SlideRevealButton.astro +159 -0
- package/src/components/lib/buttons/index.ts +4 -0
- package/src/components/lib/cards/GithubRepoCard.astro +176 -0
- package/src/components/lib/cards/PricingCompareMiniCard.astro +196 -0
- package/src/components/lib/cards/StatsTrendCard.astro +149 -0
- package/src/components/lib/cards/index.ts +3 -0
- package/src/components/lib/charts/ActivityRings.astro +105 -0
- package/src/components/lib/charts/AreaChart.astro +4 -4
- package/src/components/lib/charts/BarChart.astro +3 -3
- package/src/components/lib/charts/BoxPlotChart.astro +109 -0
- package/src/components/lib/charts/BubbleChart.astro +101 -0
- package/src/components/lib/charts/BulletChart.astro +160 -0
- package/src/components/lib/charts/BumpChart.astro +92 -0
- package/src/components/lib/charts/CandlestickChart.astro +105 -0
- package/src/components/lib/charts/ChartFrame.astro +373 -0
- package/src/components/lib/charts/DivergingBarChart.astro +98 -0
- package/src/components/lib/charts/DonutChart.astro +2 -2
- package/src/components/lib/charts/DumbbellChart.astro +92 -0
- package/src/components/lib/charts/ForecastLineChart.astro +125 -0
- package/src/components/lib/charts/FunnelChart.astro +122 -0
- package/src/components/lib/charts/GaugeChart.astro +111 -0
- package/src/components/lib/charts/GoalProgressChart.astro +97 -0
- package/src/components/lib/charts/GroupedBarChart.astro +125 -0
- package/src/components/lib/charts/HeatmapChart.astro +131 -0
- package/src/components/lib/charts/HistogramChart.astro +111 -0
- package/src/components/lib/charts/HorizontalBarChart.astro +155 -0
- package/src/components/lib/charts/KpiStatTile.astro +116 -0
- package/src/components/lib/charts/KpiTrendGrid.astro +60 -0
- package/src/components/lib/charts/LineChart.astro +160 -0
- package/src/components/lib/charts/LinearProgressGauge.astro +136 -0
- package/src/components/lib/charts/LollipopChart.astro +100 -0
- package/src/components/lib/charts/MeterGauge.astro +122 -0
- package/src/components/lib/charts/MetricDeltaTable.astro +125 -0
- package/src/components/lib/charts/PieChart.astro +135 -0
- package/src/components/lib/charts/PolarAreaChart.astro +85 -0
- package/src/components/lib/charts/PopulationPyramid.astro +122 -0
- package/src/components/lib/charts/PunchCardChart.astro +89 -0
- package/src/components/lib/charts/RadarChart.astro +94 -0
- package/src/components/lib/charts/RadarMetricChart.astro +168 -0
- package/src/components/lib/charts/RadialBarChart.astro +124 -0
- package/src/components/lib/charts/RangeAreaChart.astro +113 -0
- package/src/components/lib/charts/RetentionCohortTable.astro +126 -0
- package/src/components/lib/charts/SankeyChart.astro +128 -0
- package/src/components/lib/charts/ScatterPlot.astro +139 -0
- package/src/components/lib/charts/SegmentedBarChart.astro +119 -0
- package/src/components/lib/charts/SlopeChart.astro +105 -0
- package/src/components/lib/charts/SparklineChart.astro +87 -0
- package/src/components/lib/charts/StackedAreaChart.astro +130 -0
- package/src/components/lib/charts/StackedBarChart.astro +136 -0
- package/src/components/lib/charts/SunburstChart.astro +103 -0
- package/src/components/lib/charts/TreemapChart.astro +94 -0
- package/src/components/lib/charts/WaffleChart.astro +121 -0
- package/src/components/lib/charts/WaterfallChart.astro +118 -0
- package/src/components/lib/charts/chart-tooltip.ts +75 -0
- package/src/components/lib/charts/chart-utils.ts +271 -0
- package/src/components/lib/charts/index.ts +46 -0
- package/src/components/lib/data/ActivityHeatmapGrid.astro +157 -0
- package/src/components/lib/data/MetricComparisonRow.astro +109 -0
- package/src/components/lib/data/StatusTimelineFeed.astro +168 -0
- package/src/components/lib/data/index.ts +3 -0
- package/src/components/lib/ecommerce/CartDrawer.astro +483 -0
- package/src/components/lib/ecommerce/CartPageList.astro +290 -0
- package/src/components/lib/ecommerce/CartToast.astro +276 -0
- package/src/components/lib/ecommerce/CategoryTiles.astro +143 -0
- package/src/components/lib/ecommerce/CheckoutForm.astro +423 -0
- package/src/components/lib/ecommerce/CountdownBanner.astro +230 -0
- package/src/components/lib/ecommerce/FilterBar.astro +278 -0
- package/src/components/lib/ecommerce/FilterSidebar.astro +405 -0
- package/src/components/lib/ecommerce/LiveActivityToast.astro +213 -0
- package/src/components/lib/ecommerce/OrderSummary.astro +295 -0
- package/src/components/lib/ecommerce/ProductBuyBox.astro +247 -0
- package/src/components/lib/ecommerce/ProductCardMinimal.astro +229 -0
- package/src/components/lib/ecommerce/ProductGallery.astro +145 -0
- package/src/components/lib/ecommerce/ProductGrid.astro +118 -0
- package/src/components/lib/ecommerce/ProductMedia.astro +113 -0
- package/src/components/lib/ecommerce/ProductRating.astro +78 -0
- package/src/components/lib/ecommerce/ProductToolbar.astro +93 -0
- package/src/components/lib/ecommerce/PromoBar.astro +145 -0
- package/src/components/lib/ecommerce/StockIndicator.astro +127 -0
- package/src/components/lib/ecommerce/StoreHeader.astro +446 -0
- package/src/components/lib/ecommerce/StoreHero.astro +260 -0
- package/src/components/lib/ecommerce/StoreProductCard.astro +307 -0
- package/src/components/lib/ecommerce/TrustBadges.astro +101 -0
- package/src/components/lib/ecommerce/VariantPicker.astro +145 -0
- package/src/components/lib/ecommerce/cart-store.ts +151 -0
- package/src/components/lib/ecommerce/catalog-filter.ts +62 -0
- package/src/components/lib/ecommerce/index.ts +34 -0
- package/src/components/lib/ecommerce/product-icons.ts +28 -0
- package/src/components/lib/ecommerce/types.ts +70 -0
- package/src/components/lib/feedback/ProgressRingCounter.astro +118 -0
- package/src/components/lib/feedback/ToastNotificationGroup.astro +173 -0
- package/src/components/lib/feedback/index.ts +2 -0
- package/src/components/lib/forms/AnimatedInput.astro +4 -2
- package/src/components/lib/forms/CustomRadioGroup.astro +3 -1
- package/src/components/lib/forms/GlassInlineToggleGroup.astro +161 -0
- package/src/components/lib/forms/PasswordStrengthInput.astro +242 -0
- package/src/components/lib/forms/PhoneCountryInput.astro +145 -0
- package/src/components/lib/forms/TagsAutocompleteInput.astro +249 -0
- package/src/components/lib/forms/index.ts +5 -0
- package/src/components/lib/index.ts +2 -0
- package/src/components/lib/layout/BentoGrid3.astro +6 -4
- package/src/components/lib/layout/CenterFixedBox.astro +2 -2
- package/src/components/lib/layout/CenteredContainer.astro +4 -2
- package/src/components/lib/layout/ClusterHorizontal.astro +2 -2
- package/src/components/lib/layout/DiagonalSectionDivider.astro +69 -0
- package/src/components/lib/layout/FeatureHero.astro +4 -2
- package/src/components/lib/layout/FooterCenteredMinimal.astro +4 -2
- package/src/components/lib/layout/FullBleedSection.astro +2 -2
- package/src/components/lib/layout/GalleryGrid4.astro +2 -2
- package/src/components/lib/layout/HolyGrailGrid.astro +127 -0
- package/src/components/lib/layout/LandingSectionSplit.astro +5 -3
- package/src/components/lib/layout/MasonryGrid.astro +2 -2
- package/src/components/lib/layout/MinimalFooterGrid.astro +1 -1
- package/src/components/lib/layout/ScrollSnapSection.astro +1 -1
- package/src/components/lib/layout/SidebarLayoutWrapper.astro +4 -2
- package/src/components/lib/layout/SplitScreenLayout.astro +3 -3
- package/src/components/lib/layout/StepLayoutVertical.astro +1 -1
- package/src/components/lib/layout/StickySidebarWrapper.astro +4 -2
- package/src/components/lib/layout/index.ts +3 -1
- package/src/components/lib/navigation/QuickJumpDock.astro +125 -0
- package/src/components/lib/navigation/StepBreadcrumbBar.astro +151 -0
- package/src/components/lib/navigation/SubNavbarPills.astro +102 -0
- package/src/components/lib/navigation/index.ts +3 -0
- package/src/components/lib/overlays/CookiePreferencesDrawer.astro +226 -0
- package/src/components/lib/overlays/FloatingFeedbackWidget.astro +203 -0
- package/src/components/lib/overlays/ImageCompareSlider.astro +172 -0
- package/src/components/lib/overlays/index.ts +3 -0
- package/src/components/lib/sections/AgencyContactBrief.astro +194 -0
- package/src/components/lib/sections/AgencyFooterCta.astro +94 -0
- package/src/components/lib/sections/AgencyHeader.astro +161 -0
- package/src/components/lib/sections/AgencyHeroKinetic.astro +172 -0
- package/src/components/lib/sections/AgencyServicesList.astro +113 -0
- package/src/components/lib/sections/AgencyTeamGrid.astro +111 -0
- package/src/components/lib/sections/AgencyWorkGrid.astro +147 -0
- package/src/components/lib/sections/BlogGridSection.astro +133 -0
- package/src/components/lib/sections/ButtonsShowcase.astro +20 -18
- package/src/components/lib/sections/CardsShowcase.astro +28 -26
- package/src/components/lib/sections/CareersOpenings.astro +141 -0
- package/src/components/lib/sections/ChangelogSection.astro +151 -0
- package/src/components/lib/sections/ContactGlassForm.astro +10 -8
- package/src/components/lib/sections/ContactSplitMap.astro +141 -0
- package/src/components/lib/sections/CtaAppDownload.astro +13 -11
- package/src/components/lib/sections/CtaGlowBanner.astro +12 -10
- package/src/components/lib/sections/CtaNewsletterSection.astro +165 -0
- package/src/components/lib/sections/CtaSplitImage.astro +149 -0
- package/src/components/lib/sections/DataShowcase.astro +23 -21
- package/src/components/lib/sections/FaqAccordionSection.astro +8 -8
- package/src/components/lib/sections/FaqTwoColumn.astro +121 -0
- package/src/components/lib/sections/FeatureAlternatingRows.astro +192 -0
- package/src/components/lib/sections/FeatureBentoGrid.astro +13 -11
- package/src/components/lib/sections/FeatureIconGrid.astro +155 -0
- package/src/components/lib/sections/FeatureTabsShowcase.astro +182 -0
- package/src/components/lib/sections/FeatureTimelineFlow.astro +8 -6
- package/src/components/lib/sections/FeedbackShowcase.astro +15 -13
- package/src/components/lib/sections/FooterMegaSection.astro +157 -0
- package/src/components/lib/sections/FormsShowcase.astro +22 -20
- package/src/components/lib/sections/HeroDashboardPreview.astro +182 -0
- package/src/components/lib/sections/HeroGlass.astro +22 -20
- package/src/components/lib/sections/HeroGradient.astro +15 -13
- package/src/components/lib/sections/HeroMinimalCentered.astro +175 -0
- package/src/components/lib/sections/HeroShowcaseSplit.astro +306 -0
- package/src/components/lib/sections/HeroSplit.astro +13 -11
- package/src/components/lib/sections/HeroTerminal.astro +253 -0
- package/src/components/lib/sections/HeroWaitlist.astro +231 -0
- package/src/components/lib/sections/HowItWorksSteps.astro +180 -0
- package/src/components/lib/sections/IntegrationsGrid.astro +167 -0
- package/src/components/lib/sections/LayoutShowcase.astro +21 -19
- package/src/components/lib/sections/LogoCloudSection.astro +96 -0
- package/src/components/lib/sections/LogoWallGrid.astro +93 -0
- package/src/components/lib/sections/NavigationShowcase.astro +15 -13
- package/src/components/lib/sections/OverlaysShowcase.astro +21 -19
- package/src/components/lib/sections/PricingComparisonMatrix.astro +15 -13
- package/src/components/lib/sections/PricingSinglePlan.astro +159 -0
- package/src/components/lib/sections/PricingTierCards.astro +11 -9
- package/src/components/lib/sections/PricingToggleCards.astro +171 -0
- package/src/components/lib/sections/ShopCategoryHero.astro +103 -0
- package/src/components/lib/sections/ShopCollectionMosaic.astro +131 -0
- package/src/components/lib/sections/ShopFooterWordmark.astro +100 -0
- package/src/components/lib/sections/ShopHeaderEditorial.astro +396 -0
- package/src/components/lib/sections/ShopHeroEditorial.astro +151 -0
- package/src/components/lib/sections/ShopLookbook.astro +250 -0
- package/src/components/lib/sections/ShopNewsletterEditorial.astro +128 -0
- package/src/components/lib/sections/ShopProductRail.astro +150 -0
- package/src/components/lib/sections/ShopReviewsEditorial.astro +133 -0
- package/src/components/lib/sections/ShopValuesMarquee.astro +91 -0
- package/src/components/lib/sections/StatsCounterBand.astro +124 -0
- package/src/components/lib/sections/StatsDashboardSection.astro +85 -0
- package/src/components/lib/sections/StatsMetricShowcase.astro +9 -7
- package/src/components/lib/sections/TeamGridSection.astro +12 -10
- package/src/components/lib/sections/TestimonialCarousel.astro +167 -0
- package/src/components/lib/sections/TestimonialFeatured.astro +122 -0
- package/src/components/lib/sections/TestimonialGridSection.astro +188 -0
- package/src/components/lib/sections/TestimonialWallGlass.astro +11 -9
- package/src/components/lib/sections/TypographyShowcase.astro +10 -8
- package/src/components/lib/sections/index.ts +39 -0
- package/src/components/lib/templates/ecommerce/StoreCategoryPage.astro +160 -0
- package/src/components/lib/templates/ecommerce/StoreCheckoutPage.astro +98 -0
- package/src/components/lib/templates/ecommerce/StoreHomePage.astro +191 -0
- package/src/components/lib/templates/ecommerce/StoreLayout.astro +169 -0
- package/src/components/lib/templates/ecommerce/StoreProductPage.astro +165 -0
- package/src/components/lib/templates/ecommerce/data.ts +187 -0
- package/src/components/lib/templates/ecommerce/index.ts +14 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialBagPage.astro +52 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialCheckoutPage.astro +123 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialHomePage.astro +102 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialLayout.astro +216 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialProductPage.astro +205 -0
- package/src/components/lib/templates/ecommerce-editorial/EditorialShopPage.astro +112 -0
- package/src/components/lib/templates/ecommerce-editorial/data.ts +125 -0
- package/src/components/lib/templates/ecommerce-editorial/index.ts +16 -0
- package/src/components/lib/templates/saas-hotel/AppLayout.astro +83 -0
- package/src/components/lib/templates/saas-hotel/DashboardPage.astro +66 -0
- package/src/components/lib/templates/saas-hotel/GuestsPage.astro +65 -0
- package/src/components/lib/templates/saas-hotel/LandingPage.astro +213 -0
- package/src/components/lib/templates/saas-hotel/ReportsPage.astro +63 -0
- package/src/components/lib/templates/saas-hotel/ReservationsPage.astro +49 -0
- package/src/components/lib/templates/saas-hotel/RoomsPage.astro +48 -0
- package/src/components/lib/templates/saas-hotel/SettingsPage.astro +115 -0
- package/src/components/lib/templates/saas-hotel/SignInPage.astro +50 -0
- package/src/components/lib/templates/saas-hotel/data.ts +229 -0
- package/src/components/lib/templates/saas-hotel/index.ts +19 -0
- package/src/components/lib/templates/saas-hotel/lobby-theme.css +90 -0
- package/src/components/lib/typography/AnimatedCounterText.astro +102 -0
- package/src/components/lib/typography/CurvedPathHeading.astro +86 -0
- package/src/components/lib/typography/GradientTextMarquee.astro +105 -0
- package/src/components/lib/typography/HackerDecodeText.astro +85 -0
- package/src/components/lib/typography/index.ts +4 -0
- package/src/styles/global.css +113 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* ShopCategoryHero — Catalogue page header: breadcrumb, oversized category title with item
|
|
4
|
+
* count, intro text, sub-category links and a strip of three visuals.
|
|
5
|
+
*
|
|
6
|
+
* @param {Array<{label: string, href?: string}>} breadcrumb - Trail; the last item is the current page.
|
|
7
|
+
* @param {string} title - Category name. Default 'Clothing'.
|
|
8
|
+
* @param {number} count - Number of products (superscript). Optional.
|
|
9
|
+
* @param {string} text - Intro paragraph.
|
|
10
|
+
* @param {Array<{label: string, href: string, active?: boolean}>} links - Sub-category links.
|
|
11
|
+
* @param {Array<{icon?: string, hue?: number, image?: string}>} visuals - Up to three images (empty hides the strip).
|
|
12
|
+
* @param {string} variant - Layout (split|centered). Default 'split'.
|
|
13
|
+
* @param {string} size - Vertical rhythm (sm|md|lg). Default 'md'.
|
|
14
|
+
* @param {string} className - Extra class.
|
|
15
|
+
*
|
|
16
|
+
* Accessibility: breadcrumb nav with aria-current; one h1; visuals are decorative.
|
|
17
|
+
*/
|
|
18
|
+
import ProductMedia from '../ecommerce/ProductMedia.astro';
|
|
19
|
+
|
|
20
|
+
interface Props {
|
|
21
|
+
breadcrumb?: Array<{ label: string; href?: string }>;
|
|
22
|
+
title?: string;
|
|
23
|
+
count?: number;
|
|
24
|
+
text?: string;
|
|
25
|
+
links?: Array<{ label: string; href: string; active?: boolean }>;
|
|
26
|
+
visuals?: Array<{ icon?: string; hue?: number; image?: string }>;
|
|
27
|
+
variant?: 'split' | 'centered';
|
|
28
|
+
size?: 'sm' | 'md' | 'lg';
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
breadcrumb = [{ label: 'Home', href: '#' }, { label: 'Shop', href: '#' }, { label: 'Clothing' }],
|
|
34
|
+
title = 'Clothing',
|
|
35
|
+
count = 24,
|
|
36
|
+
text = 'Overshirts, knitwear and outerwear cut from linen, merino and organic cotton. Designed to be layered, washed and worn for a decade.',
|
|
37
|
+
links = [
|
|
38
|
+
{ label: 'All', href: '#', active: true },
|
|
39
|
+
{ label: 'Overshirts', href: '#' },
|
|
40
|
+
{ label: 'Knitwear', href: '#' },
|
|
41
|
+
{ label: 'Outerwear', href: '#' },
|
|
42
|
+
],
|
|
43
|
+
visuals = [{ icon: 'shirt', hue: 30 }, { icon: 'jacket', hue: 22 }, { icon: 'sneaker', hue: 12 }],
|
|
44
|
+
variant = 'split',
|
|
45
|
+
size = 'md',
|
|
46
|
+
className = '',
|
|
47
|
+
} = Astro.props;
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
<header class:list={['sch', `sch--${variant}`, `sch--${size}`, className]}>
|
|
51
|
+
<nav class="sch__crumbs" aria-label="Breadcrumb">
|
|
52
|
+
<ol>
|
|
53
|
+
{breadcrumb.map((b, i) => (
|
|
54
|
+
<li>{b.href && i < breadcrumb.length - 1 ? <a href={b.href}>{b.label}</a> : <span aria-current="page">{b.label}</span>}</li>
|
|
55
|
+
))}
|
|
56
|
+
</ol>
|
|
57
|
+
</nav>
|
|
58
|
+
<div class="sch__main">
|
|
59
|
+
<h1 class="sch__title">{title}{count !== undefined && <sup>{count}</sup>}</h1>
|
|
60
|
+
<div class="sch__side">
|
|
61
|
+
{text && <p class="sch__text">{text}</p>}
|
|
62
|
+
{links.length > 0 && (
|
|
63
|
+
<ul class="sch__links">
|
|
64
|
+
{links.map((l) => <li><a href={l.href} aria-current={l.active ? 'page' : undefined}>{l.label}</a></li>)}
|
|
65
|
+
</ul>
|
|
66
|
+
)}
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
{visuals.length > 0 && (
|
|
70
|
+
<div class="sch__strip" aria-hidden="true">
|
|
71
|
+
{visuals.slice(0, 3).map((v) => <ProductMedia image={v.image} icon={v.icon} hue={v.hue} ratio="16 / 9" variant="soft" size="md" />)}
|
|
72
|
+
</div>
|
|
73
|
+
)}
|
|
74
|
+
</header>
|
|
75
|
+
|
|
76
|
+
<style>
|
|
77
|
+
.sch { container-type: inline-size; --py: clamp(1.5rem, 4vw, 3rem); padding-block: var(--py); color: var(--c-text-1, #fff); }
|
|
78
|
+
.sch--sm { --py: 1rem; }
|
|
79
|
+
.sch--lg { --py: clamp(2.5rem, 6vw, 5rem); }
|
|
80
|
+
.sch__crumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 var(--sp-6, 1.5rem); padding: 0; list-style: none; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-2, #a3a3a3); }
|
|
81
|
+
.sch__crumbs li + li::before { content: '/'; margin-right: 0.5rem; opacity: 0.5; }
|
|
82
|
+
.sch__crumbs a { color: inherit; text-decoration: none; }
|
|
83
|
+
.sch__crumbs a:hover { color: var(--c-text-1, #fff); }
|
|
84
|
+
.sch__crumbs [aria-current] { color: var(--c-text-1, #fff); }
|
|
85
|
+
.sch__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: clamp(1rem, 4vw, 4rem); align-items: end; }
|
|
86
|
+
.sch--centered .sch__main { grid-template-columns: 1fr; text-align: center; justify-items: center; }
|
|
87
|
+
.sch__title { margin: 0; font-family: var(--font-display, Georgia, 'Times New Roman', serif); font-size: clamp(3.5rem, 12vw, 10rem); font-weight: 400; letter-spacing: -0.055em; line-height: 0.85; }
|
|
88
|
+
.sch__title sup { margin-left: 0.15em; font-family: var(--font-sans, system-ui); font-size: 0.14em; font-weight: 600; letter-spacing: 0; vertical-align: super; color: var(--shop-accent, var(--c-primary-light, #d4a017)); }
|
|
89
|
+
.sch__text { margin: 0 0 var(--sp-4, 1rem); max-width: 30rem; line-height: 1.65; color: var(--c-text-2, #a3a3a3); }
|
|
90
|
+
.sch__links { display: flex; flex-wrap: wrap; gap: 0 var(--sp-5, 1.25rem); margin: 0; padding: 0; list-style: none; }
|
|
91
|
+
.sch--centered .sch__links { justify-content: center; }
|
|
92
|
+
.sch__links a { display: inline-flex; align-items: center; min-height: 40px; font-size: 0.9rem; color: var(--c-text-2, #a3a3a3); text-decoration: none; border-bottom: 1px solid transparent; }
|
|
93
|
+
.sch__links a:hover, .sch__links a[aria-current] { color: var(--c-text-1, #fff); border-bottom-color: currentColor; }
|
|
94
|
+
.sch a:focus-visible { outline: 2px solid var(--shop-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
95
|
+
.sch__strip { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-3, 0.75rem); margin-top: clamp(1.5rem, 4vw, 3rem); }
|
|
96
|
+
.sch__strip :global(.p-media) { height: 100%; border-radius: var(--r-sm, 2px); }
|
|
97
|
+
|
|
98
|
+
@container (max-width: 760px) {
|
|
99
|
+
.sch__main { grid-template-columns: 1fr; }
|
|
100
|
+
.sch__strip { grid-template-columns: 1fr 1fr; }
|
|
101
|
+
.sch__strip > :global(:first-child) { grid-column: 1 / -1; }
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* ShopCollectionMosaic — Asymmetric collection grid: one tall feature tile and smaller tiles,
|
|
4
|
+
* each with an index number, title, item count and an underline link.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} eyebrow - Small label. Default 'Collections'.
|
|
7
|
+
* @param {string} title - Section heading. Default 'Shop by *intention*'.
|
|
8
|
+
* @param {Array<{title: string, text?: string, href: string, count?: number, icon?: string, hue?: number, image?: string}>} items - 2–5 tiles; the first one is featured.
|
|
9
|
+
* @param {string} linkLabel - Tile link text. Default 'Explore'.
|
|
10
|
+
* @param {string} countLabel - Suffix after counts. Default 'pieces'.
|
|
11
|
+
* @param {string} variant - Layout (feature-left|feature-right). Default 'feature-left'.
|
|
12
|
+
* @param {string} size - Tile height (sm|md|lg). Default 'md'.
|
|
13
|
+
* @param {string} className - Extra class.
|
|
14
|
+
*
|
|
15
|
+
* Accessibility: each tile is one link with a heading inside; art is decorative.
|
|
16
|
+
*/
|
|
17
|
+
import ProductMedia from '../ecommerce/ProductMedia.astro';
|
|
18
|
+
|
|
19
|
+
interface Tile { title: string; text?: string; href: string; count?: number; icon?: string; hue?: number; image?: string }
|
|
20
|
+
interface Props {
|
|
21
|
+
eyebrow?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
items?: Tile[];
|
|
24
|
+
linkLabel?: string;
|
|
25
|
+
countLabel?: string;
|
|
26
|
+
variant?: 'feature-left' | 'feature-right';
|
|
27
|
+
size?: 'sm' | 'md' | 'lg';
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const {
|
|
32
|
+
eyebrow = 'Collections',
|
|
33
|
+
title = 'Shop by *intention*',
|
|
34
|
+
items = [
|
|
35
|
+
{ title: 'The wardrobe', text: 'Overshirts, knitwear and coats in natural fibres.', href: '#', count: 24, icon: 'jacket', hue: 22 },
|
|
36
|
+
{ title: 'At the table', text: 'Stoneware made by hand.', href: '#', count: 12, icon: 'mug', hue: 14 },
|
|
37
|
+
{ title: 'Light & air', text: 'Lamps and living things.', href: '#', count: 9, icon: 'plant', hue: 110 },
|
|
38
|
+
{ title: 'To carry', text: 'Bags that soften with age.', href: '#', count: 8, icon: 'bag', hue: 34 },
|
|
39
|
+
],
|
|
40
|
+
linkLabel = 'Explore',
|
|
41
|
+
countLabel = 'pieces',
|
|
42
|
+
variant = 'feature-left',
|
|
43
|
+
size = 'md',
|
|
44
|
+
className = '',
|
|
45
|
+
} = Astro.props;
|
|
46
|
+
|
|
47
|
+
const parts = title.split(/\*(.+?)\*/g);
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
<section class:list={['scm', `scm--${variant}`, `scm--${size}`, className]}>
|
|
51
|
+
<header class="scm__head">
|
|
52
|
+
{eyebrow && <p class="scm__eyebrow">{eyebrow}</p>}
|
|
53
|
+
<h2 class="scm__title">{parts.map((p, i) => (i % 2 ? <em>{p}</em> : p))}</h2>
|
|
54
|
+
</header>
|
|
55
|
+
<ul class="scm__grid">
|
|
56
|
+
{items.slice(0, 5).map((t, i) => (
|
|
57
|
+
<li class:list={['scm__item', { 'scm__item--feature': i === 0 }]}>
|
|
58
|
+
<a class="scm__tile" href={t.href}>
|
|
59
|
+
<span class="scm__art"><ProductMedia image={t.image} alt="" icon={t.icon} hue={t.hue} ratio="auto" variant="soft" size={i === 0 ? 'lg' : 'md'} /></span>
|
|
60
|
+
<span class="scm__num" aria-hidden="true">{String(i + 1).padStart(2, '0')}</span>
|
|
61
|
+
<span class="scm__body">
|
|
62
|
+
<h3 class="scm__name">{t.title}</h3>
|
|
63
|
+
{t.text && <span class="scm__text">{t.text}</span>}
|
|
64
|
+
<span class="scm__link">{t.count !== undefined ? `${linkLabel} · ${t.count} ${countLabel}` : linkLabel}</span>
|
|
65
|
+
</span>
|
|
66
|
+
</a>
|
|
67
|
+
</li>
|
|
68
|
+
))}
|
|
69
|
+
</ul>
|
|
70
|
+
</section>
|
|
71
|
+
|
|
72
|
+
<style>
|
|
73
|
+
.scm { container-type: inline-size; --scm-h: 300px; color: var(--c-text-1, #fff); }
|
|
74
|
+
.scm--sm { --scm-h: 230px; }
|
|
75
|
+
.scm--lg { --scm-h: 380px; }
|
|
76
|
+
.scm__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4, 1rem); margin-bottom: var(--sp-6, 1.5rem); padding-bottom: var(--sp-3, 0.75rem); border-bottom: 1px solid currentColor; }
|
|
77
|
+
.scm__eyebrow { order: 2; margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-text-2, #a3a3a3); }
|
|
78
|
+
.scm__title { margin: 0; font-family: var(--font-display, Georgia, 'Times New Roman', serif); font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 400; letter-spacing: -0.035em; line-height: 1; }
|
|
79
|
+
.scm__title em { font-style: italic; color: var(--shop-accent, var(--c-primary-light, #d4a017)); }
|
|
80
|
+
|
|
81
|
+
.scm__grid {
|
|
82
|
+
display: grid;
|
|
83
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
84
|
+
grid-auto-rows: var(--scm-h);
|
|
85
|
+
gap: var(--sp-3, 0.75rem);
|
|
86
|
+
margin: 0;
|
|
87
|
+
padding: 0;
|
|
88
|
+
list-style: none;
|
|
89
|
+
}
|
|
90
|
+
.scm__item--feature { grid-column: span 2; grid-row: span 2; }
|
|
91
|
+
.scm--feature-right .scm__item--feature { grid-column: 3 / span 2; grid-row: 1 / span 2; }
|
|
92
|
+
.scm__item:nth-child(4):last-child { grid-column: span 2; }
|
|
93
|
+
|
|
94
|
+
.scm__tile {
|
|
95
|
+
position: relative;
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
justify-content: flex-end;
|
|
99
|
+
height: 100%;
|
|
100
|
+
padding: var(--sp-5, 1.25rem);
|
|
101
|
+
color: inherit;
|
|
102
|
+
text-decoration: none;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
isolation: isolate;
|
|
105
|
+
border-radius: var(--r-sm, 2px);
|
|
106
|
+
}
|
|
107
|
+
.scm__art { position: absolute; inset: 0; z-index: -1; }
|
|
108
|
+
.scm__art :global(.p-media) { height: 100%; aspect-ratio: auto; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
109
|
+
.scm__art :global(.p-media__art) { width: auto; height: 42%; margin-bottom: 22%; }
|
|
110
|
+
.scm__tile:hover .scm__art :global(.p-media) { transform: scale(1.04); }
|
|
111
|
+
.scm__tile::after { content: ''; position: absolute; inset: 35% 0 0; z-index: -1; background: linear-gradient(transparent, rgb(var(--paper-rgb, 5 5 5) / 0.9)); }
|
|
112
|
+
.scm__num { position: absolute; top: var(--sp-4, 1rem); left: var(--sp-5, 1.25rem); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
|
|
113
|
+
.scm__body { display: grid; gap: 4px; }
|
|
114
|
+
.scm__name { margin: 0; font-family: var(--font-display, Georgia, serif); font-size: 1.6rem; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
|
|
115
|
+
.scm__item--feature .scm__name { font-size: clamp(2rem, 3.5vw, 3rem); }
|
|
116
|
+
.scm__text { max-width: 24rem; font-size: 0.88rem; color: var(--c-text-2, #a3a3a3); }
|
|
117
|
+
.scm__link { width: fit-content; margin-top: 6px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
|
|
118
|
+
.scm__tile:hover .scm__link { color: var(--shop-accent, var(--c-primary-light, #d4a017)); }
|
|
119
|
+
.scm__tile:focus-visible { outline: 2px solid var(--shop-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
120
|
+
|
|
121
|
+
@container (max-width: 900px) {
|
|
122
|
+
.scm__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 220px; }
|
|
123
|
+
.scm__item--feature, .scm--feature-right .scm__item--feature { grid-column: 1 / -1; grid-row: span 2; }
|
|
124
|
+
.scm__item:nth-child(4):last-child { grid-column: auto; }
|
|
125
|
+
}
|
|
126
|
+
@container (max-width: 480px) {
|
|
127
|
+
.scm__grid { grid-template-columns: 1fr; }
|
|
128
|
+
.scm__item--feature, .scm--feature-right .scm__item--feature { grid-row: span 1; }
|
|
129
|
+
}
|
|
130
|
+
@media (prefers-reduced-motion: reduce) { .scm__art :global(.p-media) { transition: none; } }
|
|
131
|
+
</style>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* ShopFooterWordmark — Store footer with link columns, contact block, payment labels and a
|
|
4
|
+
* giant edge-to-edge wordmark at the bottom.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} brand - Wordmark. Default 'Forma'.
|
|
7
|
+
* @param {string} brandHref - Wordmark link. Default '/'.
|
|
8
|
+
* @param {Array<{title: string, links: {label: string, href: string}[]}>} columns - Link columns.
|
|
9
|
+
* @param {{title: string, lines: string[]}} contact - Contact block (optional).
|
|
10
|
+
* @param {string[]} payments - Payment method labels. Default Visa · Mastercard · PayPal · Apple Pay.
|
|
11
|
+
* @param {string} copyright - Bottom-left text.
|
|
12
|
+
* @param {string} variant - Style (plain|inverted). Default 'plain'.
|
|
13
|
+
* @param {string} className - Extra class.
|
|
14
|
+
*
|
|
15
|
+
* Accessibility: footer landmark with a visually hidden heading; columns are nav lists; the
|
|
16
|
+
* wordmark is decorative (aria-hidden) and duplicated by the visible brand link.
|
|
17
|
+
*/
|
|
18
|
+
interface Props {
|
|
19
|
+
brand?: string;
|
|
20
|
+
brandHref?: string;
|
|
21
|
+
columns?: Array<{ title: string; links: Array<{ label: string; href: string }> }>;
|
|
22
|
+
contact?: { title: string; lines: string[] };
|
|
23
|
+
payments?: string[];
|
|
24
|
+
copyright?: string;
|
|
25
|
+
variant?: 'plain' | 'inverted';
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const {
|
|
30
|
+
brand = 'Forma',
|
|
31
|
+
brandHref = '/',
|
|
32
|
+
columns = [
|
|
33
|
+
{ title: 'Shop', links: [{ label: 'Clothing', href: '#' }, { label: 'Shoes', href: '#' }, { label: 'Bags', href: '#' }, { label: 'Objects', href: '#' }] },
|
|
34
|
+
{ title: 'Care', links: [{ label: 'Shipping', href: '#' }, { label: 'Returns', href: '#' }, { label: 'Repairs', href: '#' }, { label: 'Size guide', href: '#' }] },
|
|
35
|
+
{ title: 'Studio', links: [{ label: 'About', href: '#' }, { label: 'Journal', href: '#' }, { label: 'Stockists', href: '#' }] },
|
|
36
|
+
],
|
|
37
|
+
contact = { title: 'Visit', lines: ['Calle del Pez 14, Madrid', 'Tue–Sat · 11:00–20:00', 'hello@forma.studio'] },
|
|
38
|
+
payments = ['Visa', 'Mastercard', 'PayPal', 'Apple Pay'],
|
|
39
|
+
copyright = `© ${new Date().getFullYear()} Forma Studio`,
|
|
40
|
+
variant = 'plain',
|
|
41
|
+
className = '',
|
|
42
|
+
} = Astro.props;
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
<footer class:list={['sfw', `sfw--${variant}`, className]} aria-labelledby="sfw-title">
|
|
46
|
+
<h2 id="sfw-title" class="sr-only">Site footer</h2>
|
|
47
|
+
<div class="sfw__top">
|
|
48
|
+
<a class="sfw__brand" href={brandHref}>{brand}</a>
|
|
49
|
+
{columns.map((c) => (
|
|
50
|
+
<nav class="sfw__col" aria-label={c.title}>
|
|
51
|
+
<p class="sfw__col-title">{c.title}</p>
|
|
52
|
+
<ul>{c.links.map((l) => <li><a href={l.href}>{l.label}</a></li>)}</ul>
|
|
53
|
+
</nav>
|
|
54
|
+
))}
|
|
55
|
+
{contact && (
|
|
56
|
+
<div class="sfw__col">
|
|
57
|
+
<p class="sfw__col-title">{contact.title}</p>
|
|
58
|
+
<address>{contact.lines.map((l) => <span>{l}</span>)}</address>
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
<div class="sfw__bottom">
|
|
63
|
+
<p>{copyright}</p>
|
|
64
|
+
{payments.length > 0 && <ul class="sfw__pay" aria-label="Payment methods">{payments.map((p) => <li>{p}</li>)}</ul>}
|
|
65
|
+
</div>
|
|
66
|
+
<p class="sfw__wordmark" aria-hidden="true">{brand}<span>°</span></p>
|
|
67
|
+
</footer>
|
|
68
|
+
|
|
69
|
+
<style>
|
|
70
|
+
.sfw { container-type: inline-size; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2.5rem) 0; border-top: 1px solid var(--c-text-1, #fff); color: var(--c-text-1, #fff); overflow: hidden; }
|
|
71
|
+
.sfw--inverted { background: var(--c-text-1, #fff); color: var(--c-bg, #050505); border-top: 0; }
|
|
72
|
+
.sfw__top { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: var(--sp-8, 2rem); max-width: 1440px; margin: 0 auto; }
|
|
73
|
+
.sfw__brand { font-family: var(--font-display, Georgia, 'Times New Roman', serif); font-size: 1.8rem; letter-spacing: -0.03em; color: inherit; text-decoration: none; }
|
|
74
|
+
.sfw__col-title { margin: 0 0 var(--sp-3, 0.75rem); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.6; }
|
|
75
|
+
.sfw__col ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
|
|
76
|
+
.sfw__col a { display: inline-flex; align-items: center; min-height: 34px; color: inherit; text-decoration: none; font-size: 0.95rem; }
|
|
77
|
+
.sfw__col a:hover { text-decoration: underline; text-underline-offset: 4px; }
|
|
78
|
+
.sfw__col address { display: grid; gap: 6px; font-style: normal; font-size: 0.95rem; line-height: 1.5; }
|
|
79
|
+
.sfw a:focus-visible { outline: 2px solid var(--shop-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
80
|
+
.sfw__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-4, 1rem); max-width: 1440px; margin: clamp(2rem, 5vw, 3.5rem) auto 0; padding-top: var(--sp-4, 1rem); border-top: 1px solid var(--c-border, rgba(255, 255, 255, 0.12)); font-size: 0.8rem; opacity: 0.75; }
|
|
81
|
+
.sfw__bottom p { margin: 0; }
|
|
82
|
+
.sfw__pay { display: flex; flex-wrap: wrap; gap: var(--sp-2, 0.5rem); margin: 0; padding: 0; list-style: none; }
|
|
83
|
+
.sfw__pay li { padding: 0.15rem 0.55rem; border: 1px solid currentColor; border-radius: var(--r-sm, 2px); font-size: 0.7rem; letter-spacing: 0.04em; }
|
|
84
|
+
.sfw__wordmark {
|
|
85
|
+
margin: clamp(1rem, 3vw, 2rem) 0 -0.18em;
|
|
86
|
+
font-family: var(--font-display, Georgia, 'Times New Roman', serif);
|
|
87
|
+
font-size: clamp(5rem, 24vw, 22rem);
|
|
88
|
+
line-height: 0.8;
|
|
89
|
+
letter-spacing: -0.06em;
|
|
90
|
+
text-align: center;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
}
|
|
93
|
+
.sfw__wordmark span { color: var(--shop-accent, var(--c-primary-light, #d4a017)); }
|
|
94
|
+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
95
|
+
|
|
96
|
+
@container (max-width: 900px) {
|
|
97
|
+
.sfw__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
98
|
+
.sfw__brand { grid-column: 1 / -1; }
|
|
99
|
+
}
|
|
100
|
+
</style>
|