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,396 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* ShopHeaderEditorial — Editorial store header: thin announcement line, left menu, centred
|
|
4
|
+
* wordmark, right utilities (search, theme toggle, bag count) and a full-width mega menu.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} brand - Wordmark text. Default 'Forma'.
|
|
7
|
+
* @param {string} brandHref - Wordmark link. Default '/'.
|
|
8
|
+
* @param {string} announcement - Top line text (empty hides it).
|
|
9
|
+
* @param {Array} links - `{ label, href, columns?: { title, links: {label, href}[] }[], feature?: { title, text, href, icon?, hue? } }`.
|
|
10
|
+
* @param {string} searchHref - Search page URL (empty hides the icon). Default '#'.
|
|
11
|
+
* @param {string} bagHref - Bag page URL. When empty, the bag button opens a CartDrawer instead.
|
|
12
|
+
* @param {string} cartKey - Cart storage key for the live count. Default 'ack-cart'.
|
|
13
|
+
* @param {boolean} themeToggle - Show a light/dark toggle (html[data-theme]). Default true.
|
|
14
|
+
* @param {string} currentHref - Marks the active link.
|
|
15
|
+
* @param {boolean} sticky - Stick to the top on scroll. Default true.
|
|
16
|
+
* @param {string} variant - Style (paper|transparent|inverted). Default 'paper'.
|
|
17
|
+
* @param {string} size - Height (sm|md|lg). Default 'md'.
|
|
18
|
+
* @param {string} id - Base id. Default 'shop-header'.
|
|
19
|
+
* @param {string} className - Extra class.
|
|
20
|
+
*
|
|
21
|
+
* Accessibility: mega menus are disclosure buttons (aria-expanded) that close on Escape/outside
|
|
22
|
+
* click; the mobile menu is a disclosure too; the bag link label includes the live count.
|
|
23
|
+
*/
|
|
24
|
+
import ProductMedia from '../ecommerce/ProductMedia.astro';
|
|
25
|
+
|
|
26
|
+
interface Col { title: string; links: Array<{ label: string; href: string }> }
|
|
27
|
+
interface Feature { title: string; text?: string; href: string; icon?: string; hue?: number }
|
|
28
|
+
interface NavLink { label: string; href: string; columns?: Col[]; feature?: Feature }
|
|
29
|
+
|
|
30
|
+
interface Props {
|
|
31
|
+
brand?: string;
|
|
32
|
+
brandHref?: string;
|
|
33
|
+
announcement?: string;
|
|
34
|
+
links?: NavLink[];
|
|
35
|
+
searchHref?: string;
|
|
36
|
+
bagHref?: string;
|
|
37
|
+
cartKey?: string;
|
|
38
|
+
themeToggle?: boolean;
|
|
39
|
+
currentHref?: string;
|
|
40
|
+
sticky?: boolean;
|
|
41
|
+
variant?: 'paper' | 'transparent' | 'inverted';
|
|
42
|
+
size?: 'sm' | 'md' | 'lg';
|
|
43
|
+
id?: string;
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const {
|
|
48
|
+
brand = 'Forma',
|
|
49
|
+
brandHref = '/',
|
|
50
|
+
announcement = 'Complimentary shipping over €150 · Free returns within 30 days',
|
|
51
|
+
links = [
|
|
52
|
+
{
|
|
53
|
+
label: 'Shop',
|
|
54
|
+
href: '#',
|
|
55
|
+
columns: [
|
|
56
|
+
{ title: 'Clothing', links: [{ label: 'Overshirts', href: '#' }, { label: 'Knitwear', href: '#' }, { label: 'Outerwear', href: '#' }] },
|
|
57
|
+
{ title: 'Objects', links: [{ label: 'Ceramics', href: '#' }, { label: 'Lighting', href: '#' }, { label: 'Plants', href: '#' }] },
|
|
58
|
+
{ title: 'Accessories', links: [{ label: 'Bags', href: '#' }, { label: 'Eyewear', href: '#' }, { label: 'Watches', href: '#' }] },
|
|
59
|
+
],
|
|
60
|
+
feature: { title: 'The Autumn edit', text: 'Twelve pieces in warm, quiet tones.', href: '#', icon: 'jacket', hue: 22 },
|
|
61
|
+
},
|
|
62
|
+
{ label: 'New in', href: '#' },
|
|
63
|
+
{ label: 'Journal', href: '#' },
|
|
64
|
+
],
|
|
65
|
+
searchHref = '#',
|
|
66
|
+
bagHref = '#',
|
|
67
|
+
cartKey = 'ack-cart',
|
|
68
|
+
themeToggle = true,
|
|
69
|
+
currentHref,
|
|
70
|
+
sticky = true,
|
|
71
|
+
variant = 'paper',
|
|
72
|
+
size = 'md',
|
|
73
|
+
id = 'shop-header',
|
|
74
|
+
className = '',
|
|
75
|
+
} = Astro.props;
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
<header class:list={['she', `she--${variant}`, `she--${size}`, { 'she--sticky': sticky }, className]} data-shop-header data-key={cartKey}>
|
|
79
|
+
{announcement && <p class="she__announce">{announcement}</p>}
|
|
80
|
+
<div class="she__bar">
|
|
81
|
+
<div class="she__left">
|
|
82
|
+
<button class="she__icon she__burger" type="button" aria-expanded="false" aria-controls={`${id}-nav`} aria-label="Menu" data-burger>
|
|
83
|
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true"><path d="M3 8h18M3 16h18"/></svg>
|
|
84
|
+
</button>
|
|
85
|
+
<nav class="she__nav" id={`${id}-nav`} aria-label="Main" data-nav>
|
|
86
|
+
<ul>
|
|
87
|
+
{links.map((link, i) => (
|
|
88
|
+
<li>
|
|
89
|
+
{link.columns?.length ? (
|
|
90
|
+
<>
|
|
91
|
+
<button class="she__link she__link--desk" type="button" aria-expanded="false" aria-controls={`${id}-mega-${i}`} data-mega-toggle>{link.label}</button>
|
|
92
|
+
<a class="she__link she__link--mob" href={link.href}>{link.label}</a>
|
|
93
|
+
<ul class="she__sub">
|
|
94
|
+
{link.columns.flatMap((c) => c.links).map((l) => <li><a href={l.href}>{l.label}</a></li>)}
|
|
95
|
+
</ul>
|
|
96
|
+
</>
|
|
97
|
+
) : (
|
|
98
|
+
<a class="she__link" href={link.href} aria-current={currentHref === link.href ? 'page' : undefined}>{link.label}</a>
|
|
99
|
+
)}
|
|
100
|
+
</li>
|
|
101
|
+
))}
|
|
102
|
+
</ul>
|
|
103
|
+
</nav>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<a class="she__brand" href={brandHref}>{brand}</a>
|
|
107
|
+
|
|
108
|
+
<div class="she__right">
|
|
109
|
+
{searchHref && (
|
|
110
|
+
<a class="she__icon" href={searchHref} aria-label="Search">
|
|
111
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
|
|
112
|
+
</a>
|
|
113
|
+
)}
|
|
114
|
+
{themeToggle && (
|
|
115
|
+
<button class="she__icon" type="button" aria-label="Switch theme" data-theme-btn>
|
|
116
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true"><circle cx="12" cy="12" r="8"/><path d="M12 4a8 8 0 0 1 0 16z" fill="currentColor"/></svg>
|
|
117
|
+
</button>
|
|
118
|
+
)}
|
|
119
|
+
{bagHref ? (
|
|
120
|
+
<a class="she__bag" href={bagHref} aria-label="Bag" data-bag-link>
|
|
121
|
+
Bag <span class="she__count" data-count>0</span>
|
|
122
|
+
</a>
|
|
123
|
+
) : (
|
|
124
|
+
<button class="she__bag" type="button" aria-label="Bag" data-bag-link data-cart-open data-cart-key={cartKey}>
|
|
125
|
+
Bag <span class="she__count" data-count>0</span>
|
|
126
|
+
</button>
|
|
127
|
+
)}
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
{links.map((link, i) => link.columns?.length ? (
|
|
132
|
+
<div class="she__mega" id={`${id}-mega-${i}`} hidden data-mega>
|
|
133
|
+
<div class="she__mega-inner">
|
|
134
|
+
{link.columns.map((col) => (
|
|
135
|
+
<div class="she__col">
|
|
136
|
+
<p class="she__col-title">{col.title}</p>
|
|
137
|
+
<ul>{col.links.map((l) => <li><a href={l.href}>{l.label}</a></li>)}</ul>
|
|
138
|
+
</div>
|
|
139
|
+
))}
|
|
140
|
+
<a class="she__col she__col--all" href={link.href}>View everything <span aria-hidden="true">→</span></a>
|
|
141
|
+
{link.feature && (
|
|
142
|
+
<a class="she__feature" href={link.feature.href}>
|
|
143
|
+
<ProductMedia icon={link.feature.icon} hue={link.feature.hue} ratio="4 / 3" variant="soft" size="lg" />
|
|
144
|
+
<span class="she__feature-title">{link.feature.title}</span>
|
|
145
|
+
{link.feature.text && <span class="she__feature-text">{link.feature.text}</span>}
|
|
146
|
+
</a>
|
|
147
|
+
)}
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
) : null)}
|
|
151
|
+
</header>
|
|
152
|
+
|
|
153
|
+
<script>
|
|
154
|
+
import { createCart } from '../ecommerce/cart-store';
|
|
155
|
+
|
|
156
|
+
document.querySelectorAll<HTMLElement>('[data-shop-header]:not([data-bound])').forEach((header) => {
|
|
157
|
+
header.dataset.bound = '';
|
|
158
|
+
const toggles = Array.from(header.querySelectorAll<HTMLButtonElement>('[data-mega-toggle]'));
|
|
159
|
+
const panelOf = (b: HTMLButtonElement) => document.getElementById(b.getAttribute('aria-controls') || '');
|
|
160
|
+
const closeAll = (except?: HTMLButtonElement) => toggles.forEach((b) => {
|
|
161
|
+
if (b === except) return;
|
|
162
|
+
b.setAttribute('aria-expanded', 'false');
|
|
163
|
+
const p = panelOf(b);
|
|
164
|
+
if (p) p.hidden = true;
|
|
165
|
+
});
|
|
166
|
+
toggles.forEach((b) => b.addEventListener('click', () => {
|
|
167
|
+
const open = b.getAttribute('aria-expanded') !== 'true';
|
|
168
|
+
closeAll(b);
|
|
169
|
+
b.setAttribute('aria-expanded', String(open));
|
|
170
|
+
const p = panelOf(b);
|
|
171
|
+
if (p) p.hidden = !open;
|
|
172
|
+
}));
|
|
173
|
+
document.addEventListener('click', (e) => { if (!header.contains(e.target as Node)) closeAll(); });
|
|
174
|
+
document.addEventListener('keydown', (e) => {
|
|
175
|
+
if (e.key !== 'Escape') return;
|
|
176
|
+
const open = toggles.find((b) => b.getAttribute('aria-expanded') === 'true');
|
|
177
|
+
closeAll();
|
|
178
|
+
open?.focus();
|
|
179
|
+
const burger = header.querySelector<HTMLButtonElement>('[data-burger]');
|
|
180
|
+
if (burger?.getAttribute('aria-expanded') === 'true') { burger.click(); burger.focus(); }
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
const burger = header.querySelector<HTMLButtonElement>('[data-burger]');
|
|
184
|
+
const nav = header.querySelector<HTMLElement>('[data-nav]');
|
|
185
|
+
burger?.addEventListener('click', () => {
|
|
186
|
+
const open = burger.getAttribute('aria-expanded') !== 'true';
|
|
187
|
+
burger.setAttribute('aria-expanded', String(open));
|
|
188
|
+
nav?.classList.toggle('is-open', open);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
header.querySelector('[data-theme-btn]')?.addEventListener('click', () => {
|
|
192
|
+
const root = document.documentElement;
|
|
193
|
+
const next = root.dataset.theme === 'dark' ? 'light' : 'dark';
|
|
194
|
+
root.dataset.theme = next;
|
|
195
|
+
try { window.localStorage.setItem('ack-theme', next); } catch { /* ignore */ }
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
const bag = header.querySelector<HTMLElement>('[data-bag-link]');
|
|
199
|
+
const count = header.querySelector<HTMLElement>('[data-count]');
|
|
200
|
+
if (bag && count) {
|
|
201
|
+
const cart = createCart(header.dataset.key);
|
|
202
|
+
const render = () => {
|
|
203
|
+
const n = cart.count();
|
|
204
|
+
count.textContent = String(n);
|
|
205
|
+
bag.setAttribute('aria-label', `Bag, ${n} ${n === 1 ? 'item' : 'items'}`);
|
|
206
|
+
};
|
|
207
|
+
render();
|
|
208
|
+
cart.subscribe(() => {
|
|
209
|
+
render();
|
|
210
|
+
count.classList.remove('is-bump');
|
|
211
|
+
void count.offsetWidth;
|
|
212
|
+
count.classList.add('is-bump');
|
|
213
|
+
});
|
|
214
|
+
if (bag.tagName === 'BUTTON') {
|
|
215
|
+
bag.addEventListener('click', () => document.dispatchEvent(new CustomEvent('ack:cart-open', { detail: { key: cart.key, trigger: bag } })));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
</script>
|
|
220
|
+
|
|
221
|
+
<style>
|
|
222
|
+
.she {
|
|
223
|
+
container-type: inline-size;
|
|
224
|
+
--she-h: 72px;
|
|
225
|
+
position: relative;
|
|
226
|
+
z-index: 50;
|
|
227
|
+
color: var(--c-text-1, #fff);
|
|
228
|
+
background: var(--c-bg, #050505);
|
|
229
|
+
border-bottom: 1px solid var(--c-border, rgba(255, 255, 255, 0.1));
|
|
230
|
+
}
|
|
231
|
+
.she--sm { --she-h: 60px; }
|
|
232
|
+
.she--lg { --she-h: 88px; }
|
|
233
|
+
.she--sticky { position: sticky; top: 0; }
|
|
234
|
+
.she--transparent { background: transparent; border-bottom-color: transparent; }
|
|
235
|
+
.she--inverted { background: var(--c-text-1, #fff); color: var(--c-bg, #050505); }
|
|
236
|
+
|
|
237
|
+
.she__announce {
|
|
238
|
+
margin: 0;
|
|
239
|
+
padding: 0.5rem var(--sp-4, 1rem);
|
|
240
|
+
border-bottom: 1px solid var(--c-border, rgba(255, 255, 255, 0.1));
|
|
241
|
+
font-size: 0.72rem;
|
|
242
|
+
letter-spacing: 0.12em;
|
|
243
|
+
text-align: center;
|
|
244
|
+
text-transform: uppercase;
|
|
245
|
+
color: var(--c-text-2, #a3a3a3);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.she__bar {
|
|
249
|
+
display: grid;
|
|
250
|
+
grid-template-columns: 1fr auto 1fr;
|
|
251
|
+
align-items: center;
|
|
252
|
+
gap: var(--sp-4, 1rem);
|
|
253
|
+
max-width: 1440px;
|
|
254
|
+
height: var(--she-h);
|
|
255
|
+
margin: 0 auto;
|
|
256
|
+
padding: 0 clamp(1rem, 3vw, 2.5rem);
|
|
257
|
+
}
|
|
258
|
+
.she__left, .she__right { display: flex; align-items: center; gap: var(--sp-1, 0.25rem); }
|
|
259
|
+
.she__right { justify-content: flex-end; }
|
|
260
|
+
.she__brand {
|
|
261
|
+
font-family: var(--font-display, Georgia, 'Times New Roman', serif);
|
|
262
|
+
font-size: clamp(1.6rem, 3vw, 2.1rem);
|
|
263
|
+
font-weight: 400;
|
|
264
|
+
letter-spacing: -0.03em;
|
|
265
|
+
color: inherit;
|
|
266
|
+
text-decoration: none;
|
|
267
|
+
}
|
|
268
|
+
.she__brand::after { content: '°'; color: var(--shop-accent, var(--c-primary-light, #d4a017)); }
|
|
269
|
+
|
|
270
|
+
.she__nav ul { display: flex; gap: var(--sp-1, 0.25rem); margin: 0; padding: 0; list-style: none; }
|
|
271
|
+
.she__link {
|
|
272
|
+
position: relative;
|
|
273
|
+
display: inline-flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
min-height: 44px;
|
|
276
|
+
padding: 0 0.75rem;
|
|
277
|
+
border: 0;
|
|
278
|
+
background: none;
|
|
279
|
+
color: inherit;
|
|
280
|
+
font: inherit;
|
|
281
|
+
font-size: 0.82rem;
|
|
282
|
+
font-weight: 500;
|
|
283
|
+
letter-spacing: 0.08em;
|
|
284
|
+
text-transform: uppercase;
|
|
285
|
+
text-decoration: none;
|
|
286
|
+
cursor: pointer;
|
|
287
|
+
}
|
|
288
|
+
.she__link::after {
|
|
289
|
+
content: '';
|
|
290
|
+
position: absolute;
|
|
291
|
+
left: 0.75rem;
|
|
292
|
+
right: 0.75rem;
|
|
293
|
+
bottom: 10px;
|
|
294
|
+
height: 1px;
|
|
295
|
+
background: currentColor;
|
|
296
|
+
transform: scaleX(0);
|
|
297
|
+
transform-origin: left;
|
|
298
|
+
transition: transform 0.3s ease;
|
|
299
|
+
}
|
|
300
|
+
.she__link:hover::after, .she__link[aria-expanded='true']::after, .she__link[aria-current='page']::after { transform: scaleX(1); }
|
|
301
|
+
|
|
302
|
+
.she__icon, .she__bag {
|
|
303
|
+
display: inline-grid;
|
|
304
|
+
place-items: center;
|
|
305
|
+
min-width: 44px;
|
|
306
|
+
height: 44px;
|
|
307
|
+
border: 0;
|
|
308
|
+
background: none;
|
|
309
|
+
color: inherit;
|
|
310
|
+
cursor: pointer;
|
|
311
|
+
text-decoration: none;
|
|
312
|
+
}
|
|
313
|
+
.she__bag { display: inline-flex; align-items: center; gap: 6px; padding: 0 0.5rem; font: inherit; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
|
|
314
|
+
.she__count {
|
|
315
|
+
display: inline-grid;
|
|
316
|
+
place-items: center;
|
|
317
|
+
min-width: 22px;
|
|
318
|
+
height: 22px;
|
|
319
|
+
padding: 0 6px;
|
|
320
|
+
border-radius: 999px;
|
|
321
|
+
background: var(--c-text-1, #fff);
|
|
322
|
+
color: var(--c-bg, #050505);
|
|
323
|
+
font-size: 0.7rem;
|
|
324
|
+
font-weight: 700;
|
|
325
|
+
letter-spacing: 0;
|
|
326
|
+
}
|
|
327
|
+
.she--inverted .she__count { background: var(--c-bg, #050505); color: var(--c-text-1, #fff); }
|
|
328
|
+
.she__count.is-bump { animation: she-bump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
|
|
329
|
+
@keyframes she-bump { 40% { transform: scale(1.3); background: var(--shop-accent, var(--c-primary-light, #d4a017)); } }
|
|
330
|
+
.she :is(a, button):focus-visible { outline: 2px solid var(--shop-accent, var(--c-primary-light, #d4a017)); outline-offset: 2px; }
|
|
331
|
+
.she__burger { display: none; }
|
|
332
|
+
.she__link--mob, .she__sub { display: none !important; }
|
|
333
|
+
|
|
334
|
+
.she__mega {
|
|
335
|
+
position: absolute;
|
|
336
|
+
left: 0;
|
|
337
|
+
right: 0;
|
|
338
|
+
top: 100%;
|
|
339
|
+
background: var(--c-bg, #050505);
|
|
340
|
+
border-bottom: 1px solid var(--c-border, rgba(255, 255, 255, 0.1));
|
|
341
|
+
box-shadow: 0 40px 60px -40px rgba(0, 0, 0, 0.5);
|
|
342
|
+
animation: she-drop 0.25s ease-out;
|
|
343
|
+
}
|
|
344
|
+
.she__mega[hidden] { display: none; }
|
|
345
|
+
.she__mega-inner {
|
|
346
|
+
display: grid;
|
|
347
|
+
grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 0.8fr) minmax(0, 1.4fr);
|
|
348
|
+
gap: var(--sp-8, 2rem);
|
|
349
|
+
max-width: 1440px;
|
|
350
|
+
margin: 0 auto;
|
|
351
|
+
padding: var(--sp-8, 2rem) clamp(1rem, 3vw, 2.5rem) var(--sp-10, 2.5rem);
|
|
352
|
+
}
|
|
353
|
+
.she__col-title { margin: 0 0 var(--sp-3, 0.75rem); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-text-2, #a3a3a3); }
|
|
354
|
+
.she__col ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
|
|
355
|
+
.she__col a { display: inline-flex; min-height: 36px; align-items: center; font-family: var(--font-display, Georgia, serif); font-size: 1.15rem; color: var(--c-text-1, #fff); text-decoration: none; }
|
|
356
|
+
.she__col a:hover { color: var(--shop-accent, var(--c-primary-light, #d4a017)); }
|
|
357
|
+
.she__col--all { align-self: end; font-family: inherit !important; font-size: 0.85rem !important; text-decoration: underline !important; text-underline-offset: 4px; }
|
|
358
|
+
.she__feature { display: grid; gap: 6px; color: inherit; text-decoration: none; }
|
|
359
|
+
.she__feature :global(.p-media) { border-radius: var(--r-sm, 2px); }
|
|
360
|
+
.she__feature-title { font-family: var(--font-display, Georgia, serif); font-size: 1.2rem; color: var(--c-text-1, #fff); }
|
|
361
|
+
.she__feature-text { font-size: 0.85rem; color: var(--c-text-2, #a3a3a3); }
|
|
362
|
+
@keyframes she-drop { from { opacity: 0; transform: translateY(-6px); } }
|
|
363
|
+
|
|
364
|
+
@container (max-width: 900px) {
|
|
365
|
+
.she__burger { display: inline-grid; }
|
|
366
|
+
.she__nav {
|
|
367
|
+
position: absolute;
|
|
368
|
+
left: 0;
|
|
369
|
+
right: 0;
|
|
370
|
+
top: 100%;
|
|
371
|
+
display: none;
|
|
372
|
+
padding: var(--sp-4, 1rem) clamp(1rem, 3vw, 2.5rem) var(--sp-6, 1.5rem);
|
|
373
|
+
background: var(--c-bg, #050505);
|
|
374
|
+
border-bottom: 1px solid var(--c-border, rgba(255, 255, 255, 0.1));
|
|
375
|
+
}
|
|
376
|
+
.she__nav.is-open { display: block; }
|
|
377
|
+
.she__nav ul { flex-direction: column; }
|
|
378
|
+
.she__link { width: 100%; min-height: 52px; padding: 0; font-family: var(--font-display, Georgia, serif); font-size: 1.6rem; letter-spacing: -0.01em; text-transform: none; }
|
|
379
|
+
.she__link::after { display: none; }
|
|
380
|
+
.she__mega-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
381
|
+
.she__feature { grid-column: 1 / -1; }
|
|
382
|
+
.she__right [aria-label='Search'] { display: none; }
|
|
383
|
+
.she__link--desk, .she__mega { display: none !important; }
|
|
384
|
+
.she__link--mob { display: inline-flex !important; }
|
|
385
|
+
.she__sub { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 0 1rem !important; padding-bottom: var(--sp-3, 0.75rem) !important; }
|
|
386
|
+
.she__sub a { display: inline-flex; min-height: 40px; align-items: center; font-size: 0.9rem; color: var(--c-text-2, #a3a3a3); text-decoration: none; }
|
|
387
|
+
}
|
|
388
|
+
@container (max-width: 480px) {
|
|
389
|
+
.she__bag { font-size: 0; gap: 0; }
|
|
390
|
+
.she__count { font-size: 0.7rem; }
|
|
391
|
+
}
|
|
392
|
+
@media (prefers-reduced-motion: reduce) {
|
|
393
|
+
.she__mega, .she__count.is-bump { animation: none; }
|
|
394
|
+
.she__link::after { transition: none; }
|
|
395
|
+
}
|
|
396
|
+
</style>
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* ShopHeroEditorial — Magazine-style shop hero: oversized serif headline with an italic accent
|
|
4
|
+
* word, issue/season meta, two CTAs, a tall feature image with caption and a running ticker.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} kicker - Small label above the title. Default 'Autumn / Winter 26'.
|
|
7
|
+
* @param {string} title - Headline (wrap a word in *asterisks* to italicise it). Default 'Quiet *objects* for everyday rituals'.
|
|
8
|
+
* @param {string} text - Supporting paragraph.
|
|
9
|
+
* @param {{label: string, href: string}} primary - Main CTA.
|
|
10
|
+
* @param {{label: string, href: string}} secondary - Secondary CTA (optional).
|
|
11
|
+
* @param {{icon?: string, hue?: number, image?: string, alt?: string, caption?: string, href?: string}} media - Feature visual.
|
|
12
|
+
* @param {string[]} ticker - Words for the running ticker (empty hides it).
|
|
13
|
+
* @param {string} issue - Small index label, e.g. "N° 04".
|
|
14
|
+
* @param {string} variant - Layout (split|stacked). Default 'split'.
|
|
15
|
+
* @param {string} size - Vertical rhythm (sm|md|lg). Default 'md'.
|
|
16
|
+
* @param {string} className - Extra class.
|
|
17
|
+
*
|
|
18
|
+
* Accessibility: one h1; ticker is decorative (aria-hidden) and stops with reduced motion.
|
|
19
|
+
*/
|
|
20
|
+
import ProductMedia from '../ecommerce/ProductMedia.astro';
|
|
21
|
+
|
|
22
|
+
interface Cta { label: string; href: string }
|
|
23
|
+
interface Props {
|
|
24
|
+
kicker?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
text?: string;
|
|
27
|
+
primary?: Cta;
|
|
28
|
+
secondary?: Cta;
|
|
29
|
+
media?: { icon?: string; hue?: number; image?: string; alt?: string; caption?: string; href?: string };
|
|
30
|
+
ticker?: string[];
|
|
31
|
+
issue?: string;
|
|
32
|
+
variant?: 'split' | 'stacked';
|
|
33
|
+
size?: 'sm' | 'md' | 'lg';
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const {
|
|
38
|
+
kicker = 'Autumn / Winter 26',
|
|
39
|
+
title = 'Quiet *objects* for everyday rituals',
|
|
40
|
+
text = 'Clothing and homeware made slowly, in small runs, by workshops we know by name. Designed to be used for years — and to look better for it.',
|
|
41
|
+
primary = { label: 'Shop the collection', href: '#' },
|
|
42
|
+
secondary = { label: 'Read the journal', href: '#' },
|
|
43
|
+
media = { icon: 'jacket', hue: 22, caption: 'Wool overcoat, in Rust — €320', href: '#' },
|
|
44
|
+
ticker = ['Made in small runs', 'Natural fibres', 'Repair for life', 'Carbon-neutral shipping', 'Free returns'],
|
|
45
|
+
issue = 'N° 04',
|
|
46
|
+
variant = 'split',
|
|
47
|
+
size = 'md',
|
|
48
|
+
className = '',
|
|
49
|
+
} = Astro.props;
|
|
50
|
+
|
|
51
|
+
const parts = title.split(/\*(.+?)\*/g);
|
|
52
|
+
const MediaTag = media.href ? 'a' : 'div';
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
<section class:list={['sh-ed', `sh-ed--${variant}`, `sh-ed--${size}`, className]}>
|
|
56
|
+
<div class="sh-ed__inner">
|
|
57
|
+
<div class="sh-ed__copy">
|
|
58
|
+
<p class="sh-ed__meta"><span>{kicker}</span>{issue && <span>{issue}</span>}</p>
|
|
59
|
+
<h1 class="sh-ed__title">{parts.map((p, i) => (i % 2 ? <em>{p}</em> : p))}</h1>
|
|
60
|
+
<div class="sh-ed__foot">
|
|
61
|
+
{text && <p class="sh-ed__text">{text}</p>}
|
|
62
|
+
<div class="sh-ed__ctas">
|
|
63
|
+
{primary && <a class="sh-ed__btn sh-ed__btn--solid" href={primary.href}>{primary.label}<span aria-hidden="true">→</span></a>}
|
|
64
|
+
{secondary && <a class="sh-ed__btn" href={secondary.href}>{secondary.label}</a>}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<MediaTag class="sh-ed__media" href={media.href}>
|
|
69
|
+
<ProductMedia image={media.image} alt={media.alt ?? ''} icon={media.icon} hue={media.hue} ratio="4 / 5" variant="soft" size="lg" />
|
|
70
|
+
{media.caption && <span class="sh-ed__caption">{media.caption}</span>}
|
|
71
|
+
</MediaTag>
|
|
72
|
+
</div>
|
|
73
|
+
{ticker.length > 0 && (
|
|
74
|
+
<div class="sh-ed__ticker" aria-hidden="true">
|
|
75
|
+
<div class="sh-ed__track">
|
|
76
|
+
{[0, 1].map(() => ticker.map((w) => <span>{w}<i>✦</i></span>))}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
)}
|
|
80
|
+
</section>
|
|
81
|
+
|
|
82
|
+
<style>
|
|
83
|
+
.sh-ed { container-type: inline-size; --py: clamp(2.5rem, 6vw, 5rem); color: var(--c-text-1, #fff); overflow: hidden; }
|
|
84
|
+
.sh-ed--sm { --py: clamp(1.5rem, 4vw, 3rem); }
|
|
85
|
+
.sh-ed--lg { --py: clamp(3.5rem, 8vw, 7rem); }
|
|
86
|
+
.sh-ed__inner {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
|
|
89
|
+
gap: clamp(1.5rem, 4vw, 4rem);
|
|
90
|
+
align-items: end;
|
|
91
|
+
max-width: 1440px;
|
|
92
|
+
margin: 0 auto;
|
|
93
|
+
padding: var(--py) clamp(1rem, 3vw, 2.5rem);
|
|
94
|
+
}
|
|
95
|
+
.sh-ed--stacked .sh-ed__inner { grid-template-columns: 1fr; }
|
|
96
|
+
.sh-ed__meta { display: flex; justify-content: space-between; gap: var(--sp-4, 1rem); margin: 0 0 var(--sp-6, 1.5rem); padding-bottom: var(--sp-3, 0.75rem); border-bottom: 1px solid currentColor; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
|
|
97
|
+
.sh-ed__title {
|
|
98
|
+
margin: 0;
|
|
99
|
+
font-family: var(--font-display, Georgia, 'Times New Roman', serif);
|
|
100
|
+
font-size: clamp(3rem, 8.5vw, 8.5rem);
|
|
101
|
+
font-weight: 400;
|
|
102
|
+
line-height: 0.92;
|
|
103
|
+
letter-spacing: -0.045em;
|
|
104
|
+
text-wrap: balance;
|
|
105
|
+
}
|
|
106
|
+
.sh-ed__title em { font-style: italic; color: var(--shop-accent, var(--c-primary-light, #d4a017)); }
|
|
107
|
+
.sh-ed__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-6, 1.5rem); align-items: end; margin-top: var(--sp-8, 2rem); }
|
|
108
|
+
.sh-ed__text { margin: 0; max-width: 30rem; font-size: 1rem; line-height: 1.65; color: var(--c-text-2, #a3a3a3); }
|
|
109
|
+
.sh-ed__ctas { display: flex; flex-wrap: wrap; gap: var(--sp-2, 0.5rem); }
|
|
110
|
+
.sh-ed__btn {
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: 0.6rem;
|
|
114
|
+
min-height: 52px;
|
|
115
|
+
padding: 0 1.4rem;
|
|
116
|
+
border: 1px solid currentColor;
|
|
117
|
+
border-radius: var(--r-sm, 2px);
|
|
118
|
+
color: inherit;
|
|
119
|
+
font-size: 0.85rem;
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
letter-spacing: 0.06em;
|
|
122
|
+
text-transform: uppercase;
|
|
123
|
+
text-decoration: none;
|
|
124
|
+
transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
|
|
125
|
+
}
|
|
126
|
+
.sh-ed__btn:hover { background: var(--c-text-1, #fff); color: var(--c-bg, #050505); }
|
|
127
|
+
.sh-ed__btn--solid { background: var(--c-text-1, #fff); color: var(--c-bg, #050505); border-color: var(--c-text-1, #fff); }
|
|
128
|
+
.sh-ed__btn--solid:hover { background: var(--shop-accent, var(--c-primary-light, #d4a017)); border-color: var(--shop-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); }
|
|
129
|
+
.sh-ed__btn:focus-visible, .sh-ed__media:focus-visible { outline: 2px solid var(--shop-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
130
|
+
|
|
131
|
+
.sh-ed__media { position: relative; display: block; color: inherit; text-decoration: none; border-radius: var(--r-sm, 2px); overflow: hidden; }
|
|
132
|
+
.sh-ed__media :global(.p-media) { transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
133
|
+
.sh-ed__media:hover :global(.p-media) { transform: scale(1.03); }
|
|
134
|
+
.sh-ed__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--sp-3, 0.75rem) var(--sp-4, 1rem); background: linear-gradient(transparent, rgb(var(--paper-rgb, 5 5 5) / 0.85)); font-size: 0.8rem; letter-spacing: 0.02em; }
|
|
135
|
+
|
|
136
|
+
.sh-ed__ticker { border-block: 1px solid var(--c-border, rgba(255, 255, 255, 0.1)); overflow: hidden; }
|
|
137
|
+
.sh-ed__track { display: flex; width: max-content; animation: sh-ed-run 40s linear infinite; }
|
|
138
|
+
.sh-ed__track span { display: inline-flex; align-items: center; gap: 1.5rem; padding: 0.9rem 0 0.9rem 1.5rem; font-family: var(--font-display, Georgia, serif); font-size: 1.15rem; font-style: italic; white-space: nowrap; }
|
|
139
|
+
.sh-ed__track i { font-style: normal; font-size: 0.7rem; color: var(--shop-accent, var(--c-primary-light, #d4a017)); }
|
|
140
|
+
@keyframes sh-ed-run { to { transform: translateX(-50%); } }
|
|
141
|
+
|
|
142
|
+
@container (max-width: 900px) {
|
|
143
|
+
.sh-ed__inner { grid-template-columns: 1fr; }
|
|
144
|
+
.sh-ed__foot { grid-template-columns: 1fr; }
|
|
145
|
+
.sh-ed__media { max-width: 520px; }
|
|
146
|
+
}
|
|
147
|
+
@media (prefers-reduced-motion: reduce) {
|
|
148
|
+
.sh-ed__track { animation: none; }
|
|
149
|
+
.sh-ed__media :global(.p-media) { transition: none; }
|
|
150
|
+
}
|
|
151
|
+
</style>
|