1
0
Fork 0

fix: Merge in develop changes without re-introduced issues

There were some trouble the snuck in when mergin an earlier PR
This commit is contained in:
joostdecock 2023-07-21 18:19:07 +02:00
parent c2882cce22
commit d2b4d2d3b3
36 changed files with 2677 additions and 2470 deletions

View file

@ -213,7 +213,7 @@ backend:
dev:
'chai': *chai
'chai-http': '4.4.0'
'esbuild': '0.18.14'
'esbuild': '0.18.15'
'mocha': *mocha
'mocha-steps': '1.3.0'
'nodemon': '3.0.1'
@ -225,9 +225,9 @@ dev:
'@mdx-js/mdx': *mdx
'@mdx-js/react': *mdx
'@mdx-js/runtime': &mdxRuntime '2.0.0-next.9'
'@next/bundle-analyzer': &next '13.4.10'
'@next/bundle-analyzer': &next '13.4.11'
'@tailwindcss/typography': &tailwindTypography '0.5.9'
'algoliasearch': '4.19.0'
'algoliasearch': '4.19.1'
'daisyui': &daisyui '3.2.1'
'lodash.get': *_get
'lodash.orderby': &_orderby '4.6.0'
@ -237,8 +237,8 @@ dev:
'react-copy-to-clipboard': &reactCopyToClipboard '5.1.0'
'react-dom': *react
'react-hotkeys-hook': &reactHotkeysHook '4.4.1'
'react-instantsearch-dom': &reactInstantsearchDom '6.40.1'
'react-instantsearch-hooks-web': '6.47.0'
'react-instantsearch-dom': &reactInstantsearchDom '6.40.3'
'react-instantsearch-hooks-web': '6.47.1'
'react-markdown': &reactMarkdown '8.0.7'
'react-swipeable': &reactSwipeable '7.0.1'
'react-timeago': &reactTimeago '7.1.0'
@ -263,7 +263,7 @@ dev:
email:
_:
'@maizzle/framework': '4.4.6'
'@maizzle/framework': '4.4.7'
'tailwindcss-box-shadow': '2.0.1'
'tailwindcss-email-variants': '2.0.2'
'tailwindcss-mso': '1.3.0'
@ -276,7 +276,7 @@ lab:
'@mdx-js/react': *mdx
'@mdx-js/runtime': *mdxRuntime
'@tailwindcss/typography': *tailwindTypography
'algoliasearch': &algoliasearch '4.19.0'
'algoliasearch': &algoliasearch '4.19.1'
'd3-dispatch': '3.0.1'
'd3-drag': '3.0.0'
'd3-selection': '3.0.0'
@ -367,7 +367,7 @@ sanity:
shared:
_:
'@headlessui/react': *headlessUiReact
'@next/mdx': '13.4.10'
'@next/mdx': '13.4.11'
'@resvg/resvg-js': '2.4.1'
'@tailwindcss/typography': *tailwindTypography
'Buffer': '0.0.0'

18
markdown/org/*/de.md Normal file
View file

@ -0,0 +1,18 @@
---
title: Dokumentation
---
Welcome to the FreeSewing documentation for makers. Here you will find all the [documentation for our various designs](/docs/designs) as well as [how to take measurements](/docs/measurements/), documentation for [various sewing terms and techniques](/docs/sewing/).
If you're new to FreeSewing, please take a moment to read the [getting started documentation](/docs/guide/).
<ReadMore />
<Tip>
If you're looking for
developer/contributor docs, please refer to
[FreeSewing.dev](https://freesewing.dev/) instead.
</Tip>

18
markdown/org/*/es.md Normal file
View file

@ -0,0 +1,18 @@
---
title: Documentación
---
Welcome to the FreeSewing documentation for makers. Here you will find all the [documentation for our various designs](/docs/designs) as well as [how to take measurements](/docs/measurements/), documentation for [various sewing terms and techniques](/docs/sewing/).
If you're new to FreeSewing, please take a moment to read the [getting started documentation](/docs/guide/).
<ReadMore />
<Tip>
If you're looking for
developer/contributor docs, please refer to
[FreeSewing.dev](https://freesewing.dev/) instead.
</Tip>

18
markdown/org/*/fr.md Normal file
View file

@ -0,0 +1,18 @@
---
title: Documentation
---
Bienvenue dans la documentation de FreeSewing pour les créateurs. Vous trouverez ici toute la [documentation pour nos différents modèles](/docs/designs) comme la façon [de prendre les mesures](/docs/measurements/), la documentation [pour les différents termes et techniques de couture](/docs/sewing/).
Si vous ne connaissez pas encore FreeSewing, prenez le temps de lire la [ documentation de démarrage](/docs/guide/).
<ReadMore />
<Tip>
Si vous cherchez
la documentation pour les développeurs/contributeurs, veuillez plutôt vous référer à
[FreeSewing.dev](https://freesewing.dev/).
</Tip>

18
markdown/org/*/nl.md Normal file
View file

@ -0,0 +1,18 @@
---
title: Documentatie
---
Welkom bij de FreeSewing documentatie voor makers. Hier vind je alle [documentatie voor onze verschillende ontwerpen](/docs/designs) evenals [hoe je maten opneemt](/docs/measurements/), documentatie voor [verschillende naaitermen en technieken](/docs/sewing/).
Als je nog niet eerder met FreeSewing hebt gewerkt, neem dan even de tijd om de [Aan de slag documentatie](/docs/guide/)te lezen.
<ReadMore />
<Tip>
Als je op zoek bent naar
docs voor ontwikkelaars/medewerkers, kijk dan op
[FreeSewing.dev](https://freesewing.dev/).
</Tip>

18
markdown/org/*/uk.md Normal file
View file

@ -0,0 +1,18 @@
---
title: Документація
---
Ласкаво просимо до документації FreeSewing для розробників. Тут ви знайдете всю [документацію для наших різноманітних дизайнів](/docs/designs) як , так і [, як знімати мірки](/docs/measurements/), документацію для [різних термінів і технік шиття](/docs/sewing/).
Якщо ви новачок у FreeSewing, будь ласка, знайдіть хвилинку, щоб прочитати документацію про початок роботи [та](/docs/guide/).
<ReadMore />
<Tip>
Якщо ви шукаєте документи для розробників/контрибуторів
, замість цього зверніться до
[FreeSewing.dev](https://freesewing.dev/).
</Tip>

View file

@ -15,7 +15,7 @@ title: "Bella body block: Sewing Instructions"
### Крок 1: Створення макета
- Закрийте передню нагрудну і талію виточки.
- Закрийте передню виточку на грудях та виточки на талії.
- Закрийте задні виточки.
- Пришийте перед до спинки на плечах _лицьовими сторонами разом_.
- Пришийте перед до спинки по бокових швах _гарними сторонами разом_.

View file

@ -86,14 +86,14 @@ Nous disposons maintenant de tous les points de départ et d'arrivée pour dessi
For each of the anchor points (the ones marked in orange, not points 1 and 2) there is an option to control the spread upwards, and downwards:
- [Répartition de tête de manche vers le bas Q1](/docs/patterns/breanna/options/sleevecapq1spread1) : contrôle la répartition vers le bas dans le premier quadrant
- [Répartition de tête de manche vers le haut Q1](/docs/patterns/breanna/options/sleevecapq1spread2) : contrôle la répartition vers le haut dans le premier quadrant
- [Répartition de tête de manche vers le bas Q2](/docs/patterns/breanna/options/sleevecapq2spread1) : contrôle la répartition vers le bas dans le deuxième quadrant
- [Répartition de tête de manche vers le haut Q2](/docs/patterns/breanna/options/sleevecapq2spread2) : contrôle la répartition vers le haut dans le deuxième quadrant
- [Répartition de tête de manche vers le haut Q3](/docs/patterns/breanna/options/sleevecapq3spread1) : contrôle la répartition vers le haut dans le troisième quadrant
- [Répartition de tête de manche vers le bas Q3](/docs/patterns/breanna/options/sleevecapq3spread2) : contrôle la répartition vers le bas dans le troisième quadrant
- [Répartition de tête de manche vers le haut Q4](/docs/patterns/breanna/options/sleevecapq4spread1) : contrôle la répartition vers le haut dans le quatrième quadrant
- [Répartition de tête de manche vers le bas Q4](/docs/patterns/breanna/options/sleevecapq4spread2) : contrôle la répartition vers le bas dans le quatrième quadrant
- [Répartition de tête de manche vers le bas Q1](/docs/patterns/breanna/options/sleevecapq1spread1) : contrôle la répartition vers le bas dans le premier quadrant<0><0>
- [Répartition de tête de manche vers le haut Q1](/docs/patterns/breanna/options/sleevecapq1spread2) : contrôle la répartition vers le haut dans le premier quadrant<0><0>
- [Répartition de tête de manche vers le bas Q2](/docs/patterns/breanna/options/sleevecapq2spread1) : contrôle la répartition vers le bas dans le deuxième quadrant<0><0>
- [Répartition de tête de manche vers le haut Q2](/docs/patterns/breanna/options/sleevecapq2spread2) : contrôle la répartition vers le haut dans le deuxième quadrant<0><0>
- [Répartition de tête de manche vers le haut Q3](/docs/patterns/breanna/options/sleevecapq3spread1) : contrôle la répartition vers le haut dans le troisième quadrant<0><0>
- [Répartition de tête de manche vers le bas Q3](/docs/patterns/breanna/options/sleevecapq3spread2) : contrôle la répartition vers le bas dans le troisième quadrant<0><0>
- [Répartition de tête de manche vers le haut Q4](/docs/patterns/breanna/options/sleevecapq4spread1) : contrôle la répartition vers le haut dans le quatrième quadrant<0><0>
- [Répartition de tête de manche vers le bas Q4](/docs/patterns/breanna/options/sleevecapq4spread2) : contrôle la répartition vers le bas dans le quatrième quadrant<0><0>
<Note>

View file

@ -86,14 +86,14 @@ Nous disposons maintenant de tous les points de départ et d'arrivée pour dessi
For each of the anchor points (the ones marked in orange, not points 1 and 2) there is an option to control the spread upwards, and downwards:
- [Répartition de tête de manche vers le bas Q1](/docs/patterns/brian/options/sleevecapq1spread1) : contrôle la répartition vers le bas dans le premier quadrant
- [Répartition de tête de manche vers le haut Q1](/docs/patterns/brian/options/sleevecapq1spread2) : contrôle la répartition vers le haut dans le premier quadrant
- [Répartition de tête de manche vers le bas Q2](/docs/patterns/brian/options/sleevecapq2spread1) : contrôle la répartition vers le bas dans le deuxième quadrant
- [Répartition de tête de manche vers le haut Q2](/docs/patterns/brian/options/sleevecapq2spread2) : contrôle la répartition vers le haut dans le deuxième quadrant
- [Répartition de tête de manche vers le haut Q3](/docs/patterns/brian/options/sleevecapq3spread1) : contrôle la répartition vers le haut dans le troisième quadrant
- [Répartition de tête de manche vers le bas Q3](/docs/patterns/brian/options/sleevecapq3spread2) : contrôle la répartition vers le bas dans le troisième quadrant
- [Répartition de tête de manche vers le haut Q4](/docs/patterns/brian/options/sleevecapq4spread1) : contrôle la répartition vers le haut dans le quatrième quadrant
- [Répartition de tête de manche vers le bas Q4](/docs/patterns/brian/options/sleevecapq4spread2) : contrôle la répartition vers le bas dans le quatrième quadrant
- [Répartition de tête de manche vers le bas Q1](/docs/patterns/brian/options/sleevecapq1spread1) : contrôle la répartition vers le bas dans le premier quadrant<0><0>
- [Répartition de tête de manche vers le haut Q1](/docs/patterns/brian/options/sleevecapq1spread2) : contrôle la répartition vers le haut dans le premier quadrant<0><0>
- [Répartition de tête de manche vers le bas Q2](/docs/patterns/brian/options/sleevecapq2spread1) : contrôle la répartition vers le bas dans le deuxième quadrant<0><0>
- [Répartition de tête de manche vers le haut Q2](/docs/patterns/brian/options/sleevecapq2spread2) : contrôle la répartition vers le haut dans le deuxième quadrant<0><0>
- [Répartition de tête de manche vers le haut Q3](/docs/patterns/brian/options/sleevecapq3spread1) : contrôle la répartition vers le haut dans le troisième quadrant<0><0>
- [Répartition de tête de manche vers le bas Q3](/docs/patterns/brian/options/sleevecapq3spread2) : contrôle la répartition vers le bas dans le troisième quadrant<0><0>
- [Répartition de tête de manche vers le haut Q4](/docs/patterns/brian/options/sleevecapq4spread1) : contrôle la répartition vers le haut dans le quatrième quadrant<0><0>
- [Répartition de tête de manche vers le bas Q4](/docs/patterns/brian/options/sleevecapq4spread2) : contrôle la répartition vers le bas dans le quatrième quadrant<0><0>
<Note>

View file

@ -54,7 +54,7 @@ title: "Carlton coat: Sewing Instructions"
- Видаліть припуски на шви (якщо вони є) верхньої частини.
- Верхня частина - це тепер **частина заднього плеча** .
#### Різання
#### Крій
- Виріжте всі деталі з відповідних тканин/фактур. ([див. Карлтон Каттінг](/docs/patterns/carlton/cutting/))

View file

@ -10,7 +10,7 @@ title: "Charlie chinos: Sewing Instructions"
Тепер зашийте виточку, використовуючи невелику довжину стібка, і прошийте до кінця виточки, навіть на кілька стібків від тканини.
![Закриті дротики](step01.svg)
![Закриті виточки](step01.svg)
<Note>

View file

@ -30,7 +30,7 @@ title: "Penelope pencil skirt: Sewing Instructions"
Вентиляційний отвір ззаду є опціональним у моделі Penelope. Це дозволить вам ходити набагато легше , ніж якщо ви зробите спідницю без неї. Вентиляційний отвір також впливає на те, де буде розташована застібка-блискавка . Якщо ви вирішили не мати вентиляційного отвору, застібка-блискавка за замовчуванням розташовується в боковому шві , а спинка буде розрізана на згині. З вентиляційним отвором на задній частині повинен бути шов, і блискавка буде розташована на цьому шві.
### Дартс
### Виточки
Виточки використовуються для компенсації різниці між обхватами талії і сидіння. Залежно від цієї різниці, може бути дві виточки, одна виточка або взагалі без виточок. Більша кількість виточок забезпечує потенційно кращу посадку. Але якщо кількість тканини, яку буде вбирати виточка, стає занадто малою, кількість виточок зменшується. Інакше було б дуже складно зашити виточки, і вони, ймовірно, стали б досить непривабливими. Частина різниці буде врахована в боковому шві, а якщо різниця невелика, то виточки на передній і задній частинах не будуть включені.
@ -46,7 +46,7 @@ title: "Penelope pencil skirt: Sewing Instructions"
</Warning>
### Крок 1: Дартс
### Крок 1: Виточки
- Зшийте всі виточки.
- Притисніть виточки до спинки.

View file

@ -1,12 +1,12 @@
---
layout: onecol
title: Різання
title: Крій
---
![Я вирізаю футболки](cutting.jpg)
Розкрій - це процес вирізання різних деталей викрійки з тканини.
Крій — це процес вирізання з тканини різних деталей викрійки.
Різання зазвичай виконується ножицями або роторним різаком.
Крій зазвичай виконується ножицями або роторним різаком.
> Крій **одягу**, те, як він виглядає, відноситься до того, як він був викроєний. Наприклад, джинси з високою посадкою і топ з глибоким вирізом.
> **Крій одягу**, себто його вигляд, описує як він був вирізаний. Наприклад, джинси вузького крою та топ з глибоким вирізом.

View file

@ -1,17 +1,17 @@
---
title: Дартс
title: Виточки
---
![Нагрудні виточки на блузці](dart.jpg)
![Блузка з виточками на грудях](dart.jpg)
Виточки мають вирішальне значення в дизайні викрійок, оскільки вони перетворюють плаский, двовимірний шматок тканини на тривимірну форму.
Виточки є критичними для дизайну викрійок, оскільки вони допомагають надати двовимірному шмату тканини об'ємної, тривимірної форми.
Витачка створюється двома лініями, які утворюють клин і перетинаються в точці виточки. Коли лінії зшиваються разом, вони створюють постійну складку, не даючи тканині лежати рівно, створюючи таким чином тривимірну форму.
Виточка створюється двома лініями, які утворюють клиноподібну форму, та зустрічаються у точці, утворюючи вершину. Коли лінії зшиваються разом, вони створюють постійну складку та не дають тканині лежати рівно, створюючи таким чином об'ємну форму.
Виточки використовуються там, де тканина повинна покривати вигини в декількох напрямках. Вам не потрібна виточка для ніг, тому що тканина може повторювати вигин ваших ніг і обертатися навколо них. Ваша сідниця вигинається не тільки горизонтально, але й вертикально. Тож бомжі та цицьки - це, як правило, місця, де ви знайдете дротики.
Виточки використовуються там, де тканина повинна покривати криві лінії тіла декількох напрямків. Вам не потрібна виточка на ногах, тому що тканина може створити бажану форму обертаючись навколо них. Ваша сідниця вигинається не лишень горизонтально, але й вертикально. Тому сідниці, груди, спина та талія — це, як правило, місця, де зазвичай розташовуються виточки.
> Вікіпедія має трохи більше інформації на цю тему: [Виточка (шиття) у Вікіпедії](http://en.wikipedia.org/wiki/Dart_\(sewing\))
> Вікіпедія має трохи більше інформації на цю тему: [Dart (sewing) на Вікіпедії](http://en.wikipedia.org/wiki/Dart_\(sewing\)) (стаття англійською)
>
> Витачкам присвячені цілі розділи в книгах з шиття та конструювання викрійок. Знати, як і де їх використовувати, не так просто. Але для цього сайту достатньо знати, що це таке.
> Виточкам присвячені цілі розділи в книгах з шиття та конструювання викрійок. Знати, як і де їх використовувати — непроста задача. Але для користування цим вебсайтом Вам потрібно знати лишень що це таке.
> Фото: [Таша](http://bygumbygolly.com/2013/01/finished-1940s-simplicity-diamonds/)
> Фото: [Tasha](http://bygumbygolly.com/2013/01/finished-1940s-simplicity-diamonds/) (стаття англійською)

View file

@ -2,17 +2,15 @@
title: Документація
---
Ласкаво просимо до документації FreeSewing для розробників. Тут ви знайдете всю [документацію для наших різноманітних дизайнів](/docs/designs) як , так і [, як знімати мірки](/docs/measurements/), документацію для [різних термінів і технік шиття](/docs/sewing/).
Ласкаво просимо до кравецької документації FreeSewing. Тут можна знайти всю документацію, що стосується [наших дизайнів](/docs/designs), а також [зняття мірок](/docs/measurements/) й [загального опису кравецького жаргону та технік](/docs/sewing/).
Якщо ви новачок у FreeSewing, будь ласка, знайдіть хвилинку, щоб прочитати документацію про початок роботи [та](/docs/guide/).
Якщо Ви тут новачок, ми рекомендуємо до прочитання наш [посібник початківця](/docs/guide/).
<ReadMore />
<Tip>
Якщо ви шукаєте документи для розробників/контрибуторів
, замість цього зверніться до
[FreeSewing.dev](https://freesewing.dev/).
Якщо Ви шукаєте документацію для розробників та/чи заохочених учасників, Вам сюди: [FreeSewing.dev] (https://freesewing.dev/).
</Tip>

View file

@ -0,0 +1,11 @@
---
maker: "Юст де Кок"
caption: "Сорочка Simon від Joost"
date: "2017-03-28"
image: "https://cdn.sanity.io/images/hl5bw8cj/site-content/126118086acff3eb0102a5defaa8ef47977a23c0-2048x1365.jpg"
intro: "FIXME_no_intro"
title: "Joost does Simon"
designs:
- "simon"
---

View file

@ -46,7 +46,7 @@ export const shouldSkipBuild = (site, checkFolders = '../shared .') => {
}
// Do not build dependabot PRs
if (author.toLowerCase().includes('dependabot')) {
if (branch.toLowerCase().includes('dependabot')) {
console.log('🛑 Not building: Dependabot PR')
process.exit(0)
}

View file

@ -50,7 +50,7 @@
"devDependencies": {
"chai": "4.3.7",
"chai-http": "4.4.0",
"esbuild": "0.18.14",
"esbuild": "0.18.15",
"mocha": "10.2.0",
"mocha-steps": "1.3.0",
"nodemon": "3.0.1",

View file

@ -34,20 +34,20 @@
"@mdx-js/mdx": "2.3.0",
"@mdx-js/react": "2.3.0",
"@mdx-js/runtime": "2.0.0-next.9",
"@next/bundle-analyzer": "13.4.10",
"@next/bundle-analyzer": "13.4.11",
"@tailwindcss/typography": "0.5.9",
"algoliasearch": "4.19.0",
"algoliasearch": "4.19.1",
"daisyui": "3.2.1",
"lodash.get": "4.4.2",
"lodash.orderby": "4.6.0",
"lodash.set": "4.3.2",
"next": "13.4.10",
"next": "13.4.11",
"react": "18.2.0",
"react-copy-to-clipboard": "5.1.0",
"react-dom": "18.2.0",
"react-hotkeys-hook": "4.4.1",
"react-instantsearch-dom": "6.40.1",
"react-instantsearch-hooks-web": "6.47.0",
"react-instantsearch-dom": "6.40.3",
"react-instantsearch-hooks-web": "6.47.1",
"react-markdown": "8.0.7",
"react-swipeable": "7.0.1",
"react-timeago": "7.1.0",
@ -62,7 +62,7 @@
"devDependencies": {
"@playwright/test": "^1.32.3",
"autoprefixer": "10.4.14",
"eslint-config-next": "13.4.10",
"eslint-config-next": "13.4.11",
"js-yaml": "4.1.0",
"postcss": "8.4.26",
"playwright": "^1.32.3",

View file

@ -1,69 +0,0 @@
// Hooks
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
// Components
import Head from 'next/head'
import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
//import { TocWrapper } from 'shared/components/wrappers/toc.mjs'
import { PageWrapper, ns } from 'shared/components/wrappers/page.mjs'
// MDX content for each language
import MDX, { frontmatter } from 'markdown/{{{ slug }}}/en.md'
/*
* This page is auto-generated by the prebuild script.
* Any changes you make will be overwritten on the next (pre)build.
*
* See the page-templates folder for more info.
*/
const DocsPage = ({ page }) => {
return (
<PageWrapper {...page} title={frontmatter.title}>
<Head>
<meta property="og:title" content={frontmatter.title} key="title" />
<meta property="og:type" content="article" key="type" />
<meta property="og:description" content={`{{{introEn}}}`} key="type" />
<meta property="og:article:author" content="Joost De Cock" key="author" />
<meta
property="og:image"
content={`https://canary.backend.freesewing.org/og-img/${page.locale}/dev/{{{ slug }}}}`}
key="image"
/>
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:url" content={`https://freesewing.dev/{{{ slug }}}`} key="url" />
<meta property="og:locale" content="en" key="locale" />
<meta property="og:site_name" content="freesewing.dev" key="site" />
<title>{frontmatter.title} - FreeSewing.dev</title>
</Head>
<div className="flex flex-row-reverse flex-wrap xl:flex-nowrap justify-end">
{frontmatter.toc && (
<div className="mb-8 w-full xl:w-80 2xl:w-96 xl:pl-8 2xl:pl-16">
{/* FIXME: Implement toc plugin that adds it to frontmatter */}
{/* <TocWrapper toc={frontmatter.toc} /> */}
</div>
)}
<MdxWrapper {...{ MDX, frontmatter }} />
</div>
</PageWrapper>
)
}
export default DocsPage
/*
* getStaticProps() is used to fetch data at build-time.
* To learn more, see: https://nextjs.org/docs/basic-features/data-fetching
*/
export async function getStaticProps({ locale }) {
return {
props: {
...(await serverSideTranslations(locale, ['docs', ...ns])),
locale,
page: {
locale,
path: {{{ slugArray }}},
},
},
}
}

View file

@ -19,7 +19,7 @@
},
"peerDependencies": {},
"dependencies": {
"@maizzle/framework": "4.4.6",
"@maizzle/framework": "4.4.7",
"tailwindcss-box-shadow": "2.0.1",
"tailwindcss-email-variants": "2.0.2",
"tailwindcss-mso": "1.3.0"

View file

@ -36,7 +36,7 @@
"@mdx-js/react": "2.3.0",
"@mdx-js/runtime": "2.0.0-next.9",
"@tailwindcss/typography": "0.5.9",
"algoliasearch": "4.19.0",
"algoliasearch": "4.19.1",
"d3-dispatch": "3.0.1",
"d3-drag": "3.0.0",
"d3-selection": "3.0.0",
@ -45,13 +45,13 @@
"lodash.get": "4.4.2",
"lodash.orderby": "4.6.0",
"lodash.set": "4.3.2",
"next": "13.4.10",
"next": "13.4.11",
"next-i18next": "14.0.0",
"react": "18.2.0",
"react-copy-to-clipboard": "5.1.0",
"react-hotkeys-hook": "4.4.1",
"react-i18next": "13.0.2",
"react-instantsearch-dom": "6.40.1",
"react-instantsearch-dom": "6.40.3",
"react-markdown": "8.0.7",
"react-swipeable": "7.0.1",
"react-timeago": "7.1.0",
@ -67,7 +67,7 @@
"devDependencies": {
"@playwright/test": "^1.32.3",
"autoprefixer": "10.4.14",
"eslint-config-next": "13.4.10",
"eslint-config-next": "13.4.11",
"js-yaml": "4.1.0",
"postcss": "8.4.26",
"playwright": "^1.32.3",

View file

@ -17,8 +17,10 @@ import { PrevNext } from 'shared/components/prev-next.mjs'
export const ns = [navNs, 'docs']
/** checks for a slug that isn't a post, to prevent a prev or next button to it */
const isEndSlug = (slug) => slug.split('/').length === 1
/** layout for a page that displays a blog, showcase or newsletter */
export const PostLayout = ({ children = [], slug, frontmatter, locale }) => (
<>
<FrontmatterHead {...{ frontmatter, slug, locale }} />

View file

@ -1,6 +1,11 @@
import { localePath } from 'shared/utils.mjs'
import { siteConfig as config } from 'site/site.config.mjs'
/**
* get pre-generated paths for each language for post slug pages
* @param {Object} posts an object holding all the posts
* @return {String[]} paths for the most recent posts in all locales
*/
export const getPostSlugPaths = (posts) => {
const paths = []
@ -15,6 +20,12 @@ export const getPostSlugPaths = (posts) => {
return paths
}
/**
* get pre-generated paths for each language for post index pages
* @param {Object} posts an object keyed by locale of posts sorted by date published
* @param {String} type post type: blog, showcase, or newsletter
* @return {String[]} paths for the first two pages of posts in all locales
*/
export const getPostIndexPaths = (posts, type) => {
const paths = []
for (const language in posts) {
@ -25,6 +36,15 @@ export const getPostIndexPaths = (posts, type) => {
return paths
}
/**
* get static props for a post index page
* @param {Object} pagenr the current page number in the pagination
* @param {Object} posts on object keyed by slug holding the posts title
* @return {Object} meta on object keyed by slug holding the posts metadata
* @return {Object[]} props.posts the posts to link to on the page
* @return {Number} props.current the current page number
* @return {Number} props.total the total number of pages
*/
export const getPostIndexProps = (pagenr, posts, meta) => {
const pageNum = parseInt(pagenr)
const numLocPages = Math.ceil(Object.keys(posts).length / config.posts.perPage)

View file

@ -37,7 +37,7 @@
"@mdx-js/runtime": "2.0.0-next.9",
"@sanity/client": "^6.1.2",
"@tailwindcss/typography": "0.5.9",
"algoliasearch": "4.19.0",
"algoliasearch": "4.19.1",
"react-copy-to-clipboard": "5.1.0",
"daisyui": "3.2.1",
"echarts": "5.4.2",
@ -48,10 +48,10 @@
"lodash.orderby": "4.6.0",
"lodash.set": "4.3.2",
"luxon": "3.3.0",
"next": "13.4.10",
"next": "13.4.11",
"react-dropzone": "14.2.3",
"react-hotkeys-hook": "4.4.1",
"react-instantsearch-dom": "6.40.1",
"react-instantsearch-dom": "6.40.3",
"react-hot-toast": "2.4.1",
"react-markdown": "8.0.7",
"react-swipeable": "7.0.1",
@ -70,7 +70,7 @@
"devDependencies": {
"@playwright/test": "^1.32.3",
"autoprefixer": "10.4.14",
"eslint-config-next": "13.4.10",
"eslint-config-next": "13.4.11",
"js-yaml": "4.1.0",
"postcss": "8.4.26",
"playwright": "^1.32.3",

View file

@ -12,27 +12,13 @@ import { DocsLayout, ns as layoutNs } from 'site/components/layouts/docs.mjs'
import { loaders } from 'shared/components/dynamic-docs/org.mjs'
export const ns = [...pageNs, layoutNs]
/*
* PLEASE READ THIS BEFORE YOU TRY TO REFACTOR THIS PAGE
*
* You will notice that this page has a page component for each language
* and that those components are 95% identical. So you may be thinking:
*
* This is not DRY, let me refactor this real quick
*
* Before you do so, please reflect on these topics:
*
* - Do you know the pitfalls of dynamic imports in Webpack?
* - Do you know how much documentation we have?
* - Do you know we support 5 languages?
*
* If you do know all of these thigns, and you think you can improve this page. Go ahead.
*
* If you are not sure, then I would recommend you find something else to work on, unless
* you consider this a learning opportunity.
*
* joost
*
/**
* a page to display documentation markdown
* Each page MUST be wrapped in the PageWrapper component.
* You also MUST spread props.page into this wrapper component
* when path and locale come from static props (as here)
* or set them manually.
*/
export const Page = ({ page, locale, frontmatter, MDX }) => (
<PageWrapper
@ -46,6 +32,7 @@ export const Page = ({ page, locale, frontmatter, MDX }) => (
)
const DocsPage = ({ page, locale, slug }) => {
// get the appropriate loader for the locale, and load the mdx for this page
const loader = useCallback(() => loaders[locale](slug), [locale, slug])
// State
const { frontmatter, MDX } = useDynamicMdx(loader)
@ -98,6 +85,6 @@ export async function getStaticPaths() {
...somePaths.map((key) => `/nl/${key}`),
...somePaths.map((key) => `/uk/${key}`),
],
fallback: 'blocking',
fallback: false,
}
}

View file

@ -32,14 +32,31 @@ const NextPage = ({ t, s }) =>
<span></span>
)
/**
* get slug at the given index, or null if it should not be displayed
* @param {Number} index the index of the page to get
* @param {String[]} slugLut the lut for navigation slugs
* @param {Object} siteNav nav data
* @param {Boolen | Function} shouldHide should this element be hidden?
* Function arguments should accept the slug that this element would display and return a boolean
* @return {String | null} the slug for the page, or null if it shouldn't display
*/
const getItemWithCaveat = (index, slugLut, siteNav, shouldHide) => {
// boolean shouldHide, return null
if (shouldHide === true) return null
// function shouldHide, return null if it returns true
if (typeof shouldHide === 'function' && shouldHide(slugLut[index])) return null
// get the slug at the index
return get(siteNav, slugLut[index].split('/'))
}
/**
* Previous and Next buttons
* @param {Boolean | Function} options.noPrev should the previous button be hidden? You can pass a function that accepts the slug for the previous button and returns a boolean, or just pass a boolean
* @param {Boolean | Function} options.noNext should the next button be hidden? You can pass a function that accepts the slug for the next button and returns a boolean, or just pass a boolean
*/
export const PrevNext = ({ noPrev = false, noNext = false }) => {
// Grab siteNav and slugLut from the navigation context
const { siteNav, slugLut, slug } = useContext(NavigationContext)

View file

@ -2,6 +2,14 @@ import { components } from 'shared/components/mdx/index.mjs'
import { Loading } from 'shared/components/spinner.mjs'
import { useState, useEffect } from 'react'
/**
* Dynamically load and compile mdx
* @param {Function} loader an import function to use to load the mdx
* @param {String} site the site whose component set will be used in rendering the mdx
* @return {Object} props
* @return {React.component} props.MDX an component to render the loaded MDX
* @return {Object} props.frontmatter the frontmatter loaded from the markdown
*/
export const useDynamicMdx = (loader, site = 'org') => {
// State
const [frontmatter, setFrontmatter] = useState({ title: `freeSewing.${site}` })

View file

@ -1,75 +1,75 @@
{
"basting": {
"term": "зметування",
"description": "Дивіться <a href='/docs/sewing/basting/'>Зметування</a> у <a href='/docs/sewing'> документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/basting/'>зметування</a> в <a href='/docs/sewing'> документації до шиття</a>"
},
"coverlock": {
"term": аверлок",
"description": "Дивіться <a href='/docs/sewing/coverlock/'>Каверлок</a> у <a href='/docs/sewing'> Документація до шиття</a>"
"term": оверлок",
"description": "Дивіться <a href='/docs/sewing/coverlock/'>коверлок</a> у <a href='/docs/sewing'> документації до шиття</a>"
},
"cutting": {
"term": "вирізання",
"description": "Дивіться <a href='/docs/sewing/cutting/'>Вирізання</a> у <a href='/docs/sewing'> Документація до шиття</a>"
"term": "крій",
"description": "Дивіться <a href='/docs/sewing/cutting/'>крій</a> у <a href='/docs/sewing'> документації до шиття</a>"
},
"darts": {
"term": "виточки",
"description": "Дивіться <a href='/docs/sewing/darts/'>Виточки</a> у<a href='/docs/sewing'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/darts/'>виточки</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"doubleWeltPockets": {
"term": "кишеня з подвійною листочкою",
"description": "Дивіться <a href='/docs/sewing/double-welt-pockets/'>Кишеня з подвійною листочкою</a> у<a href='/docs/sewing'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/double-welt-pockets/'>кишеню з подвійною листочкою</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"ease": {
"term": "свобода облягання",
"description": "Дивіться <a href='/docs/sewing/ease/'>Свобода облягання</a> у <a href='/docs/sewing'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/ease/'>свободу облягання</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"edgestitch": {
"term": "шов по краю",
"description": "Дивіться <a href='/docs/sewing/edgestitching/'>Шов по краю</a> у <a href='/docs/sewing'>Документація до шиття</a>"
"term": "закріплювальний шов",
"description": "Дивіться <a href='/docs/sewing/edgestitching/'>закріплення краю</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"fabricGrain": {
"term": "нитка-основа тканини",
"description": "Дивіться <a href='/docs/sewing/fabric-grain/'>Нитка основа тканини</a> у <a href='/docs/sewing'>Документація до шиття</a>"
"term": "тканинне зерно",
"description": "Дивіться <a href='/docs/sewing/fabric-grain/'>тканинне зерно</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"goodSidesTogether": {
"term": "лицьові сторони одна до одної",
"description": "Дивіться <a href='/docs/sewing/good-sides-together/'>Лицьові сторони одна до одної</a> у <a href='/docs/sewing/'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/good-sides-together/'>\"Лицьові сторони одна до одної\"</a> в <a href='/docs/sewing/'>документації до шиття</a>"
},
"onTheFold": {
"term": "на згині",
"description": "Дивіться <a href='/docs/sewing/on-the-fold/'>На згині</a> у <a href='/docs/sewing/'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/on-the-fold/'>\"На згині\"</a> в <a href='/docs/sewing/'>документації до шиття</a>"
},
"hemming": {
"term": "підшивання краю",
"description": "Дивіться <a href='/docs/sewing/hemming/'>Підшивання краю</a> у <a href='/docs/sewing'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/hemming/'>підшивання краю</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"jersey": {
"term": "джерсі",
"description": "Дивіться <a href='/docs/sewing/jersey/'>Джерсі</a> у <a href='/docs/sewing'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/jersey/'>джерсі</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"knitBinding": {
"term": "трикотажна бейка",
"description": "Дивіться <a href='/docs/sewing/knit-binding/'>Трикотажна бейка</a> у <a href='/docs/sewing'> Документація до шиття</a>"
"term": "трикотажна бійка",
"description": "Дивіться <a href='/docs/sewing/knit-binding/'>трикотажну бійку</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"knitFabric": {
"term": "трикотаж",
"description": "Дивіться <a href='/docs/sewing/knit-fabric/'>Трикотаж</a> у <a href='/docs/sewing'> Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/knit-fabric/'>трикотаж</a> у <a href='/docs/sewing'> документації до шиття</a>"
},
"pinning": {
"term": "зметування булавками",
"description": "Дивіться <a href='/docs/sewing/pinning/'>Зметування булавками</a> у <a href='/docs/sewing'> Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/pinning/'>зметування булавками</a> в <a href='/docs/sewing'> документації до шиття</a>"
},
"rayon": {
"term": "віскоза",
"description": "Дивіться <a href='/docs/sewing/rayon/'>Віскоза</a> у<a href='/docs/sewing'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/rayon/'>віскозу</a> в <a href='/docs/sewing'>документації до шиття</a>"
},
"sa": {
"term": "припуск на шов",
"description": "Дивіться <a href='/docs/sewing/seam-allowance/'>Припуск на шов</a> у <a href='/docs/sewing'> Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/seam-allowance/'>припуск на шов</a> у <a href='/docs/sewing'>документації до шиття</a>"
},
"serger": {
"term": "машина-оверлок",
"description": "Дивіться <a href='/docs/sewing/serger/'>Оверлок</a> у <a href='/docs/sewing'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/serger/'>оверлок</a> у <a href='/docs/sewing'>документації до шиття</a>"
},
"slipstitch": {
"term": "потайний шов",
@ -81,7 +81,7 @@
},
"trimming": {
"term": "підрізання припусків на шов",
"description": "Дивіться <a href='/docs/sewing/trimming/'>Підрізання припусків на шов</a> у <a href='/docs/sewing'>Документація до шиття</a>"
"description": "Дивіться <a href='/docs/sewing/trimming/'>Підрізання припусків на шов</a> у <a href='/docs/sewing'>Документації до шиття</a>"
},
"twinNeedle": {
"term": "подвійна голка",

View file

@ -17,7 +17,7 @@
"peerDependencies": {},
"dependencies": {
"@headlessui/react": "1.7.15",
"@next/mdx": "13.4.10",
"@next/mdx": "13.4.11",
"@resvg/resvg-js": "2.4.1",
"@tailwindcss/typography": "0.5.9",
"Buffer": "0.0.0",

View file

@ -125,6 +125,7 @@ const fixData = (rawData, languages) => {
const data = {}
for (const [namespace, nsdata] of Object.entries(rawData)) {
if (typeof nsdata.en === 'undefined') {
console.log({ namespace, nsdata })
throw `No English data for namespace ${namespace}. Bailing out`
}
data[namespace] = { en: nsdata.en }

4708
yarn.lock

File diff suppressed because it is too large Load diff