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,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* AgencyContactBrief — "Start a project" brief: service chips, budget pills, timeline, contact
|
|
4
|
+
* details and message, with validation and a success state; side column with direct contacts,
|
|
5
|
+
* office and response time.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} title - Heading. Default "Let's build something people remember".
|
|
8
|
+
* @param {string} text - Intro text.
|
|
9
|
+
* @param {string[]} services - Service chips (multi-select).
|
|
10
|
+
* @param {string[]} budgets - Budget options (single-select).
|
|
11
|
+
* @param {string[]} timelines - Timeline select options.
|
|
12
|
+
* @param {string} action - Form action. With '#' the form validates and confirms locally. Default '#'.
|
|
13
|
+
* @param {Array<{label: string, value: string, href: string}>} contacts - Direct channels.
|
|
14
|
+
* @param {{city: string, address: string}} office - Office card (optional).
|
|
15
|
+
* @param {string} responseTime - Reply promise. Default 'We reply within one business day.'
|
|
16
|
+
* @param {string} id - Base id. Default 'brief'.
|
|
17
|
+
* @param {string} className - Extra class.
|
|
18
|
+
*
|
|
19
|
+
* Accessibility: chips and pills are native checkboxes/radios inside fieldsets with legends;
|
|
20
|
+
* required fields use autocomplete hints; errors are listed in an alert and focus moves to the
|
|
21
|
+
* first invalid field; the success message receives focus.
|
|
22
|
+
*/
|
|
23
|
+
interface Props {
|
|
24
|
+
title?: string;
|
|
25
|
+
text?: string;
|
|
26
|
+
services?: string[];
|
|
27
|
+
budgets?: string[];
|
|
28
|
+
timelines?: string[];
|
|
29
|
+
action?: string;
|
|
30
|
+
contacts?: Array<{ label: string; value: string; href: string }>;
|
|
31
|
+
office?: { city: string; address: string };
|
|
32
|
+
responseTime?: string;
|
|
33
|
+
id?: string;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const {
|
|
38
|
+
title = "Let's build something people remember",
|
|
39
|
+
text = 'Tell us a little about your project. A partner — not a salesperson — will reply with next steps.',
|
|
40
|
+
services = ['Brand identity', 'Website', 'Growth marketing', 'Content & social', 'Not sure yet'],
|
|
41
|
+
budgets = ['< €15k', '€15–30k', '€30–60k', '€60k+'],
|
|
42
|
+
timelines = ['As soon as possible', 'In 1–3 months', 'In 3–6 months', 'Just exploring'],
|
|
43
|
+
action = '#',
|
|
44
|
+
contacts = [
|
|
45
|
+
{ label: 'New business', value: 'hello@volta.studio', href: 'mailto:hello@volta.studio' },
|
|
46
|
+
{ label: 'Call us', value: '+34 910 123 456', href: 'tel:+34910123456' },
|
|
47
|
+
],
|
|
48
|
+
office = { city: 'Madrid', address: 'Calle de Fuencarral 45, 28004' },
|
|
49
|
+
responseTime = 'We reply within one business day.',
|
|
50
|
+
id = 'brief',
|
|
51
|
+
className = '',
|
|
52
|
+
} = Astro.props;
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
<div class="cq-agency-brief">
|
|
56
|
+
<section class:list={['acb', className]} aria-labelledby={`${id}-title`}>
|
|
57
|
+
<div class="acb__intro">
|
|
58
|
+
<h2 class="acb__title" id={`${id}-title`}>{title}</h2>
|
|
59
|
+
{text && <p class="acb__text">{text}</p>}
|
|
60
|
+
<ul class="acb__contacts">
|
|
61
|
+
{contacts.map((c) => <li><span>{c.label}</span><a href={c.href}>{c.value}</a></li>)}
|
|
62
|
+
</ul>
|
|
63
|
+
{office && <p class="acb__office"><span>Studio</span><strong>{office.city}</strong>{office.address}</p>}
|
|
64
|
+
{responseTime && <p class="acb__reply"><i aria-hidden="true"></i>{responseTime}</p>}
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<form class="acb__form" action={action} method="post" novalidate data-brief>
|
|
68
|
+
<fieldset class="acb__group">
|
|
69
|
+
<legend>What do you need?</legend>
|
|
70
|
+
<div class="acb__chips">
|
|
71
|
+
{services.map((s, i) => (
|
|
72
|
+
<label class="acb__chip"><input type="checkbox" name="services" value={s} checked={i === 0} /><span>{s}</span></label>
|
|
73
|
+
))}
|
|
74
|
+
</div>
|
|
75
|
+
</fieldset>
|
|
76
|
+
<fieldset class="acb__group">
|
|
77
|
+
<legend>Budget</legend>
|
|
78
|
+
<div class="acb__chips">
|
|
79
|
+
{budgets.map((b, i) => (
|
|
80
|
+
<label class="acb__chip"><input type="radio" name="budget" value={b} checked={i === 1} /><span>{b}</span></label>
|
|
81
|
+
))}
|
|
82
|
+
</div>
|
|
83
|
+
</fieldset>
|
|
84
|
+
<div class="acb__row">
|
|
85
|
+
<div class="acb__field">
|
|
86
|
+
<label for={`${id}-name`}>Your name</label>
|
|
87
|
+
<input id={`${id}-name`} name="name" required autocomplete="name" />
|
|
88
|
+
</div>
|
|
89
|
+
<div class="acb__field">
|
|
90
|
+
<label for={`${id}-email`}>Work email</label>
|
|
91
|
+
<input id={`${id}-email`} name="email" type="email" required autocomplete="email" />
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="acb__row">
|
|
95
|
+
<div class="acb__field">
|
|
96
|
+
<label for={`${id}-company`}>Company</label>
|
|
97
|
+
<input id={`${id}-company`} name="company" autocomplete="organization" />
|
|
98
|
+
</div>
|
|
99
|
+
<div class="acb__field">
|
|
100
|
+
<label for={`${id}-when`}>Timeline</label>
|
|
101
|
+
<select id={`${id}-when`} name="timeline">{timelines.map((t) => <option>{t}</option>)}</select>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="acb__field">
|
|
105
|
+
<label for={`${id}-msg`}>Tell us about the project</label>
|
|
106
|
+
<textarea id={`${id}-msg`} name="message" rows="4" required minlength="20" placeholder="Goals, audience, deadlines, links…"></textarea>
|
|
107
|
+
</div>
|
|
108
|
+
<p class="acb__error" role="alert" data-error></p>
|
|
109
|
+
<button class="acb__submit" type="submit">Send brief <span aria-hidden="true">↗</span></button>
|
|
110
|
+
<p class="acb__fine">By sending this form you agree to our privacy policy. No newsletters, promise.</p>
|
|
111
|
+
</form>
|
|
112
|
+
|
|
113
|
+
<div class="acb__done" hidden tabindex="-1" data-done>
|
|
114
|
+
<span class="acb__done-badge" aria-hidden="true">✓</span>
|
|
115
|
+
<h3>Brief received — thank you!</h3>
|
|
116
|
+
<p>{responseTime} In the meantime, have a look at our recent work.</p>
|
|
117
|
+
</div>
|
|
118
|
+
</section>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<script>
|
|
122
|
+
document.querySelectorAll<HTMLFormElement>('form[data-brief]:not([data-bound])').forEach((form) => {
|
|
123
|
+
form.dataset.bound = '';
|
|
124
|
+
const error = form.querySelector<HTMLElement>('[data-error]')!;
|
|
125
|
+
const done = form.parentElement!.querySelector<HTMLElement>('[data-done]')!;
|
|
126
|
+
form.addEventListener('submit', (e) => {
|
|
127
|
+
form.querySelectorAll('[aria-invalid]').forEach((n) => n.removeAttribute('aria-invalid'));
|
|
128
|
+
const invalid = Array.from(form.querySelectorAll<HTMLInputElement | HTMLTextAreaElement>('input[required], textarea[required]')).filter((n) => !n.checkValidity());
|
|
129
|
+
const noService = !form.querySelector('input[name="services"]:checked');
|
|
130
|
+
if (invalid.length || noService) {
|
|
131
|
+
e.preventDefault();
|
|
132
|
+
invalid.forEach((n) => n.setAttribute('aria-invalid', 'true'));
|
|
133
|
+
const msgs = invalid.map((n) => form.querySelector(`label[for="${n.id}"]`)?.textContent).filter(Boolean);
|
|
134
|
+
if (noService) msgs.unshift('at least one service');
|
|
135
|
+
error.textContent = `Please complete: ${msgs.join(', ')}.`;
|
|
136
|
+
(invalid[0] ?? form.querySelector<HTMLInputElement>('input[name="services"]'))?.focus();
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (form.getAttribute('action') === '#') {
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
form.hidden = true;
|
|
142
|
+
done.hidden = false;
|
|
143
|
+
done.focus();
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
<style>
|
|
150
|
+
.cq-agency-brief { container-type: inline-size; }
|
|
151
|
+
.acb { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6cqi, 5rem); color: var(--c-text-1, #fff); }
|
|
152
|
+
.acb__title { margin: 0; font-size: clamp(2.4rem, 6.5cqi, 4.6rem); font-weight: 900; letter-spacing: -0.055em; line-height: 0.92; }
|
|
153
|
+
.acb__text { margin: var(--sp-5, 1.25rem) 0 0; max-width: 28rem; font-size: 1.05rem; line-height: 1.6; color: var(--c-text-2, #a3a3a3); }
|
|
154
|
+
.acb__contacts { display: grid; gap: var(--sp-4, 1rem); margin: var(--sp-8, 2rem) 0 0; padding: 0; list-style: none; }
|
|
155
|
+
.acb__contacts li, .acb__office { display: grid; gap: 2px; margin: 0; }
|
|
156
|
+
.acb__contacts span, .acb__office span { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-3, #737373); }
|
|
157
|
+
.acb__contacts a { font-size: clamp(1.2rem, 2.6cqi, 1.6rem); font-weight: 800; letter-spacing: -0.02em; color: inherit; text-decoration: none; background: linear-gradient(var(--agency-accent, var(--c-primary-light, #d4a017)), var(--agency-accent, var(--c-primary-light, #d4a017))) 0 100% / 0 35% no-repeat; transition: background-size 0.3s ease; width: fit-content; }
|
|
158
|
+
.acb__contacts a:hover { background-size: 100% 35%; }
|
|
159
|
+
.acb__office { margin-top: var(--sp-6, 1.5rem); font-size: 0.92rem; color: var(--c-text-2, #a3a3a3); }
|
|
160
|
+
.acb__office strong { font-size: 1.05rem; color: var(--c-text-1, #fff); }
|
|
161
|
+
.acb__reply { display: flex; align-items: center; gap: 8px; margin: var(--sp-6, 1.5rem) 0 0; font-size: 0.88rem; font-weight: 600; }
|
|
162
|
+
.acb__reply i { width: 10px; height: 10px; border-radius: 50%; background: var(--c-success, #34d399); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-success, #34d399) 25%, transparent); }
|
|
163
|
+
|
|
164
|
+
.acb__form, .acb__done { display: grid; gap: var(--sp-5, 1.25rem); padding: clamp(1.25rem, 3.5cqi, 2.25rem); border-radius: 28px; border: 1px solid var(--c-border, rgba(255, 255, 255, 0.12)); background: var(--c-bg-1, #0a0a0a); }
|
|
165
|
+
.acb__form[hidden], .acb__done[hidden] { display: none; }
|
|
166
|
+
.acb__group { margin: 0; padding: 0; border: 0; min-width: 0; }
|
|
167
|
+
.acb__group legend { margin-bottom: var(--sp-3, 0.75rem); font-size: 0.95rem; font-weight: 800; }
|
|
168
|
+
.acb__chips { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
169
|
+
.acb__chip { position: relative; cursor: pointer; }
|
|
170
|
+
.acb__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
|
|
171
|
+
.acb__chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1.5px solid var(--c-border, rgba(255, 255, 255, 0.2)); font-size: 0.9rem; font-weight: 700; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
|
|
172
|
+
.acb__chip:hover span { border-color: currentColor; }
|
|
173
|
+
.acb__chip input:checked + span { background: var(--agency-accent, var(--c-primary-light, #d4a017)); border-color: transparent; color: var(--c-on-primary, #050505); }
|
|
174
|
+
.acb__chip input:focus-visible + span { outline: 2px solid var(--c-text-1, #fff); outline-offset: 2px; }
|
|
175
|
+
.acb__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4, 1rem); }
|
|
176
|
+
.acb__field { display: grid; gap: 6px; }
|
|
177
|
+
.acb__field label { font-size: 0.85rem; font-weight: 700; }
|
|
178
|
+
.acb__field :is(input, select, textarea) { width: 100%; min-height: 50px; padding: 0.75rem 1rem; border-radius: 14px; border: 1.5px solid var(--c-border, rgba(255, 255, 255, 0.16)); background: var(--c-bg, #050505); color: var(--c-text-1, #fff); font: inherit; font-size: 0.95rem; }
|
|
179
|
+
.acb__field textarea { resize: vertical; }
|
|
180
|
+
.acb__field :is(input, select, textarea):focus { outline: none; border-color: var(--c-text-1, #fff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--agency-accent, var(--c-primary-light, #d4a017)) 35%, transparent); }
|
|
181
|
+
.acb__field [aria-invalid='true'] { border-color: var(--c-danger, #f87171); }
|
|
182
|
+
.acb__error { margin: 0; font-size: 0.88rem; font-weight: 600; color: var(--c-danger, #f87171); }
|
|
183
|
+
.acb__error:empty { display: none; }
|
|
184
|
+
.acb__submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; border: 0; border-radius: 999px; background: var(--c-text-1, #fff); color: var(--c-bg, #050505); font: inherit; font-size: 1.05rem; font-weight: 900; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; }
|
|
185
|
+
.acb__submit:hover { background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); transform: rotate(-1deg); }
|
|
186
|
+
.acb__submit:focus-visible { outline: 2px solid var(--agency-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
187
|
+
.acb__fine { margin: -6px 0 0; font-size: 0.78rem; color: var(--c-text-3, #737373); text-align: center; }
|
|
188
|
+
.acb__done { place-content: center; justify-items: start; min-height: 420px; outline: none; }
|
|
189
|
+
.acb__done-badge { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); font-size: 1.8rem; font-weight: 900; transform: rotate(-8deg); }
|
|
190
|
+
.acb__done h3 { margin: 0; font-size: 2rem; font-weight: 900; letter-spacing: -0.04em; }
|
|
191
|
+
.acb__done p { margin: 0; color: var(--c-text-2, #a3a3a3); }
|
|
192
|
+
@container (max-width: 820px) { .acb { grid-template-columns: 1fr; } }
|
|
193
|
+
@container (max-width: 520px) { .acb__row { grid-template-columns: 1fr; } }
|
|
194
|
+
</style>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* AgencyFooterCta — Agency footer led by a giant "Let's talk" link, then link columns, offices,
|
|
4
|
+
* socials and the legal line.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} kicker - Line above the CTA. Default 'Have a project in mind?'.
|
|
7
|
+
* @param {{label: string, href: string}} cta - Giant CTA link. Default "Let's talk".
|
|
8
|
+
* @param {string} email - Email shown under the CTA (optional).
|
|
9
|
+
* @param {Array<{title: string, links: {label: string, href: string}[]}>} columns - Link columns.
|
|
10
|
+
* @param {Array<{city: string, address: string}>} offices - Office addresses.
|
|
11
|
+
* @param {Array<{label: string, href: string}>} socials - Social links.
|
|
12
|
+
* @param {string} brand - Brand for the legal line. Default 'Volta'.
|
|
13
|
+
* @param {string} variant - Style (accent|plain). Default 'accent'.
|
|
14
|
+
* @param {string} className - Extra class.
|
|
15
|
+
*
|
|
16
|
+
* Accessibility: footer landmark with a visually hidden heading; the CTA is a single large link;
|
|
17
|
+
* columns are nav lists.
|
|
18
|
+
*/
|
|
19
|
+
interface Props {
|
|
20
|
+
kicker?: string;
|
|
21
|
+
cta?: { label: string; href: string };
|
|
22
|
+
email?: string;
|
|
23
|
+
columns?: Array<{ title: string; links: Array<{ label: string; href: string }> }>;
|
|
24
|
+
offices?: Array<{ city: string; address: string }>;
|
|
25
|
+
socials?: Array<{ label: string; href: string }>;
|
|
26
|
+
brand?: string;
|
|
27
|
+
variant?: 'accent' | 'plain';
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const {
|
|
32
|
+
kicker = 'Have a project in mind?',
|
|
33
|
+
cta = { label: "Let's talk", href: '#contact' },
|
|
34
|
+
email = 'hello@volta.studio',
|
|
35
|
+
columns = [
|
|
36
|
+
{ title: 'Studio', links: [{ label: 'Work', href: '#' }, { label: 'Services', href: '#' }, { label: 'About', href: '#' }, { label: 'Careers', href: '#' }] },
|
|
37
|
+
{ title: 'Services', links: [{ label: 'Brand identity', href: '#' }, { label: 'Websites', href: '#' }, { label: 'Growth', href: '#' }] },
|
|
38
|
+
],
|
|
39
|
+
offices = [{ city: 'Madrid', address: 'Calle de Fuencarral 45' }, { city: 'Lisbon', address: 'Rua das Flores 12' }],
|
|
40
|
+
socials = [{ label: 'Instagram', href: '#' }, { label: 'LinkedIn', href: '#' }, { label: 'Dribbble', href: '#' }, { label: 'Behance', href: '#' }],
|
|
41
|
+
brand = 'Volta',
|
|
42
|
+
variant = 'accent',
|
|
43
|
+
className = '',
|
|
44
|
+
} = Astro.props;
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
<div class="cq-agency-footer">
|
|
48
|
+
<footer class:list={['afc', `afc--${variant}`, className]} aria-labelledby="afc-title">
|
|
49
|
+
<h2 id="afc-title" class="sr-only">Footer</h2>
|
|
50
|
+
<div class="afc__inner">
|
|
51
|
+
<p class="afc__kicker">{kicker}</p>
|
|
52
|
+
<a class="afc__cta" href={cta.href}>{cta.label}<span aria-hidden="true">↗</span></a>
|
|
53
|
+
{email && <a class="afc__email" href={`mailto:${email}`}>{email}</a>}
|
|
54
|
+
|
|
55
|
+
<div class="afc__grid">
|
|
56
|
+
{columns.map((c) => (
|
|
57
|
+
<nav aria-label={c.title}><p class="afc__label">{c.title}</p><ul>{c.links.map((l) => <li><a href={l.href}>{l.label}</a></li>)}</ul></nav>
|
|
58
|
+
))}
|
|
59
|
+
{offices.length > 0 && (
|
|
60
|
+
<div><p class="afc__label">Offices</p><ul>{offices.map((o) => <li><strong>{o.city}</strong><span>{o.address}</span></li>)}</ul></div>
|
|
61
|
+
)}
|
|
62
|
+
{socials.length > 0 && (
|
|
63
|
+
<nav aria-label="Social"><p class="afc__label">Follow</p><ul>{socials.map((s) => <li><a href={s.href}>{s.label} ↗</a></li>)}</ul></nav>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
<p class="afc__legal"><span>© {new Date().getFullYear()} {brand}. All rights reserved.</span><span>Privacy · Cookies · Imprint</span></p>
|
|
67
|
+
</div>
|
|
68
|
+
</footer>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.cq-agency-footer { container-type: inline-size; }
|
|
73
|
+
.afc { padding: clamp(3rem, 8cqi, 6rem) clamp(1rem, 4cqi, 2.5rem) var(--sp-6, 1.5rem); color: var(--c-text-1, #fff); }
|
|
74
|
+
.afc--accent { background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); --c-text-1: var(--c-on-primary, #050505); --c-text-2: color-mix(in srgb, var(--c-on-primary, #050505) 72%, transparent); --c-border: color-mix(in srgb, var(--c-on-primary, #050505) 25%, transparent); border-radius: 40px 40px 0 0; }
|
|
75
|
+
.afc__inner { max-width: 1280px; margin: 0 auto; }
|
|
76
|
+
.afc__kicker { margin: 0 0 var(--sp-3, 0.75rem); font-size: 1.1rem; font-weight: 700; color: var(--c-text-2, #a3a3a3); }
|
|
77
|
+
.afc__cta { display: inline-flex; align-items: flex-start; gap: 0.1em; font-size: clamp(3.5rem, 15cqi, 12rem); font-weight: 900; letter-spacing: -0.07em; line-height: 0.85; color: inherit; text-decoration: none; transition: letter-spacing 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
78
|
+
.afc__cta span { font-size: 0.4em; transition: transform 0.4s ease; }
|
|
79
|
+
.afc__cta:hover { letter-spacing: -0.05em; color: inherit; }
|
|
80
|
+
.afc__cta:hover span { transform: translate(6px, -6px) rotate(10deg); }
|
|
81
|
+
.afc__email { display: inline-block; margin-top: var(--sp-4, 1rem); font-size: clamp(1.1rem, 2.4cqi, 1.5rem); font-weight: 800; color: inherit; text-decoration: underline; text-underline-offset: 6px; }
|
|
82
|
+
.afc__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-8, 2rem); margin-top: clamp(2.5rem, 7cqi, 5rem); padding-top: var(--sp-6, 1.5rem); border-top: 1.5px solid currentColor; }
|
|
83
|
+
.afc__label { margin: 0 0 var(--sp-3, 0.75rem); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-text-2, #a3a3a3); }
|
|
84
|
+
.afc__grid ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
|
|
85
|
+
.afc__grid a { display: inline-flex; min-height: 32px; align-items: center; color: inherit; font-weight: 700; text-decoration: none; }
|
|
86
|
+
.afc__grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
|
|
87
|
+
.afc__grid li strong { display: block; font-weight: 800; }
|
|
88
|
+
.afc__grid li span { font-size: 0.9rem; color: var(--c-text-2, #a3a3a3); }
|
|
89
|
+
.afc a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
|
|
90
|
+
.afc__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-3, 0.75rem); margin: var(--sp-10, 2.5rem) 0 0; font-size: 0.82rem; color: var(--c-text-2, #a3a3a3); }
|
|
91
|
+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
92
|
+
@container (max-width: 760px) { .afc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .afc--accent { border-radius: 28px 28px 0 0; } }
|
|
93
|
+
@media (prefers-reduced-motion: reduce) { .afc__cta, .afc__cta span { transition: none; } }
|
|
94
|
+
</style>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* AgencyHeader — Floating pill navigation for agency and studio sites: logo, links, theme toggle,
|
|
4
|
+
* "Start a project" CTA and an animated full-screen mobile menu.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} brand - Logo text. Default 'Volta'.
|
|
7
|
+
* @param {string} brandHref - Logo link. Default '/'.
|
|
8
|
+
* @param {Array<{label: string, href: string}>} links - Menu links.
|
|
9
|
+
* @param {{label: string, href: string}} cta - Call to action. Default 'Start a project'.
|
|
10
|
+
* @param {string} currentHref - Marks the active link with aria-current.
|
|
11
|
+
* @param {boolean} themeToggle - Show the light/dark toggle. Default true.
|
|
12
|
+
* @param {boolean} sticky - Float over the page while scrolling. Default true.
|
|
13
|
+
* @param {string} variant - Style (pill|bar). Default 'pill'.
|
|
14
|
+
* @param {string} className - Extra class.
|
|
15
|
+
*
|
|
16
|
+
* Accessibility: nav landmark; the mobile menu is a disclosure (aria-expanded) closed with
|
|
17
|
+
* Escape, which returns focus to the toggle; links have 44px targets.
|
|
18
|
+
*/
|
|
19
|
+
interface Props {
|
|
20
|
+
brand?: string;
|
|
21
|
+
brandHref?: string;
|
|
22
|
+
links?: Array<{ label: string; href: string }>;
|
|
23
|
+
cta?: { label: string; href: string };
|
|
24
|
+
currentHref?: string;
|
|
25
|
+
themeToggle?: boolean;
|
|
26
|
+
sticky?: boolean;
|
|
27
|
+
variant?: 'pill' | 'bar';
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const {
|
|
32
|
+
brand = 'Volta',
|
|
33
|
+
brandHref = '/',
|
|
34
|
+
links = [
|
|
35
|
+
{ label: 'Work', href: '#work' },
|
|
36
|
+
{ label: 'Services', href: '#services' },
|
|
37
|
+
{ label: 'Studio', href: '#team' },
|
|
38
|
+
{ label: 'Contact', href: '#contact' },
|
|
39
|
+
],
|
|
40
|
+
cta = { label: 'Start a project', href: '#contact' },
|
|
41
|
+
currentHref,
|
|
42
|
+
themeToggle = true,
|
|
43
|
+
sticky = true,
|
|
44
|
+
variant = 'pill',
|
|
45
|
+
className = '',
|
|
46
|
+
} = Astro.props;
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
<header class:list={['ah', `ah--${variant}`, { 'ah--sticky': sticky }, className]} data-agency-header>
|
|
50
|
+
<div class="ah__bar">
|
|
51
|
+
<a class="ah__brand" href={brandHref}><span class="ah__dot" aria-hidden="true"></span>{brand}</a>
|
|
52
|
+
<nav class="ah__nav" id="ah-nav" aria-label="Main" data-nav>
|
|
53
|
+
<ul>
|
|
54
|
+
{links.map((l) => <li><a href={l.href} aria-current={l.href === currentHref ? 'page' : undefined}>{l.label}</a></li>)}
|
|
55
|
+
</ul>
|
|
56
|
+
{cta && <a class="ah__cta ah__cta--mobile" href={cta.href}>{cta.label} <span aria-hidden="true">↗</span></a>}
|
|
57
|
+
</nav>
|
|
58
|
+
<div class="ah__actions">
|
|
59
|
+
{themeToggle && (
|
|
60
|
+
<button class="ah__icon" type="button" aria-label="Switch theme" data-theme-btn>
|
|
61
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="12" cy="12" r="8"/><path d="M12 4a8 8 0 0 1 0 16z" fill="currentColor"/></svg>
|
|
62
|
+
</button>
|
|
63
|
+
)}
|
|
64
|
+
{cta && <a class="ah__cta" href={cta.href}>{cta.label} <span aria-hidden="true">↗</span></a>}
|
|
65
|
+
<button class="ah__icon ah__burger" type="button" aria-expanded="false" aria-controls="ah-nav" aria-label="Menu" data-burger>
|
|
66
|
+
<span aria-hidden="true"></span><span aria-hidden="true"></span>
|
|
67
|
+
</button>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</header>
|
|
71
|
+
|
|
72
|
+
<script>
|
|
73
|
+
document.querySelectorAll<HTMLElement>('[data-agency-header]:not([data-bound])').forEach((h) => {
|
|
74
|
+
h.dataset.bound = '';
|
|
75
|
+
const burger = h.querySelector<HTMLButtonElement>('[data-burger]');
|
|
76
|
+
const nav = h.querySelector<HTMLElement>('[data-nav]');
|
|
77
|
+
const set = (open: boolean) => {
|
|
78
|
+
burger?.setAttribute('aria-expanded', String(open));
|
|
79
|
+
nav?.classList.toggle('is-open', open);
|
|
80
|
+
h.classList.toggle('is-menu', open);
|
|
81
|
+
document.documentElement.style.overflow = open ? 'hidden' : '';
|
|
82
|
+
};
|
|
83
|
+
burger?.addEventListener('click', () => set(burger.getAttribute('aria-expanded') !== 'true'));
|
|
84
|
+
nav?.querySelectorAll('a').forEach((a) => a.addEventListener('click', () => set(false)));
|
|
85
|
+
document.addEventListener('keydown', (e) => {
|
|
86
|
+
if (e.key === 'Escape' && burger?.getAttribute('aria-expanded') === 'true') { set(false); burger.focus(); }
|
|
87
|
+
});
|
|
88
|
+
h.querySelector('[data-theme-btn]')?.addEventListener('click', () => {
|
|
89
|
+
const root = document.documentElement;
|
|
90
|
+
const next = root.dataset.theme === 'dark' ? 'light' : 'dark';
|
|
91
|
+
root.dataset.theme = next;
|
|
92
|
+
try { window.localStorage.setItem('ack-theme', next); } catch { /* ignore */ }
|
|
93
|
+
});
|
|
94
|
+
const onScroll = () => h.classList.toggle('is-scrolled', window.scrollY > 12);
|
|
95
|
+
onScroll();
|
|
96
|
+
window.addEventListener('scroll', onScroll, { passive: true });
|
|
97
|
+
});
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style>
|
|
101
|
+
.ah { position: relative; z-index: 60; padding: 14px clamp(0.75rem, 2vw, 1.5rem); color: var(--c-text-1, #fff); }
|
|
102
|
+
.ah--sticky { position: sticky; top: 0; }
|
|
103
|
+
.ah__bar {
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
gap: var(--sp-4, 1rem);
|
|
107
|
+
max-width: 1280px;
|
|
108
|
+
min-height: 60px;
|
|
109
|
+
margin: 0 auto;
|
|
110
|
+
padding: 0 8px 0 22px;
|
|
111
|
+
border-radius: 999px;
|
|
112
|
+
border: 1px solid var(--c-border, rgba(255, 255, 255, 0.1));
|
|
113
|
+
background: rgb(var(--paper-rgb, 5 5 5) / 0.75);
|
|
114
|
+
backdrop-filter: blur(16px) saturate(1.4);
|
|
115
|
+
transition: box-shadow 0.3s ease, background 0.3s ease;
|
|
116
|
+
}
|
|
117
|
+
.ah--bar .ah__bar { border-radius: 0; border-width: 0 0 1px; max-width: none; }
|
|
118
|
+
.ah.is-menu .ah__bar { backdrop-filter: none; background: transparent; border-color: transparent; box-shadow: none; }
|
|
119
|
+
.ah.is-scrolled .ah__bar { box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.45); }
|
|
120
|
+
.ah__brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 900; letter-spacing: -0.05em; color: inherit; text-decoration: none; }
|
|
121
|
+
.ah__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--agency-accent, var(--c-primary-light, #d4a017)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--agency-accent, var(--c-primary-light, #d4a017)) 30%, transparent); }
|
|
122
|
+
.ah__nav { margin: 0 auto; }
|
|
123
|
+
.ah__nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
|
|
124
|
+
.ah__nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; color: var(--c-text-2, #a3a3a3); font-size: 0.92rem; font-weight: 600; text-decoration: none; transition: background 0.2s ease, color 0.2s ease; }
|
|
125
|
+
.ah__nav a:hover, .ah__nav a[aria-current] { color: var(--c-text-1, #fff); background: rgb(var(--ink-rgb, 255 255 255) / 0.07); }
|
|
126
|
+
.ah__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
|
|
127
|
+
.ah__icon { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
|
|
128
|
+
.ah__icon:hover { background: rgb(var(--ink-rgb, 255 255 255) / 0.07); }
|
|
129
|
+
.ah__cta { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 1.25rem; border-radius: 999px; background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); font-weight: 800; font-size: 0.9rem; text-decoration: none; white-space: nowrap; transition: transform 0.2s ease; }
|
|
130
|
+
.ah__cta:hover { transform: translateY(-1px) rotate(-1deg); color: var(--c-on-primary, #050505); }
|
|
131
|
+
.ah__cta--mobile { display: none; }
|
|
132
|
+
.ah :is(a, button):focus-visible { outline: 2px solid var(--agency-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
133
|
+
.ah__burger { display: none; flex-direction: column; gap: 6px; }
|
|
134
|
+
.ah__burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s ease; }
|
|
135
|
+
.ah__burger[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
|
|
136
|
+
.ah__burger[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }
|
|
137
|
+
|
|
138
|
+
@media (max-width: 860px) {
|
|
139
|
+
.ah__burger { display: grid; place-content: center; }
|
|
140
|
+
.ah__actions > .ah__cta { display: none; }
|
|
141
|
+
.ah__nav {
|
|
142
|
+
position: fixed;
|
|
143
|
+
inset: 0;
|
|
144
|
+
z-index: -1;
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
gap: var(--sp-8, 2rem);
|
|
149
|
+
padding: 100px 28px 40px;
|
|
150
|
+
background: var(--c-bg, #050505);
|
|
151
|
+
opacity: 0;
|
|
152
|
+
visibility: hidden;
|
|
153
|
+
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
154
|
+
}
|
|
155
|
+
.ah__nav.is-open { opacity: 1; visibility: visible; }
|
|
156
|
+
.ah__nav ul { flex-direction: column; gap: 4px; }
|
|
157
|
+
.ah__nav a { min-height: 64px; padding: 0; font-size: clamp(2.2rem, 10vw, 3.2rem); font-weight: 900; letter-spacing: -0.04em; color: var(--c-text-1, #fff); background: none !important; }
|
|
158
|
+
.ah__cta--mobile { display: inline-flex; align-self: flex-start; font-size: 1rem; min-height: 54px; }
|
|
159
|
+
}
|
|
160
|
+
@media (prefers-reduced-motion: reduce) { .ah__nav, .ah__bar, .ah__cta, .ah__burger span { transition: none; } }
|
|
161
|
+
</style>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* AgencyHeroKinetic — Agency hero with an oversized headline whose last word rotates through a
|
|
4
|
+
* list (highlighted like a marker stroke), intro text, CTAs, client proof and rotating stickers.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} before - Headline text before the rotating word. Default 'We build brands people'.
|
|
7
|
+
* @param {string[]} words - Rotating words. Default ['remember', 'share', 'choose', 'love'].
|
|
8
|
+
* @param {string} text - Intro paragraph.
|
|
9
|
+
* @param {{label: string, href: string}} primary - Main CTA.
|
|
10
|
+
* @param {{label: string, href: string}} secondary - Secondary CTA (optional).
|
|
11
|
+
* @param {{count: string, label: string, people?: string[]}} proof - Client proof with avatar initials.
|
|
12
|
+
* @param {string[]} stickers - Small rotated badges around the headline (max 3).
|
|
13
|
+
* @param {number} interval - Rotation speed in ms. Default 2200.
|
|
14
|
+
* @param {string} variant - Layout (left|centered). Default 'left'.
|
|
15
|
+
* @param {string} size - Type scale (md|lg|xl). Default 'lg'.
|
|
16
|
+
* @param {string} className - Extra class.
|
|
17
|
+
*
|
|
18
|
+
* Accessibility: the h1 contains the full sentence for screen readers (first word); the rotating
|
|
19
|
+
* copy is aria-hidden; rotation stops with prefers-reduced-motion and pauses on hover/focus.
|
|
20
|
+
*/
|
|
21
|
+
interface Props {
|
|
22
|
+
before?: string;
|
|
23
|
+
words?: string[];
|
|
24
|
+
text?: string;
|
|
25
|
+
primary?: { label: string; href: string };
|
|
26
|
+
secondary?: { label: string; href: string };
|
|
27
|
+
proof?: { count: string; label: string; people?: string[] };
|
|
28
|
+
stickers?: string[];
|
|
29
|
+
interval?: number;
|
|
30
|
+
variant?: 'left' | 'centered';
|
|
31
|
+
size?: 'md' | 'lg' | 'xl';
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const {
|
|
36
|
+
before = 'We build brands people',
|
|
37
|
+
words = ['remember', 'share', 'choose', 'love'],
|
|
38
|
+
text = 'Volta is an independent studio for brand, web and growth. We turn ambitious companies into the obvious choice in their category.',
|
|
39
|
+
primary = { label: 'Start a project', href: '#contact' },
|
|
40
|
+
secondary = { label: 'See our work', href: '#work' },
|
|
41
|
+
proof = { count: '120+', label: 'brands launched since 2016', people: ['Ana R', 'Ben K', 'Cleo M', 'Dev P'] },
|
|
42
|
+
stickers = ['Brand', 'Web', 'Growth'],
|
|
43
|
+
interval = 2200,
|
|
44
|
+
variant = 'left',
|
|
45
|
+
size = 'lg',
|
|
46
|
+
className = '',
|
|
47
|
+
} = Astro.props;
|
|
48
|
+
|
|
49
|
+
const hues = [80, 280, 20, 190];
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
<div class="cq-agency-hero">
|
|
53
|
+
<section class:list={['ahk', `ahk--${variant}`, `ahk--${size}`, className]} data-kinetic data-interval={interval}>
|
|
54
|
+
<div class="ahk__inner">
|
|
55
|
+
<h1 class="ahk__title">
|
|
56
|
+
<span>{before} </span>
|
|
57
|
+
<span class="sr-only">{words[0]}.</span>
|
|
58
|
+
<span class="ahk__rotor" aria-hidden="true">
|
|
59
|
+
{words.map((w, i) => <span class:list={['ahk__word', { 'is-active': i === 0 }]}>{w}</span>)}
|
|
60
|
+
</span>
|
|
61
|
+
</h1>
|
|
62
|
+
|
|
63
|
+
{stickers.slice(0, 3).map((s, i) => <span class:list={['ahk__sticker', `ahk__sticker--${i + 1}`]} aria-hidden="true">{s}</span>)}
|
|
64
|
+
|
|
65
|
+
<div class="ahk__foot">
|
|
66
|
+
{text && <p class="ahk__text">{text}</p>}
|
|
67
|
+
<div class="ahk__ctas">
|
|
68
|
+
{primary && <a class="ahk__btn ahk__btn--primary" href={primary.href}>{primary.label}<span aria-hidden="true">↗</span></a>}
|
|
69
|
+
{secondary && <a class="ahk__btn" href={secondary.href}>{secondary.label}</a>}
|
|
70
|
+
</div>
|
|
71
|
+
{proof && (
|
|
72
|
+
<p class="ahk__proof">
|
|
73
|
+
{proof.people && (
|
|
74
|
+
<span class="ahk__faces" aria-hidden="true">
|
|
75
|
+
{proof.people.map((p, i) => <span style={`--h: ${hues[i % hues.length]}`}>{p.split(' ').map((x) => x[0]).join('')}</span>)}
|
|
76
|
+
</span>
|
|
77
|
+
)}
|
|
78
|
+
<span><strong>{proof.count}</strong> {proof.label}</span>
|
|
79
|
+
</p>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</section>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<script>
|
|
87
|
+
document.querySelectorAll<HTMLElement>('[data-kinetic]:not([data-bound])').forEach((hero) => {
|
|
88
|
+
hero.dataset.bound = '';
|
|
89
|
+
const words = Array.from(hero.querySelectorAll<HTMLElement>('.ahk__word'));
|
|
90
|
+
if (words.length < 2 || window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
|
91
|
+
let i = 0;
|
|
92
|
+
let paused = false;
|
|
93
|
+
hero.addEventListener('mouseenter', () => { paused = true; });
|
|
94
|
+
hero.addEventListener('mouseleave', () => { paused = false; });
|
|
95
|
+
hero.addEventListener('focusin', () => { paused = true; });
|
|
96
|
+
hero.addEventListener('focusout', () => { paused = false; });
|
|
97
|
+
window.setInterval(() => {
|
|
98
|
+
if (paused || document.hidden) return;
|
|
99
|
+
words[i].classList.remove('is-active');
|
|
100
|
+
words[i].classList.add('is-leaving');
|
|
101
|
+
const prev = words[i];
|
|
102
|
+
window.setTimeout(() => prev.classList.remove('is-leaving'), 500);
|
|
103
|
+
i = (i + 1) % words.length;
|
|
104
|
+
words[i].classList.add('is-active');
|
|
105
|
+
}, Number(hero.dataset.interval) || 2200);
|
|
106
|
+
});
|
|
107
|
+
</script>
|
|
108
|
+
|
|
109
|
+
<style>
|
|
110
|
+
.cq-agency-hero { container-type: inline-size; }
|
|
111
|
+
.ahk { --fs: clamp(3rem, 10cqi, 8.5rem); position: relative; padding: clamp(3rem, 9cqi, 7rem) clamp(1rem, 4cqi, 2.5rem) clamp(2.5rem, 6cqi, 5rem); color: var(--c-text-1, #fff); overflow: hidden; }
|
|
112
|
+
.ahk--md { --fs: clamp(2.6rem, 8cqi, 6.5rem); }
|
|
113
|
+
.ahk--xl { --fs: clamp(3.4rem, 12cqi, 10.5rem); }
|
|
114
|
+
.ahk__inner { position: relative; max-width: 1280px; margin: 0 auto; }
|
|
115
|
+
.ahk--centered .ahk__inner { text-align: center; }
|
|
116
|
+
.ahk__title { margin: 0; font-size: var(--fs); font-weight: 900; line-height: 0.92; letter-spacing: -0.06em; text-wrap: balance; }
|
|
117
|
+
.ahk__rotor { position: relative; display: inline-grid; vertical-align: top; }
|
|
118
|
+
.ahk__word {
|
|
119
|
+
grid-area: 1 / 1;
|
|
120
|
+
padding: 0 0.12em;
|
|
121
|
+
border-radius: 0.12em;
|
|
122
|
+
background: var(--agency-accent, var(--c-primary-light, #d4a017));
|
|
123
|
+
color: var(--c-on-primary, #050505);
|
|
124
|
+
opacity: 0;
|
|
125
|
+
transform: translateY(40%) rotate(3deg);
|
|
126
|
+
transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
|
127
|
+
}
|
|
128
|
+
.ahk__word.is-active { opacity: 1; transform: rotate(-2deg); }
|
|
129
|
+
.ahk__word.is-leaving { opacity: 0; transform: translateY(-40%) rotate(-6deg); }
|
|
130
|
+
|
|
131
|
+
.ahk__sticker {
|
|
132
|
+
position: absolute;
|
|
133
|
+
padding: 0.5rem 1rem;
|
|
134
|
+
border-radius: 999px;
|
|
135
|
+
border: 1.5px solid currentColor;
|
|
136
|
+
background: var(--c-bg, #050505);
|
|
137
|
+
font-size: 0.85rem;
|
|
138
|
+
font-weight: 800;
|
|
139
|
+
letter-spacing: 0.02em;
|
|
140
|
+
animation: ahk-float 6s ease-in-out infinite;
|
|
141
|
+
}
|
|
142
|
+
.ahk__sticker--1 { top: -2%; right: 8%; transform: rotate(8deg); }
|
|
143
|
+
.ahk__sticker--2 { top: 38%; right: -1%; transform: rotate(-10deg); animation-delay: -2s; background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); border-color: transparent; }
|
|
144
|
+
.ahk__sticker--3 { top: 18%; right: 26%; transform: rotate(-4deg); animation-delay: -4s; }
|
|
145
|
+
@keyframes ahk-float { 50% { translate: 0 -8px; } }
|
|
146
|
+
|
|
147
|
+
.ahk__foot { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: var(--sp-6, 1.5rem) var(--sp-10, 2.5rem); align-items: end; margin-top: clamp(2rem, 5cqi, 3.5rem); padding-top: var(--sp-6, 1.5rem); border-top: 1.5px solid currentColor; }
|
|
148
|
+
.ahk--centered .ahk__foot { grid-template-columns: 1fr; justify-items: center; }
|
|
149
|
+
.ahk__text { margin: 0; max-width: 34rem; font-size: 1.1rem; line-height: 1.6; color: var(--c-text-2, #a3a3a3); }
|
|
150
|
+
.ahk__ctas { display: flex; flex-wrap: wrap; gap: var(--sp-2, 0.5rem); }
|
|
151
|
+
.ahk__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 1.6rem; border-radius: 999px; border: 1.5px solid currentColor; color: inherit; font-size: 1rem; font-weight: 800; text-decoration: none; transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease; }
|
|
152
|
+
.ahk__btn:hover { background: var(--c-text-1, #fff); color: var(--c-bg, #050505); }
|
|
153
|
+
.ahk__btn--primary { background: var(--agency-accent, var(--c-primary-light, #d4a017)); border-color: transparent; color: var(--c-on-primary, #050505); }
|
|
154
|
+
.ahk__btn--primary:hover { background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); transform: translateY(-2px) rotate(-1.5deg); }
|
|
155
|
+
.ahk__btn:focus-visible { outline: 2px solid var(--agency-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
156
|
+
.ahk__proof { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--sp-3, 0.75rem); margin: 0; font-size: 0.92rem; color: var(--c-text-2, #a3a3a3); }
|
|
157
|
+
.ahk__proof strong { color: var(--c-text-1, #fff); }
|
|
158
|
+
.ahk__faces { display: inline-flex; }
|
|
159
|
+
.ahk__faces span { display: grid; place-items: center; width: 36px; height: 36px; margin-left: -8px; border-radius: 50%; border: 2px solid var(--c-bg, #050505); background: hsl(var(--h) 70% 55%); color: #0b0b0b; font-size: 0.7rem; font-weight: 800; }
|
|
160
|
+
.ahk__faces span:first-child { margin-left: 0; }
|
|
161
|
+
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
162
|
+
|
|
163
|
+
@container (max-width: 760px) {
|
|
164
|
+
.ahk__foot { grid-template-columns: 1fr; }
|
|
165
|
+
.ahk__sticker--1, .ahk__sticker--3 { display: none; }
|
|
166
|
+
.ahk__sticker--2 { top: auto; bottom: 32%; right: 4%; }
|
|
167
|
+
}
|
|
168
|
+
@media (prefers-reduced-motion: reduce) {
|
|
169
|
+
.ahk__sticker { animation: none; }
|
|
170
|
+
.ahk__word { transition: none; }
|
|
171
|
+
}
|
|
172
|
+
</style>
|