@netlify/spark-ui 1.20.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -28,7 +28,8 @@ const {
|
|
|
28
28
|
} = Astro.props;
|
|
29
29
|
|
|
30
30
|
const isAnchorHeadline = isCardClickable && headline && !link?.text && link?.href;
|
|
31
|
-
const isExternal =
|
|
31
|
+
const isExternal =
|
|
32
|
+
link?.href && !new URL(link.href, 'https://www.netlify.com').hostname.endsWith('netlify.com');
|
|
32
33
|
---
|
|
33
34
|
|
|
34
35
|
<Element
|
|
@@ -68,7 +69,12 @@ const isExternal = link?.href && !new URL(link.href, 'https://www.netlify.com').
|
|
|
68
69
|
<slot />
|
|
69
70
|
{
|
|
70
71
|
link && link.text && (
|
|
71
|
-
<ActionLink
|
|
72
|
+
<ActionLink
|
|
73
|
+
class="n-card-link"
|
|
74
|
+
id={link.id}
|
|
75
|
+
href={link.href}
|
|
76
|
+
{...(isExternal && { target: '_blank', rel: 'noopener' })}
|
|
77
|
+
>
|
|
72
78
|
{link.text}
|
|
73
79
|
</ActionLink>
|
|
74
80
|
)
|
|
@@ -163,6 +169,7 @@ const isExternal = link?.href && !new URL(link.href, 'https://www.netlify.com').
|
|
|
163
169
|
}
|
|
164
170
|
|
|
165
171
|
.n-card-clickable .n-action-arrow {
|
|
172
|
+
margin-block-start: auto;
|
|
166
173
|
margin-inline-start: auto;
|
|
167
174
|
}
|
|
168
175
|
|
package/skills/landing-page.md
CHANGED
|
@@ -80,8 +80,8 @@ import tickerData from '../data/trust-bar-ticker.json';
|
|
|
80
80
|
<PageSection>
|
|
81
81
|
<HeadingBlock eyebrow={cardData.eyebrow} heading={cardData.heading} text={cardData.text} alignment="center" />
|
|
82
82
|
<div class="ntl-grid" style="--ntl-grid-column-min-size: 20rem;">
|
|
83
|
-
{cardData.items.map(({
|
|
84
|
-
<Card
|
|
83
|
+
{cardData.items.map(({ image, ...card }) => (
|
|
84
|
+
<Card {...card}>
|
|
85
85
|
{image && <Image slot="image" src={image.src} alt={image.alt} width={image.width} height={image.height} />}
|
|
86
86
|
</Card>
|
|
87
87
|
))}
|
|
@@ -92,9 +92,8 @@ import tickerData from '../data/trust-bar-ticker.json';
|
|
|
92
92
|
<PageSection>
|
|
93
93
|
<HeadingBlock eyebrow={switchbackData.eyebrow} heading={switchbackData.heading} />
|
|
94
94
|
<SwitchbackGroup>
|
|
95
|
-
{switchbackData.items.map(({
|
|
96
|
-
<Switchback
|
|
97
|
-
isReversed={i % 2 === 0} mediaPattern={mediaPattern}>
|
|
95
|
+
{switchbackData.items.map(({ image, ...item }, i) => (
|
|
96
|
+
<Switchback {...item} isReversed={i % 2 === 0}>
|
|
98
97
|
<Image slot="media" src={image.src} alt={image.alt} width={image.width} height={image.height} />
|
|
99
98
|
</Switchback>
|
|
100
99
|
))}
|
|
@@ -111,8 +110,8 @@ import tickerData from '../data/trust-bar-ticker.json';
|
|
|
111
110
|
))}
|
|
112
111
|
</TabList>
|
|
113
112
|
<TabPanelGroup isUniformHeight noPadding>
|
|
114
|
-
{tabbedContentData.items.map(({
|
|
115
|
-
<TabbedContentPanel isHidden={!isSelected}
|
|
113
|
+
{tabbedContentData.items.map(({ title, icon, isSelected, ...panel }) => (
|
|
114
|
+
<TabbedContentPanel {...panel} isHidden={!isSelected} />
|
|
116
115
|
))}
|
|
117
116
|
</TabPanelGroup>
|
|
118
117
|
</TabbedContent>
|
|
@@ -146,7 +145,7 @@ HeadingBlock props: `heading`, `headingLevel` (1-4, default 2), `text`, `eyebrow
|
|
|
146
145
|
Keep content in JSON files. Key shapes:
|
|
147
146
|
|
|
148
147
|
- **Hero:** `{ heading, text, ctas: [{ id, text, href, variant? }] }`
|
|
149
|
-
- **Card item:** `{ eyebrow,
|
|
148
|
+
- **Card item:** `{ eyebrow, headline, paragraph (HTML ok), link: { id, href, text }, image?: { src, alt, width, height }, isCardClickable? }`
|
|
150
149
|
- **Switchback item:** `{ eyebrow, heading, text, list: string[], cta: { id, href, text }, mediaPattern: 1|2|3, image: { src, alt, width, height } }`
|
|
151
150
|
- **TabbedContent item:** `{ title, icon?, isSelected, heading, text?, list?: string[], ctas?, codeBlock?: { heading?, icon?, lang, code } }`
|
|
152
151
|
- **TrustBarTicker:** `{ stats: [{ iconSrc, text }], logos: [{ src, alt, width, height }] }`
|