Skip to content

Commit b91c268

Browse files
committed
plugin fix and styles fix
1 parent 16a04b6 commit b91c268

3 files changed

Lines changed: 24 additions & 10 deletions

File tree

01-blocks-scripts-and-sprites.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,9 @@ will be the attachment point of the part on the anchor.
390390
:::
391391

392392
Sprite nesting is shown in the sprite corral icons of both anchors and parts:
393-
![image47.png](images/01-blocks-scripts-and-sprites/image47.png) <!-- {width=1.63056in height=0.96528in} -->
393+
394+
![image47.png](images/01-blocks-scripts-and-sprites/image47.png)
395+
<!-- {width=1.63056in height=0.96528in} -->
394396

395397
In this illustration, it is desired to animate Alonzo’s arm. (The arm has
396398
been colored green in this picture to make the relationship of the two
@@ -411,8 +413,11 @@ extended to its parts. Also, cloning the anchor (see Section @sec-permanent-and-
411413
will also clone all its parts.
412414

413415
<!-- TODO: Figure w/caption -->
414-
![image56.png](images/01-blocks-scripts-and-sprites/image56.png) <!-- {width=1.44444in height=1.5625in} --> ![image48.png](images/01-blocks-scripts-and-sprites/image48.png) <!-- {width=1.63056in height=0.96528in} -->
415-
![image49.png](images/01-blocks-scripts-and-sprites/image49.png) <!-- {width=1.63056in height=0.96528in} -->
416+
![image56.png](images/01-blocks-scripts-and-sprites/image56.png)
417+
418+
![image48.png](images/01-blocks-scripts-and-sprites/image48.png)
419+
420+
![image49.png](images/01-blocks-scripts-and-sprites/image49.png)
416421

417422
*Top: turning the part: the green arm. Bottom: turning the anchor, with
418423
the arm synchronous (left) and dangling (right).*
@@ -495,7 +500,7 @@ in an input slot of blocks that are expecting a number or text. You
495500
wouldn’t say {inline alt="image84.png"}`images/01-blocks-scripts-and-sprites/image84.png`, although (as you can see from the picture) Snap<em>!</em> lets you do it if you really want. Instead, you normally use predicates in
496501
special hexagonal input slots like this one:
497502

498-
{inline alt="image86.png" class="image-2x"}`./blocks/images/block_doIf.png`
503+
{img alt="image86.png" class="image-2x"}`./blocks/images/block_doIf.png`
499504

500505
The C-shaped `if` block runs its input script if (and only
501506
if) the expression in its hexagonal input reports true.
@@ -1243,7 +1248,8 @@ word or phrase, e.g., “enter” or “up arrow,” then the value of key
12431248
will be that word or phrase, *except for* the space character, which
12441249
is represented as itself in key.)
12451250

1246-
{inline alt="image356.png" class="image-4x"}`images/01-blocks-scripts-and-sprites/image356.png` <!-- style="width:2.25in;height:0.41944in" alt="Website Description automatically generated with medium confidence" -->
1251+
{inline alt="image356.png" class="image-4x"}`images/01-blocks-scripts-and-sprites/image356.png`
1252+
<!-- style="width:2.25in;height:0.41944in" alt="Website Description automatically generated with medium confidence" -->
12471253

12481254
The RGB(A) option accepts a single number, which
12491255
is a grayscale value 0-255; a two-number list, grayscale plus opacity

_support/plugins/img-role.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const imgRole = {
2121
url: data.body.trim(),
2222
alt,
2323
class: className || 'image-inline',
24-
width:,
24+
width,
2525
height,
2626
title,
2727
},
@@ -66,6 +66,7 @@ const blockImgRole = {
6666
width,
6767
height,
6868
title,
69+
align: 'center',
6970
},
7071
];
7172
},

_support/styles/snap-manual.scss

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,19 @@ h1, h2, h3, h4, h5, h6 {
7474
nav a[href*="/blocks/"] { font-family: ui-monospace, monospace; }
7575

7676
// Block (page) titles cannot have their own classes added to them directly.
77-
.title code,
78-
.menu-text code {
77+
html.light .title code,
78+
html.light .menu-text code {
7979
color: #000;
8080
background-color: unset;
8181
}
8282

83+
html.dark .title code,
84+
html.dark .menu-text code {
85+
color: #FFF;
86+
background-color: unset;
87+
}
88+
89+
8390
// TODO: make latex env
8491
.image-1-5x {
8592
&, img {
@@ -213,8 +220,8 @@ p code:not(.sourceCode) {
213220
// font-family: monospace;
214221
}
215222

216-
body.dark\:bg-stone-900 code,
217-
body.dark\:bg-stone-900 p code:not(.sourceCode) {
223+
html.dark code,
224+
html.dark p code:not(.sourceCode) {
218225
color: white;
219226
background-color: unset;
220227
}

0 commit comments

Comments
 (0)