@contentrain/astro-kit 0.45.2 → 0.45.4
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/catalog.json +106 -2
- package/components/_shared/Section.astro +4 -2
- package/components/band/Band.astro +3 -1
- package/components/band/meta.json +1 -0
- package/components/behavior/Behavior.astro +3 -1
- package/components/behavior/meta.json +1 -0
- package/components/card-grid/CardGrid.astro +3 -1
- package/components/card-grid/meta.json +1 -0
- package/components/contact-details/ContactDetails.astro +3 -1
- package/components/contact-details/meta.json +1 -0
- package/components/contact-form/ContactForm.astro +3 -1
- package/components/contact-form/meta.json +1 -0
- package/components/cta/Cta.astro +3 -1
- package/components/cta/meta.json +1 -0
- package/components/faq/Faq.astro +3 -1
- package/components/faq/meta.json +1 -0
- package/components/feature-list/FeatureList.astro +3 -1
- package/components/feature-list/meta.json +1 -0
- package/components/gallery/Gallery.astro +3 -1
- package/components/gallery/meta.json +1 -0
- package/components/hero/Hero.astro +5 -3
- package/components/hero/meta.json +1 -0
- package/components/logo-cloud/LogoCloud.astro +3 -1
- package/components/logo-cloud/meta.json +1 -0
- package/components/newsletter/Newsletter.astro +3 -1
- package/components/newsletter/meta.json +1 -0
- package/components/post-card/PostCard.astro +3 -2
- package/components/post-card/fixtures.json +12 -0
- package/components/post-card/meta.json +1 -1
- package/components/post-list/PostList.astro +3 -1
- package/components/post-list/meta.json +1 -0
- package/components/pricing/Pricing.astro +3 -1
- package/components/pricing/meta.json +1 -0
- package/components/prose/fixtures.json +3 -3
- package/components/slider/Slider.astro +3 -1
- package/components/slider/SliderTrack.astro +3 -1
- package/components/slider/meta.json +1 -0
- package/components/split/Split.astro +3 -1
- package/components/split/meta.json +1 -0
- package/components/stats/Stats.astro +3 -1
- package/components/stats/meta.json +1 -0
- package/components/steps/Steps.astro +3 -1
- package/components/steps/meta.json +1 -0
- package/components/tabs/Tabs.astro +3 -1
- package/components/tabs/meta.json +1 -0
- package/components/team/Team.astro +3 -1
- package/components/team/meta.json +1 -0
- package/components/testimonial/Testimonial.astro +3 -1
- package/components/testimonial/meta.json +1 -0
- package/package.json +1 -1
package/catalog.json
CHANGED
|
@@ -436,6 +436,11 @@
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
},
|
|
439
|
+
"entry": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"content": false,
|
|
442
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
443
|
+
},
|
|
439
444
|
"id": {
|
|
440
445
|
"type": "string",
|
|
441
446
|
"content": false,
|
|
@@ -677,6 +682,11 @@
|
|
|
677
682
|
}
|
|
678
683
|
}
|
|
679
684
|
},
|
|
685
|
+
"entry": {
|
|
686
|
+
"type": "string",
|
|
687
|
+
"content": false,
|
|
688
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
689
|
+
},
|
|
680
690
|
"id": {
|
|
681
691
|
"type": "string",
|
|
682
692
|
"content": false,
|
|
@@ -1019,6 +1029,11 @@
|
|
|
1019
1029
|
}
|
|
1020
1030
|
}
|
|
1021
1031
|
},
|
|
1032
|
+
"entry": {
|
|
1033
|
+
"type": "string",
|
|
1034
|
+
"content": false,
|
|
1035
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
1036
|
+
},
|
|
1022
1037
|
"id": {
|
|
1023
1038
|
"type": "string",
|
|
1024
1039
|
"content": false,
|
|
@@ -1223,6 +1238,11 @@
|
|
|
1223
1238
|
"content": false,
|
|
1224
1239
|
"description": "Text of the map link (ui:)."
|
|
1225
1240
|
},
|
|
1241
|
+
"entry": {
|
|
1242
|
+
"type": "string",
|
|
1243
|
+
"content": false,
|
|
1244
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
1245
|
+
},
|
|
1226
1246
|
"id": {
|
|
1227
1247
|
"type": "string",
|
|
1228
1248
|
"content": false,
|
|
@@ -1492,6 +1512,11 @@
|
|
|
1492
1512
|
},
|
|
1493
1513
|
"description": "Ways to reach you, in order (Email → mailto:, Phone → tel:, Address → map link)."
|
|
1494
1514
|
},
|
|
1515
|
+
"entry": {
|
|
1516
|
+
"type": "string",
|
|
1517
|
+
"content": false,
|
|
1518
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
1519
|
+
},
|
|
1495
1520
|
"id": {
|
|
1496
1521
|
"type": "string",
|
|
1497
1522
|
"content": false,
|
|
@@ -1963,6 +1988,11 @@
|
|
|
1963
1988
|
}
|
|
1964
1989
|
}
|
|
1965
1990
|
},
|
|
1991
|
+
"entry": {
|
|
1992
|
+
"type": "string",
|
|
1993
|
+
"content": false,
|
|
1994
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
1995
|
+
},
|
|
1966
1996
|
"id": {
|
|
1967
1997
|
"type": "string",
|
|
1968
1998
|
"content": false,
|
|
@@ -2626,6 +2656,11 @@
|
|
|
2626
2656
|
}
|
|
2627
2657
|
}
|
|
2628
2658
|
},
|
|
2659
|
+
"entry": {
|
|
2660
|
+
"type": "string",
|
|
2661
|
+
"content": false,
|
|
2662
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
2663
|
+
},
|
|
2629
2664
|
"id": {
|
|
2630
2665
|
"type": "string",
|
|
2631
2666
|
"content": false,
|
|
@@ -2891,6 +2926,11 @@
|
|
|
2891
2926
|
}
|
|
2892
2927
|
}
|
|
2893
2928
|
},
|
|
2929
|
+
"entry": {
|
|
2930
|
+
"type": "string",
|
|
2931
|
+
"content": false,
|
|
2932
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
2933
|
+
},
|
|
2894
2934
|
"id": {
|
|
2895
2935
|
"type": "string",
|
|
2896
2936
|
"content": false,
|
|
@@ -3328,6 +3368,11 @@
|
|
|
3328
3368
|
"content": false,
|
|
3329
3369
|
"description": "Section background."
|
|
3330
3370
|
},
|
|
3371
|
+
"entry": {
|
|
3372
|
+
"type": "string",
|
|
3373
|
+
"content": false,
|
|
3374
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
3375
|
+
},
|
|
3331
3376
|
"id": {
|
|
3332
3377
|
"type": "string",
|
|
3333
3378
|
"content": false,
|
|
@@ -3975,6 +4020,11 @@
|
|
|
3975
4020
|
},
|
|
3976
4021
|
"description": "Hero image; loaded first (the page's largest image)."
|
|
3977
4022
|
},
|
|
4023
|
+
"entry": {
|
|
4024
|
+
"type": "string",
|
|
4025
|
+
"content": false,
|
|
4026
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
4027
|
+
},
|
|
3978
4028
|
"id": {
|
|
3979
4029
|
"type": "string",
|
|
3980
4030
|
"content": false,
|
|
@@ -4435,6 +4485,11 @@
|
|
|
4435
4485
|
}
|
|
4436
4486
|
}
|
|
4437
4487
|
},
|
|
4488
|
+
"entry": {
|
|
4489
|
+
"type": "string",
|
|
4490
|
+
"content": false,
|
|
4491
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
4492
|
+
},
|
|
4438
4493
|
"id": {
|
|
4439
4494
|
"type": "string",
|
|
4440
4495
|
"content": false,
|
|
@@ -4705,6 +4760,11 @@
|
|
|
4705
4760
|
"content": false,
|
|
4706
4761
|
"description": "Open the provider's confirmation page in a new tab (the reader keeps the site)."
|
|
4707
4762
|
},
|
|
4763
|
+
"entry": {
|
|
4764
|
+
"type": "string",
|
|
4765
|
+
"content": false,
|
|
4766
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
4767
|
+
},
|
|
4708
4768
|
"id": {
|
|
4709
4769
|
"type": "string",
|
|
4710
4770
|
"content": false,
|
|
@@ -4979,8 +5039,7 @@
|
|
|
4979
5039
|
},
|
|
4980
5040
|
"href": {
|
|
4981
5041
|
"type": "url",
|
|
4982
|
-
"
|
|
4983
|
-
"description": "Post address (from the permalink pattern)."
|
|
5042
|
+
"description": "Post address (from the permalink pattern). Absent for an entry with no page of its own (a list-only custom type's): the title is printed unlinked, never as a dead or `#` link."
|
|
4984
5043
|
},
|
|
4985
5044
|
"excerpt": {
|
|
4986
5045
|
"type": "text",
|
|
@@ -5263,6 +5322,11 @@
|
|
|
5263
5322
|
"content": false,
|
|
5264
5323
|
"description": "Section background: default, muted, inverse or accent."
|
|
5265
5324
|
},
|
|
5325
|
+
"entry": {
|
|
5326
|
+
"type": "string",
|
|
5327
|
+
"content": false,
|
|
5328
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
5329
|
+
},
|
|
5266
5330
|
"id": {
|
|
5267
5331
|
"type": "string",
|
|
5268
5332
|
"content": false,
|
|
@@ -5592,6 +5656,11 @@
|
|
|
5592
5656
|
"content": false,
|
|
5593
5657
|
"description": "Badge text on featured plans (ui-strings pricing.featured)."
|
|
5594
5658
|
},
|
|
5659
|
+
"entry": {
|
|
5660
|
+
"type": "string",
|
|
5661
|
+
"content": false,
|
|
5662
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
5663
|
+
},
|
|
5595
5664
|
"id": {
|
|
5596
5665
|
"type": "string",
|
|
5597
5666
|
"content": false,
|
|
@@ -6110,6 +6179,11 @@
|
|
|
6110
6179
|
"content": false,
|
|
6111
6180
|
"description": "Wrap from the last slide to the first."
|
|
6112
6181
|
},
|
|
6182
|
+
"entry": {
|
|
6183
|
+
"type": "string",
|
|
6184
|
+
"content": false,
|
|
6185
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
6186
|
+
},
|
|
6113
6187
|
"id": {
|
|
6114
6188
|
"type": "string",
|
|
6115
6189
|
"default": "slider",
|
|
@@ -6779,6 +6853,11 @@
|
|
|
6779
6853
|
}
|
|
6780
6854
|
}
|
|
6781
6855
|
},
|
|
6856
|
+
"entry": {
|
|
6857
|
+
"type": "string",
|
|
6858
|
+
"content": false,
|
|
6859
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
6860
|
+
},
|
|
6782
6861
|
"id": {
|
|
6783
6862
|
"type": "string",
|
|
6784
6863
|
"content": false,
|
|
@@ -7102,6 +7181,11 @@
|
|
|
7102
7181
|
}
|
|
7103
7182
|
}
|
|
7104
7183
|
},
|
|
7184
|
+
"entry": {
|
|
7185
|
+
"type": "string",
|
|
7186
|
+
"content": false,
|
|
7187
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
7188
|
+
},
|
|
7105
7189
|
"id": {
|
|
7106
7190
|
"type": "string",
|
|
7107
7191
|
"content": false,
|
|
@@ -7266,6 +7350,11 @@
|
|
|
7266
7350
|
},
|
|
7267
7351
|
"description": "The steps, in order (Elementor icon boxes, Divi blurbs, Gutenberg columns of heading + text)."
|
|
7268
7352
|
},
|
|
7353
|
+
"entry": {
|
|
7354
|
+
"type": "string",
|
|
7355
|
+
"content": false,
|
|
7356
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
7357
|
+
},
|
|
7269
7358
|
"id": {
|
|
7270
7359
|
"type": "string",
|
|
7271
7360
|
"content": false,
|
|
@@ -7657,6 +7746,11 @@
|
|
|
7657
7746
|
"type": "string",
|
|
7658
7747
|
"description": "Accessible name of the tab list when there is no heading."
|
|
7659
7748
|
},
|
|
7749
|
+
"entry": {
|
|
7750
|
+
"type": "string",
|
|
7751
|
+
"content": false,
|
|
7752
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
7753
|
+
},
|
|
7660
7754
|
"id": {
|
|
7661
7755
|
"type": "string",
|
|
7662
7756
|
"description": "Section id, unique per page: the tabs machine and its element ids derive from it."
|
|
@@ -7818,6 +7912,11 @@
|
|
|
7818
7912
|
},
|
|
7819
7913
|
"description": "The people, in display order (Divi team member name/position/content/image_url, Elementor image box)."
|
|
7820
7914
|
},
|
|
7915
|
+
"entry": {
|
|
7916
|
+
"type": "string",
|
|
7917
|
+
"content": false,
|
|
7918
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
7919
|
+
},
|
|
7821
7920
|
"id": {
|
|
7822
7921
|
"type": "string",
|
|
7823
7922
|
"content": false,
|
|
@@ -8255,6 +8354,11 @@
|
|
|
8255
8354
|
}
|
|
8256
8355
|
}
|
|
8257
8356
|
},
|
|
8357
|
+
"entry": {
|
|
8358
|
+
"type": "string",
|
|
8359
|
+
"content": false,
|
|
8360
|
+
"description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed."
|
|
8361
|
+
},
|
|
8258
8362
|
"id": {
|
|
8259
8363
|
"type": "string",
|
|
8260
8364
|
"content": false,
|
|
@@ -46,11 +46,13 @@ interface Props {
|
|
|
46
46
|
'aria-labelledby'?: string | undefined
|
|
47
47
|
/** The component this section is (`hero`, `card-grid`): `data-kit-section`'s value, the hook a theme or a design layer styles one kind of section by. */
|
|
48
48
|
kit?: string | undefined
|
|
49
|
+
/** The page entry the section is built from, without its locale (`services-0`): `data-kit-entry`'s value, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
50
|
+
entry?: string | undefined
|
|
49
51
|
/** The source section's measured style (`MeasuredStyle`): frame width, padding, fill, image, columns, gap. Wins over `tone`. */
|
|
50
52
|
measured?: MeasuredStyle | undefined
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
const { tone: given, spacing, width = 'page', as: Tag = 'section', id, class: className, 'aria-labelledby': labelledBy, kit, measured } = Astro.props
|
|
55
|
+
const { tone: given, spacing, width = 'page', as: Tag = 'section', id, class: className, 'aria-labelledby': labelledBy, kit, entry, measured } = Astro.props
|
|
54
56
|
const m = measuredFrame(measured)
|
|
55
57
|
// A measured fill is the section's own colour, its text set by the measured tone; a tone alone picks the kit's band.
|
|
56
58
|
const tone = m.color ? 'none' : m.tone === 'dark' ? 'inverse' : m.tone === 'light' ? 'default' : given
|
|
@@ -62,7 +64,7 @@ const frameStyle = width === 'prose' ? m.frameStyle?.replace('--container-page:'
|
|
|
62
64
|
const backdrop = safeSrc(m.image?.src)
|
|
63
65
|
const dataTone = m.color ? (m.tone === 'dark' ? 'inverse' : 'default') : tone ?? 'default'
|
|
64
66
|
---
|
|
65
|
-
<Tag id={id} aria-labelledby={labelledBy} class={section({ tone, spacing, class: [text, layered, className].filter(Boolean).join(' ') || undefined })} style={style} data-tone={dataTone} data-kit-section={kit ?? ''} data-kit-spacing={spacing ?? 'md'} data-kit-measured={measured ? '' : undefined}>
|
|
67
|
+
<Tag id={id} aria-labelledby={labelledBy} class={section({ tone, spacing, class: [text, layered, className].filter(Boolean).join(' ') || undefined })} style={style} data-tone={dataTone} data-kit-section={kit ?? ''} data-kit-entry={entry} data-kit-spacing={spacing ?? 'md'} data-kit-measured={measured ? '' : undefined}>
|
|
66
68
|
{m.image && backdrop && <img src={backdrop} alt="" loading="lazy" decoding="async" class="absolute inset-0 -z-10 h-full w-full" style={`object-fit: ${m.image.fit}${m.image.position ? `; object-position: ${m.image.position}` : ''}`} />}
|
|
67
69
|
{m.overlay && <div class="absolute inset-0 -z-10" style={`background: ${m.overlay}`} aria-hidden="true" />}
|
|
68
70
|
{width === 'none' ? <slot /> : <div class={width === 'prose' ? 'container-prose' : 'container-page'} style={frameStyle}><slot /></div>}
|
|
@@ -101,6 +101,8 @@ interface Props {
|
|
|
101
101
|
leadLines?: 'flow' | 'lines' | undefined
|
|
102
102
|
/** Stack only: from md the content starts at this share of the frame's width (`15` … `42` %), its text at that edge. `none` (absent): as before. */
|
|
103
103
|
inset?: 'none' | '15' | '27' | '34' | '42' | undefined
|
|
104
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
105
|
+
entry?: string | undefined
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
const { heading, eyebrow, lead, media, items = [], actions = [], headingLevel = 2, layout, columns, align, tone, measured, id, headingLines, leadLines, inset } = Astro.props
|
|
@@ -113,7 +115,7 @@ const ItemHeading = `h${heading ? headingLevel + 1 : headingLevel}` as 'h2' | 'h
|
|
|
113
115
|
const headingId = heading ? (id ? `${id}-title` : instanceId(Astro.locals, undefined, `band-${heading.toLowerCase().replace(/[^a-z0-9]+/g, '-')}`)) : undefined
|
|
114
116
|
const hasCopy = Boolean(heading || eyebrow || lead || actions.length)
|
|
115
117
|
---
|
|
116
|
-
<Section kit="band" tone={tone} id={id} aria-labelledby={headingId} measured={measured}>
|
|
118
|
+
<Section kit="band" tone={tone} id={id} aria-labelledby={headingId} measured={measured} entry={Astro.props.entry}>
|
|
117
119
|
<div class={s.column()}>
|
|
118
120
|
{(hasCopy || media) && (
|
|
119
121
|
<div class={s.grid()}>
|
|
@@ -340,6 +340,7 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
},
|
|
343
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
343
344
|
"id": {
|
|
344
345
|
"type": "string",
|
|
345
346
|
"content": false,
|
|
@@ -32,6 +32,8 @@ interface Props {
|
|
|
32
32
|
measured?: MeasuredStyle | undefined
|
|
33
33
|
/** Section id, unique per page; without one `behavior`, `behavior-2`, … in render order. */
|
|
34
34
|
id?: string | undefined
|
|
35
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
36
|
+
entry?: string | undefined
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
const { kind, html, items, title, panel, fact, previousLabel, nextLabel, closeLabel, tone, measured, id: givenId } = Astro.props
|
|
@@ -44,7 +46,7 @@ const factId = fact && /^[\w:.-]{1,120}$/.test(fact) ? fact : undefined
|
|
|
44
46
|
const NOSCRIPT = '<style>.cr-behavior dialog:not([open]){display:block;position:static;margin:0;max-width:none}</style>'
|
|
45
47
|
---
|
|
46
48
|
{html && (
|
|
47
|
-
<Section kit="behavior" tone={tone} id={id} measured={measured}>
|
|
49
|
+
<Section kit="behavior" tone={tone} id={id} measured={measured} entry={Astro.props.entry}>
|
|
48
50
|
<div
|
|
49
51
|
class="cr-behavior"
|
|
50
52
|
data-cr-behavior={kind}
|
|
@@ -198,6 +198,7 @@
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
201
202
|
"id": {
|
|
202
203
|
"type": "string",
|
|
203
204
|
"content": false,
|
|
@@ -90,6 +90,8 @@ interface Props {
|
|
|
90
90
|
measured?: MeasuredStyle | undefined
|
|
91
91
|
/** Section id, unique per page; without one `card-grid`, `card-grid-2`, … in render order. Its title is `<id>-title`. */
|
|
92
92
|
id?: string | undefined
|
|
93
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
94
|
+
entry?: string | undefined
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
const { title, intro, items, headingLevel = 2, columns, style, align, tone, measured, id: givenId, layout, index = false } = Astro.props
|
|
@@ -104,7 +106,7 @@ const r = rows({ index })
|
|
|
104
106
|
const List = index ? 'ol' : 'ul'
|
|
105
107
|
const number = (i: number) => String(i + 1).padStart(2, '0')
|
|
106
108
|
---
|
|
107
|
-
<Section kit="card-grid" measured={measured} tone={tone} id={id} aria-labelledby={headingId}>
|
|
109
|
+
<Section kit="card-grid" measured={measured} tone={tone} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
108
110
|
{(title || intro) && (
|
|
109
111
|
<header class:list={['mb-10 flex max-w-2xl flex-col gap-3', align === 'center' && 'mx-auto items-center text-center']}>
|
|
110
112
|
{title && <Heading id={headingId} class="text-3xl [font-weight:var(--font-weight-heading,700)] tracking-tight text-balance md:text-4xl">{title}</Heading>}
|
|
@@ -247,6 +247,7 @@
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
},
|
|
250
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
250
251
|
"id": {
|
|
251
252
|
"type": "string",
|
|
252
253
|
"content": false,
|
|
@@ -47,6 +47,8 @@ interface Props {
|
|
|
47
47
|
id?: string | undefined
|
|
48
48
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
49
49
|
measured?: MeasuredStyle | undefined
|
|
50
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
51
|
+
entry?: string | undefined
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
const {
|
|
@@ -64,7 +66,7 @@ const tel = phone ? `tel:${phone.replace(/[^\d+]/g, '')}` : undefined
|
|
|
64
66
|
const shown = Boolean(email || phone || address || hours || mapUrl)
|
|
65
67
|
---
|
|
66
68
|
{shown && (
|
|
67
|
-
<Section kit="contact-details" measured={measured} spacing="md" id={id} aria-labelledby={headingId}>
|
|
69
|
+
<Section kit="contact-details" measured={measured} spacing="md" id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
68
70
|
{heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
69
71
|
<dl class={s.list({ class: measuredGrid(measured) })}>
|
|
70
72
|
{email && <div><dt class={s.term()}>{emailLabel}</dt><dd class={s.value()}><a href={`mailto:${email}`} class={s.link()}>{email}</a></dd></div>}
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"content": false,
|
|
84
84
|
"description": "Text of the map link (ui:)."
|
|
85
85
|
},
|
|
86
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
86
87
|
"id": {
|
|
87
88
|
"type": "string",
|
|
88
89
|
"content": false,
|
|
@@ -100,6 +100,8 @@ interface Props {
|
|
|
100
100
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
101
101
|
measured?: MeasuredStyle | undefined
|
|
102
102
|
id?: string | undefined
|
|
103
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
104
|
+
entry?: string | undefined
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
const { model, heading, intro, formHeading, details = [], layout, detailsStyle, panel, hours, socials = [], map, align, tone, headingPlace = 'top', measured, id: givenId } = Astro.props
|
|
@@ -124,7 +126,7 @@ const LINK = 'underline decoration-line underline-offset-4 hover:decoration-curr
|
|
|
124
126
|
const FormHeading = heading ? 'h3' : 'h2'
|
|
125
127
|
---
|
|
126
128
|
{!bare && (
|
|
127
|
-
<Section kit="contact-form" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId}>
|
|
129
|
+
<Section kit="contact-form" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
128
130
|
<div class={s.grid()}>
|
|
129
131
|
{!formOnly && (heading || intro || details.length > 0 || hours || socials.length > 0 || map) && !(headingInForm && !hours && socials.length === 0 && !map && !intro && details.length === 0) && (
|
|
130
132
|
<div class={s.copy()}>
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
},
|
|
122
122
|
"description": "Ways to reach you, in order (Email → mailto:, Phone → tel:, Address → map link)."
|
|
123
123
|
},
|
|
124
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
124
125
|
"id": {
|
|
125
126
|
"type": "string",
|
|
126
127
|
"content": false,
|
package/components/cta/Cta.astro
CHANGED
|
@@ -87,6 +87,8 @@ interface Props {
|
|
|
87
87
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
88
88
|
measured?: MeasuredStyle | undefined
|
|
89
89
|
id?: string | undefined
|
|
90
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
91
|
+
entry?: string | undefined
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
const { heading, eyebrow, body, note, image, actions, layout, frame, size, align, mediaSide, tone = 'accent', actionsAlign, bgImage, bgOverlay, measured: given, id: givenId } = Astro.props
|
|
@@ -103,7 +105,7 @@ const headingId = `${id}-title`
|
|
|
103
105
|
const onAccent = (action: ActionInput): ActionInput => ({ label: action.label, href: action.href, newTab: action.newTab, style: 'secondary' })
|
|
104
106
|
const shown = actions.map(action => (tone === 'accent' && !bgImage && (action.style ?? 'primary') === 'primary' ? onAccent(action) : action))
|
|
105
107
|
---
|
|
106
|
-
<Section kit="cta" measured={measured} tone={frame === 'card' ? 'default' : tone} spacing={size === 'lg' ? 'lg' : 'md'} id={id} aria-labelledby={headingId}>
|
|
108
|
+
<Section kit="cta" measured={measured} tone={frame === 'card' ? 'default' : tone} spacing={size === 'lg' ? 'lg' : 'md'} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
107
109
|
<div class:list={[s.box(), image && 'md:flex-row md:items-center md:justify-between md:gap-12']}>
|
|
108
110
|
<div class={image ? s.text() : 'contents'}>
|
|
109
111
|
<div class={s.copy()}>
|
package/components/cta/meta.json
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"bgOverlay": { "type": "string", "content": false, "description": "The colour laid over the background image (a hex or rgb colour); default black at 55 %." },
|
|
25
25
|
"actions": { "type": "array", "label": "Buttons", "required": true, "items": { "type": "object", "fields": { "label": { "type": "string", "label": "Label", "required": true, "description": "The button text." }, "href": { "type": "url", "label": "Link", "required": true, "description": "Where the button goes: a page on this site or a full address." }, "newTab": { "type": "boolean", "label": "Open in a new tab", "description": "Open the link in a new tab (an external site the reader should not leave for)." }, "style": { "type": "select", "label": "Style", "options": ["primary", "secondary", "ghost"], "description": "primary for the main action, secondary or ghost for the ones beside it." } } }, "description": "Buttons, in order; usually one." },
|
|
26
26
|
"measured": { "type": "object", "content": false, "description": "The source section's measured style (MeasuredStyle): frame width, padding, fill, image, columns per width, gap, text tone, radius, minimum height — all in pixels. Absent, the site's tokens; present, it wins over tone and columns. Values that are not a number, a colour or a known keyword are dropped.", "fields": { "containerPx": { "type": "integer", "min": 0, "max": 2560, "description": "The frame's content width." }, "padY": { "type": "integer", "min": 0, "max": 400, "description": "Top and bottom padding." }, "padX": { "type": "integer", "min": 0, "max": 200, "description": "The frame's side padding (gutter)." }, "bg": { "type": "object", "description": "The section's background.", "fields": { "color": { "type": "string", "description": "Fill colour: hex, rgb(a) or hsl(a)." }, "image": { "type": "string", "description": "Background image address (http(s) or root-relative), drawn behind the content." }, "overlay": { "type": "string", "description": "Colour or linear/radial gradient laid over the image or the fill." }, "size": { "type": "string", "description": "cover, contain or auto; anything else draws as cover." }, "position": { "type": "string", "description": "One or two of center/top/bottom/left/right or percentages." } } }, "columns": { "type": "object", "description": "Item columns at 390 (base), 768 (md) and 1280 (lg) px; a missing width follows the narrower one.", "fields": { "390": { "type": "integer", "min": 1, "max": 6, "description": "Phone." }, "768": { "type": "integer", "min": 1, "max": 6, "description": "Tablet." }, "1280": { "type": "integer", "min": 1, "max": 6, "description": "Desktop." } } }, "gap": { "type": "integer", "min": 0, "max": 200, "description": "Gap between items." }, "tone": { "type": "select", "options": ["light", "dark"], "description": "What the text is set for: dark = light text on a dark band. Without it, a fill's own lightness decides." }, "align": { "type": "select", "options": ["start", "center", "end"], "description": "Where the heading and lead sit; read by a component whose own align is not set." }, "radius": { "type": "integer", "min": 0, "max": 200, "description": "Card and item corner radius." }, "minHeight": { "type": "integer", "min": 0, "max": 2000, "description": "The section's minimum height." } } },
|
|
27
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
27
28
|
"id": { "type": "string", "content": false, "description": "Anchor id of the section; the heading gets `<id>-title`. Without one, `cta`, `cta-2`, … in render order, so every section on a page has its own." }
|
|
28
29
|
},
|
|
29
30
|
"slots": {},
|
package/components/faq/Faq.astro
CHANGED
|
@@ -84,6 +84,8 @@ interface Props {
|
|
|
84
84
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
85
85
|
measured?: MeasuredStyle | undefined
|
|
86
86
|
id?: string | undefined
|
|
87
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
88
|
+
entry?: string | undefined
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
const { items, heading, intro, layout, columns, icon, numbered = false, style, questionStyle, exclusive = false, openFirst = false, schema = false, tone, measured, id: givenId } = Astro.props
|
|
@@ -114,7 +116,7 @@ const structured = schema && withText.length > 0
|
|
|
114
116
|
: null
|
|
115
117
|
---
|
|
116
118
|
{items.length > 0 && (
|
|
117
|
-
<Section kit="faq" measured={measured} tone={tone} spacing="md" width={wide ? 'page' : 'prose'} id={id} aria-labelledby={headingId}>
|
|
119
|
+
<Section kit="faq" measured={measured} tone={tone} spacing="md" width={wide ? 'page' : 'prose'} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
118
120
|
<div class={s.root()}>
|
|
119
121
|
{(heading || intro) && (
|
|
120
122
|
<header class={s.head()}>
|
package/components/faq/meta.json
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"openFirst": { "type": "boolean", "default": false, "content": false, "description": "The first answer starts open (Divi open_toggle, Elementor active item 1)." },
|
|
22
22
|
"schema": { "type": "boolean", "default": false, "content": false, "description": "Emit FAQPage JSON-LD built from these items. Use on at most one FAQ per page, and only when the page is really a FAQ." },
|
|
23
23
|
"measured": { "type": "object", "content": false, "description": "The source section's measured style (MeasuredStyle): frame width, padding, fill, image, columns per width, gap, text tone, radius, minimum height — all in pixels. Absent, the site's tokens; present, it wins over tone and columns. Values that are not a number, a colour or a known keyword are dropped.", "fields": { "containerPx": { "type": "integer", "min": 0, "max": 2560, "description": "The frame's content width." }, "padY": { "type": "integer", "min": 0, "max": 400, "description": "Top and bottom padding." }, "padX": { "type": "integer", "min": 0, "max": 200, "description": "The frame's side padding (gutter)." }, "bg": { "type": "object", "description": "The section's background.", "fields": { "color": { "type": "string", "description": "Fill colour: hex, rgb(a) or hsl(a)." }, "image": { "type": "string", "description": "Background image address (http(s) or root-relative), drawn behind the content." }, "overlay": { "type": "string", "description": "Colour or linear/radial gradient laid over the image or the fill." }, "size": { "type": "string", "description": "cover, contain or auto; anything else draws as cover." }, "position": { "type": "string", "description": "One or two of center/top/bottom/left/right or percentages." } } }, "columns": { "type": "object", "description": "Item columns at 390 (base), 768 (md) and 1280 (lg) px; a missing width follows the narrower one.", "fields": { "390": { "type": "integer", "min": 1, "max": 6, "description": "Phone." }, "768": { "type": "integer", "min": 1, "max": 6, "description": "Tablet." }, "1280": { "type": "integer", "min": 1, "max": 6, "description": "Desktop." } } }, "gap": { "type": "integer", "min": 0, "max": 200, "description": "Gap between items." }, "tone": { "type": "select", "options": ["light", "dark"], "description": "What the text is set for: dark = light text on a dark band. Without it, a fill's own lightness decides." }, "align": { "type": "select", "options": ["start", "center", "end"], "description": "Where the heading and lead sit; read by a component whose own align is not set." }, "radius": { "type": "integer", "min": 0, "max": 200, "description": "Card and item corner radius." }, "minHeight": { "type": "integer", "min": 0, "max": 2000, "description": "The section's minimum height." } } },
|
|
24
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
24
25
|
"id": { "type": "string", "content": false, "description": "Section id; also the exclusive group's name." },
|
|
25
26
|
"numbered": { "type": "boolean", "default": false, "content": false, "description": "Count the questions with a leading number, drawn by the page's style rather than written into the text." }
|
|
26
27
|
},
|
|
@@ -73,6 +73,8 @@ interface Props {
|
|
|
73
73
|
id?: string | undefined
|
|
74
74
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
75
75
|
measured?: MeasuredStyle | undefined
|
|
76
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
77
|
+
entry?: string | undefined
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
const { heading, intro, items, columns, style = 'icon', tone, bare = false, titleLevel = 3, id: givenId, measured } = Astro.props
|
|
@@ -105,7 +107,7 @@ const Title = style === 'list' ? 'span' : bare ? `h${titleLevel}` as 'h3' : head
|
|
|
105
107
|
</ul>
|
|
106
108
|
)
|
|
107
109
|
: (
|
|
108
|
-
<Section kit="feature-list" measured={measured} tone={tone} id={id} aria-labelledby={headingId}>
|
|
110
|
+
<Section kit="feature-list" measured={measured} tone={tone} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
109
111
|
{(heading || intro) && (
|
|
110
112
|
<header class="mb-10 flex max-w-2xl flex-col gap-3">
|
|
111
113
|
{heading && <h2 id={headingId} class="text-3xl [font-weight:var(--font-weight-heading,700)] tracking-tight text-balance md:text-4xl">{heading}</h2>}
|
|
@@ -218,6 +218,7 @@
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
221
222
|
"id": {
|
|
222
223
|
"type": "string",
|
|
223
224
|
"content": false,
|
|
@@ -91,6 +91,8 @@ interface Props {
|
|
|
91
91
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
92
92
|
measured?: MeasuredStyle | undefined
|
|
93
93
|
id?: string | undefined
|
|
94
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
95
|
+
entry?: string | undefined
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
const { items: given, heading, layout, columns, aspect, gap, captionStyle, hoverEffect, enlargeLabel = 'Enlarge', regionLabel = 'Images', open = 'popover', closeLabel = 'Close', prevLabel = 'Previous image', nextLabel = 'Next image', ofLabel = 'of', tone, measured, id: givenId } = Astro.props
|
|
@@ -103,7 +105,7 @@ const lightbox = open === 'lightbox' ? `${id}-viewer` : undefined
|
|
|
103
105
|
const sizes = columns === '2' ? '50vw' : columns === '4' ? '(min-width: 768px) 25vw, 50vw' : '(min-width: 768px) 33vw, 50vw'
|
|
104
106
|
---
|
|
105
107
|
{items.length > 0 && (
|
|
106
|
-
<Section kit="gallery" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId}>
|
|
108
|
+
<Section kit="gallery" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
107
109
|
{heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
108
110
|
{/* A scrolling strip is a labelled, focusable region so the keyboard can scroll it. */}
|
|
109
111
|
<div tabindex={layout === 'row' ? 0 : undefined} role={layout === 'row' ? 'region' : undefined} aria-label={layout === 'row' ? heading ?? regionLabel : undefined} data-kit-lightbox={lightbox}>
|
|
@@ -154,6 +154,7 @@
|
|
|
154
154
|
"content": false,
|
|
155
155
|
"description": "Section background."
|
|
156
156
|
},
|
|
157
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
157
158
|
"id": {
|
|
158
159
|
"type": "string",
|
|
159
160
|
"content": false,
|
|
@@ -128,6 +128,8 @@ interface Props {
|
|
|
128
128
|
contentAt?: 'start' | 'end' | undefined
|
|
129
129
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
130
130
|
measured?: MeasuredStyle | undefined
|
|
131
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
132
|
+
entry?: string | undefined
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
|
|
@@ -155,7 +157,7 @@ const bleed = bleeds ? (layout === 'centered' ? `max-w-none md:w-auto ${BLEED.st
|
|
|
155
157
|
---
|
|
156
158
|
{cover && width === 'content'
|
|
157
159
|
? (
|
|
158
|
-
<Section kit="hero" measured={sectionMeasured} tone="none" spacing="sm" width="prose" id={id} aria-labelledby={headingId}>
|
|
160
|
+
<Section kit="hero" measured={sectionMeasured} tone="none" spacing="sm" width="prose" id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
159
161
|
<div class={`relative isolate overflow-hidden bg-ink text-surface ${mutedInverse}`}>
|
|
160
162
|
<KitImage image={image} priority sizes="(min-width: 768px) 46rem, 100vw" class="absolute inset-0 -z-10 h-full w-full object-cover" />
|
|
161
163
|
<div class:list={['absolute inset-0 -z-10', !scrim && 'bg-ink/60']} style={scrim ? `background: ${scrim}` : undefined} aria-hidden="true" />
|
|
@@ -175,7 +177,7 @@ const bleed = bleeds ? (layout === 'centered' ? `max-w-none md:w-auto ${BLEED.st
|
|
|
175
177
|
)
|
|
176
178
|
: cover
|
|
177
179
|
? (
|
|
178
|
-
<Section kit="hero" measured={sectionMeasured} tone="inverse" spacing="none" width="none" id={id} aria-labelledby={headingId} class={screen ? `relative isolate overflow-hidden ${screen}` : 'relative isolate overflow-hidden'}>
|
|
180
|
+
<Section kit="hero" measured={sectionMeasured} tone="inverse" spacing="none" width="none" id={id} aria-labelledby={headingId} class={screen ? `relative isolate overflow-hidden ${screen}` : 'relative isolate overflow-hidden'} entry={Astro.props.entry}>
|
|
179
181
|
<KitImage image={image} priority sizes="100vw" class="absolute inset-0 -z-10 h-full w-full object-cover" />
|
|
180
182
|
<div class:list={['absolute inset-0 -z-10', !scrim && 'bg-ink/60']} style={scrim ? `background: ${scrim}` : undefined} aria-hidden="true" />
|
|
181
183
|
<div class:list={['container-page', measured?.padY === undefined && 'py-16 md:py-28']}>
|
|
@@ -192,7 +194,7 @@ const bleed = bleeds ? (layout === 'centered' ? `max-w-none md:w-auto ${BLEED.st
|
|
|
192
194
|
</Section>
|
|
193
195
|
)
|
|
194
196
|
: (
|
|
195
|
-
<Section kit="hero" measured={sectionMeasured} tone={tone} spacing="lg" id={id} aria-labelledby={headingId} class={[bleeds && 'overflow-x-clip', screen].filter(Boolean).join(' ') || undefined}>
|
|
197
|
+
<Section kit="hero" measured={sectionMeasured} tone={tone} spacing="lg" id={id} aria-labelledby={headingId} class={[bleeds && 'overflow-x-clip', screen].filter(Boolean).join(' ') || undefined} entry={Astro.props.entry}>
|
|
196
198
|
{/* Without an image a split has nothing beside the text: the text takes the whole row, not half of it. */}
|
|
197
199
|
<div class={s.grid({ class: image ? undefined : 'md:grid-cols-1' })}>
|
|
198
200
|
<div class={s.copy()}>
|
|
@@ -251,6 +251,7 @@
|
|
|
251
251
|
},
|
|
252
252
|
"description": "Hero image; loaded first (the page's largest image)."
|
|
253
253
|
},
|
|
254
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
254
255
|
"id": {
|
|
255
256
|
"type": "string",
|
|
256
257
|
"content": false,
|
|
@@ -78,6 +78,8 @@ interface Props {
|
|
|
78
78
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
79
79
|
measured?: MeasuredStyle | undefined
|
|
80
80
|
id?: string | undefined
|
|
81
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
82
|
+
entry?: string | undefined
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
const { heading, items, layout, columns, logoHeight, style, align, tone, measured, id: givenId } = Astro.props
|
|
@@ -99,7 +101,7 @@ const shown = items.flatMap((item) => {
|
|
|
99
101
|
// About four seconds a logo: the strip reads at a pace, whatever its length.
|
|
100
102
|
const duration = `${Math.max(20, shown.length * 4)}s`
|
|
101
103
|
---
|
|
102
|
-
<Section kit="logo-cloud" measured={measured} tone={tone} id={id} aria-labelledby={headingId}>
|
|
104
|
+
<Section kit="logo-cloud" measured={measured} tone={tone} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
103
105
|
{heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
104
106
|
<div class:list={[marquee && 'kit-marquee overflow-hidden']} style={marquee ? `--kit-marquee-duration:${duration}` : undefined}>
|
|
105
107
|
<ul class={s.list({ class: grid })}>
|
|
@@ -216,6 +216,7 @@
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
219
220
|
"id": {
|
|
220
221
|
"type": "string",
|
|
221
222
|
"content": false,
|
|
@@ -70,6 +70,8 @@ interface Props {
|
|
|
70
70
|
id?: string | undefined
|
|
71
71
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
72
72
|
measured?: MeasuredStyle | undefined
|
|
73
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
74
|
+
entry?: string | undefined
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
const {
|
|
@@ -87,7 +89,7 @@ const headingId = heading ? `${id}-title` : undefined
|
|
|
87
89
|
const formRel: Record<string, string> = newTab ? { rel: 'noopener noreferrer' } : {}
|
|
88
90
|
---
|
|
89
91
|
{form && (
|
|
90
|
-
<Section kit="newsletter" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId}>
|
|
92
|
+
<Section kit="newsletter" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
91
93
|
<div class={s.box()}>
|
|
92
94
|
{(heading || intro) && (
|
|
93
95
|
<div class={s.copy()}>
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"content": false,
|
|
101
101
|
"description": "Open the provider's confirmation page in a new tab (the reader keeps the site)."
|
|
102
102
|
},
|
|
103
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
103
104
|
"id": {
|
|
104
105
|
"type": "string",
|
|
105
106
|
"content": false,
|
|
@@ -38,7 +38,8 @@ const card = tv({
|
|
|
38
38
|
|
|
39
39
|
interface Props {
|
|
40
40
|
title: string
|
|
41
|
-
|
|
41
|
+
/** The entry's address. Absent for an entry with no page of its own: the title is printed unlinked, never as a dead link. */
|
|
42
|
+
href?: string | undefined
|
|
42
43
|
excerpt?: string | undefined
|
|
43
44
|
/** Publication date: a Date, or ISO 8601 text as Contentrain stores it. */
|
|
44
45
|
date?: Date | string | undefined
|
|
@@ -93,7 +94,7 @@ const Heading = `h${headingLevel}` as 'h2' | 'h3'
|
|
|
93
94
|
</p>
|
|
94
95
|
)}
|
|
95
96
|
<Heading class={slots.title({ class: linkTitle ? 'text-[color:var(--color-link,var(--color-accent))]' : undefined })}>
|
|
96
|
-
<a href={safeHref(href)} class="text-current no-underline after:absolute after:inset-0 after:content-[''] hover:text-accent-text">{title}</a>
|
|
97
|
+
{href ? <a href={safeHref(href)} class="text-current no-underline after:absolute after:inset-0 after:content-[''] hover:text-accent-text">{title}</a> : title}
|
|
97
98
|
</Heading>
|
|
98
99
|
{below && (author || date) && (
|
|
99
100
|
<p class={slots.meta()}>
|
|
@@ -73,5 +73,17 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"frame": "narrow"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "unlinked",
|
|
79
|
+
"props": {
|
|
80
|
+
"title": "Fast support, every time",
|
|
81
|
+
"excerpt": "Moved forty sites without a single ticket left open.",
|
|
82
|
+
"category": {
|
|
83
|
+
"label": "Agencies",
|
|
84
|
+
"href": "/quote-category/agencies/"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"frame": "narrow"
|
|
76
88
|
}
|
|
77
89
|
]
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"props": {
|
|
14
14
|
"title": { "type": "string", "required": true, "description": "Post title (posts.title)." },
|
|
15
|
-
"href": { "type": "url", "
|
|
15
|
+
"href": { "type": "url", "description": "Post address (from the permalink pattern). Absent for an entry with no page of its own (a list-only custom type's): the title is printed unlinked, never as a dead or `#` link." },
|
|
16
16
|
"excerpt": { "type": "text", "description": "Summary (posts.excerpt)." },
|
|
17
17
|
"date": { "type": "datetime", "description": "Publication date (posts.published_at)." },
|
|
18
18
|
"locale": { "type": "string", "description": "Locale the date is written in (site.language)." },
|
|
@@ -74,6 +74,8 @@ interface Props {
|
|
|
74
74
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
75
75
|
measured?: MeasuredStyle | undefined
|
|
76
76
|
id?: string | undefined
|
|
77
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
78
|
+
entry?: string | undefined
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
const { heading, intro, posts, layout = 'grid', columns, showImage = true, showExcerpt = true, showAuthor = true, showCategory = true, excerptLines, locale, timeZone, surface, moreHref, moreLabel, tone, measured, id: givenId } = Astro.props
|
|
@@ -88,7 +90,7 @@ const sizes = layout === 'list' || layout === 'compact' ? '256px' : columns ===
|
|
|
88
90
|
const cardLayout = (i: number) => layout === 'compact' ? 'minimal' : layout === 'list' || (layout === 'featured' && i === 0) ? 'horizontal' : 'vertical'
|
|
89
91
|
---
|
|
90
92
|
{posts.length > 0 && (
|
|
91
|
-
<Section kit="post-list" measured={measured} tone={tone} id={id} aria-labelledby={headingId}>
|
|
93
|
+
<Section kit="post-list" measured={measured} tone={tone} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
92
94
|
{(heading || intro) && (
|
|
93
95
|
<header class={s.header()}>
|
|
94
96
|
{heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
@@ -168,6 +168,7 @@
|
|
|
168
168
|
"content": false,
|
|
169
169
|
"description": "Section background: default, muted, inverse or accent."
|
|
170
170
|
},
|
|
171
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
171
172
|
"id": {
|
|
172
173
|
"type": "string",
|
|
173
174
|
"content": false,
|
|
@@ -117,6 +117,8 @@ interface Props {
|
|
|
117
117
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
118
118
|
measured?: MeasuredStyle | undefined
|
|
119
119
|
id?: string | undefined
|
|
120
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
121
|
+
entry?: string | undefined
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
const { heading, intro, plans, featuredLabel = 'Most popular', columns, layout = 'cards', featureStyle, compact, billingToggle = 'none', billingMainLabel = 'Monthly', billingAltLabel = 'Yearly', billingLegend = 'Billing period', billingAltNote, wasLabel = 'Was', includedLabel = 'Included', notIncludedLabel = 'Not included', tone, measured, id: givenId } = Astro.props
|
|
@@ -136,7 +138,7 @@ const PlanHeading = heading ? 'h3' : 'h2'
|
|
|
136
138
|
const features = await Promise.all(plans.map(plan => renderMarkdown(plan.features)))
|
|
137
139
|
---
|
|
138
140
|
{plans.length > 0 && (
|
|
139
|
-
<Section kit="pricing" measured={measured} tone={tone} id={id} aria-labelledby={headingId}>
|
|
141
|
+
<Section kit="pricing" measured={measured} tone={tone} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
140
142
|
{(heading || intro) && (
|
|
141
143
|
<header class={s.header()}>
|
|
142
144
|
{heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
@@ -174,6 +174,7 @@
|
|
|
174
174
|
"content": false,
|
|
175
175
|
"description": "Badge text on featured plans (ui-strings pricing.featured)."
|
|
176
176
|
},
|
|
177
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
177
178
|
"id": {
|
|
178
179
|
"type": "string",
|
|
179
180
|
"content": false,
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
{ "name": "base", "frame": "narrow", "props": { "size": "base", "searchable": false, "html": "<p class=\"has-drop-cap\">Moving a WordPress site to a static stack is mostly about keeping what already works.</p><figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Metric</th><th>Before</th><th>After</th></tr></thead><tbody><tr><td>Requests</td><td>84</td><td>9</td></tr><tr><td>LCP</td><td>3.1 s</td><td>0.8 s</td></tr></tbody></table></figure>" } },
|
|
4
4
|
{ "name": "markdown", "frame": "narrow", "props": { "markdown": "## From a page section\n\nA section's text is **markdown** in the page model, with [a link](/about/) and a list:\n\n- Written once\n- Rendered at build time", "size": "base" } },
|
|
5
5
|
{ "name": "inset-15", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Keeping what works</h2><p>A careful migration keeps <strong>addresses</strong>, <a href=\"/about/\">formatting</a> and rankings.</p><ul class=\"wp-block-list\"><li>Permalinks stay put.</li><li>Archives survive.</li></ul><blockquote class=\"wp-block-quote\"><p>The fastest request is the one the server never has to think about.</p><cite>Every performance engineer</cite></blockquote><div class=\"wp-block-buttons is-layout-flex\"><div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"/contact/\">Get in touch</a></div></div>", "inset": "15" } },
|
|
6
|
-
{ "name": "inset-27", "frame": "page", "props": { "size": "base", "searchable": false, "html": "<p class=\"has-drop-cap\">Moving a WordPress site to a static stack is mostly about keeping what already works.</p><figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Metric</th><th>Before</th><th>After</th></tr></thead><tbody><tr><td>Requests</td><td>84</td><td>9</td></tr><tr><td>LCP</td><td>3.1 s</td><td>0.8 s</td></tr></tbody></table></figure>", "inset": "27" } },
|
|
6
|
+
{ "name": "inset-27", "frame": "page", "props": { "size": "base", "searchable": false, "html": "<p class=\"has-drop-cap\">Moving a WordPress site to a static stack is mostly about keeping what already works.</p><figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Metric</th><th>Before</th><th>After</th></tr></thead><tbody><tr><td>Requests</td><td>84</td><td>9</td></tr><tr><td>LCP</td><td>3.1 s</td><td>0.8 s<span class=\"screen-reader-text\"> after the move</span></td></tr></tbody></table></figure>", "inset": "27" } },
|
|
7
7
|
{ "name": "inset-34", "frame": "page", "props": { "markdown": "## From a page section\n\nA section's text is **markdown** in the page model, with [a link](/about/) and a list:\n\n- Written once\n- Rendered at build time", "size": "base", "inset": "34" } },
|
|
8
8
|
{ "name": "inset-42", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Keeping what works</h2><p>A careful migration keeps <strong>addresses</strong>, <a href=\"/about/\">formatting</a> and rankings.</p><ul class=\"wp-block-list\"><li>Permalinks stay put.</li><li>Archives survive.</li></ul><blockquote class=\"wp-block-quote\"><p>The fastest request is the one the server never has to think about.</p><cite>Every performance engineer</cite></blockquote><div class=\"wp-block-buttons is-layout-flex\"><div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"/contact/\">Get in touch</a></div></div>", "inset": "42" } },
|
|
9
|
-
{ "name": "table-wide", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Compare plans</h2><p>Every plan side by side.</p><table><thead><tr><th>Plan</th><th>Monthly price</th><th>Yearly price</th><th>Sites included</th><th>Storage per site</th><th>Bandwidth per month</th><th>Staging environments</th><th>Daily backups kept</th><th>Edge caching</th><th>Malware scanning</th><th>Priority support</th><th>Migration help</th></tr></thead><tbody><tr><td>Starter</td><td>$35</td><td>$350</td><td>1</td><td>10 GB</td><td>50 GB</td><td>1</td><td>14 days</td><td>Included</td><td>Included</td><td>Email</td><td>One free</td></tr><tr><td>Business</td><td>$115</td><td>$1,150</td><td>5</td><td>40 GB</td><td>250 GB</td><td>5</td><td>30 days</td><td>Included</td><td>Included</td><td>Chat and email</td><td>Unlimited</td></tr></tbody></table><p>Prices exclude tax.</p>" } },
|
|
10
|
-
{ "name": "table-narrow", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Opening hours</h2><table><tbody><tr><td>Weekdays</td><td>9–18</td></tr><tr><td>Saturday</td><td>10–14</td></tr></tbody></table><p>Closed on public holidays.</p>" } }
|
|
9
|
+
{ "name": "table-wide", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Compare plans</h2><p>Every plan side by side.</p><div class=\"table-scroll\" role=\"region\" tabindex=\"0\" aria-label=\"Table\"><table><thead><tr><th>Plan</th><th>Monthly price</th><th>Yearly price</th><th>Sites included</th><th>Storage per site</th><th>Bandwidth per month</th><th>Staging environments</th><th>Daily backups kept</th><th>Edge caching</th><th>Malware scanning</th><th>Priority support</th><th>Migration help</th></tr></thead><tbody><tr><td>Starter</td><td>$35</td><td>$350</td><td>1</td><td>10 GB</td><td>50 GB</td><td>1</td><td>14 days</td><td>Included</td><td>Included</td><td>Email</td><td>One free<span class=\"screen-reader-text\"> migration on the Starter plan</span></td></tr><tr><td>Business</td><td>$115</td><td>$1,150</td><td>5</td><td>40 GB</td><td>250 GB</td><td>5</td><td>30 days</td><td>Included</td><td>Included</td><td>Chat and email</td><td>Unlimited<span class=\"screen-reader-text\"> migrations on the Business plan</span></td></tr></tbody></table></div><p>Prices exclude tax.</p>" } },
|
|
10
|
+
{ "name": "table-narrow", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Opening hours</h2><div class=\"table-scroll\" role=\"region\" tabindex=\"0\" aria-label=\"Table\"><table><tbody><tr><td>Weekdays</td><td>9–18</td></tr><tr><td>Saturday</td><td>10–14</td></tr></tbody></table></div><p>Closed on public holidays.</p>" } }
|
|
11
11
|
]
|
|
@@ -52,6 +52,8 @@ interface Props {
|
|
|
52
52
|
measured?: MeasuredStyle | undefined
|
|
53
53
|
/** Unique on the page: names the track the buttons control. */
|
|
54
54
|
id?: string | undefined
|
|
55
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
56
|
+
entry?: string | undefined
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
const props = Astro.props
|
|
@@ -59,5 +61,5 @@ const props = Astro.props
|
|
|
59
61
|
const id = props.measured ? instanceId(Astro.locals, props.id, 'slider') : undefined
|
|
60
62
|
---
|
|
61
63
|
{props.measured
|
|
62
|
-
? <Section kit="slider" measured={props.measured} tone="none" spacing="sm" id={id}><SliderTrack {...props} id={id} framed={false} /></Section>
|
|
64
|
+
? <Section kit="slider" measured={props.measured} tone="none" spacing="sm" id={id} entry={Astro.props.entry}><SliderTrack {...props} id={id} framed={false} /></Section>
|
|
63
65
|
: <SliderTrack {...props} />}
|
|
@@ -99,6 +99,8 @@ interface Props {
|
|
|
99
99
|
id?: string | undefined
|
|
100
100
|
/** Draw the section's own frame and spacing (when Slider.astro has no Section around it). */
|
|
101
101
|
framed?: boolean | undefined
|
|
102
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
103
|
+
entry?: string | undefined
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
const { slides: given, label, prevLabel = 'Previous slide', nextLabel = 'Next slide', slideLabel = 'Slide', ofLabel = 'of', playLabel = 'Play', loop = false, perView = '1', aspect, caption, heading, intro, eyebrow, actions, measured, id: givenId, framed = true } = Astro.props
|
|
@@ -135,7 +137,7 @@ const cards = slides.some(slide => !slide.image && !slide.video && !slide.player
|
|
|
135
137
|
// ratio, so the player that replaces the link moves nothing.
|
|
136
138
|
const under = 'flex size-11 shrink-0 items-center justify-center rounded-full bg-surface text-ink ring-1 ring-line hover:bg-surface disabled:opacity-40'
|
|
137
139
|
---
|
|
138
|
-
<Root id={framed ? id : undefined} class:list={['group relative', framed && 'container-page py-8']} data-kit-section={framed ? 'slider' : undefined} data-kit-spacing={framed ? 'none' : undefined} role={framed ? undefined : 'region'} aria-roledescription="carousel" aria-label={label} data-kit-slider data-loop={loop ? '' : undefined} data-slide-label={slideLabel}>
|
|
140
|
+
<Root id={framed ? id : undefined} class:list={['group relative', framed && 'container-page py-8']} data-kit-section={framed ? 'slider' : undefined} data-kit-entry={framed ? Astro.props.entry : undefined} data-kit-spacing={framed ? 'none' : undefined} role={framed ? undefined : 'region'} aria-roledescription="carousel" aria-label={label} data-kit-slider data-loop={loop ? '' : undefined} data-slide-label={slideLabel}>
|
|
139
141
|
<SectionHeader heading={heading} intro={intro} eyebrow={eyebrow} actions={actions} />
|
|
140
142
|
<div class={slots.viewport()} data-viewport tabindex="0" role="group" aria-label={label}>
|
|
141
143
|
<div class:list={['flex gap-4 [&>*]:shrink-0 group-data-[ready]:[&>*]:snap-align-none', measuredRow?.track]} id={trackId} data-container>
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"ofLabel": { "type": "string", "content": false, "description": "ui-strings slider.of." },
|
|
20
20
|
"playLabel": { "type": "string", "content": false, "description": "ui-strings embed.play." },
|
|
21
21
|
"loop": { "type": "boolean", "default": false, "content": false, "description": "Wrap from the last slide to the first." },
|
|
22
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
22
23
|
"id": { "type": "string", "default": "slider", "content": false, "description": "Unique on the page: names the track that the previous/next buttons control (aria-controls)." },
|
|
23
24
|
"heading": {"type": "string", "label": "Heading", "description": "The section heading."},
|
|
24
25
|
"intro": {"type": "text", "label": "Introduction", "description": "A sentence under the heading."},
|
|
@@ -99,6 +99,8 @@ interface Props {
|
|
|
99
99
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
100
100
|
measured?: MeasuredStyle | undefined
|
|
101
101
|
id?: string | undefined
|
|
102
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
103
|
+
entry?: string | undefined
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
const { heading, headingLevel = 2, eyebrow, body, actions = [], image, features = [], videoUrl, playLabel, imageSide, ratio = '1:1', imageFit, imageShape, imageBleed, mediaKind, featureStyle = 'check', stackOrder, sticky = false, align, tone, measured, id: givenId } = Astro.props
|
|
@@ -112,7 +114,7 @@ const video = mediaKind === 'video' && videoUrl
|
|
|
112
114
|
const headingId = heading ? `${id}-title` : undefined
|
|
113
115
|
const html = await renderMarkdown(body)
|
|
114
116
|
---
|
|
115
|
-
<Section kit="split" measured={measured} tone={tone} id={id} aria-labelledby={headingId} class={bleed ? 'overflow-x-clip' : undefined}>
|
|
117
|
+
<Section kit="split" measured={measured} tone={tone} id={id} aria-labelledby={headingId} class={bleed ? 'overflow-x-clip' : undefined} entry={Astro.props.entry}>
|
|
116
118
|
<div class:list={[s.grid(), columns]}>
|
|
117
119
|
<div class={s.copy()}>
|
|
118
120
|
{eyebrow && <p class={s.eyebrow()}>{eyebrow}</p>}
|
|
@@ -342,6 +342,7 @@
|
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
},
|
|
345
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
345
346
|
"id": {
|
|
346
347
|
"type": "string",
|
|
347
348
|
"content": false,
|
|
@@ -95,6 +95,8 @@ interface Props {
|
|
|
95
95
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
96
96
|
measured?: MeasuredStyle | undefined
|
|
97
97
|
id?: string | undefined
|
|
98
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
99
|
+
entry?: string | undefined
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
const { heading, intro, items, layout, columns, style, align, valueSize, labelSize, order, motion, tone, measured, id: givenId } = Astro.props
|
|
@@ -111,7 +113,7 @@ const iconOf = (item: Item) => imageOf(item.icon, '')
|
|
|
111
113
|
const widthOf = (item: Item) => `--stat-chars:${(item.prefix ?? '').length + item.value.length + (item.suffix ?? '').length}`
|
|
112
114
|
// A <dl> names its term first, so figure-first is a plain list, read in the order it is drawn (WCAG 1.3.2).
|
|
113
115
|
---
|
|
114
|
-
<Section kit="stats" measured={measured} tone={tone} id={id} aria-labelledby={headingId}>
|
|
116
|
+
<Section kit="stats" measured={measured} tone={tone} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
115
117
|
{(heading || intro) && (
|
|
116
118
|
<header class="mb-10 flex max-w-2xl flex-col gap-3">
|
|
117
119
|
{heading && <h2 id={headingId} class="text-3xl [font-weight:var(--font-weight-heading,700)] tracking-tight text-balance md:text-4xl">{heading}</h2>}
|
|
@@ -260,6 +260,7 @@
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
},
|
|
263
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
263
264
|
"id": {
|
|
264
265
|
"type": "string",
|
|
265
266
|
"content": false,
|
|
@@ -79,6 +79,8 @@ interface Props {
|
|
|
79
79
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
80
80
|
measured?: MeasuredStyle | undefined
|
|
81
81
|
id?: string | undefined
|
|
82
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
83
|
+
entry?: string | undefined
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
const { heading, intro, items, kind = 'steps', layout: givenLayout, marker, connector, currentLabel = 'Current', style, measured, id: givenId } = Astro.props
|
|
@@ -94,7 +96,7 @@ const headingId = heading ? `${id}-title` : undefined
|
|
|
94
96
|
const StepHeading = heading ? 'h3' : 'h2'
|
|
95
97
|
---
|
|
96
98
|
{items.length > 0 && (
|
|
97
|
-
<Section kit="steps" measured={measured} id={id} aria-labelledby={headingId}>
|
|
99
|
+
<Section kit="steps" measured={measured} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
98
100
|
{(heading || intro) && (
|
|
99
101
|
<header class={s.header()}>
|
|
100
102
|
{heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
},
|
|
119
119
|
"description": "The steps, in order (Elementor icon boxes, Divi blurbs, Gutenberg columns of heading + text)."
|
|
120
120
|
},
|
|
121
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
121
122
|
"id": {
|
|
122
123
|
"type": "string",
|
|
123
124
|
"content": false,
|
|
@@ -57,6 +57,8 @@ interface Props {
|
|
|
57
57
|
id?: string | undefined
|
|
58
58
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
59
59
|
measured?: MeasuredStyle | undefined
|
|
60
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
61
|
+
entry?: string | undefined
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
const { items, heading, intro, eyebrow, actions, label, style, orientation = 'horizontal', tone, id: givenId, measured } = Astro.props
|
|
@@ -69,7 +71,7 @@ const PanelHeading = heading ? 'h3' : 'h2'
|
|
|
69
71
|
const value = (i: number) => `tab-${i + 1}`
|
|
70
72
|
---
|
|
71
73
|
{items.length > 0 && (
|
|
72
|
-
<Section kit="tabs" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId}>
|
|
74
|
+
<Section kit="tabs" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
73
75
|
{intro || eyebrow || actions?.length
|
|
74
76
|
? <SectionHeader heading={heading} intro={intro} eyebrow={eyebrow} actions={actions} headingId={headingId} />
|
|
75
77
|
: heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"items": { "type": "array", "required": true, "items": { "type": "object", "fields": { "label": { "type": "string", "required": true }, "content": { "type": "richtext", "required": true } } }, "description": "Tabs in order (Elementor tabs tab_title/tab_content, Divi tab title + content)." },
|
|
19
19
|
"heading": { "type": "string", "description": "Section heading; also names the tab list." },
|
|
20
20
|
"label": { "type": "string", "description": "Accessible name of the tab list when there is no heading." },
|
|
21
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
21
22
|
"id": { "type": "string", "description": "Section id, unique per page: the tabs machine and its element ids derive from it." }
|
|
22
23
|
},
|
|
23
24
|
"slots": {},
|
|
@@ -82,6 +82,8 @@ interface Props {
|
|
|
82
82
|
/** The source section's measured style (`MeasuredStyle`): frame, padding, fill, background image, columns per width, gap. Absent, the site's tokens; present, it wins over tone and columns. */
|
|
83
83
|
measured?: MeasuredStyle | undefined
|
|
84
84
|
id?: string | undefined
|
|
85
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
86
|
+
entry?: string | undefined
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
const { heading, intro, items, columns, layout, imageShape, align, bioClamp, readMoreLabel = 'Read more', socialLabel = '{name} on {network}', style, roleStyle, measured, id: givenId } = Astro.props
|
|
@@ -96,7 +98,7 @@ const headingId = heading ? `${id}-title` : undefined
|
|
|
96
98
|
const NameHeading = heading ? 'h3' : 'h2'
|
|
97
99
|
---
|
|
98
100
|
{items.length > 0 && (
|
|
99
|
-
<Section kit="team" measured={measured} id={id} aria-labelledby={headingId}>
|
|
101
|
+
<Section kit="team" measured={measured} id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
100
102
|
{(heading || intro) && (
|
|
101
103
|
<header class={s.header()}>
|
|
102
104
|
{heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
},
|
|
131
131
|
"description": "The people, in display order (Divi team member name/position/content/image_url, Elementor image box)."
|
|
132
132
|
},
|
|
133
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
133
134
|
"id": {
|
|
134
135
|
"type": "string",
|
|
135
136
|
"content": false,
|
|
@@ -92,6 +92,8 @@ interface Props {
|
|
|
92
92
|
id?: string | undefined
|
|
93
93
|
/** `lines`: each line the author broke a quote into (`\n`) is a block of its own, `data-kit-line="1"`, `"2"`, …, for a theme to set its ink, indent or size; still one quote in one paragraph, its marks before the first line and after the last. `flow` (absent): as before. */
|
|
94
94
|
quoteLines?: 'flow' | 'lines' | undefined
|
|
95
|
+
/** The page entry this section is built from, without its locale (`services-0`): `data-kit-entry`, the hook a design layer styles this one section by. Absent, none is printed. */
|
|
96
|
+
entry?: string | undefined
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
const { items, heading, layout, quoteSize, frame, avatarSize, avatarPlace, quoteMark = 'marks', ratingLabel = '{rating} out of 5 stars', label = 'Testimonials', tone, measured, id: givenId, quoteLines } = Astro.props
|
|
@@ -114,7 +116,7 @@ const spoken = (rating: number) => String(Math.round(rating * 10) / 10)
|
|
|
114
116
|
const scrolls = layout === 'row'
|
|
115
117
|
---
|
|
116
118
|
{items.length > 0 && (
|
|
117
|
-
<Section kit="testimonial" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId}>
|
|
119
|
+
<Section kit="testimonial" measured={measured} tone={tone} spacing="md" id={id} aria-labelledby={headingId} entry={Astro.props.entry}>
|
|
118
120
|
{heading && <h2 id={headingId} class={s.heading()}>{heading}</h2>}
|
|
119
121
|
<div class={list} tabindex={scrolls ? 0 : undefined} role={scrolls ? 'region' : undefined} aria-labelledby={scrolls && heading ? headingId : undefined} aria-label={scrolls && !heading ? label : undefined}>
|
|
120
122
|
{items.map((item) => {
|
|
@@ -258,6 +258,7 @@
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
},
|
|
261
|
+
"entry": { "type": "string", "content": false, "description": "The page entry this section is built from, without its locale (services-0): printed as data-kit-entry, the hook a design layer styles this one section by. Absent, none is printed." },
|
|
261
262
|
"id": {
|
|
262
263
|
"type": "string",
|
|
263
264
|
"content": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentrain/astro-kit",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Copy-in Astro components for Contentrain sites (shadcn model): typed props, tailwind-variants, zero JavaScript by default — with a machine-readable catalog",
|
|
6
6
|
"type": "module",
|