@xenterprises/nuxt-x-marketing 1.15.3 → 1.15.5
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/CHANGELOG.md +27 -0
- package/app/components/X/Mark/Hero/index.vue +54 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
30
30
|
section and its sample product data were dropped with them. Every other section of the
|
|
31
31
|
demo page is unchanged.
|
|
32
32
|
|
|
33
|
+
## [1.15.5] - 2026-10-21
|
|
34
|
+
|
|
35
|
+
### Added (opt-in)
|
|
36
|
+
|
|
37
|
+
- **`XMarkHero` `reserveIndicatorSpace`** (boolean, kebab `reserve-indicator-space`). With the
|
|
38
|
+
scroll indicator shown, the content column gets room so the CTA ends at least 2rem (32px)
|
|
39
|
+
above the indicator's top. Centred content gets equal top and bottom padding (6.5rem below
|
|
40
|
+
md, 6rem from md), so a hero whose content already fits does not move; content that would not
|
|
41
|
+
fit makes the hero taller (it is a min-height) instead of running into the indicator.
|
|
42
|
+
`verticalAlign="bottom"` and `scrimMobile="bottom"` get the bottom room they lack (8px and
|
|
43
|
+
64px below md). No effect with `hasScrollIndicator` false. Measured on the Aqualis hero
|
|
44
|
+
(unfinishedwoodfurniture Home): gap 8, 9.5 and -2px at 360x740, 375x667 and 1280x800 became
|
|
45
|
+
32px (hero 48, 45 and 68px taller); the other six sizes and cheaplawnmower Home are 0 px.
|
|
46
|
+
Unset: body HTML identical to 1.15.4 and 0 px difference at all nine test sizes.
|
|
47
|
+
|
|
48
|
+
## [1.15.4] - 2026-10-21
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- **`XMarkHero` subtitle centring with `align="center"`.** The subtitle's `max-w-2xl` box sat at
|
|
53
|
+
the left of the `max-w-3xl` text column, so a centred subtitle was 48px left of centre at
|
|
54
|
+
1024px and up (24px at 768px). The subtitle now gets `mx-auto` when `align="center"` (prop or
|
|
55
|
+
`#subtitle` slot), so its box and text are centred on the column. Title and CTA were already
|
|
56
|
+
centred and are unchanged. `align="left"` (default) and `align="right"`: body HTML identical to
|
|
57
|
+
1.15.3 and 0 px difference at 1440x900, 1024x768, 768x1024, 390x844 and 375x667. Centred heroes
|
|
58
|
+
below about 720px wide are also 0 px (the box already fills the column).
|
|
59
|
+
|
|
33
60
|
## [1.15.3] - 2026-10-20
|
|
34
61
|
|
|
35
62
|
### Added (opt-in)
|
|
@@ -80,7 +80,10 @@
|
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
82
|
<!-- Content -->
|
|
83
|
-
<div
|
|
83
|
+
<div
|
|
84
|
+
class="relative z-10 w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"
|
|
85
|
+
:class="indicatorClasses"
|
|
86
|
+
>
|
|
84
87
|
<div
|
|
85
88
|
class="max-w-3xl pb-6 md:pb-8"
|
|
86
89
|
:class="[contentAlignmentClasses, { 'x-hero-cts-col': constrain }]"
|
|
@@ -102,6 +105,7 @@
|
|
|
102
105
|
<p
|
|
103
106
|
v-if="subtitle || $slots.subtitle"
|
|
104
107
|
class="mt-6 text-xl text-white/80 max-w-2xl"
|
|
108
|
+
:class="{ 'mx-auto': align === 'center' }"
|
|
105
109
|
>
|
|
106
110
|
<slot name="subtitle">{{ subtitle }}</slot>
|
|
107
111
|
</p>
|
|
@@ -276,6 +280,17 @@ const props = defineProps({
|
|
|
276
280
|
type: Boolean,
|
|
277
281
|
default: false,
|
|
278
282
|
},
|
|
283
|
+
/**
|
|
284
|
+
* Opt-in (1.15.5). With hasScrollIndicator, reserves room so the content (CTA) ends at
|
|
285
|
+
* least 2rem above the scroll indicator. Centred content gets equal top and bottom
|
|
286
|
+
* padding, so a hero whose content already fits keeps its position; content that would
|
|
287
|
+
* not fit makes the hero taller instead of overlapping the indicator. No effect when
|
|
288
|
+
* hasScrollIndicator is false. Unset (default): output identical to 1.15.4.
|
|
289
|
+
*/
|
|
290
|
+
reserveIndicatorSpace: {
|
|
291
|
+
type: Boolean,
|
|
292
|
+
default: false,
|
|
293
|
+
},
|
|
279
294
|
/** Add top padding for non-transparent nav */
|
|
280
295
|
includeNavPadding: {
|
|
281
296
|
type: Boolean,
|
|
@@ -322,6 +337,16 @@ const constrainStyle = computed(() => {
|
|
|
322
337
|
return { "--x-cts-w": w.endsWith("%") ? `${parseFloat(w)}cqw` : w };
|
|
323
338
|
});
|
|
324
339
|
|
|
340
|
+
// reserveIndicatorSpace (1.15.5): only with the scroll indicator shown. The indicator's
|
|
341
|
+
// top sits 6rem above the hero bottom (bottom-8 + 4rem tall); content ends 2rem above it.
|
|
342
|
+
const indicatorClasses = computed(() => {
|
|
343
|
+
if (!props.reserveIndicatorSpace || !props.hasScrollIndicator) return undefined;
|
|
344
|
+
return [
|
|
345
|
+
props.verticalAlign === "bottom" ? "x-hero-ind-b" : "x-hero-ind",
|
|
346
|
+
mobileBottom.value ? "x-hero-ind-mb" : "",
|
|
347
|
+
];
|
|
348
|
+
});
|
|
349
|
+
|
|
325
350
|
const heightClass = computed(() => {
|
|
326
351
|
const heights = {
|
|
327
352
|
full: "min-h-[calc(100svh-var(--ui-header-height))]",
|
|
@@ -422,6 +447,34 @@ const contentAlignmentClasses = computed(() => {
|
|
|
422
447
|
--x-cts-pad: 2rem;
|
|
423
448
|
}
|
|
424
449
|
}
|
|
450
|
+
/* reserveIndicatorSpace (1.15.5). The scroll indicator's top is 6rem above the hero
|
|
451
|
+
* bottom; the text column ends with pb-6 (md: pb-8). These paddings put the CTA bottom
|
|
452
|
+
* 8rem above the hero bottom, a 2rem gap. Centred: equal top and bottom padding so the
|
|
453
|
+
* content centre does not move; the hero's min-height lets it grow when content does
|
|
454
|
+
* not fit. verticalAlign="bottom" already has pb-24 on the section. */
|
|
455
|
+
.x-hero-ind {
|
|
456
|
+
padding-top: 6.5rem;
|
|
457
|
+
padding-bottom: 6.5rem;
|
|
458
|
+
}
|
|
459
|
+
.x-hero-ind-b {
|
|
460
|
+
padding-bottom: 0.5rem;
|
|
461
|
+
}
|
|
462
|
+
@media (min-width: 768px) {
|
|
463
|
+
.x-hero-ind {
|
|
464
|
+
padding-top: 6rem;
|
|
465
|
+
padding-bottom: 6rem;
|
|
466
|
+
}
|
|
467
|
+
.x-hero-ind-b {
|
|
468
|
+
padding-bottom: 0;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/* scrimMobile="bottom" below md: the section has pb-10 and bottom-aligned content. */
|
|
472
|
+
@media (max-width: 767.98px) {
|
|
473
|
+
.x-hero-ind-mb {
|
|
474
|
+
padding-top: 0;
|
|
475
|
+
padding-bottom: 4rem;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
425
478
|
/* md+: 90% up to --x-scrim-w, then a long eased fade to clear. */
|
|
426
479
|
@media (min-width: 768px) {
|
|
427
480
|
.x-hero-scrim-w {
|