1
0
Fork 0

feat: Flat import of markdown repo

This is a flat (without history) import of (some of) the content
from our markdown module.

We've imported this without history because the repo contains our
blog posts and showcases posts content prior to porting them to strapi.

Since this contains many images, it would balloon the size of this repo
to import the full history.

Instead, please refer to the history of the (archived) markdown repo
at: https://github.com/freesewing/markdown
This commit is contained in:
Joost De Cock 2021-08-25 16:09:31 +02:00
parent 1671a896b5
commit b34a2ee2ed
6132 changed files with 244167 additions and 0 deletions

View file

@ -0,0 +1,90 @@
---
title: 150|Structure of a part
---
Let's get rid of the example box first. Open `src/bib.js` and make sure it looks like this:
```js
export default function(part) {
let { Point, points, Path, paths } = part.shorthand();
// Design pattern here
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
return part;
}
```
This is an empty skeleton for a pattern part. Anytime you want to create a new part, this is a good starting point.
Let's quickly go over the different sections. Even if there's not much going on yet, it's always good to understand what's going on.
## The draft method
```js
export default function(part) {
// ...
return part;
}
```
This is the boilerplate of our `draftBib` method. It takes the part as an argument, and returns it.
<Note>
If you're new to JavaScript, and don't intuitively *get this*, stick with it. It will become second nature soon enough.
</Note>
## Using shorthand
```js
let {
Point,
points,
Path,
paths,
} = part.shorthand();
```
This is FreeSewing's **shorthand** method. It returns an object with a bunch of handy helpers and you use JavaScript's *object destructuring* to only get what you need.
The example above makes the following variables available:
- `Point`: The Point constructor
- `points`: A reference to the part's points
- `Path`: The Path constructor
- `paths`: A reference to the part's paths
<Note>
This will all become clear, but if you're curious, the API docs have all the details
on [the Part.shorthand() method](/reference/api/part/#shorthand)
</Note>
## Part boilerplate
```js
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
```
This is some more boilerplate that makes sure we respect the `complete`, `sa`, and `paperless` settings.
For now, you don't need to worry about this. Let's just start designing our bib.

View file

@ -0,0 +1,95 @@
---
title: Structure of a part
order: 150
---
Let's get rid of the example box first.
Open `src/bib.js` and make sure it looks like this:
```js
export default function(part) {
let { Point, points, Path, paths } = part.shorthand();
// Design pattern here
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
return part;
}
```
This is an empty skeleton for a pattern part. Anytime you want to create a new part,
this is a good starting point.
Let's quickly go over the different sections.
Even if there's not much going on yet, it's always good to understand what's going on.
## The draft method
```js
export default function(part) {
// ...
return part;
}
```
This is the boilerplate of our `draftBib` method. It takes the part as an argument, and returns it.
<Note>
If you're new to JavaScript, and don't intuitively *get this*, stick with it. It will become second nature soon enough.
</Note>
## Using shorthand
```js
let {
Point,
points,
Path,
paths,
} = part.shorthand();
```
This is FreeSewing's **shorthand** method. It returns an object with a bunch of handy helpers
and you use JavaScript's *object destructuring* to only get what you need.
The example above makes the following variables available:
- `Point`: The Point constructor
- `points`: A reference to the part's points
- `Path`: The Path constructor
- `paths`: A reference to the part's paths
<Note>
This will all become clear, but if you're curious, the API docs have all the details
on [the Part.shorthand() method](/reference/api/part/#shorthand)
</Note>
## Part boilerplate
```js
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
```
This is some more boilerplate that makes sure we respect the `complete`, `sa`, and `paperless` settings.
For now, you don't need to worry about this. Let's just start designing our bib.

View file

@ -0,0 +1,90 @@
---
title: 150|Structure of a part
---
Let's get rid of the example box first. Open `src/bib.js` and make sure it looks like this:
```js
export default function(part) {
let { Point, points, Path, paths } = part.shorthand();
// Design pattern here
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
return part;
}
```
This is an empty skeleton for a pattern part. Anytime you want to create a new part, this is a good starting point.
Let's quickly go over the different sections. Even if there's not much going on yet, it's always good to understand what's going on.
## The draft method
```js
export default function(part) {
// ...
return part;
}
```
This is the boilerplate of our `draftBib` method. It takes the part as an argument, and returns it.
<Note>
If you're new to JavaScript, and don't intuitively *get this*, stick with it. It will become second nature soon enough.
</Note>
## Using shorthand
```js
let {
Point,
points,
Path,
paths,
} = part.shorthand();
```
This is FreeSewing's **shorthand** method. It returns an object with a bunch of handy helpers and you use JavaScript's *object destructuring* to only get what you need.
The example above makes the following variables available:
- `Point`: The Point constructor
- `points`: A reference to the part's points
- `Path`: The Path constructor
- `paths`: A reference to the part's paths
<Note>
This will all become clear, but if you're curious, the API docs have all the details
on [the Part.shorthand() method](/reference/api/part/#shorthand)
</Note>
## Part boilerplate
```js
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
```
This is some more boilerplate that makes sure we respect the `complete`, `sa`, and `paperless` settings.
For now, you don't need to worry about this. Let's just start designing our bib.

View file

@ -0,0 +1,90 @@
---
title: 150|Structure of a part
---
Débarassons-nous tout d'abord de la boîte exemple. Ouvrez le fichier `src/bib.js` et assurez-vous qu'il ressemble à ceci :
```js
export default function(part) {
let { Point, points, Path, paths } = part.shorthand();
// Design pattern here
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
return part;
}
```
C'est un squelette vide pour une partie de patron. A chaque fois que vous voudrez créer une nouvelle partie, ces quelques lignes constitueront un bon point de départ.
Parcourons rapidement les différentes sections. Même s'il ne se passe pas encore grand chose, il est toujours bénéfique de comprendre ce qu'il se passe.
## La méthode d'ébauche (draft)
```js
export default function(part) {
// ...
return part;
}
```
Ceci est un standard de notre méthode `draftBib`. Elle prend comme argument la partie, et la retourne.
<Note>
If you're new to JavaScript, and don't intuitively *get this*, stick with it. Cela va bientôt devenir une seconde nature.
</Note>
## Using shorthand
```js
let {
Point,
points,
Path,
paths,
} = part.shorthand();
```
This is FreeSewing's **shorthand** method. It returns an object with a bunch of handy helpers and you use JavaScript's *object destructuring* to only get what you need.
L'exemple ci-dessus rend les variables suivantes disponibles :
- `Point` : Le constructeur de point (Point)
- `points`: Une référence aux points de la partie
- `Path` : La constructeur de chemin (Path)
- `paths` : Une référence aux chemins de la partie
<Note>
This will all become clear, but if you're curious, the API docs have all the details
on [the Part.shorthand() method](/reference/api/part/#shorthand)
</Note>
## Partie standard
```js
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
```
Voici quelques standards supplémentaires pour nous assurer que nous respectons les paramètres `complete`, `sa`, et `paperless`.
Pour le moment, vous n'avez pas à vous inquiéter à propos de cela. Focalisons-nous sur le démarrage du bavoir.

View file

@ -0,0 +1,90 @@
---
title: 150|Structure of a part
---
Laten we eerst het voorbeeldvak weghalen. Open `scr/bib.js` en controleer of het er als volgt uitziet:
```js
export default function(part) {
let { Point, points, Path, paths } = part.shorthand();
// Ontwerp je patroon hier
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
return part;
}
```
Dit is een leeg 'geraamte' voor een patroondeel. Telkens wanneer je een nieuw onderdeel wil aanmaken, is dit een goed vertrekpunt.
Laten we snel de verschillende secties overlopen. Er is nu nog niet veel te zien, maar het is altijd goed om te begrijpen hoe het in elkaar zit.
## De tekenmethode
```js
export default function(part) {
// ...
return part;
}
```
Dit is de boilerplate van de `draftBib`-methode. Het gebruikt het onderdeel als argument en geeft het terug.
<Note>
If you're new to JavaScript, and don't intuitively *get this*, stick with it. Het wordt al snel een tweede natuur.
</Note>
## Using shorthand
```js
let {
Point,
points,
Path,
paths,
} = part.shorthand();
```
This is FreeSewing's **shorthand** method. It returns an object with a bunch of handy helpers and you use JavaScript's *object destructuring* to only get what you need.
Het voorbeeld hierboven maakt de volgende variabelen beschikbaar:
- `Point`: de Point constructor, die punten creëert
- `points`: een verwijzing naar de punten van het onderdeel
- `Path`: de Path constructor, die paden creëert
- `paths`: een verwijzing naar de paden van het onderdeel
<Note>
This will all become clear, but if you're curious, the API docs have all the details
on [the Part.shorthand() method](/reference/api/part/#shorthand)
</Note>
## Boilerplate voor patroondelen
```js
// Complete?
if (complete) {
if (sa) {
}
// Paperless?
if (paperless) {
}
}
```
Dit is nog wat meer boilerplatecode die ervoor zorgt dat we de instellingen `complete`, `sa` en `paperless` respecteren.
Je hoeft hier voorlopig niet te diep over na te denken. We beginnen gewoon met ons slabbetje te ontwerpen.