1 import type { BaseSpec, GradientStop } from "../../types.js"
2
3 export type CloudPillSpec = {
4 /** Total height of the pill. */
5 height: number
6 /** Distance from the pill's edge to the logomark. */
7 paddingLeft: number
8 /** Distance from the end of the date to the pill's edge. */
9 paddingRight: number
10 fillGradient: GradientStop[]
11 /** Thickness of the inset highlight and ring. */
12 hairline: number
13 /** Lit edge along the very top of the pill. */
14 highlightColor: string
15 /** Faint ring all the way around, standing the pill off the background. */
16 ringColor: string
17 /** The pill's cast shadow. */
18 shadowOffsetY: number
19 shadowBlur: number
20 shadowSpread: number
21 shadowColor: string
22 }
23
24 export type CloudChangelogContentSpec = {
25 /** Visible height of the logomark. */
26 logoHeight: number
27 logoColor: string
28 /** Space between the logomark and the wordmark. */
29 gap: number
30
31 /** The constant wordmark next to the logomark. */
32 wordmark: string
33 fontSize: number
34 fontWeight: number
35 letterSpacing: number
36 color: string
37
38 /** The rule between the wordmark and the date. */
39 dividerWidth: number
40 dividerHeight: number
41 /** Space either side of the rule. */
42 dividerMargin: number
43 dividerColor: string
44
45 dateFontFamily: string
46 dateFontSize: number
47 dateFontWeight: number
48 dateLetterSpacing: number
49 dateColor: string
50 }
51
52 export type CloudChangelogSpec = BaseSpec & {
53 pill: CloudPillSpec
54 content: CloudChangelogContentSpec
55 }
56
57 /**
58 * Design spec for the Cloud changelog banner: a pill holding the logomark, the
59 * Cloud wordmark, and the entry's date.
60 *
61 * Sizes are in pixels at the reference resolution of 2400x1260 — twice the
62 * 1200x630 the design was authored at, so the banner is delivered at retina
63 * density by default. Override `width` and everything scales proportionally.
64 */
65 export const CLOUD_CHANGELOG_SPEC: CloudChangelogSpec = {
66 width: 2400,
67 height: 1260,
68
69 background: "#18181C",
70
71 pill: {
72 height: 264,
73 paddingLeft: 88,
74 paddingRight: 112,
75 // Lit along the top, settling into the background by the bottom edge.
76 fillGradient: [
77 [0, "#4E4D53"],
78 [0.42, "#2B2A2F"],
79 [1, "#1C1B21"],
80 ],
81 hairline: 2,
82 highlightColor: "rgba(255, 255, 255, 0.16)",
83 ringColor: "rgba(255, 255, 255, 0.05)",
84 shadowOffsetY: 60,
85 shadowBlur: 120,
86 // The design tightens the shadow with a -40 spread, which satori cannot
87 // draw — see the note in `template.ts`. The blur is pulled in to compensate
88 // for the pool the missing spread would otherwise let spill.
89 shadowSpread: 0,
90 shadowColor: "rgba(0, 0, 0, 0.85)",
91 },
92
93 content: {
94 logoHeight: 130,
95 logoColor: "#E8E7EC",
96 gap: 56,
97
98 wordmark: "Cloud",
99 fontSize: 132,
100 fontWeight: 500,
101 // -0.03em at the reference size.
102 letterSpacing: -3.96,
103 color: "#E8E7EC",
104
105 dividerWidth: 2,
106 dividerHeight: 112,
107 dividerMargin: 64,
108 dividerColor: "rgba(255, 255, 255, 0.12)",
109
110 // The date is set in mono so entries line up with each other whatever the
111 // month, and read as data rather than as part of the wordmark.
112 dateFontFamily: "Roboto Mono",
113 dateFontSize: 88,
114 dateFontWeight: 400,
115 // -0.01em at the reference size.
116 dateLetterSpacing: -0.88,
117 dateColor: "#A8A7B0",
118 },
119 }