@kurbo/dkit 0.4.0
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 +24 -0
- package/dist/bin.js +8066 -0
- package/dist/bin.js.map +1 -0
- package/package.json +58 -0
- package/vendor/registry/blocks/blog-detail/module.json +27 -0
- package/vendor/registry/blocks/blog-detail/ui/minimal/next/blog-detail.tsx +26 -0
- package/vendor/registry/blocks/blog-detail/ui/minimal/nuxt/BlogDetail.vue +27 -0
- package/vendor/registry/blocks/blog-detail/ui/shadcn/next/blog-detail.tsx +106 -0
- package/vendor/registry/blocks/blog-detail/ui/shadcn/nuxt/BlogDetail.vue +116 -0
- package/vendor/registry/blocks/blog-list/module.json +26 -0
- package/vendor/registry/blocks/blog-list/ui/minimal/next/blog-list.tsx +130 -0
- package/vendor/registry/blocks/blog-list/ui/minimal/nuxt/BlogList.vue +62 -0
- package/vendor/registry/blocks/blog-list/ui/shadcn/next/blog-list.tsx +109 -0
- package/vendor/registry/blocks/blog-list/ui/shadcn/nuxt/BlogList.vue +100 -0
- package/vendor/registry/blocks/blog-list-cards/module.json +27 -0
- package/vendor/registry/blocks/blog-list-cards/ui/minimal/next/blog-list-cards.tsx +130 -0
- package/vendor/registry/blocks/blog-list-cards/ui/minimal/nuxt/BlogListCards.vue +114 -0
- package/vendor/registry/blocks/blog-list-cards/ui/shadcn/next/blog-list-cards.tsx +119 -0
- package/vendor/registry/blocks/blog-list-cards/ui/shadcn/nuxt/BlogListCards.vue +113 -0
- package/vendor/registry/blocks/booking-form-ui/module.json +15 -0
- package/vendor/registry/blocks/booking-form-ui/ui/minimal/next/booking-form.tsx +89 -0
- package/vendor/registry/blocks/booking-form-ui/ui/shadcn/next/booking-form.tsx +92 -0
- package/vendor/registry/blocks/contact-form-ui/module.json +27 -0
- package/vendor/registry/blocks/contact-form-ui/ui/minimal/next/contact-form.tsx +45 -0
- package/vendor/registry/blocks/contact-form-ui/ui/minimal/nuxt/ContactForm.vue +79 -0
- package/vendor/registry/blocks/contact-form-ui/ui/shadcn/next/contact-form.tsx +55 -0
- package/vendor/registry/blocks/contact-form-ui/ui/shadcn/nuxt/ContactForm.vue +92 -0
- package/vendor/registry/blocks/faq-list/module.json +15 -0
- package/vendor/registry/blocks/faq-list/ui/minimal/next/faq-list.tsx +78 -0
- package/vendor/registry/blocks/faq-list/ui/shadcn/next/faq-list.tsx +77 -0
- package/vendor/registry/blocks/maintenance-gate/module.json +13 -0
- package/vendor/registry/blocks/maintenance-gate/ui/minimal/next/maintenance-gate.tsx +135 -0
- package/vendor/registry/blocks/maintenance-gate/ui/shadcn/next/maintenance-gate.tsx +87 -0
- package/vendor/registry/blocks/nav-footer/module.json +13 -0
- package/vendor/registry/blocks/nav-footer/ui/minimal/next/nav-footer.tsx +55 -0
- package/vendor/registry/blocks/nav-footer/ui/shadcn/next/nav-footer.tsx +41 -0
- package/vendor/registry/blocks/nav-header/module.json +14 -0
- package/vendor/registry/blocks/nav-header/ui/minimal/next/nav-header.tsx +244 -0
- package/vendor/registry/blocks/nav-header/ui/shadcn/next/nav-header-client.tsx +185 -0
- package/vendor/registry/blocks/nav-header/ui/shadcn/next/nav-header.tsx +12 -0
- package/vendor/registry/blocks/page-detail/module.json +26 -0
- package/vendor/registry/blocks/page-detail/ui/minimal/next/page-detail.tsx +26 -0
- package/vendor/registry/blocks/page-detail/ui/minimal/nuxt/PageDetail.vue +26 -0
- package/vendor/registry/blocks/page-detail/ui/shadcn/next/page-detail.tsx +61 -0
- package/vendor/registry/blocks/page-detail/ui/shadcn/nuxt/PageDetail.vue +62 -0
- package/vendor/registry/blocks/project-detail/module.json +15 -0
- package/vendor/registry/blocks/project-detail/ui/minimal/next/project-detail.tsx +58 -0
- package/vendor/registry/blocks/project-detail/ui/shadcn/next/project-detail.tsx +91 -0
- package/vendor/registry/blocks/project-list/module.json +14 -0
- package/vendor/registry/blocks/project-list/ui/minimal/next/project-list.tsx +104 -0
- package/vendor/registry/blocks/project-list/ui/shadcn/next/project-list.tsx +81 -0
- package/vendor/registry/blocks/project-list-cards/module.json +15 -0
- package/vendor/registry/blocks/project-list-cards/ui/minimal/next/project-list-cards.tsx +125 -0
- package/vendor/registry/blocks/project-list-cards/ui/shadcn/next/project-list-cards.tsx +94 -0
- package/vendor/registry/blocks/projects-carousel/module.json +15 -0
- package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel-client.tsx +239 -0
- package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel.tsx +24 -0
- package/vendor/registry/blocks/projects-carousel/ui/shadcn/next/projects-carousel-client.tsx +102 -0
- package/vendor/registry/blocks/projects-carousel/ui/shadcn/next/projects-carousel.tsx +24 -0
- package/vendor/registry/blocks/service-detail/module.json +15 -0
- package/vendor/registry/blocks/service-detail/ui/minimal/next/service-detail.tsx +49 -0
- package/vendor/registry/blocks/service-detail/ui/shadcn/next/service-detail.tsx +75 -0
- package/vendor/registry/blocks/service-list/module.json +14 -0
- package/vendor/registry/blocks/service-list/ui/minimal/next/service-list.tsx +103 -0
- package/vendor/registry/blocks/service-list/ui/shadcn/next/service-list.tsx +80 -0
- package/vendor/registry/blocks/service-list-cards/module.json +15 -0
- package/vendor/registry/blocks/service-list-cards/ui/minimal/next/service-list-cards.tsx +124 -0
- package/vendor/registry/blocks/service-list-cards/ui/shadcn/next/service-list-cards.tsx +92 -0
- package/vendor/registry/blocks/site-brand/module.json +13 -0
- package/vendor/registry/blocks/site-brand/ui/minimal/next/site-brand.tsx +61 -0
- package/vendor/registry/blocks/site-brand/ui/shadcn/next/site-brand.tsx +48 -0
- package/vendor/registry/blocks/site-logo/module.json +13 -0
- package/vendor/registry/blocks/site-logo/ui/minimal/next/site-logo.tsx +37 -0
- package/vendor/registry/blocks/site-logo/ui/shadcn/next/site-logo.tsx +34 -0
- package/vendor/registry/blocks/social-links/module.json +13 -0
- package/vendor/registry/blocks/social-links/ui/minimal/next/social-links.tsx +55 -0
- package/vendor/registry/blocks/social-links/ui/shadcn/next/social-links.tsx +46 -0
- package/vendor/registry/blocks/team-detail/module.json +15 -0
- package/vendor/registry/blocks/team-detail/ui/minimal/next/team-detail.tsx +113 -0
- package/vendor/registry/blocks/team-detail/ui/shadcn/next/team-detail.tsx +77 -0
- package/vendor/registry/blocks/team-list/module.json +14 -0
- package/vendor/registry/blocks/team-list/ui/minimal/next/team-list.tsx +113 -0
- package/vendor/registry/blocks/team-list/ui/shadcn/next/team-list.tsx +77 -0
- package/vendor/registry/blocks/team-list-cards/module.json +15 -0
- package/vendor/registry/blocks/team-list-cards/ui/minimal/next/team-list-cards.tsx +111 -0
- package/vendor/registry/blocks/team-list-cards/ui/shadcn/next/team-list-cards.tsx +83 -0
- package/vendor/registry/blocks/testimonials-carousel/module.json +15 -0
- package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel-client.tsx +230 -0
- package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel.tsx +23 -0
- package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel-client.tsx +91 -0
- package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel.tsx +23 -0
- package/vendor/registry/blocks/testimonials-list/module.json +14 -0
- package/vendor/registry/blocks/testimonials-list/ui/minimal/next/testimonials-list.tsx +109 -0
- package/vendor/registry/blocks/testimonials-list/ui/shadcn/next/testimonials-list.tsx +72 -0
- package/vendor/registry/blocks/testimonials-list-cards/module.json +15 -0
- package/vendor/registry/blocks/testimonials-list-cards/ui/minimal/next/testimonials-list-cards.tsx +114 -0
- package/vendor/registry/blocks/testimonials-list-cards/ui/shadcn/next/testimonials-list-cards.tsx +72 -0
- package/vendor/registry/core/languages/policies.json +25 -0
- package/vendor/registry/core/languages/seed.json +16 -0
- package/vendor/registry/core/languages/snapshot.json +94 -0
- package/vendor/registry/modules/blog/access/policies.json +49 -0
- package/vendor/registry/modules/blog/access/policies.multilocale.json +67 -0
- package/vendor/registry/modules/blog/lib.multilocale.ts +552 -0
- package/vendor/registry/modules/blog/lib.ts +346 -0
- package/vendor/registry/modules/blog/module.json +50 -0
- package/vendor/registry/modules/blog/schema/snapshot.json +701 -0
- package/vendor/registry/modules/blog/schema/snapshot.multilocale.json +884 -0
- package/vendor/registry/modules/blog/services/ATTRIBUTION.md +8 -0
- package/vendor/registry/modules/blog/services/assets/ada-lovelace-avatar.jpg +0 -0
- package/vendor/registry/modules/blog/services/assets/hello-from-dkit-cover.jpg +0 -0
- package/vendor/registry/modules/blog/services/seed.json +70 -0
- package/vendor/registry/modules/blog/services/seed.multilocale.json +90 -0
- package/vendor/registry/modules/blog/types.multilocale.ts +96 -0
- package/vendor/registry/modules/blog/types.ts +62 -0
- package/vendor/registry/modules/booking-form/access/policies.json +25 -0
- package/vendor/registry/modules/booking-form/access/policies.multilocale.json +27 -0
- package/vendor/registry/modules/booking-form/lib.multilocale.ts +71 -0
- package/vendor/registry/modules/booking-form/lib.ts +77 -0
- package/vendor/registry/modules/booking-form/module.json +32 -0
- package/vendor/registry/modules/booking-form/schema/snapshot.json +294 -0
- package/vendor/registry/modules/booking-form/schema/snapshot.multilocale.json +467 -0
- package/vendor/registry/modules/booking-form/services/flows.json +19 -0
- package/vendor/registry/modules/booking-form/types.multilocale.ts +29 -0
- package/vendor/registry/modules/booking-form/types.ts +27 -0
- package/vendor/registry/modules/contact-form/access/policies.json +25 -0
- package/vendor/registry/modules/contact-form/access/policies.multilocale.json +27 -0
- package/vendor/registry/modules/contact-form/lib.multilocale.ts +65 -0
- package/vendor/registry/modules/contact-form/lib.ts +67 -0
- package/vendor/registry/modules/contact-form/module.json +32 -0
- package/vendor/registry/modules/contact-form/schema/snapshot.json +193 -0
- package/vendor/registry/modules/contact-form/schema/snapshot.multilocale.json +293 -0
- package/vendor/registry/modules/contact-form/services/flows.json +19 -0
- package/vendor/registry/modules/contact-form/types.multilocale.ts +21 -0
- package/vendor/registry/modules/contact-form/types.ts +19 -0
- package/vendor/registry/modules/faq/access/policies.json +25 -0
- package/vendor/registry/modules/faq/access/policies.multilocale.json +18 -0
- package/vendor/registry/modules/faq/lib.multilocale.ts +120 -0
- package/vendor/registry/modules/faq/lib.ts +73 -0
- package/vendor/registry/modules/faq/module.json +31 -0
- package/vendor/registry/modules/faq/schema/snapshot.json +180 -0
- package/vendor/registry/modules/faq/schema/snapshot.multilocale.json +116 -0
- package/vendor/registry/modules/faq/services/seed.json +38 -0
- package/vendor/registry/modules/faq/services/seed.multilocale.json +32 -0
- package/vendor/registry/modules/faq/types.multilocale.ts +31 -0
- package/vendor/registry/modules/faq/types.ts +17 -0
- package/vendor/registry/modules/navigation/access/policies.json +31 -0
- package/vendor/registry/modules/navigation/access/policies.multilocale.json +51 -0
- package/vendor/registry/modules/navigation/lib.multilocale.ts +198 -0
- package/vendor/registry/modules/navigation/lib.ts +252 -0
- package/vendor/registry/modules/navigation/module.json +46 -0
- package/vendor/registry/modules/navigation/schema/snapshot.json +453 -0
- package/vendor/registry/modules/navigation/schema/snapshot.multilocale.json +864 -0
- package/vendor/registry/modules/navigation/services/seed.json +103 -0
- package/vendor/registry/modules/navigation/services/seed.multilocale.json +88 -0
- package/vendor/registry/modules/navigation/types.multilocale.ts +60 -0
- package/vendor/registry/modules/navigation/types.ts +44 -0
- package/vendor/registry/modules/pages/access/policies.json +25 -0
- package/vendor/registry/modules/pages/access/policies.multilocale.json +18 -0
- package/vendor/registry/modules/pages/lib.multilocale.ts +166 -0
- package/vendor/registry/modules/pages/lib.ts +123 -0
- package/vendor/registry/modules/pages/module.json +39 -0
- package/vendor/registry/modules/pages/schema/snapshot.json +247 -0
- package/vendor/registry/modules/pages/schema/snapshot.multilocale.json +187 -0
- package/vendor/registry/modules/pages/services/seed.json +24 -0
- package/vendor/registry/modules/pages/services/seed.multilocale.json +34 -0
- package/vendor/registry/modules/pages/types.multilocale.ts +37 -0
- package/vendor/registry/modules/pages/types.ts +21 -0
- package/vendor/registry/modules/projects/access/policies.json +31 -0
- package/vendor/registry/modules/projects/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/projects/lib.multilocale.ts +111 -0
- package/vendor/registry/modules/projects/lib.ts +138 -0
- package/vendor/registry/modules/projects/module.json +48 -0
- package/vendor/registry/modules/projects/schema/snapshot.json +348 -0
- package/vendor/registry/modules/projects/schema/snapshot.multilocale.json +577 -0
- package/vendor/registry/modules/projects/services/ATTRIBUTION.md +7 -0
- package/vendor/registry/modules/projects/services/assets/brand-identity-cover.jpg +0 -0
- package/vendor/registry/modules/projects/services/seed.json +40 -0
- package/vendor/registry/modules/projects/services/seed.multilocale.json +31 -0
- package/vendor/registry/modules/projects/types.multilocale.ts +38 -0
- package/vendor/registry/modules/projects/types.ts +28 -0
- package/vendor/registry/modules/services/access/policies.json +31 -0
- package/vendor/registry/modules/services/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/services/lib.multilocale.ts +109 -0
- package/vendor/registry/modules/services/lib.ts +134 -0
- package/vendor/registry/modules/services/module.json +47 -0
- package/vendor/registry/modules/services/schema/snapshot.json +305 -0
- package/vendor/registry/modules/services/schema/snapshot.multilocale.json +510 -0
- package/vendor/registry/modules/services/services/ATTRIBUTION.md +8 -0
- package/vendor/registry/modules/services/services/assets/design-development.jpg +0 -0
- package/vendor/registry/modules/services/services/assets/strategy-consulting.jpg +0 -0
- package/vendor/registry/modules/services/services/seed.json +44 -0
- package/vendor/registry/modules/services/services/seed.multilocale.json +31 -0
- package/vendor/registry/modules/services/types.multilocale.ts +36 -0
- package/vendor/registry/modules/services/types.ts +26 -0
- package/vendor/registry/modules/settings/access/policies.json +31 -0
- package/vendor/registry/modules/settings/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/settings/lib.multilocale.ts +158 -0
- package/vendor/registry/modules/settings/lib.ts +259 -0
- package/vendor/registry/modules/settings/module.json +33 -0
- package/vendor/registry/modules/settings/schema/snapshot.json +315 -0
- package/vendor/registry/modules/settings/schema/snapshot.multilocale.json +586 -0
- package/vendor/registry/modules/settings/services/assets/dkit-logo.svg +4 -0
- package/vendor/registry/modules/settings/services/seed.json +31 -0
- package/vendor/registry/modules/settings/services/seed.multilocale.json +42 -0
- package/vendor/registry/modules/settings/types.multilocale.ts +72 -0
- package/vendor/registry/modules/settings/types.ts +94 -0
- package/vendor/registry/modules/team/access/policies.json +31 -0
- package/vendor/registry/modules/team/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/team/lib.multilocale.ts +88 -0
- package/vendor/registry/modules/team/lib.ts +120 -0
- package/vendor/registry/modules/team/module.json +47 -0
- package/vendor/registry/modules/team/schema/snapshot.json +295 -0
- package/vendor/registry/modules/team/schema/snapshot.multilocale.json +525 -0
- package/vendor/registry/modules/team/services/ATTRIBUTION.md +8 -0
- package/vendor/registry/modules/team/services/assets/morgan-lee-photo.jpg +0 -0
- package/vendor/registry/modules/team/services/assets/taylor-kim-photo.jpg +0 -0
- package/vendor/registry/modules/team/services/seed.json +52 -0
- package/vendor/registry/modules/team/services/seed.multilocale.json +30 -0
- package/vendor/registry/modules/team/types.multilocale.ts +33 -0
- package/vendor/registry/modules/team/types.ts +27 -0
- package/vendor/registry/modules/testimonials/access/policies.json +31 -0
- package/vendor/registry/modules/testimonials/access/policies.multilocale.json +43 -0
- package/vendor/registry/modules/testimonials/lib.multilocale.ts +93 -0
- package/vendor/registry/modules/testimonials/lib.ts +85 -0
- package/vendor/registry/modules/testimonials/module.json +41 -0
- package/vendor/registry/modules/testimonials/schema/snapshot.json +248 -0
- package/vendor/registry/modules/testimonials/schema/snapshot.multilocale.json +462 -0
- package/vendor/registry/modules/testimonials/services/ATTRIBUTION.md +8 -0
- package/vendor/registry/modules/testimonials/services/assets/jane-doe-avatar.jpg +0 -0
- package/vendor/registry/modules/testimonials/services/assets/sample-author-avatar.jpg +0 -0
- package/vendor/registry/modules/testimonials/services/seed.json +49 -0
- package/vendor/registry/modules/testimonials/services/seed.multilocale.json +30 -0
- package/vendor/registry/modules/testimonials/types.multilocale.ts +27 -0
- package/vendor/registry/modules/testimonials/types.ts +22 -0
- package/vendor/registry/registry.json +832 -0
- package/vendor/registry/shared/helpers.ts +16 -0
- package/vendor/registry/shared/i18n.ts +74 -0
- package/vendor/registry/shared/minimal.css +83 -0
- package/vendor/registry/shared/paths.ts +50 -0
- package/vendor/registry/shared/prose.css +113 -0
- package/vendor/registry/tsconfig.json +49 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { getTeamMembers, teamMemberPhotoUrl } from "@/lib/dkit/team";
|
|
2
|
+
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
|
+
|
|
4
|
+
/** Minimal kit — stacked list (shared type primitives). */
|
|
5
|
+
export async function TeamList() {
|
|
6
|
+
const members = await getTeamMembers();
|
|
7
|
+
const hrefById = Object.fromEntries(
|
|
8
|
+
await Promise.all(
|
|
9
|
+
members.map(async (member) => [member.id, await moduleHref("team", member.slug)] as const),
|
|
10
|
+
),
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<section>
|
|
15
|
+
<style>{`
|
|
16
|
+
.dkit-team-list {
|
|
17
|
+
list-style: none;
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
21
|
+
.dkit-team-list > li {
|
|
22
|
+
display: flex;
|
|
23
|
+
gap: 1rem;
|
|
24
|
+
padding: 1rem 0;
|
|
25
|
+
border-bottom: 1px solid var(--dkit-border, #ddd);
|
|
26
|
+
}
|
|
27
|
+
.dkit-team-list > li:last-child {
|
|
28
|
+
border-bottom: 0;
|
|
29
|
+
}
|
|
30
|
+
.dkit-team-list__photo,
|
|
31
|
+
.dkit-team-list__initial {
|
|
32
|
+
flex: 0 0 auto;
|
|
33
|
+
width: 4rem;
|
|
34
|
+
height: 4rem;
|
|
35
|
+
border-radius: 9999px;
|
|
36
|
+
object-fit: cover;
|
|
37
|
+
}
|
|
38
|
+
.dkit-team-list__initial {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
background: #eee;
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
font-size: 1.25rem;
|
|
45
|
+
}
|
|
46
|
+
.dkit-team-list__body {
|
|
47
|
+
min-width: 0;
|
|
48
|
+
flex: 1;
|
|
49
|
+
}
|
|
50
|
+
.dkit-team-list__name {
|
|
51
|
+
margin: 0 0 0.25rem;
|
|
52
|
+
font-size: 1.25rem;
|
|
53
|
+
}
|
|
54
|
+
.dkit-team-list__role {
|
|
55
|
+
margin: 0.25rem 0 0;
|
|
56
|
+
font-size: 0.875rem;
|
|
57
|
+
color: var(--dkit-accent, #0F766E);
|
|
58
|
+
}
|
|
59
|
+
.dkit-team-list__bio {
|
|
60
|
+
margin: 0.5rem 0 0;
|
|
61
|
+
font-size: 0.875rem;
|
|
62
|
+
color: var(--dkit-muted, #555);
|
|
63
|
+
}
|
|
64
|
+
`}</style>
|
|
65
|
+
|
|
66
|
+
<header>
|
|
67
|
+
<p className="dkit-label">Our team</p>
|
|
68
|
+
<h1 className="dkit-headline">Team</h1>
|
|
69
|
+
</header>
|
|
70
|
+
|
|
71
|
+
{members.length === 0 ? (
|
|
72
|
+
<p>No team members yet.</p>
|
|
73
|
+
) : (
|
|
74
|
+
<ul className="dkit-team-list">
|
|
75
|
+
{members.map((member) => {
|
|
76
|
+
const photoUrl = teamMemberPhotoUrl(member);
|
|
77
|
+
return (
|
|
78
|
+
<li key={member.id}>
|
|
79
|
+
{photoUrl ? (
|
|
80
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
81
|
+
<img
|
|
82
|
+
className="dkit-team-list__photo"
|
|
83
|
+
src={photoUrl}
|
|
84
|
+
alt=""
|
|
85
|
+
width={64}
|
|
86
|
+
height={64}
|
|
87
|
+
/>
|
|
88
|
+
) : (
|
|
89
|
+
<span className="dkit-team-list__initial">
|
|
90
|
+
{member.name.charAt(0)}
|
|
91
|
+
</span>
|
|
92
|
+
)}
|
|
93
|
+
<div className="dkit-team-list__body">
|
|
94
|
+
<h2 className="dkit-team-list__name">
|
|
95
|
+
<a href={hrefById[member.id]!}>
|
|
96
|
+
{member.name}
|
|
97
|
+
</a>
|
|
98
|
+
</h2>
|
|
99
|
+
{member.role ? (
|
|
100
|
+
<p className="dkit-team-list__role">{member.role}</p>
|
|
101
|
+
) : null}
|
|
102
|
+
{member.bio ? (
|
|
103
|
+
<p className="dkit-team-list__bio">{member.bio}</p>
|
|
104
|
+
) : null}
|
|
105
|
+
</div>
|
|
106
|
+
</li>
|
|
107
|
+
);
|
|
108
|
+
})}
|
|
109
|
+
</ul>
|
|
110
|
+
)}
|
|
111
|
+
</section>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { getTeamMembers, teamMemberPhotoUrl } from "@/lib/dkit/team";
|
|
2
|
+
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
|
+
|
|
4
|
+
/** Styled with shadcn theme tokens — stacked list like blog-list. */
|
|
5
|
+
export async function TeamList() {
|
|
6
|
+
const members = await getTeamMembers();
|
|
7
|
+
const hrefById = Object.fromEntries(
|
|
8
|
+
await Promise.all(
|
|
9
|
+
members.map(async (member) => [member.id, await moduleHref("team", member.slug)] as const),
|
|
10
|
+
),
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className="relative mx-auto max-w-2xl px-6 py-16 sm:py-20">
|
|
15
|
+
<header className="mb-12 border-b border-border pb-10">
|
|
16
|
+
<p className="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
|
|
17
|
+
Our team
|
|
18
|
+
</p>
|
|
19
|
+
<h1 className="text-4xl font-semibold leading-tight tracking-tight text-foreground sm:text-5xl">
|
|
20
|
+
Team
|
|
21
|
+
</h1>
|
|
22
|
+
<p className="mt-4 max-w-md text-base leading-relaxed text-muted-foreground">
|
|
23
|
+
Meet the people behind the product.
|
|
24
|
+
</p>
|
|
25
|
+
</header>
|
|
26
|
+
|
|
27
|
+
{members.length === 0 ? (
|
|
28
|
+
<p className="rounded-xl border border-dashed border-border bg-muted/40 px-6 py-10 text-center text-muted-foreground">
|
|
29
|
+
No team members yet.
|
|
30
|
+
</p>
|
|
31
|
+
) : (
|
|
32
|
+
<ul className="space-y-1">
|
|
33
|
+
{members.map((member) => {
|
|
34
|
+
const photoUrl = teamMemberPhotoUrl(member);
|
|
35
|
+
return (
|
|
36
|
+
<li key={member.id}>
|
|
37
|
+
<a
|
|
38
|
+
href={hrefById[member.id]!}
|
|
39
|
+
className="group flex gap-5 rounded-xl px-4 py-5 transition-colors hover:bg-muted/60"
|
|
40
|
+
>
|
|
41
|
+
{photoUrl ? (
|
|
42
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
43
|
+
<img
|
|
44
|
+
src={photoUrl}
|
|
45
|
+
alt=""
|
|
46
|
+
className="mt-0.5 h-16 w-16 shrink-0 rounded-full object-cover ring-1 ring-border"
|
|
47
|
+
/>
|
|
48
|
+
) : (
|
|
49
|
+
<span className="mt-0.5 flex h-16 w-16 shrink-0 items-center justify-center rounded-full bg-muted text-lg font-semibold text-muted-foreground ring-1 ring-border">
|
|
50
|
+
{member.name.charAt(0)}
|
|
51
|
+
</span>
|
|
52
|
+
)}
|
|
53
|
+
<span className="min-w-0 flex-1">
|
|
54
|
+
<span className="block text-xl font-medium tracking-tight text-foreground transition-colors group-hover:text-primary">
|
|
55
|
+
{member.name}
|
|
56
|
+
</span>
|
|
57
|
+
{member.bio ? (
|
|
58
|
+
<span className="mt-2 block text-sm leading-relaxed text-muted-foreground">
|
|
59
|
+
{member.bio}
|
|
60
|
+
</span>
|
|
61
|
+
) : null}
|
|
62
|
+
<span className="mt-3 flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground">
|
|
63
|
+
{member.role ? <span>{member.role}</span> : null}
|
|
64
|
+
<span className="ml-auto text-primary opacity-0 transition group-hover:opacity-100">
|
|
65
|
+
View →
|
|
66
|
+
</span>
|
|
67
|
+
</span>
|
|
68
|
+
</span>
|
|
69
|
+
</a>
|
|
70
|
+
</li>
|
|
71
|
+
);
|
|
72
|
+
})}
|
|
73
|
+
</ul>
|
|
74
|
+
)}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dkit:block",
|
|
3
|
+
"id": "team-list-cards",
|
|
4
|
+
"title": "Team list (cards)",
|
|
5
|
+
"description": "Card grid with photo, name, role, and bio snippet",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"frameworks": ["next"],
|
|
8
|
+
"uiKits": ["shadcn", "minimal"],
|
|
9
|
+
"shadcnComponents": ["card"],
|
|
10
|
+
"slot": "list",
|
|
11
|
+
"route": { "kind": "index" },
|
|
12
|
+
"registryDependencies": ["team"],
|
|
13
|
+
"dependencies": ["@directus/sdk"],
|
|
14
|
+
"layers": ["ui"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { getTeamMembers, teamMemberPhotoUrl } from "@/lib/dkit/team";
|
|
2
|
+
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
|
+
|
|
4
|
+
/** Minimal kit — uses shared .dkit-card / type primitives. */
|
|
5
|
+
export async function TeamListCards() {
|
|
6
|
+
const members = await getTeamMembers();
|
|
7
|
+
const hrefById = Object.fromEntries(
|
|
8
|
+
await Promise.all(
|
|
9
|
+
members.map(async (member) => [member.id, await moduleHref("team", member.slug)] as const),
|
|
10
|
+
),
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<section>
|
|
15
|
+
<style>{`
|
|
16
|
+
.dkit-team-cards-header {
|
|
17
|
+
text-align: center;
|
|
18
|
+
margin-bottom: 2rem;
|
|
19
|
+
}
|
|
20
|
+
.dkit-team-cards {
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
|
23
|
+
gap: 2rem;
|
|
24
|
+
list-style: none;
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
.dkit-team-cards .dkit-card {
|
|
29
|
+
align-items: center;
|
|
30
|
+
text-align: center;
|
|
31
|
+
}
|
|
32
|
+
.dkit-team-cards__photo,
|
|
33
|
+
.dkit-team-cards__initial {
|
|
34
|
+
width: 6rem;
|
|
35
|
+
height: 6rem;
|
|
36
|
+
border-radius: 9999px;
|
|
37
|
+
object-fit: cover;
|
|
38
|
+
margin-bottom: 1rem;
|
|
39
|
+
}
|
|
40
|
+
.dkit-team-cards__initial {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
background: #eee;
|
|
45
|
+
font-weight: 700;
|
|
46
|
+
font-size: 1.5rem;
|
|
47
|
+
}
|
|
48
|
+
.dkit-team-cards__name {
|
|
49
|
+
margin: 0;
|
|
50
|
+
font-size: 1.125rem;
|
|
51
|
+
}
|
|
52
|
+
.dkit-team-cards__role {
|
|
53
|
+
margin: 0.25rem 0 0;
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
color: var(--dkit-accent, #0F766E);
|
|
56
|
+
}
|
|
57
|
+
.dkit-team-cards__bio {
|
|
58
|
+
margin: 0.75rem 0 0;
|
|
59
|
+
font-size: 0.875rem;
|
|
60
|
+
color: var(--dkit-muted, #666);
|
|
61
|
+
line-height: 1.5;
|
|
62
|
+
}
|
|
63
|
+
`}</style>
|
|
64
|
+
|
|
65
|
+
<div className="dkit-team-cards-header">
|
|
66
|
+
<p className="dkit-label">Our team</p>
|
|
67
|
+
<h2 className="dkit-headline">Meet the people behind the product</h2>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
{members.length === 0 ? (
|
|
71
|
+
<p>No team members yet.</p>
|
|
72
|
+
) : (
|
|
73
|
+
<ul className="dkit-team-cards">
|
|
74
|
+
{members.map((member) => {
|
|
75
|
+
const photoUrl = teamMemberPhotoUrl(member);
|
|
76
|
+
return (
|
|
77
|
+
<li key={member.id}>
|
|
78
|
+
<a
|
|
79
|
+
href={hrefById[member.id]!}
|
|
80
|
+
className="dkit-card"
|
|
81
|
+
>
|
|
82
|
+
{photoUrl ? (
|
|
83
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
84
|
+
<img
|
|
85
|
+
className="dkit-team-cards__photo"
|
|
86
|
+
src={photoUrl}
|
|
87
|
+
alt=""
|
|
88
|
+
width={96}
|
|
89
|
+
height={96}
|
|
90
|
+
/>
|
|
91
|
+
) : (
|
|
92
|
+
<span className="dkit-team-cards__initial">
|
|
93
|
+
{member.name.charAt(0)}
|
|
94
|
+
</span>
|
|
95
|
+
)}
|
|
96
|
+
<h3 className="dkit-team-cards__name">{member.name}</h3>
|
|
97
|
+
{member.role ? (
|
|
98
|
+
<p className="dkit-team-cards__role">{member.role}</p>
|
|
99
|
+
) : null}
|
|
100
|
+
{member.bio ? (
|
|
101
|
+
<p className="dkit-team-cards__bio">{member.bio}</p>
|
|
102
|
+
) : null}
|
|
103
|
+
</a>
|
|
104
|
+
</li>
|
|
105
|
+
);
|
|
106
|
+
})}
|
|
107
|
+
</ul>
|
|
108
|
+
)}
|
|
109
|
+
</section>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { getTeamMembers, teamMemberPhotoUrl } from "@/lib/dkit/team";
|
|
2
|
+
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
|
+
import {
|
|
4
|
+
Card,
|
|
5
|
+
CardContent,
|
|
6
|
+
CardDescription,
|
|
7
|
+
CardHeader,
|
|
8
|
+
CardTitle,
|
|
9
|
+
} from "@/components/ui/card";
|
|
10
|
+
|
|
11
|
+
/** Uses your project's shadcn/ui components. */
|
|
12
|
+
export async function TeamListCards() {
|
|
13
|
+
const members = await getTeamMembers();
|
|
14
|
+
const hrefById = Object.fromEntries(
|
|
15
|
+
await Promise.all(
|
|
16
|
+
members.map(async (member) => [member.id, await moduleHref("team", member.slug)] as const),
|
|
17
|
+
),
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="mx-auto max-w-5xl px-6 py-16 sm:py-20">
|
|
22
|
+
<header className="mb-12 text-center">
|
|
23
|
+
<p className="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
|
|
24
|
+
Our team
|
|
25
|
+
</p>
|
|
26
|
+
<h2 className="text-3xl font-semibold tracking-tight text-foreground sm:text-4xl">
|
|
27
|
+
Meet the people behind the product
|
|
28
|
+
</h2>
|
|
29
|
+
</header>
|
|
30
|
+
|
|
31
|
+
{members.length === 0 ? (
|
|
32
|
+
<p className="rounded-xl border border-dashed border-border px-6 py-12 text-center text-muted-foreground">
|
|
33
|
+
No team members yet.
|
|
34
|
+
</p>
|
|
35
|
+
) : (
|
|
36
|
+
<div className="grid gap-5 sm:grid-cols-2 lg:grid-cols-3">
|
|
37
|
+
{members.map((member) => {
|
|
38
|
+
const photoUrl = teamMemberPhotoUrl(member);
|
|
39
|
+
return (
|
|
40
|
+
<a
|
|
41
|
+
key={member.id}
|
|
42
|
+
href={hrefById[member.id]!}
|
|
43
|
+
className="group block no-underline transition hover:-translate-y-0.5"
|
|
44
|
+
>
|
|
45
|
+
<Card className="h-full text-center shadow-sm transition group-hover:border-primary/40 group-hover:shadow-md">
|
|
46
|
+
<CardHeader className="justify-items-center text-center">
|
|
47
|
+
{photoUrl ? (
|
|
48
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
49
|
+
<img
|
|
50
|
+
src={photoUrl}
|
|
51
|
+
alt=""
|
|
52
|
+
className="mb-2 h-24 w-24 rounded-full object-cover ring-2 ring-border"
|
|
53
|
+
/>
|
|
54
|
+
) : (
|
|
55
|
+
<span className="mb-2 flex h-24 w-24 items-center justify-center rounded-full bg-muted text-2xl font-semibold text-muted-foreground">
|
|
56
|
+
{member.name.charAt(0)}
|
|
57
|
+
</span>
|
|
58
|
+
)}
|
|
59
|
+
<CardTitle className="text-lg transition-colors group-hover:text-primary">
|
|
60
|
+
{member.name}
|
|
61
|
+
</CardTitle>
|
|
62
|
+
{member.role ? (
|
|
63
|
+
<CardDescription className="text-primary">
|
|
64
|
+
{member.role}
|
|
65
|
+
</CardDescription>
|
|
66
|
+
) : null}
|
|
67
|
+
</CardHeader>
|
|
68
|
+
{member.bio ? (
|
|
69
|
+
<CardContent>
|
|
70
|
+
<p className="line-clamp-3 text-sm leading-relaxed text-muted-foreground">
|
|
71
|
+
{member.bio}
|
|
72
|
+
</p>
|
|
73
|
+
</CardContent>
|
|
74
|
+
) : null}
|
|
75
|
+
</Card>
|
|
76
|
+
</a>
|
|
77
|
+
);
|
|
78
|
+
})}
|
|
79
|
+
</div>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "dkit:block",
|
|
3
|
+
"id": "testimonials-carousel",
|
|
4
|
+
"title": "Testimonials carousel",
|
|
5
|
+
"description": "Full-bleed testimonial slider — one quote per slide",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"frameworks": ["next"],
|
|
8
|
+
"uiKits": ["shadcn", "minimal"],
|
|
9
|
+
"shadcnComponents": ["carousel", "button"],
|
|
10
|
+
"slot": "list",
|
|
11
|
+
"route": { "kind": "static" },
|
|
12
|
+
"registryDependencies": ["testimonials"],
|
|
13
|
+
"dependencies": ["@directus/sdk", "embla-carousel-react"],
|
|
14
|
+
"layers": ["ui"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
|
|
5
|
+
export type TestimonialSlide = {
|
|
6
|
+
id: string;
|
|
7
|
+
quote: string;
|
|
8
|
+
author_name: string;
|
|
9
|
+
author_role?: string | null;
|
|
10
|
+
company?: string | null;
|
|
11
|
+
avatarUrl?: string | null;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Full-bleed CSS scroll-snap carousel.
|
|
16
|
+
* Prev/next only call scrollBy — motion is CSS (snap + smooth scroll).
|
|
17
|
+
*/
|
|
18
|
+
export function TestimonialsCarouselClient({
|
|
19
|
+
slides,
|
|
20
|
+
}: {
|
|
21
|
+
slides: TestimonialSlide[];
|
|
22
|
+
}) {
|
|
23
|
+
const scrollerRef = useRef<HTMLDivElement>(null);
|
|
24
|
+
|
|
25
|
+
function scrollByPage(dir: -1 | 1) {
|
|
26
|
+
const el = scrollerRef.current;
|
|
27
|
+
if (!el) return;
|
|
28
|
+
el.scrollBy({ left: dir * el.clientWidth, behavior: "smooth" });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (!slides.length) {
|
|
32
|
+
return <p>No testimonials yet.</p>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<section className="dkit-testimonials-carousel">
|
|
37
|
+
<style>{`
|
|
38
|
+
.dkit-testimonials-carousel {
|
|
39
|
+
width: 100%;
|
|
40
|
+
overflow-x: clip;
|
|
41
|
+
padding: 3.5rem 0;
|
|
42
|
+
background: #f5f5f5;
|
|
43
|
+
}
|
|
44
|
+
.dkit-testimonials-carousel__intro {
|
|
45
|
+
max-width: 40rem;
|
|
46
|
+
margin: 0 auto 2.5rem;
|
|
47
|
+
padding: 0 1.5rem;
|
|
48
|
+
text-align: center;
|
|
49
|
+
}
|
|
50
|
+
.dkit-testimonials-carousel__intro h2 {
|
|
51
|
+
margin: 0.5rem 0 0;
|
|
52
|
+
font-size: 1.75rem;
|
|
53
|
+
}
|
|
54
|
+
.dkit-testimonials-carousel__eyebrow {
|
|
55
|
+
margin: 0;
|
|
56
|
+
font-size: 0.75rem;
|
|
57
|
+
letter-spacing: 0.2em;
|
|
58
|
+
text-transform: uppercase;
|
|
59
|
+
}
|
|
60
|
+
.dkit-testimonials-carousel__frame {
|
|
61
|
+
position: relative;
|
|
62
|
+
max-width: 56rem;
|
|
63
|
+
margin: 0 auto;
|
|
64
|
+
padding: 0 3rem;
|
|
65
|
+
}
|
|
66
|
+
.dkit-testimonials-carousel__track {
|
|
67
|
+
display: flex;
|
|
68
|
+
overflow-x: auto;
|
|
69
|
+
scroll-snap-type: x mandatory;
|
|
70
|
+
scroll-behavior: smooth;
|
|
71
|
+
overscroll-behavior-x: contain;
|
|
72
|
+
scrollbar-width: none;
|
|
73
|
+
-webkit-overflow-scrolling: touch;
|
|
74
|
+
}
|
|
75
|
+
.dkit-testimonials-carousel__track::-webkit-scrollbar {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
.dkit-testimonials-carousel__slide {
|
|
79
|
+
flex: 0 0 100%;
|
|
80
|
+
scroll-snap-align: center;
|
|
81
|
+
scroll-snap-stop: always;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
padding: 0 1.5rem;
|
|
84
|
+
}
|
|
85
|
+
.dkit-testimonials-carousel__figure {
|
|
86
|
+
margin: 0 auto;
|
|
87
|
+
max-width: 36rem;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
align-items: center;
|
|
91
|
+
text-align: center;
|
|
92
|
+
}
|
|
93
|
+
.dkit-testimonials-carousel__avatar,
|
|
94
|
+
.dkit-testimonials-carousel__avatar-fallback {
|
|
95
|
+
width: 6rem;
|
|
96
|
+
height: 6rem;
|
|
97
|
+
border-radius: 9999px;
|
|
98
|
+
object-fit: cover;
|
|
99
|
+
margin-bottom: 2rem;
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
}
|
|
102
|
+
.dkit-testimonials-carousel__avatar-fallback {
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
background: #fff;
|
|
107
|
+
border: 1px solid #ddd;
|
|
108
|
+
font-size: 1.5rem;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
}
|
|
111
|
+
.dkit-testimonials-carousel__quote {
|
|
112
|
+
margin: 0;
|
|
113
|
+
font-size: 1.35rem;
|
|
114
|
+
line-height: 1.5;
|
|
115
|
+
}
|
|
116
|
+
.dkit-testimonials-carousel__caption {
|
|
117
|
+
margin-top: 2rem;
|
|
118
|
+
}
|
|
119
|
+
.dkit-testimonials-carousel__name {
|
|
120
|
+
display: block;
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
font-size: 1rem;
|
|
123
|
+
}
|
|
124
|
+
.dkit-testimonials-carousel__role {
|
|
125
|
+
display: block;
|
|
126
|
+
margin-top: 0.25rem;
|
|
127
|
+
font-size: 0.875rem;
|
|
128
|
+
color: #666;
|
|
129
|
+
}
|
|
130
|
+
.dkit-testimonials-carousel__nav {
|
|
131
|
+
position: absolute;
|
|
132
|
+
inset: 0 0.25rem;
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
}
|
|
138
|
+
.dkit-testimonials-carousel__nav button {
|
|
139
|
+
pointer-events: auto;
|
|
140
|
+
width: 2.25rem;
|
|
141
|
+
height: 2.25rem;
|
|
142
|
+
border-radius: 9999px;
|
|
143
|
+
border: 1px solid #ccc;
|
|
144
|
+
background: #fff;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
}
|
|
147
|
+
.dkit-testimonials-carousel__nav button:hover {
|
|
148
|
+
background: #f0f0f0;
|
|
149
|
+
}
|
|
150
|
+
@media (prefers-reduced-motion: reduce) {
|
|
151
|
+
.dkit-testimonials-carousel__track {
|
|
152
|
+
scroll-behavior: auto;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`}</style>
|
|
156
|
+
|
|
157
|
+
<header className="dkit-testimonials-carousel__intro">
|
|
158
|
+
<p className="dkit-testimonials-carousel__eyebrow">Testimonials</p>
|
|
159
|
+
<h2>What our clients say</h2>
|
|
160
|
+
</header>
|
|
161
|
+
|
|
162
|
+
<div className="dkit-testimonials-carousel__frame">
|
|
163
|
+
<div
|
|
164
|
+
ref={scrollerRef}
|
|
165
|
+
className="dkit-testimonials-carousel__track"
|
|
166
|
+
tabIndex={0}
|
|
167
|
+
aria-roledescription="carousel"
|
|
168
|
+
aria-label="Testimonials"
|
|
169
|
+
>
|
|
170
|
+
{slides.map((t) => (
|
|
171
|
+
<div
|
|
172
|
+
key={t.id}
|
|
173
|
+
className="dkit-testimonials-carousel__slide"
|
|
174
|
+
aria-roledescription="slide"
|
|
175
|
+
>
|
|
176
|
+
<figure className="dkit-testimonials-carousel__figure">
|
|
177
|
+
{t.avatarUrl ? (
|
|
178
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
179
|
+
<img
|
|
180
|
+
className="dkit-testimonials-carousel__avatar"
|
|
181
|
+
src={t.avatarUrl}
|
|
182
|
+
alt=""
|
|
183
|
+
width={96}
|
|
184
|
+
height={96}
|
|
185
|
+
/>
|
|
186
|
+
) : (
|
|
187
|
+
<span className="dkit-testimonials-carousel__avatar-fallback">
|
|
188
|
+
{t.author_name.charAt(0)}
|
|
189
|
+
</span>
|
|
190
|
+
)}
|
|
191
|
+
<blockquote className="dkit-testimonials-carousel__quote">
|
|
192
|
+
“{t.quote}”
|
|
193
|
+
</blockquote>
|
|
194
|
+
<figcaption className="dkit-testimonials-carousel__caption">
|
|
195
|
+
<span className="dkit-testimonials-carousel__name">
|
|
196
|
+
{t.author_name}
|
|
197
|
+
</span>
|
|
198
|
+
{t.author_role || t.company ? (
|
|
199
|
+
<span className="dkit-testimonials-carousel__role">
|
|
200
|
+
{[t.author_role, t.company].filter(Boolean).join(" · ")}
|
|
201
|
+
</span>
|
|
202
|
+
) : null}
|
|
203
|
+
</figcaption>
|
|
204
|
+
</figure>
|
|
205
|
+
</div>
|
|
206
|
+
))}
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
{slides.length > 1 ? (
|
|
210
|
+
<div className="dkit-testimonials-carousel__nav">
|
|
211
|
+
<button
|
|
212
|
+
type="button"
|
|
213
|
+
aria-label="Previous testimonial"
|
|
214
|
+
onClick={() => scrollByPage(-1)}
|
|
215
|
+
>
|
|
216
|
+
←
|
|
217
|
+
</button>
|
|
218
|
+
<button
|
|
219
|
+
type="button"
|
|
220
|
+
aria-label="Next testimonial"
|
|
221
|
+
onClick={() => scrollByPage(1)}
|
|
222
|
+
>
|
|
223
|
+
→
|
|
224
|
+
</button>
|
|
225
|
+
</div>
|
|
226
|
+
) : null}
|
|
227
|
+
</div>
|
|
228
|
+
</section>
|
|
229
|
+
);
|
|
230
|
+
}
|
package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel.tsx
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getTestimonials,
|
|
3
|
+
testimonialAvatarUrl,
|
|
4
|
+
} from "@/lib/dkit/testimonials";
|
|
5
|
+
import {
|
|
6
|
+
TestimonialsCarouselClient,
|
|
7
|
+
type TestimonialSlide,
|
|
8
|
+
} from "./testimonials-carousel-client";
|
|
9
|
+
|
|
10
|
+
/** Minimal kit — CSS scroll-snap carousel with tiny prev/next JS. */
|
|
11
|
+
export async function TestimonialsCarousel() {
|
|
12
|
+
const testimonials = await getTestimonials();
|
|
13
|
+
const slides: TestimonialSlide[] = testimonials.map((t) => ({
|
|
14
|
+
id: t.id,
|
|
15
|
+
quote: t.quote,
|
|
16
|
+
author_name: t.author_name,
|
|
17
|
+
author_role: t.author_role,
|
|
18
|
+
company: t.company,
|
|
19
|
+
avatarUrl: testimonialAvatarUrl(t),
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
return <TestimonialsCarouselClient slides={slides} />;
|
|
23
|
+
}
|