@repobit/dex-system-design 2.3.2 → 2.5.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/CHANGELOG.md +27 -0
- package/package.json +3 -2
- package/schemas/component-manifest.json +86 -4
- package/src/components/anchor/anchor.stories.js +0 -3
- package/src/components/audience-card/audience-card.css.js +10 -0
- package/src/components/audience-card/audience-card.js +2 -2
- package/src/components/awards/awards-spotlight.css.js +10 -0
- package/src/components/awards/awards-spotlight.js +1 -1
- package/src/components/badge/badge.css.js +7 -1
- package/src/components/bento-grid/bento-grid.css.js +4 -0
- package/src/components/bento-grid/bento-grid.js +31 -0
- package/src/components/bento-grid/bento-grid.stories.js +1 -1
- package/src/components/bento-grid/bento-item.css.js +32 -3
- package/src/components/bento-grid/bento-item.js +3 -3
- package/src/components/button/button.css.js +36 -1
- package/src/components/button/button.js +13 -6
- package/src/components/button/button.stories.js +4 -4
- package/src/components/features-tab/features-tab.js +2 -1
- package/src/components/features-tab/features-tab.stories.js +2 -2
- package/src/components/grid/grid.css.js +6 -1
- package/src/components/grid/grid.js +10 -1
- package/src/components/grid/grid.stories.js +6 -1
- package/src/components/header/header-code.stories.js +2 -5
- package/src/components/header/header.js +4 -4
- package/src/components/header/header.stories.js +3 -3
- package/src/components/hero/hero.css.js +121 -18
- package/src/components/hero/hero.js +5 -2
- package/src/components/hero/hero.stories.js +5 -4
- package/src/components/logo-marquee/logo-marquee.js +3 -3
- package/src/components/logo-marquee/logo-marquee.stories.js +6 -6
- package/src/components/partner-banner/partner-banner.css.js +96 -14
- package/src/components/partner-banner/partner-banner.js +32 -16
- package/src/components/post-card/post-card.css.js +14 -0
- package/src/components/post-card/post-card.js +8 -8
- package/src/components/pricing-cards/pricing-card-actions.js +0 -1
- package/src/components/pricing-cards/pricing-card.js +0 -4
- package/src/components/section/section.css.js +38 -0
- package/src/components/section/section.js +43 -0
- package/src/components/section/section.stories.js +246 -0
- package/src/components/section-header/section-header.css.js +11 -0
- package/src/components/section-header/section-header.js +3 -3
- package/src/components/stat/stat-highlight.js +3 -3
- package/src/components/stat/stat.css.js +25 -4
- package/src/components/stat/stat.stories.js +2 -2
- package/src/tokens/tokens.css +4 -2
- package/src/tokens/tokens.js +4 -2
|
@@ -16,7 +16,9 @@ import { partnerBannerCSS } from "./partner-banner.css.js";
|
|
|
16
16
|
* Slots: `photo` (an <img> or <picture>, cover-fitted), `lockup` (the partner
|
|
17
17
|
* mark, drawn in the brand's ink), `actions` (white and outline-white
|
|
18
18
|
* bd-button-links). Below md the card stops overlapping and becomes a solid
|
|
19
|
-
* band under the photo
|
|
19
|
+
* band under the photo, edge to edge, with the CTAs stacked at its full
|
|
20
|
+
* width, as the phone frame draws them. From md they sit in a row, and one
|
|
21
|
+
* that wraps grows to the row's width rather than keeping its own.
|
|
20
22
|
*/
|
|
21
23
|
export class PartnerBanner extends LitElement {
|
|
22
24
|
static properties = {
|
|
@@ -38,25 +40,39 @@ export class PartnerBanner extends LitElement {
|
|
|
38
40
|
this.as = "h2";
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
/* A bd-button-link fills its own box only through its fullwidth attribute,
|
|
44
|
+
so the banner sets it on every CTA at every width and leaves the box's
|
|
45
|
+
width to partner-banner.css.js: the column's width on a phone, and from
|
|
46
|
+
md the label's width until the row wraps, then the row's. That decides on
|
|
47
|
+
the rendered labels, so a longer translation wraps and grows where the
|
|
48
|
+
English fits on one line -- no breakpoint could know where that is. */
|
|
49
|
+
_onActionsSlot(e) {
|
|
50
|
+
for (const el of e.target.assignedElements({ flatten: true })) {
|
|
51
|
+
if ("fullWidth" in el) el.setAttribute("fullwidth", "");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
41
55
|
render() {
|
|
42
56
|
return html`
|
|
43
57
|
<section class="root">
|
|
44
58
|
<div class="photo"><slot name="photo"></slot></div>
|
|
45
|
-
<div class="
|
|
46
|
-
<div class="
|
|
47
|
-
<div class="
|
|
48
|
-
<div class="
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
<div class="band">
|
|
60
|
+
<div class="bd-ensemble column">
|
|
61
|
+
<div class="card">
|
|
62
|
+
<div class="intro">
|
|
63
|
+
<div class="lockup"><slot name="lockup"></slot></div>
|
|
64
|
+
<bd-h as="${this.as}" visual-level="h2" color="on-brand" class="heading"><span class="text">${this.heading}</span></bd-h>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="detail">
|
|
67
|
+
${this.quote
|
|
68
|
+
? html`<figure class="quote">
|
|
69
|
+
<blockquote>${this.quote}</blockquote>
|
|
70
|
+
${this.attribution ? html`<figcaption>${this.attribution}</figcaption>` : nothing}
|
|
71
|
+
</figure>`
|
|
72
|
+
: nothing}
|
|
73
|
+
${this.lead ? html`<p class="lead">${this.lead}</p>` : nothing}
|
|
74
|
+
<div class="actions"><slot name="actions" @slotchange=${this._onActionsSlot}></slot></div>
|
|
75
|
+
</div>
|
|
60
76
|
</div>
|
|
61
77
|
</div>
|
|
62
78
|
</div>
|
|
@@ -39,10 +39,16 @@ export const postCardCSS = css`
|
|
|
39
39
|
object-fit: cover;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/* The badge is the post's feed or category, and a feed's channel title can
|
|
43
|
+
be longer than the cover is wide -- "Business Insights Cybersecurity Blog
|
|
44
|
+
by Bitdefender" ran off the card between md and xl. It keeps the cover's
|
|
45
|
+
inset on both sides and wraps inside it instead. */
|
|
42
46
|
.badge {
|
|
43
47
|
position: absolute;
|
|
44
48
|
inset-block-start: var(--spacing-20);
|
|
45
49
|
inset-inline-start: var(--spacing-24);
|
|
50
|
+
max-width: calc(100% - 2 * var(--spacing-24));
|
|
51
|
+
--bd-badge-white-space: normal;
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
.body {
|
|
@@ -118,4 +124,12 @@ export const postCardCSS = css`
|
|
|
118
124
|
height: auto;
|
|
119
125
|
}
|
|
120
126
|
}
|
|
127
|
+
|
|
128
|
+
/* A newline in the text is a line break, so a page can keep the breaks its
|
|
129
|
+
copy was written with (a <br> in the authored eyebrow, heading or lead
|
|
130
|
+
arrives as a newline in the property). Text only: nothing here renders
|
|
131
|
+
HTML. */
|
|
132
|
+
.heading {
|
|
133
|
+
white-space: pre-line;
|
|
134
|
+
}
|
|
121
135
|
`;
|
|
@@ -20,13 +20,13 @@ import { postCardCSS } from "./post-card.css.js";
|
|
|
20
20
|
*/
|
|
21
21
|
export class PostCard extends LitElement {
|
|
22
22
|
static properties = {
|
|
23
|
-
href
|
|
24
|
-
heading
|
|
25
|
-
badge
|
|
26
|
-
image
|
|
27
|
-
imageAlt
|
|
28
|
-
readMore
|
|
29
|
-
as
|
|
23
|
+
href : { type: String },
|
|
24
|
+
heading : { type: String },
|
|
25
|
+
badge : { type: String },
|
|
26
|
+
image : { type: String },
|
|
27
|
+
imageAlt: { type: String, attribute: "image-alt" },
|
|
28
|
+
readMore: { type: String, attribute: "read-more" },
|
|
29
|
+
as : { type: String }
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
static styles = [tokens, postCardCSS];
|
|
@@ -51,7 +51,7 @@ export class PostCard extends LitElement {
|
|
|
51
51
|
case "h2": return html`<h2 class="heading">${text}</h2>`;
|
|
52
52
|
case "h4": return html`<h4 class="heading">${text}</h4>`;
|
|
53
53
|
case "h5": return html`<h5 class="heading">${text}</h5>`;
|
|
54
|
-
default
|
|
54
|
+
default: return html`<h3 class="heading">${text}</h3>`;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -232,7 +232,6 @@ class PricingCard extends LitElement {
|
|
|
232
232
|
<bd-button-link
|
|
233
233
|
label="Buy Now"
|
|
234
234
|
variant="accent"
|
|
235
|
-
size="md"
|
|
236
235
|
fullWidth
|
|
237
236
|
buyLink
|
|
238
237
|
>
|
|
@@ -242,7 +241,6 @@ class PricingCard extends LitElement {
|
|
|
242
241
|
<bd-button
|
|
243
242
|
label="Learn More"
|
|
244
243
|
variant="ghost"
|
|
245
|
-
size="md"
|
|
246
244
|
fullWidth
|
|
247
245
|
>
|
|
248
246
|
Learn More
|
|
@@ -344,7 +342,6 @@ class PricingCardFamily extends LitElement {
|
|
|
344
342
|
<bd-button-link
|
|
345
343
|
label="Buy Now"
|
|
346
344
|
variant="accent"
|
|
347
|
-
size="md"
|
|
348
345
|
fullWidth
|
|
349
346
|
buyLink
|
|
350
347
|
>
|
|
@@ -354,7 +351,6 @@ class PricingCardFamily extends LitElement {
|
|
|
354
351
|
<bd-button
|
|
355
352
|
label="Learn More"
|
|
356
353
|
variant="ghost"
|
|
357
|
-
size="md"
|
|
358
354
|
fullWidth
|
|
359
355
|
>
|
|
360
356
|
Learn More
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { css, unsafeCSS } from "lit";
|
|
2
|
+
import { above } from "../shared/token-scales.js";
|
|
3
|
+
|
|
4
|
+
/* One distance, and twice it. Every section of the Figma homepage frames sits
|
|
5
|
+
the same inset in from its top and its bottom -- 24 on the 390 phone frame,
|
|
6
|
+
32 on the 768 tablet and the 1440 desktop -- so two sections stand twice
|
|
7
|
+
that apart, 48 and 64. The blocks inside a section take the same doubled
|
|
8
|
+
gap, so two blocks of one section sit as far apart as two sections do, and
|
|
9
|
+
one rhythm runs down the whole page.
|
|
10
|
+
|
|
11
|
+
Vertical only. The page column is each module's own (ensembleCSS), so a
|
|
12
|
+
section never sets a width, an inline padding or a ground. */
|
|
13
|
+
export default css`
|
|
14
|
+
:host {
|
|
15
|
+
--bd-section-padding: var(--spacing-24);
|
|
16
|
+
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: calc(var(--bd-section-padding) * 2);
|
|
20
|
+
padding-block: var(--bd-section-padding);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media ${unsafeCSS(above("md"))} {
|
|
24
|
+
:host {
|
|
25
|
+
--bd-section-padding: var(--spacing-32);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* An edge is on or off, never another size: the block meets its neighbour
|
|
30
|
+
there, and keeps the inset everywhere else. */
|
|
31
|
+
:host([no-padding-top]) {
|
|
32
|
+
padding-block-start: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([no-padding-bottom]) {
|
|
36
|
+
padding-block-end: 0;
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
// Installs the design tokens into document scope; see src/tokens/tokens.js
|
|
3
|
+
import "../../tokens/tokens.js";
|
|
4
|
+
import sectionCSS from "./section.css.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A page section: the vertical rhythm a page is built on, and nothing else.
|
|
8
|
+
* It pads its top and bottom by the section inset (24 on a phone, 32 from md)
|
|
9
|
+
* and stacks its blocks twice that apart, so every section and every block on
|
|
10
|
+
* a page sits on one distance. The inset is not a choice a page makes: it can
|
|
11
|
+
* only be on or off at either edge, never a different size, so the rhythm
|
|
12
|
+
* cannot drift.
|
|
13
|
+
*
|
|
14
|
+
* `no-padding-top` and `no-padding-bottom` turn one edge off, for a block that
|
|
15
|
+
* must meet what is above or below it -- the hero, whose band starts under the
|
|
16
|
+
* site menu, takes `no-padding-top`. The block keeps the rest of the rhythm:
|
|
17
|
+
* the hero still stands twice the inset clear of the section after it.
|
|
18
|
+
*
|
|
19
|
+
* It sets no width and no ground. The blocks inside bring their own page
|
|
20
|
+
* column; a full-bleed band is a block like any other, so it stands twice the
|
|
21
|
+
* inset clear of its neighbours. It carries no semantics either -- a page that
|
|
22
|
+
* wants a landmark puts one inside.
|
|
23
|
+
*/
|
|
24
|
+
class BdSection extends LitElement {
|
|
25
|
+
static properties = {
|
|
26
|
+
noPaddingTop : { type: Boolean, reflect: true, attribute: "no-padding-top" },
|
|
27
|
+
noPaddingBottom: { type: Boolean, reflect: true, attribute: "no-padding-bottom" }
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
static styles = [sectionCSS];
|
|
31
|
+
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
this.noPaddingTop = false;
|
|
35
|
+
this.noPaddingBottom = false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
render() {
|
|
39
|
+
return html`<slot></slot>`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
customElements.define("bd-section", BdSection);
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import "./section.js";
|
|
3
|
+
import "../section-header/section-header.js";
|
|
4
|
+
import "../grid/grid.js";
|
|
5
|
+
import "../link/link.js";
|
|
6
|
+
import "../paragraph/paragraph.js";
|
|
7
|
+
import "../button/button.js";
|
|
8
|
+
import { Homepage as HeroHomepage } from "../hero/hero.stories.js";
|
|
9
|
+
import { Partners, Awards } from "../logo-marquee/logo-marquee.stories.js";
|
|
10
|
+
import { BrandAICards } from "../bento-grid/bento-grid.stories.js";
|
|
11
|
+
import { WhyTrustRow } from "../stat/stat.stories.js";
|
|
12
|
+
import { Default as AwardsSpotlight } from "../awards/awards-spotlight.stories.js";
|
|
13
|
+
import { Ferrari } from "../partner-banner/partner-banner.stories.js";
|
|
14
|
+
import { Feed } from "../post-card/post-card.stories.js";
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title : "Layout/Section",
|
|
18
|
+
component : "bd-section",
|
|
19
|
+
tags : ["autodocs"],
|
|
20
|
+
parameters: {
|
|
21
|
+
layout: "fullscreen",
|
|
22
|
+
docs : {
|
|
23
|
+
description: {
|
|
24
|
+
component: `
|
|
25
|
+
The vertical rhythm of a page. Every section of the Figma homepage frames sits
|
|
26
|
+
the same inset in from its top and its bottom -- **24** on the 390 phone frame,
|
|
27
|
+
**32** on the 768 tablet and the 1440 desktop -- so two sections stand twice
|
|
28
|
+
that apart, **48** and **64**. \`bd-section\` is that inset, and it stacks the
|
|
29
|
+
blocks inside it twice the inset apart too, so a block sits as far from the
|
|
30
|
+
next block as a section sits from the next section.
|
|
31
|
+
|
|
32
|
+
\`\`\`html
|
|
33
|
+
<bd-section>
|
|
34
|
+
<bd-section-header eyebrow="…" heading="…" layout="split"></bd-section-header>
|
|
35
|
+
<bd-bento-grid>…</bd-bento-grid>
|
|
36
|
+
</bd-section>
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
It sets **no width, no inline padding and no ground**: each block brings its
|
|
40
|
+
own page column, and a full-bleed band (the partner banner) is a block of its
|
|
41
|
+
own section, which is what puts it twice the inset clear of its neighbours, as
|
|
42
|
+
the frames draw it.
|
|
43
|
+
|
|
44
|
+
The inset is one distance everywhere, and a page can only turn it off at an
|
|
45
|
+
edge, never make it another size:
|
|
46
|
+
|
|
47
|
+
| Attribute | Effect |
|
|
48
|
+
|---|---|
|
|
49
|
+
| \`no-padding-top\` | No inset at the top: the block meets what is above it (the hero, under the site menu) |
|
|
50
|
+
| \`no-padding-bottom\` | No inset at the bottom: the block meets what is below it |
|
|
51
|
+
|
|
52
|
+
Turn on **guides** (or the floating button on the page) to tint the section's
|
|
53
|
+
padding and the gaps between its blocks.
|
|
54
|
+
`
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
argTypes: {
|
|
59
|
+
guides: { control: "boolean", description: "Tint each section's padding and the gaps between its blocks" }
|
|
60
|
+
},
|
|
61
|
+
args: { guides: false }
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/* The guides tint the section (its padding and the gaps show through) and
|
|
65
|
+
put the page ground back under each block, so only the rhythm is coloured.
|
|
66
|
+
Story chrome, not the component's: bd-section draws nothing. */
|
|
67
|
+
const guidesStyle = html`
|
|
68
|
+
<style>
|
|
69
|
+
.guides bd-section {
|
|
70
|
+
background: var(--color-surface-info);
|
|
71
|
+
outline: var(--border-width-1) dashed var(--color-border-brand);
|
|
72
|
+
outline-offset: calc(-1 * var(--border-width-1));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.guides bd-section > * {
|
|
76
|
+
background: var(--color-surface-default);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.guides-toggle {
|
|
80
|
+
position: fixed;
|
|
81
|
+
z-index: var(--z-overlay);
|
|
82
|
+
inset-block-end: var(--spacing-16);
|
|
83
|
+
inset-inline-end: var(--spacing-16);
|
|
84
|
+
padding: var(--spacing-8) var(--spacing-16);
|
|
85
|
+
font-family: var(--typography-label-small-fontFamily);
|
|
86
|
+
font-size: var(--typography-label-small-fontSize);
|
|
87
|
+
font-weight: var(--typography-label-small-fontWeight);
|
|
88
|
+
line-height: var(--typography-label-small-lineHeight);
|
|
89
|
+
color: var(--color-text-primary);
|
|
90
|
+
background: var(--color-surface-default);
|
|
91
|
+
border: var(--border-width-1) solid var(--color-border-brand);
|
|
92
|
+
border-radius: var(--radius-full);
|
|
93
|
+
box-shadow: var(--shadow-md);
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.guides-toggle[aria-pressed="true"] {
|
|
98
|
+
color: var(--color-brand-on-fill);
|
|
99
|
+
background: var(--color-surface-brand);
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
102
|
+
`;
|
|
103
|
+
|
|
104
|
+
/* The button flips the tint in place, so the spacing and the page itself can
|
|
105
|
+
be compared without reloading; the guides arg is only where it starts. */
|
|
106
|
+
const toggleGuides = (event) => {
|
|
107
|
+
const button = event.currentTarget;
|
|
108
|
+
const on = button.getAttribute("aria-pressed") !== "true";
|
|
109
|
+
button.setAttribute("aria-pressed", String(on));
|
|
110
|
+
button.previousElementSibling.classList.toggle("guides", on);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const page = (guides, content) => html`
|
|
114
|
+
${guidesStyle}
|
|
115
|
+
<div class="${guides ? "guides" : ""}">${content}</div>
|
|
116
|
+
<button type="button" class="guides-toggle" aria-pressed="${String(Boolean(guides))}" @click=${toggleGuides}>
|
|
117
|
+
Spacing guides
|
|
118
|
+
</button>
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
const block = (label) => html`
|
|
122
|
+
<div class="bd-container">
|
|
123
|
+
<div style="padding: var(--spacing-24); border: var(--border-width-1) solid var(--color-border-container); border-radius: var(--card-radius);">
|
|
124
|
+
<bd-p variant="small">${label}</bd-p>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
`;
|
|
128
|
+
|
|
129
|
+
export const Rhythm = {
|
|
130
|
+
name : "Rhythm (three sections)",
|
|
131
|
+
render: ({ guides }) => page(guides, html`
|
|
132
|
+
<bd-section>${block("Section 1, block 1")}${block("Section 1, block 2")}</bd-section>
|
|
133
|
+
<bd-section>${block("Section 2, one block")}</bd-section>
|
|
134
|
+
<bd-section>${block("Section 3, block 1")}${block("Section 3, block 2")}${block("Section 3, block 3")}</bd-section>
|
|
135
|
+
`),
|
|
136
|
+
args : { guides: true },
|
|
137
|
+
parameters: {
|
|
138
|
+
docs: {
|
|
139
|
+
description: {
|
|
140
|
+
story: "Placeholder blocks, guides on: the padding at each section's top and bottom, and the gap between blocks twice it. Two sections meet at padding + padding, the same distance as the gap inside one."
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export const NoPadding = {
|
|
147
|
+
name : "No padding at an edge",
|
|
148
|
+
render: ({ guides }) => page(guides, html`
|
|
149
|
+
<bd-section no-padding-top>${block("no-padding-top: meets the page's top edge")}</bd-section>
|
|
150
|
+
<bd-section>${block("A section with both insets")}</bd-section>
|
|
151
|
+
<bd-section no-padding-bottom>${block("no-padding-bottom: meets the section below")}</bd-section>
|
|
152
|
+
<bd-section no-padding-top>${block("no-padding-top: meets the section above")}</bd-section>
|
|
153
|
+
`),
|
|
154
|
+
args : { guides: true },
|
|
155
|
+
parameters: {
|
|
156
|
+
docs: {
|
|
157
|
+
description: {
|
|
158
|
+
story: "Each attribute turns one edge's inset off and leaves the rest of the rhythm alone. The last two sections meet with no inset between them, the way two bands that belong together would."
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
const splitterColumns = [
|
|
165
|
+
["For Individuals", "AI-Powered security, privacy, and scam protection for everyday digital life."],
|
|
166
|
+
["For Small Business", "Effective protection for users, devices, and business operations."],
|
|
167
|
+
["For Enterprise", "Advanced cybersecurity for prevention, detection, and response."],
|
|
168
|
+
["For MSPs", "Security built for managed service providers and the customers they protect."]
|
|
169
|
+
];
|
|
170
|
+
|
|
171
|
+
/* The homepage as the site assembles it, block for block, each one the
|
|
172
|
+
component's own story, every one in a section. The hero's band starts
|
|
173
|
+
under the site menu, so its section turns the top inset off; its bottom
|
|
174
|
+
inset stays, so the cards stand twice the inset clear of the marquee. */
|
|
175
|
+
const homepage = ({ guides }) => page(guides, html`
|
|
176
|
+
<bd-section no-padding-top>${HeroHomepage.render(HeroHomepage.args)}</bd-section>
|
|
177
|
+
|
|
178
|
+
<bd-section>${Partners.render(Partners.args)}</bd-section>
|
|
179
|
+
|
|
180
|
+
<bd-section>
|
|
181
|
+
<bd-section-header layout="split" as="h2"
|
|
182
|
+
eyebrow="15+ years of AI-driven security innovation"
|
|
183
|
+
heading="AI Across Bitdefender"
|
|
184
|
+
lead="Bitdefender is applying AI across consumer protection, enterprise security, and threat research to help people and organizations stay ahead of evolving threats."></bd-section-header>
|
|
185
|
+
${BrandAICards.render()}
|
|
186
|
+
</bd-section>
|
|
187
|
+
|
|
188
|
+
<bd-section>
|
|
189
|
+
<bd-section-header layout="split" as="h2"
|
|
190
|
+
eyebrow="25 years of Cybersecurity Excellence"
|
|
191
|
+
heading="Why Millions Trust Bitdefender"
|
|
192
|
+
lead="Bitdefender protects millions across 170+ countries, combining deep security expertise with cutting-edge AI innovation and a commitment to fighting cybercrime alongside global law enforcement."></bd-section-header>
|
|
193
|
+
<div class="bd-container">${WhyTrustRow.render()}</div>
|
|
194
|
+
</bd-section>
|
|
195
|
+
|
|
196
|
+
<bd-section>
|
|
197
|
+
<bd-section-header layout="centered" as="h2"
|
|
198
|
+
heading="Proven by Independent Testing and Industry Analysts"
|
|
199
|
+
lead="Independent analysts and testing organizations consistently recognize Bitdefender for its security performance, innovation, and trusted protection."></bd-section-header>
|
|
200
|
+
${AwardsSpotlight.render(AwardsSpotlight.args)}
|
|
201
|
+
${Awards.render(Awards.args)}
|
|
202
|
+
</bd-section>
|
|
203
|
+
|
|
204
|
+
<bd-section>${Ferrari.render()}</bd-section>
|
|
205
|
+
|
|
206
|
+
<bd-section>
|
|
207
|
+
<bd-section-header layout="split" as="h2" heading="Latest cybersecurity insights"></bd-section-header>
|
|
208
|
+
<div class="bd-container">${Feed.render()}</div>
|
|
209
|
+
</bd-section>
|
|
210
|
+
|
|
211
|
+
<bd-section>
|
|
212
|
+
<bd-section-header layout="split" as="h2"
|
|
213
|
+
heading="Find the Bitdefender solution built for you"
|
|
214
|
+
lead="Whether you are protecting personal devices, running a growing business, or securing a complex organization, Bitdefender has solutions designed for your environment."></bd-section-header>
|
|
215
|
+
<div class="bd-container">
|
|
216
|
+
<bd-grid cols="1" cols-sm="1" cols-md="2" cols-lg="4" gap="md">
|
|
217
|
+
${splitterColumns.map(([title, body]) => html`
|
|
218
|
+
<div>
|
|
219
|
+
<bd-link href="#" variant="bold" arrow>${title}</bd-link>
|
|
220
|
+
<bd-p variant="small">${body}</bd-p>
|
|
221
|
+
</div>
|
|
222
|
+
`)}
|
|
223
|
+
</bd-grid>
|
|
224
|
+
</div>
|
|
225
|
+
</bd-section>
|
|
226
|
+
`);
|
|
227
|
+
|
|
228
|
+
const homepageDocs = "The homepage from the existing components, every block after the hero in a `bd-section`. Turn on guides to see the one distance at work: the same padding at the top and bottom of every section, twice it between blocks and between sections.";
|
|
229
|
+
|
|
230
|
+
export const Homepage = {
|
|
231
|
+
name : "Homepage (desktop)",
|
|
232
|
+
render : homepage,
|
|
233
|
+
parameters: { docs: { description: { story: homepageDocs } } }
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export const HomepageTablet = {
|
|
237
|
+
name : "Homepage (tablet 768)",
|
|
238
|
+
render : homepage,
|
|
239
|
+
parameters: { viewport: { defaultViewport: "tablet" } }
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export const HomepageMobile = {
|
|
243
|
+
name : "Homepage (mobile)",
|
|
244
|
+
render : homepage,
|
|
245
|
+
parameters: { viewport: { defaultViewport: "mobile1" } }
|
|
246
|
+
};
|
|
@@ -86,4 +86,15 @@ export const sectionHeaderCSS = css`
|
|
|
86
86
|
min-width: 0;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
+
|
|
90
|
+
/* A newline in the text is a line break, so a page can keep the breaks its
|
|
91
|
+
copy was written with (a <br> in the authored eyebrow, heading or lead
|
|
92
|
+
arrives as a newline in the property). Text only: nothing here renders
|
|
93
|
+
HTML. The rule sits on a span around the text, not on bd-h or bd-p,
|
|
94
|
+
whose own templates hold newlines that would break too, and the lead's
|
|
95
|
+
span is the slot's fallback: slotted copy is markup, which brings its
|
|
96
|
+
own <br>, and its source newlines stay spaces. */
|
|
97
|
+
.text {
|
|
98
|
+
white-space: pre-line;
|
|
99
|
+
}
|
|
89
100
|
`;
|
|
@@ -63,12 +63,12 @@ export class SectionHeader extends LitElement {
|
|
|
63
63
|
return html`
|
|
64
64
|
<header class="bd-ensemble root">
|
|
65
65
|
${this.eyebrow
|
|
66
|
-
? html`<bd-p variant="eyebrow" class="eyebrow">${this.eyebrow}</bd-p>`
|
|
66
|
+
? html`<bd-p variant="eyebrow" class="eyebrow"><span class="text">${this.eyebrow}</span></bd-p>`
|
|
67
67
|
: nothing}
|
|
68
68
|
<div class="row">
|
|
69
|
-
<bd-h as="${this.as}" visual-level="h2" class="heading">${this.heading}</bd-h>
|
|
69
|
+
<bd-h as="${this.as}" visual-level="h2" class="heading"><span class="text">${this.heading}</span></bd-h>
|
|
70
70
|
<div class="lead" ?hidden=${!showLead}>
|
|
71
|
-
<slot name="lead" @slotchange=${this._onLeadSlot}>${this.lead}</slot>
|
|
71
|
+
<slot name="lead" @slotchange=${this._onLeadSlot}><span class="text">${this.lead}</span></slot>
|
|
72
72
|
</div>
|
|
73
73
|
</div>
|
|
74
74
|
</header>
|
|
@@ -18,9 +18,9 @@ const DIGITS = "0123456789";
|
|
|
18
18
|
*/
|
|
19
19
|
export class StatHighlight extends LitElement {
|
|
20
20
|
static properties = {
|
|
21
|
-
value
|
|
22
|
-
label
|
|
23
|
-
_rolled
|
|
21
|
+
value : { type: String },
|
|
22
|
+
label : { type: String },
|
|
23
|
+
_rolled: { state: true }
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
static styles = [tokens, statHighlightCSS];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
1
|
+
import { css, unsafeCSS } from "lit";
|
|
2
|
+
import { above } from "../shared/token-scales.js";
|
|
2
3
|
|
|
3
4
|
/* A tile on surface/info: the value at display-md, the caption at body-small,
|
|
4
5
|
pinned to the foot. On the info tint the value's text-primary measures
|
|
@@ -20,13 +21,22 @@ export const statTileCSS = css`
|
|
|
20
21
|
display: flex;
|
|
21
22
|
flex-direction: column;
|
|
22
23
|
justify-content: space-between;
|
|
23
|
-
gap: var(--spacing-
|
|
24
|
-
padding: var(--spacing-
|
|
24
|
+
gap: var(--spacing-12);
|
|
25
|
+
padding: var(--spacing-20);
|
|
25
26
|
text-align: start;
|
|
26
27
|
background: var(--color-surface-info);
|
|
27
28
|
border-radius: var(--shape-radius-3xl);
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
/* The phone and tablet frames hold the copy 20 in and the caption at least
|
|
32
|
+
12 under the value; the desktop frame opens both up. */
|
|
33
|
+
@media ${unsafeCSS(above("lg"))} {
|
|
34
|
+
.tile {
|
|
35
|
+
gap: var(--spacing-48);
|
|
36
|
+
padding: var(--spacing-24);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
30
40
|
.value,
|
|
31
41
|
.caption {
|
|
32
42
|
margin: 0;
|
|
@@ -49,6 +59,14 @@ export const statTileCSS = css`
|
|
|
49
59
|
line-height: var(--typography-body-small-lineHeight);
|
|
50
60
|
letter-spacing: var(--typography-body-small-letterSpacing);
|
|
51
61
|
}
|
|
62
|
+
|
|
63
|
+
/* A newline in the text is a line break, so a page can keep the breaks its
|
|
64
|
+
copy was written with (a <br> in the authored eyebrow, heading or lead
|
|
65
|
+
arrives as a newline in the property). Text only: nothing here renders
|
|
66
|
+
HTML. */
|
|
67
|
+
.caption {
|
|
68
|
+
white-space: pre-line;
|
|
69
|
+
}
|
|
52
70
|
`;
|
|
53
71
|
|
|
54
72
|
/* The leading figure. Its size is the one value here off the type scale: the
|
|
@@ -66,7 +84,10 @@ export const statHighlightCSS = css`
|
|
|
66
84
|
text-align: start;
|
|
67
85
|
color: var(--color-text-primary);
|
|
68
86
|
font-family: var(--typography-display-3xl-fontFamily);
|
|
69
|
-
|
|
87
|
+
/* no role: every display role is bold, and the design sets this one-off
|
|
88
|
+
figure in IBM Plex Sans Text (450), a cut the system does not ship;
|
|
89
|
+
Regular is the nearest it does */
|
|
90
|
+
font-weight: var(--typography-fontWeight-normal);
|
|
70
91
|
letter-spacing: var(--typography-display-3xl-letterSpacing);
|
|
71
92
|
/* no token: the one-off 180 the design sets, falling to 80 on a phone
|
|
72
93
|
through the viewport; the display scale stops at 128 */
|
|
@@ -72,13 +72,13 @@ export const Highlight = {
|
|
|
72
72
|
export const WhyTrustRow = {
|
|
73
73
|
name : "Why-trust row (composition)",
|
|
74
74
|
render: () => html`
|
|
75
|
-
<bd-grid cols="1" cols-lg="2" gap="md">
|
|
75
|
+
<bd-grid cols="1" cols-sm="1" cols-md="1" cols-lg="2" gap="md">
|
|
76
76
|
<div style="--bd-paragraph-margin-bottom: 0; display: flex; flex-direction: column; gap: var(--spacing-24); align-items: flex-start;">
|
|
77
77
|
<bd-stat-highlight value="$1.5B+" label="$1.5 billion plus"></bd-stat-highlight>
|
|
78
78
|
<bd-p>Through global ransomware operations and free decryptor releases, Bitdefender has helped victims recover their data without paying the attackers.</bd-p>
|
|
79
79
|
<bd-button-link variant="primary" href="#">Learn Why Millions Trust Us</bd-button-link>
|
|
80
80
|
</div>
|
|
81
|
-
<bd-grid cols="1" cols-sm="2" cols-md="2" cols-lg="2" gap="md">
|
|
81
|
+
<bd-grid cols="1" cols-sm="2" cols-md="2" cols-lg="2" gap="sm" gap-sm="md">
|
|
82
82
|
${tiles.map(([value, caption, label]) => html`<bd-stat-tile value="${value}" caption="${caption}" label="${label || ""}"></bd-stat-tile>`)}
|
|
83
83
|
</bd-grid>
|
|
84
84
|
</bd-grid>
|
package/src/tokens/tokens.css
CHANGED
|
@@ -1234,8 +1234,10 @@
|
|
|
1234
1234
|
--typography-display-md-letterSpacing: var(--typography-letterSpacing-tight);
|
|
1235
1235
|
--typography-display-md-fontFamily: var(--typography-fontFamily-sans);
|
|
1236
1236
|
|
|
1237
|
-
/*
|
|
1238
|
-
|
|
1237
|
+
/* 36px at every width: the floor meets the 4xl ceiling, so the fluid
|
|
1238
|
+
middle term never wins. It is kept for a brand that lowers the floor
|
|
1239
|
+
(it ramps 30px at 320 -> 36px at 992). */
|
|
1240
|
+
--typography-display-sm-fontSizeMin: 2.25rem; /* 36px */
|
|
1239
1241
|
--typography-display-sm-fontSize: clamp(
|
|
1240
1242
|
var(--typography-display-sm-fontSizeMin),
|
|
1241
1243
|
calc(1.69643rem + 0.8929vw),
|
package/src/tokens/tokens.js
CHANGED
|
@@ -1250,8 +1250,10 @@ const declarations = `
|
|
|
1250
1250
|
--typography-display-md-letterSpacing: var(--typography-letterSpacing-tight);
|
|
1251
1251
|
--typography-display-md-fontFamily: var(--typography-fontFamily-sans);
|
|
1252
1252
|
|
|
1253
|
-
/*
|
|
1254
|
-
|
|
1253
|
+
/* 36px at every width: the floor meets the 4xl ceiling, so the fluid
|
|
1254
|
+
middle term never wins. It is kept for a brand that lowers the floor
|
|
1255
|
+
(it ramps 30px at 320 -> 36px at 992). */
|
|
1256
|
+
--typography-display-sm-fontSizeMin: 2.25rem; /* 36px */
|
|
1255
1257
|
--typography-display-sm-fontSize: clamp(
|
|
1256
1258
|
var(--typography-display-sm-fontSizeMin),
|
|
1257
1259
|
calc(1.69643rem + 0.8929vw),
|