astro-component-kit 0.4.0 → 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 +105 -27
- package/package.json +16 -3
- package/src/components/index.ts +2 -0
- 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/charts/AreaChart.astro +4 -4
- package/src/components/lib/charts/BarChart.astro +3 -3
- package/src/components/lib/charts/ChartFrame.astro +10 -10
- package/src/components/lib/charts/DonutChart.astro +2 -2
- package/src/components/lib/charts/DumbbellChart.astro +1 -1
- package/src/components/lib/charts/ForecastLineChart.astro +1 -1
- package/src/components/lib/charts/GaugeChart.astro +1 -1
- package/src/components/lib/charts/HeatmapChart.astro +1 -1
- package/src/components/lib/charts/HorizontalBarChart.astro +2 -2
- package/src/components/lib/charts/KpiStatTile.astro +4 -4
- package/src/components/lib/charts/LinearProgressGauge.astro +4 -4
- package/src/components/lib/charts/MetricDeltaTable.astro +3 -3
- package/src/components/lib/charts/RadarMetricChart.astro +4 -4
- package/src/components/lib/charts/RadialBarChart.astro +1 -1
- package/src/components/lib/charts/RetentionCohortTable.astro +2 -2
- package/src/components/lib/charts/TreemapChart.astro +1 -1
- 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/forms/AnimatedInput.astro +4 -2
- package/src/components/lib/forms/CustomRadioGroup.astro +3 -1
- 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/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 +11 -9
- 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/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 +9 -7
- 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 +10 -8
- package/src/components/lib/sections/ChangelogSection.astro +14 -7
- package/src/components/lib/sections/ContactGlassForm.astro +10 -8
- package/src/components/lib/sections/ContactSplitMap.astro +11 -9
- 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 +13 -11
- package/src/components/lib/sections/CtaSplitImage.astro +13 -11
- 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 +9 -7
- package/src/components/lib/sections/FeatureAlternatingRows.astro +10 -8
- package/src/components/lib/sections/FeatureBentoGrid.astro +13 -11
- package/src/components/lib/sections/FeatureIconGrid.astro +6 -6
- package/src/components/lib/sections/FeatureTabsShowcase.astro +13 -11
- 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 +13 -11
- package/src/components/lib/sections/FormsShowcase.astro +22 -20
- package/src/components/lib/sections/HeroDashboardPreview.astro +11 -9
- 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 +10 -10
- package/src/components/lib/sections/HeroShowcaseSplit.astro +18 -16
- package/src/components/lib/sections/HeroSplit.astro +13 -11
- package/src/components/lib/sections/HeroTerminal.astro +14 -12
- package/src/components/lib/sections/HeroWaitlist.astro +10 -8
- package/src/components/lib/sections/HowItWorksSteps.astro +12 -10
- package/src/components/lib/sections/IntegrationsGrid.astro +7 -7
- package/src/components/lib/sections/LayoutShowcase.astro +21 -19
- package/src/components/lib/sections/LogoCloudSection.astro +4 -4
- package/src/components/lib/sections/LogoWallGrid.astro +6 -4
- 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 +13 -11
- package/src/components/lib/sections/PricingTierCards.astro +11 -9
- package/src/components/lib/sections/PricingToggleCards.astro +13 -13
- 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 +9 -7
- package/src/components/lib/sections/StatsDashboardSection.astro +4 -2
- 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 +10 -8
- package/src/components/lib/sections/TestimonialFeatured.astro +7 -5
- package/src/components/lib/sections/TestimonialGridSection.astro +7 -7
- 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 +10 -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/styles/global.css +95 -0
|
@@ -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>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* AgencyServicesList — Numbered, expandable service rows: big service names, short pitch,
|
|
4
|
+
* deliverable chips, typical timeline and "from" price, with a hover/focus reveal.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} eyebrow - Small label. Default 'What we do'.
|
|
7
|
+
* @param {string} title - Section heading. Default 'Services that move the needle'.
|
|
8
|
+
* @param {Array<{name: string, pitch: string, deliverables?: string[], timeline?: string, from?: string, href?: string}>} services - Rows.
|
|
9
|
+
* @param {number} open - Index opened by default (-1 for none). Default 0.
|
|
10
|
+
* @param {boolean} exclusive - Opening one row closes the others. Default true.
|
|
11
|
+
* @param {string} variant - Style (lines|cards). Default 'lines'.
|
|
12
|
+
* @param {string} className - Extra class.
|
|
13
|
+
*
|
|
14
|
+
* Accessibility: native <details>/<summary> rows (keyboard and screen-reader friendly); each row
|
|
15
|
+
* has a heading; the decorative number and arrow are aria-hidden.
|
|
16
|
+
*/
|
|
17
|
+
interface Service { name: string; pitch: string; deliverables?: string[]; timeline?: string; from?: string; href?: string }
|
|
18
|
+
interface Props {
|
|
19
|
+
eyebrow?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
services?: Service[];
|
|
22
|
+
open?: number;
|
|
23
|
+
exclusive?: boolean;
|
|
24
|
+
variant?: 'lines' | 'cards';
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
eyebrow = 'What we do',
|
|
30
|
+
title = 'Services that move the needle',
|
|
31
|
+
services = [
|
|
32
|
+
{ name: 'Brand identity', pitch: 'Positioning, naming, logo systems and guidelines that make you unmistakable.', deliverables: ['Strategy workshop', 'Visual identity', 'Brand book', 'Launch kit'], timeline: '6–8 weeks', from: '€18k' },
|
|
33
|
+
{ name: 'Websites', pitch: 'Fast, accessible Astro sites with a CMS your team will actually enjoy.', deliverables: ['UX & content', 'Design system', 'Astro build', 'CMS & analytics'], timeline: '8–12 weeks', from: '€24k' },
|
|
34
|
+
{ name: 'Growth marketing', pitch: 'Performance campaigns, SEO and CRO run by people who read the numbers.', deliverables: ['Paid social', 'SEO', 'A/B testing', 'Monthly reporting'], timeline: 'Monthly', from: '€6k / mo' },
|
|
35
|
+
{ name: 'Content & social', pitch: 'Always-on content engines: shoots, short video, copy and community.', deliverables: ['Editorial calendar', 'Production', 'Community'], timeline: 'Monthly', from: '€4k / mo' },
|
|
36
|
+
],
|
|
37
|
+
open = 0,
|
|
38
|
+
exclusive = true,
|
|
39
|
+
variant = 'lines',
|
|
40
|
+
className = '',
|
|
41
|
+
} = Astro.props;
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
<div class="cq-agency-services">
|
|
45
|
+
<section class:list={['asl', `asl--${variant}`, className]} aria-labelledby="asl-title" data-services data-exclusive={exclusive ? '' : undefined}>
|
|
46
|
+
<header class="asl__head">
|
|
47
|
+
<p class="asl__eyebrow">{eyebrow}</p>
|
|
48
|
+
<h2 class="asl__title" id="asl-title">{title}</h2>
|
|
49
|
+
</header>
|
|
50
|
+
<div class="asl__list">
|
|
51
|
+
{services.map((s, i) => (
|
|
52
|
+
<details class="asl__row" open={i === open}>
|
|
53
|
+
<summary class="asl__summary">
|
|
54
|
+
<span class="asl__num" aria-hidden="true">{String(i + 1).padStart(2, '0')}</span>
|
|
55
|
+
<h3 class="asl__name">{s.name}</h3>
|
|
56
|
+
{s.from && <span class="asl__from">from {s.from}</span>}
|
|
57
|
+
<span class="asl__arrow" aria-hidden="true">↗</span>
|
|
58
|
+
</summary>
|
|
59
|
+
<div class="asl__body">
|
|
60
|
+
<p class="asl__pitch">{s.pitch}</p>
|
|
61
|
+
{s.deliverables && <ul class="asl__chips">{s.deliverables.map((d) => <li>{d}</li>)}</ul>}
|
|
62
|
+
<p class="asl__meta">{s.timeline && <span>Timeline · <strong>{s.timeline}</strong></span>}{s.href && <a href={s.href}>Learn more →</a>}</p>
|
|
63
|
+
</div>
|
|
64
|
+
</details>
|
|
65
|
+
))}
|
|
66
|
+
</div>
|
|
67
|
+
</section>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
document.querySelectorAll<HTMLElement>('[data-services][data-exclusive]:not([data-bound])').forEach((root) => {
|
|
72
|
+
root.dataset.bound = '';
|
|
73
|
+
const rows = Array.from(root.querySelectorAll<HTMLDetailsElement>('details'));
|
|
74
|
+
rows.forEach((d) => d.addEventListener('toggle', () => { if (d.open) rows.forEach((o) => { if (o !== d) o.open = false; }); }));
|
|
75
|
+
});
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<style>
|
|
79
|
+
.cq-agency-services { container-type: inline-size; }
|
|
80
|
+
.asl { color: var(--c-text-1, #fff); }
|
|
81
|
+
.asl__head { display: grid; gap: var(--sp-2, 0.5rem); margin-bottom: var(--sp-6, 1.5rem); }
|
|
82
|
+
.asl__eyebrow { margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-text-2, #a3a3a3); }
|
|
83
|
+
.asl__title { margin: 0; max-width: 18ch; font-size: clamp(2.2rem, 6cqi, 4.2rem); font-weight: 900; letter-spacing: -0.05em; line-height: 0.95; }
|
|
84
|
+
.asl__list { border-top: 1.5px solid currentColor; }
|
|
85
|
+
.asl--cards .asl__list { display: grid; gap: var(--sp-3, 0.75rem); border: 0; }
|
|
86
|
+
.asl__row { border-bottom: 1.5px solid var(--c-border, rgba(255, 255, 255, 0.15)); }
|
|
87
|
+
.asl--cards .asl__row { border: 1px solid var(--c-border, rgba(255, 255, 255, 0.12)); border-radius: 24px; padding: 0 var(--sp-5, 1.25rem); }
|
|
88
|
+
.asl__summary { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 48px; align-items: center; gap: var(--sp-4, 1rem); min-height: 96px; cursor: pointer; list-style: none; }
|
|
89
|
+
.asl__summary::-webkit-details-marker { display: none; }
|
|
90
|
+
.asl__summary:focus-visible { outline: 2px solid var(--agency-accent, var(--c-primary-light, #d4a017)); outline-offset: 4px; border-radius: 12px; }
|
|
91
|
+
.asl__num { font-size: 0.85rem; font-weight: 700; color: var(--c-text-3, #737373); font-variant-numeric: tabular-nums; }
|
|
92
|
+
.asl__name { margin: 0; font-size: clamp(1.6rem, 4.4cqi, 3rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
93
|
+
.asl__summary:hover .asl__name { transform: translateX(10px); }
|
|
94
|
+
.asl__from { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--c-border, rgba(255, 255, 255, 0.2)); font-size: 0.82rem; font-weight: 700; color: var(--c-text-2, #a3a3a3); white-space: nowrap; }
|
|
95
|
+
.asl__arrow { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 1.1rem; transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease; }
|
|
96
|
+
.asl__row[open] .asl__arrow { transform: rotate(90deg); background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); border-color: transparent; }
|
|
97
|
+
.asl__body { display: grid; gap: var(--sp-4, 1rem); padding: 0 0 var(--sp-6, 1.5rem) calc(56px + var(--sp-4, 1rem)); animation: asl-in 0.35s ease-out; }
|
|
98
|
+
@keyframes asl-in { from { opacity: 0; transform: translateY(-6px); } }
|
|
99
|
+
.asl__pitch { margin: 0; max-width: 46rem; font-size: 1.1rem; line-height: 1.6; color: var(--c-text-2, #a3a3a3); }
|
|
100
|
+
.asl__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
|
|
101
|
+
.asl__chips li { padding: 8px 14px; border-radius: 999px; background: rgb(var(--ink-rgb, 255 255 255) / 0.07); font-size: 0.85rem; font-weight: 600; }
|
|
102
|
+
.asl__meta { display: flex; flex-wrap: wrap; gap: var(--sp-5, 1.25rem); margin: 0; font-size: 0.88rem; color: var(--c-text-2, #a3a3a3); }
|
|
103
|
+
.asl__meta strong { color: var(--c-text-1, #fff); }
|
|
104
|
+
.asl__meta a { color: var(--c-text-1, #fff); font-weight: 700; }
|
|
105
|
+
|
|
106
|
+
@container (max-width: 640px) {
|
|
107
|
+
.asl__summary { grid-template-columns: 36px minmax(0, 1fr) 44px; min-height: 80px; }
|
|
108
|
+
.asl__from { display: none; }
|
|
109
|
+
.asl__arrow { width: 44px; height: 44px; }
|
|
110
|
+
.asl__body { padding-left: 0; }
|
|
111
|
+
}
|
|
112
|
+
@media (prefers-reduced-motion: reduce) { .asl__name, .asl__arrow, .asl__body { transition: none; animation: none; } }
|
|
113
|
+
</style>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
/**
|
|
3
|
+
* AgencyTeamGrid — Team portraits with name, role, location, a personal "fun fact" revealed on
|
|
4
|
+
* hover/focus and social links, plus an optional "we're hiring" card.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} eyebrow - Small label. Default 'The studio'.
|
|
7
|
+
* @param {string} title - Heading. Default 'Small team, senior people'.
|
|
8
|
+
* @param {string} text - Intro paragraph.
|
|
9
|
+
* @param {Array<{name: string, role: string, location?: string, fact?: string, photo?: string, links?: {label: string, href: string}[]}>} people - Team members.
|
|
10
|
+
* @param {{title: string, text: string, href: string, label?: string}} hiring - Hiring card (optional).
|
|
11
|
+
* @param {number} columns - Desktop columns (3–4). Default 4.
|
|
12
|
+
* @param {string} variant - Style (portrait|compact). Default 'portrait'.
|
|
13
|
+
* @param {string} className - Extra class.
|
|
14
|
+
*
|
|
15
|
+
* Accessibility: each person is an article with a heading; the fun fact is real text (visible on
|
|
16
|
+
* hover and on keyboard focus of the card); social links have descriptive labels.
|
|
17
|
+
*/
|
|
18
|
+
interface Person { name: string; role: string; location?: string; fact?: string; photo?: string; links?: Array<{ label: string; href: string }> }
|
|
19
|
+
interface Props {
|
|
20
|
+
eyebrow?: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
text?: string;
|
|
23
|
+
people?: Person[];
|
|
24
|
+
hiring?: { title: string; text: string; href: string; label?: string };
|
|
25
|
+
columns?: 3 | 4;
|
|
26
|
+
variant?: 'portrait' | 'compact';
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const {
|
|
31
|
+
eyebrow = 'The studio',
|
|
32
|
+
title = 'Small team, senior people',
|
|
33
|
+
text = 'No juniors hidden behind account managers. You work directly with the people who do the work.',
|
|
34
|
+
people = [
|
|
35
|
+
{ name: 'Marta Ibáñez', role: 'Founder & creative director', location: 'Madrid', fact: 'Designed her first logo at 12 — for her cat.', links: [{ label: 'LinkedIn', href: '#' }] },
|
|
36
|
+
{ name: 'Jonas Weber', role: 'Head of design', location: 'Berlin', fact: 'Owns 41 typefaces, uses three.', links: [{ label: 'Dribbble', href: '#' }] },
|
|
37
|
+
{ name: 'Aisha Bello', role: 'Growth lead', location: 'Lisbon', fact: 'Ran a marathon and a product launch the same week.', links: [{ label: 'LinkedIn', href: '#' }] },
|
|
38
|
+
{ name: 'Leo Martins', role: 'Lead developer', location: 'Remote', fact: 'Ships to production from a sailboat.', links: [{ label: 'GitHub', href: '#' }] },
|
|
39
|
+
],
|
|
40
|
+
hiring = { title: 'We are hiring', text: 'Senior designers and Astro developers — remote in Europe.', href: '#', label: 'See open roles' },
|
|
41
|
+
columns = 4,
|
|
42
|
+
variant = 'portrait',
|
|
43
|
+
className = '',
|
|
44
|
+
} = Astro.props;
|
|
45
|
+
|
|
46
|
+
const hues = [80, 280, 20, 190, 330, 140];
|
|
47
|
+
const initials = (n: string) => n.split(/\s+/).slice(0, 2).map((p) => p[0]).join('');
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
<div class="cq-agency-team">
|
|
51
|
+
<section class:list={['atg', `atg--${variant}`, className]} style={`--cols: ${columns}`} aria-labelledby="atg-title">
|
|
52
|
+
<header class="atg__head">
|
|
53
|
+
<p class="atg__eyebrow">{eyebrow}</p>
|
|
54
|
+
<h2 class="atg__title" id="atg-title">{title}</h2>
|
|
55
|
+
{text && <p class="atg__text">{text}</p>}
|
|
56
|
+
</header>
|
|
57
|
+
<div class="atg__grid">
|
|
58
|
+
{people.map((p, i) => (
|
|
59
|
+
<article class="atg__person" tabindex="0" aria-labelledby={`atg-p-${i}`}>
|
|
60
|
+
<div class="atg__photo" style={`--h: ${hues[i % hues.length]}`}>
|
|
61
|
+
{p.photo ? <img src={p.photo} alt={`Portrait of ${p.name}`} loading="lazy" decoding="async" /> : <span class="atg__initials" aria-hidden="true">{initials(p.name)}</span>}
|
|
62
|
+
{p.fact && <p class="atg__fact"><span>Fun fact</span>{p.fact}</p>}
|
|
63
|
+
</div>
|
|
64
|
+
<h3 class="atg__name" id={`atg-p-${i}`}>{p.name}</h3>
|
|
65
|
+
<p class="atg__role">{p.role}{p.location && <span> · {p.location}</span>}</p>
|
|
66
|
+
{p.links && <p class="atg__links">{p.links.map((l) => <a href={l.href} aria-label={`${p.name} on ${l.label}`}>{l.label}</a>)}</p>}
|
|
67
|
+
</article>
|
|
68
|
+
))}
|
|
69
|
+
{hiring && (
|
|
70
|
+
<a class="atg__hiring" href={hiring.href}>
|
|
71
|
+
<strong>{hiring.title}</strong>
|
|
72
|
+
<span>{hiring.text}</span>
|
|
73
|
+
<em>{hiring.label ?? 'Open roles'} ↗</em>
|
|
74
|
+
</a>
|
|
75
|
+
)}
|
|
76
|
+
</div>
|
|
77
|
+
</section>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<style>
|
|
81
|
+
.cq-agency-team { container-type: inline-size; }
|
|
82
|
+
.atg { color: var(--c-text-1, #fff); }
|
|
83
|
+
.atg__head { display: grid; gap: var(--sp-2, 0.5rem); max-width: 46rem; margin-bottom: var(--sp-8, 2rem); }
|
|
84
|
+
.atg__eyebrow { margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-text-2, #a3a3a3); }
|
|
85
|
+
.atg__title { margin: 0; font-size: clamp(2.2rem, 6cqi, 4.2rem); font-weight: 900; letter-spacing: -0.05em; line-height: 0.95; }
|
|
86
|
+
.atg__text { margin: var(--sp-2, 0.5rem) 0 0; font-size: 1.05rem; line-height: 1.6; color: var(--c-text-2, #a3a3a3); }
|
|
87
|
+
.atg__grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: clamp(1rem, 2.5cqi, 1.75rem); }
|
|
88
|
+
.atg__person { display: grid; gap: 4px; outline: none; }
|
|
89
|
+
.atg__photo { position: relative; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: radial-gradient(circle at 30% 25%, hsl(var(--h) 80% 70%), transparent 60%), hsl(var(--h) 40% 22%); margin-bottom: var(--sp-3, 0.75rem); }
|
|
90
|
+
.atg--compact .atg__photo { aspect-ratio: 1; }
|
|
91
|
+
.atg__photo img { width: 100%; height: 100%; object-fit: cover; }
|
|
92
|
+
.atg__initials { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(3rem, 9cqi, 5.5rem); font-weight: 900; letter-spacing: -0.06em; color: rgba(255, 255, 255, 0.9); }
|
|
93
|
+
.atg__fact { position: absolute; inset: auto 10px 10px; margin: 0; padding: var(--sp-3, 0.75rem) var(--sp-4, 1rem); border-radius: 16px; background: var(--agency-accent, var(--c-primary-light, #d4a017)); color: var(--c-on-primary, #050505); font-size: 0.88rem; font-weight: 600; line-height: 1.4; opacity: 0; transform: translateY(12px) rotate(-1.5deg); transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
|
|
94
|
+
.atg__fact span { display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
|
|
95
|
+
.atg__person:hover .atg__fact, .atg__person:focus-within .atg__fact, .atg__person:focus .atg__fact { opacity: 1; transform: rotate(-1.5deg); }
|
|
96
|
+
.atg__person:focus-visible .atg__photo { outline: 3px solid var(--agency-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
97
|
+
.atg__name { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
|
|
98
|
+
.atg__role { margin: 0; font-size: 0.88rem; color: var(--c-text-2, #a3a3a3); }
|
|
99
|
+
.atg__links { display: flex; gap: var(--sp-3, 0.75rem); margin: 4px 0 0; }
|
|
100
|
+
.atg__links a { min-height: 32px; display: inline-flex; align-items: center; font-size: 0.85rem; font-weight: 700; color: var(--c-text-1, #fff); text-decoration: underline; text-underline-offset: 3px; }
|
|
101
|
+
.atg__links a:focus-visible, .atg__hiring:focus-visible { outline: 2px solid var(--agency-accent, var(--c-primary-light, #d4a017)); outline-offset: 3px; }
|
|
102
|
+
.atg__hiring { display: flex; flex-direction: column; justify-content: flex-end; gap: var(--sp-2, 0.5rem); aspect-ratio: 4 / 5; padding: var(--sp-6, 1.5rem); border-radius: 24px; border: 2px dashed var(--c-border, rgba(255, 255, 255, 0.25)); color: inherit; text-decoration: none; transition: background 0.3s ease, border-color 0.3s ease; }
|
|
103
|
+
.atg__hiring:hover { background: var(--agency-accent, var(--c-primary-light, #d4a017)); border-color: transparent; color: var(--c-on-primary, #050505); }
|
|
104
|
+
.atg__hiring strong { font-size: 1.8rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
|
|
105
|
+
.atg__hiring span { font-size: 0.92rem; opacity: 0.8; }
|
|
106
|
+
.atg__hiring em { font-style: normal; font-weight: 800; }
|
|
107
|
+
@container (max-width: 900px) { .atg__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
108
|
+
@container (max-width: 460px) { .atg__grid { grid-template-columns: 1fr; } .atg__hiring { aspect-ratio: auto; min-height: 200px; } }
|
|
109
|
+
@media (hover: none) { .atg__fact { position: static; opacity: 1; transform: none; margin: var(--sp-2, 0.5rem); } .atg__photo { display: flex; flex-direction: column; justify-content: flex-end; } }
|
|
110
|
+
@media (prefers-reduced-motion: reduce) { .atg__fact, .atg__hiring { transition: none; } }
|
|
111
|
+
</style>
|