fix(markdown): Move caption to children
This commit is contained in:
parent
76d13e3fa3
commit
7bebd8cf07
96 changed files with 304 additions and 213 deletions
|
@ -47,7 +47,10 @@ While we're at it, let's add a point where the closure's snap should go:
|
|||
points.snapLeft = points.top.shiftFractionTowards(points.edgeTop, 0.5)
|
||||
```
|
||||
|
||||
<Example pattern="tutorial" part="step8" caption="The right part looks a bit wonky now, but we'll get to that" />
|
||||
<Example pattern="tutorial" part="step8">
|
||||
The right part looks a bit wonky now, but we'll get to that
|
||||
</Example>
|
||||
|
||||
|
||||
Now let's mirror this on the other side, and replace our `neck` and `rect` paths with a new path.
|
||||
|
||||
|
|
|
@ -64,5 +64,7 @@ paths.neck = new Path()
|
|||
.close()
|
||||
```
|
||||
|
||||
<Example pattern="tutorial" part="step4" caption="And now you have a complete neck opening" />
|
||||
<Example pattern="tutorial" part="step4">
|
||||
And now you have a complete neck opening
|
||||
</Example>
|
||||
|
||||
|
|
|
@ -172,7 +172,10 @@ macro("scalebox", { at: points.scalebox })
|
|||
|
||||
And with that, our pattern is now *complete*:
|
||||
|
||||
<Example pattern="tutorial" part="step11" caption="We used attributes to add color, dashes, text on a path and even opacity" />
|
||||
<Example pattern="tutorial" part="step11">
|
||||
We used attributes to add color, dashes, text on a path and even opacity
|
||||
</Example>
|
||||
|
||||
|
||||
We're not done yet though. There's one more thing the user can ask for: a *paperless* pattern.
|
||||
|
||||
|
|
|
@ -59,7 +59,9 @@ macro("round", {
|
|||
|
||||
<Note> You can find more information on the `round` macro in [the macros docs](/reference/api/macros/round/).</Note>
|
||||
|
||||
<Example pattern="tutorial" part="step7" caption="Pretty good, but how are we going to fit it over the baby's head?" />
|
||||
<Example pattern="tutorial" part="step7">
|
||||
Pretty good, but how are we going to fit it over the baby's head?
|
||||
</Example>
|
||||
|
||||
Like our neck opening, we've only drawn half since we can simply copy the points to the other side.
|
||||
|
||||
|
|
|
@ -63,5 +63,8 @@ and the sides are equidistant from the neck neck opening.
|
|||
|
||||
You didn't have to do that. But it looks nicely balanced this way:
|
||||
|
||||
<Example pattern="tutorial" part="step5" caption="Note how the neck opening is the same distance from the left, right, and top edge" />
|
||||
<Example pattern="tutorial" part="step5">
|
||||
Note how the neck opening is the same distance from the left, right, and top edge
|
||||
</Example>
|
||||
|
||||
|
||||
|
|
|
@ -113,7 +113,10 @@ macro("round", {
|
|||
|
||||
With that out of the way, our bib now looks like this:
|
||||
|
||||
<Example pattern="tutorial" part="step9" caption="That is looking a lot like a bib" />
|
||||
<Example pattern="tutorial" part="step9">
|
||||
That is looking a lot like a bib
|
||||
</Example>
|
||||
|
||||
|
||||
<Note>
|
||||
|
||||
|
|
|
@ -83,7 +83,9 @@ if (paperless) {
|
|||
|
||||
There's a lot going on, but it's mostly repetition. To see what that did to your pattern, you have to enable *paperless mode* in your developing environment; you can find the option under *Pattern options* on the right. Let's look at the end result, and discuss:
|
||||
|
||||
<Example pattern="tutorial" part="bib" caption="Your paperless bib" settings={{paperless: true}} />
|
||||
<Example pattern="tutorial" part="bib" setting={{paperless: true }}>
|
||||
Your paperless bib
|
||||
</Example>
|
||||
|
||||
We used the `hd` macro to add two horizontal dimensions:
|
||||
|
||||
|
|
|
@ -72,7 +72,9 @@ and keep the rest of the path as it was.
|
|||
|
||||
The shape our bib is now completed:
|
||||
|
||||
<Example pattern="tutorial" part="step10" caption="That is looking a lot like a bib" />
|
||||
<Example pattern="tutorial" part="step10">
|
||||
That is looking a lot like a bib
|
||||
</Example>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -44,5 +44,7 @@ paths.rect = new Path()
|
|||
|
||||
All of a sudden, things are starting to look like a bib:
|
||||
|
||||
<Example pattern="tutorial" part="step6" caption="Pretty good, but how are we going to fit it over the baby's head?" />
|
||||
<Example pattern="tutorial" part="step6">
|
||||
Pretty good, but how are we going to fit it over the baby's head?
|
||||
</Example>
|
||||
|
||||
|
|
|
@ -70,6 +70,9 @@ In our case, we have a part named `bib` so we're using `draftBib()` as the metho
|
|||
Congratulations, your pattern now has a `bib` part, rather than a `box` part.
|
||||
It still looks the same though:
|
||||
|
||||
<Example pattern="tutorial" part="step1" caption="Our bib part, which is the renamed box part" />
|
||||
<Example pattern="tutorial" part="step1">
|
||||
Our bib part, which is the renamed box part
|
||||
</Example>
|
||||
|
||||
|
||||
This `bib` part is where we'll do some real work. But first, we have some more configuration to do.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue