@n1kname/components 0.40.0 → 0.40.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n1kname/components",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -215,6 +215,13 @@ const fit = (img: ImageMetadata) => [...new Set(widths.filter((w) => w <= img.wi
215
215
  .phone.n2 .s0 { left: 34%; }
216
216
  .phone.n2 .s1 { left: 48%; top: 6%; }
217
217
 
218
+ /* The phones leave the left quarter free, so a note wraps there instead of running under them. */
219
+ .cover.phone .note {
220
+ max-width: 21%;
221
+ border-radius: 10px;
222
+ padding-block: var(--sp-1);
223
+ }
224
+
218
225
  .card.phone .screen {
219
226
  width: 22%;
220
227
  box-shadow:
@@ -273,8 +280,11 @@ const fit = (img: ImageMetadata) => [...new Set(widths.filter((w) => w <= img.wi
273
280
  .cover.phone .screen {
274
281
  width: 30%;
275
282
  }
276
- .cover.phone .s0 { left: 12%; top: 14%; }
277
- .cover.phone .s1 { left: 35%; top: 9%; }
278
- .cover.phone .s2 { left: 58%; top: 4%; }
283
+ .cover.phone .s0 { left: 12%; top: 24%; }
284
+ .cover.phone .s1 { left: 35%; top: 19%; }
285
+ .cover.phone .s2 { left: 58%; top: 14%; }
286
+ .cover.phone .note {
287
+ max-width: calc(100% - 2 * var(--sp-3));
288
+ }
279
289
  }
280
290
  </style>
package/src/Steps.astro CHANGED
@@ -25,13 +25,16 @@ interface Step {
25
25
  interface Props {
26
26
  steps: Step[];
27
27
  caption?: string;
28
+ /** Phone screens: each picture held to 220px wide, centred on its plate, so a row of tall
29
+ * screens stays a sensible height instead of growing with its column. */
30
+ phone?: boolean;
28
31
  class?: string;
29
32
  }
30
33
 
31
- const { steps, caption, class: className } = Astro.props;
34
+ const { steps, caption, phone = false, class: className } = Astro.props;
32
35
  ---
33
36
 
34
- <figure class:list={['steps', className]}>
37
+ <figure class:list={['steps', { phone }, className]}>
35
38
  <ol>
36
39
  {
37
40
  steps.map((s, i) => (
@@ -139,6 +142,16 @@ const { steps, caption, class: className } = Astro.props;
139
142
  border-radius: 2px;
140
143
  }
141
144
 
145
+ .phone .shot :global(img),
146
+ .phone .placeholder {
147
+ max-width: 220px;
148
+ margin-inline: auto;
149
+ }
150
+
151
+ .phone .shot :global(img) {
152
+ border-radius: 6% / 3%;
153
+ }
154
+
142
155
  .placeholder {
143
156
  display: grid;
144
157
  place-items: center;