wip: More work on lab
This commit is contained in:
parent
d6d8c6f122
commit
7ce6ccbccf
19 changed files with 245 additions and 313 deletions
|
@ -8,7 +8,7 @@ export const config = {
|
||||||
// Repository to download from
|
// Repository to download from
|
||||||
repo: process.env.FS_REPO || 'freesewing/freesewing',
|
repo: process.env.FS_REPO || 'freesewing/freesewing',
|
||||||
// Branch to download from
|
// Branch to download from
|
||||||
branch: process.env.FS_BRANCH || 'alpha-release',
|
branch: process.env.FS_BRANCH || 'joost',
|
||||||
i18n: [
|
i18n: [
|
||||||
'account',
|
'account',
|
||||||
'common',
|
'common',
|
||||||
|
@ -62,34 +62,34 @@ yarn-error.log*
|
||||||
sites: [
|
sites: [
|
||||||
'shared/utils.mjs',
|
'shared/utils.mjs',
|
||||||
'shared/designs/index.js',
|
'shared/designs/index.js',
|
||||||
'shared/config/i18n.config.mjs',
|
|
||||||
'shared/config/freesewing.mjs',
|
'shared/config/freesewing.mjs',
|
||||||
|
'shared/config/i18n.config.mjs',
|
||||||
'shared/config/next.mjs',
|
'shared/config/next.mjs',
|
||||||
'shared/config/tailwind-force.html',
|
|
||||||
'shared/config/postcss.config.js',
|
'shared/config/postcss.config.js',
|
||||||
|
'shared/config/tailwind-force.html',
|
||||||
'shared/config/tailwind.config.js',
|
'shared/config/tailwind.config.js',
|
||||||
'shared/hooks/useGist.js',
|
'shared/hooks/useGist.mjs',
|
||||||
'shared/hooks/useLocalStorage.js',
|
'shared/hooks/useLocalStorage.mjs',
|
||||||
'shared/hooks/useTheme.js',
|
'shared/hooks/useTheme.mjs',
|
||||||
'shared/mdx/compiler.js',
|
'shared/mdx/compiler.mjs',
|
||||||
|
'shared/mdx/loader.mjs',
|
||||||
'shared/mdx/mdx-plugin-toc.mjs',
|
'shared/mdx/mdx-plugin-toc.mjs',
|
||||||
'shared/mdx/loader.js',
|
|
||||||
'shared/mdx/remark-intro-plugin.mjs',
|
'shared/mdx/remark-intro-plugin.mjs',
|
||||||
'shared/styles/code.css',
|
|
||||||
'shared/styles/globals.css',
|
|
||||||
'shared/styles/svg-freesewing-draft.css',
|
|
||||||
'shared/strapi/loader.js',
|
'shared/strapi/loader.js',
|
||||||
'shared/strapi/qa.mjs',
|
'shared/strapi/qa.mjs',
|
||||||
'shared/themes/dark.js',
|
'shared/themes/dark.js',
|
||||||
'shared/themes/hax0r.js',
|
'shared/themes/hax0r.js',
|
||||||
|
'shared/themes/index.js',
|
||||||
'shared/themes/lgbtq.js',
|
'shared/themes/lgbtq.js',
|
||||||
'shared/themes/light.js',
|
'shared/themes/light.js',
|
||||||
'shared/themes/index.js',
|
'shared/themes/runtime.mjs',
|
||||||
'shared/themes/runtime.js',
|
'shared/styles/code.css',
|
||||||
|
'shared/styles/globals.css',
|
||||||
|
'shared/styles/svg-freesewing-draft.css',
|
||||||
|
'shared/prebuild/contributors.mjs',
|
||||||
'shared/prebuild/feed.mjs',
|
'shared/prebuild/feed.mjs',
|
||||||
'shared/prebuild/i18n-only.mjs',
|
'shared/prebuild/i18n-only.mjs',
|
||||||
'shared/prebuild/i18n.mjs',
|
'shared/prebuild/i18n.mjs',
|
||||||
'shared/prebuild/contributors.mjs',
|
|
||||||
'shared/prebuild/index.mjs',
|
'shared/prebuild/index.mjs',
|
||||||
'shared/prebuild/lab.mjs',
|
'shared/prebuild/lab.mjs',
|
||||||
'shared/prebuild/md-intro.mjs',
|
'shared/prebuild/md-intro.mjs',
|
||||||
|
@ -98,187 +98,140 @@ yarn-error.log*
|
||||||
'shared/prebuild/patrons.mjs',
|
'shared/prebuild/patrons.mjs',
|
||||||
'shared/prebuild/strapi.mjs',
|
'shared/prebuild/strapi.mjs',
|
||||||
'shared/prebuild/og/index.mjs',
|
'shared/prebuild/og/index.mjs',
|
||||||
'shared/components/breadcrumbs.js',
|
'shared/components/breadcrumbs.mjs',
|
||||||
'shared/components/code.js',
|
'shared/components/code.mjs',
|
||||||
'shared/components/copy-to-clipboard.js',
|
'shared/components/copy-to-clipboard.mjs',
|
||||||
'shared/components/docs-link.js',
|
'shared/components/docs-link.mjs',
|
||||||
'shared/components/json-highlight.js',
|
'shared/components/icons.mjs',
|
||||||
'shared/components/lightbox.js',
|
'shared/components/json.mjs',
|
||||||
'shared/components/loader.js',
|
'shared/components/lightbox.mjs',
|
||||||
'shared/components/locale-picker.js',
|
'shared/components/loader.mjs',
|
||||||
'shared/components/modal.js',
|
'shared/components/modal.mjs',
|
||||||
'shared/components/page-link.js',
|
'shared/components/page-link.mjs',
|
||||||
'shared/components/picker.js',
|
'shared/components/picker.mjs',
|
||||||
'shared/components/popout.js',
|
'shared/components/popout.mjs',
|
||||||
'shared/components/raw-span.js',
|
'shared/components/raw-span.mjs',
|
||||||
'shared/components/ribbon.js',
|
'shared/components/ribbon.mjs',
|
||||||
'shared/components/spinner.js',
|
'shared/components/spinner.mjs',
|
||||||
'shared/components/theme-picker.js',
|
'shared/components/web-link.mjs',
|
||||||
'shared/components/web-link.js',
|
'shared/components/wordmark.mjs',
|
||||||
'shared/components/wordmark.js',
|
'shared/components/worm.mjs',
|
||||||
'shared/components/worm.js',
|
'shared/components/yaml.mjs',
|
||||||
'shared/components/yaml.js',
|
'shared/components/error/error-boundary.mjs',
|
||||||
'shared/components/error/error-boundary.js',
|
'shared/components/error/reset-buttons.mjs',
|
||||||
'shared/components/error/reset-buttons.js',
|
'shared/components/error/view.mjs',
|
||||||
'shared/components/error/view.js',
|
|
||||||
'shared/components/logos/cc-by.js',
|
|
||||||
'shared/components/logos/cc.js',
|
|
||||||
'shared/components/logos/freesewing.js',
|
|
||||||
'shared/components/logos/osi.js',
|
|
||||||
'shared/components/mdx/example.js',
|
|
||||||
'shared/components/mdx/examples.js',
|
|
||||||
'shared/components/mdx/figure.js',
|
|
||||||
'shared/components/mdx/highlight.js',
|
|
||||||
'shared/components/mdx/http-method.js',
|
|
||||||
'shared/components/mdx/index.js',
|
|
||||||
'shared/components/mdx/prev-next.js',
|
|
||||||
'shared/components/mdx/read-more.js',
|
|
||||||
'shared/components/mdx/status-code.js',
|
|
||||||
'shared/components/mdx/tabs.js',
|
|
||||||
'shared/components/mdx/youtube.js',
|
|
||||||
'shared/components/layouts/default.js',
|
|
||||||
'shared/components/navigation/aside.js',
|
|
||||||
'shared/components/navigation/primary.js',
|
|
||||||
'shared/components/icons/box.js',
|
|
||||||
'shared/components/icons/camera.js',
|
|
||||||
'shared/components/icons/clear.js',
|
|
||||||
'shared/components/icons/close.js',
|
|
||||||
'shared/components/icons/cog.js',
|
|
||||||
'shared/components/icons/community.js',
|
|
||||||
'shared/components/icons/copy.js',
|
|
||||||
'shared/components/icons/design.js',
|
|
||||||
'shared/components/icons/discord.js',
|
|
||||||
'shared/components/icons/docs.js',
|
|
||||||
'shared/components/icons/down.js',
|
|
||||||
'shared/components/icons/edit.js',
|
|
||||||
'shared/components/icons/export.js',
|
|
||||||
'shared/components/icons/facebook.js',
|
|
||||||
'shared/components/icons/filter.js',
|
|
||||||
'shared/components/icons/flip.js',
|
'shared/components/icons/flip.js',
|
||||||
'shared/components/icons/freesewing.js',
|
|
||||||
'shared/components/icons/github.js',
|
|
||||||
'shared/components/icons/guide.js',
|
|
||||||
'shared/components/icons/google.js',
|
|
||||||
'shared/components/icons/heart.js',
|
|
||||||
'shared/components/icons/home.js',
|
|
||||||
'shared/components/icons/help.js',
|
|
||||||
'shared/components/icons/i18n.js',
|
|
||||||
'shared/components/icons/instagram.js',
|
|
||||||
'shared/components/icons/left.js',
|
|
||||||
'shared/components/icons/menswear.js',
|
|
||||||
'shared/components/icons/menu.js',
|
|
||||||
'shared/components/icons/note.js',
|
|
||||||
'shared/components/icons/options.js',
|
|
||||||
'shared/components/icons/page-size.js',
|
|
||||||
'shared/components/icons/page.js',
|
|
||||||
'shared/components/icons/print.js',
|
|
||||||
'shared/components/icons/reddit.js',
|
|
||||||
'shared/components/icons/right.js',
|
|
||||||
'shared/components/icons/rotate.js',
|
'shared/components/icons/rotate.js',
|
||||||
'shared/components/icons/rss.js',
|
|
||||||
'shared/components/icons/search.js',
|
|
||||||
'shared/components/icons/settings.js',
|
|
||||||
'shared/components/icons/sheet.js',
|
'shared/components/icons/sheet.js',
|
||||||
'shared/components/icons/swipeleft.js',
|
'shared/components/locale-picker/index.mjs',
|
||||||
'shared/components/icons/swiperight.js',
|
'shared/components/locale-picker/locales.de.yaml',
|
||||||
'shared/components/icons/theme.js',
|
'shared/components/locale-picker/locales.en.yaml',
|
||||||
'shared/components/icons/tip.js',
|
'shared/components/locale-picker/locales.es.yaml',
|
||||||
'shared/components/icons/tutorial.js',
|
'shared/components/locale-picker/locales.fr.yaml',
|
||||||
'shared/components/icons/twitter.js',
|
'shared/components/locale-picker/locales.nl.yaml',
|
||||||
'shared/components/icons/user.js',
|
'shared/components/logos/cc-by.mjs',
|
||||||
'shared/components/icons/versions.js',
|
'shared/components/logos/cc.mjs',
|
||||||
'shared/components/icons/womenswear.js',
|
'shared/components/logos/freesewing.mjs',
|
||||||
'shared/components/icons/xray.js',
|
'shared/components/logos/osi.mjs',
|
||||||
'shared/components/wrappers/img.js',
|
'shared/components/mdx/examples.mjs',
|
||||||
'shared/components/wrappers/mdx.js',
|
'shared/components/mdx/figure.mjs',
|
||||||
'shared/components/wrappers/page.js',
|
'shared/components/mdx/highlight.mjs',
|
||||||
'shared/components/wrappers/toc.js',
|
'shared/components/mdx/http.mjs',
|
||||||
'shared/components/wrappers/workbench.js',
|
'shared/components/mdx/index.mjs',
|
||||||
'shared/components/robot/index.js',
|
'shared/components/mdx/prev-next.mjs',
|
||||||
'shared/components/robot/poses.js',
|
'shared/components/mdx/read-more.mjs',
|
||||||
'shared/components/workbench/default-settings.js',
|
'shared/components/mdx/tabbed-example.mjs',
|
||||||
'shared/components/workbench/gist-as-json.js',
|
'shared/components/mdx/tabs.mjs',
|
||||||
'shared/components/workbench/logs.js',
|
'shared/components/mdx/youtube.mjs',
|
||||||
'shared/components/workbench/sample.js',
|
'shared/components/navigation/aside.mjs',
|
||||||
'shared/components/workbench/preload.js',
|
'shared/components/navigation/primary.mjs',
|
||||||
'shared/components/workbench/yaml.js',
|
'shared/components/robot/index.mjs',
|
||||||
'shared/components/workbench/exporting/export-handler.js',
|
'shared/components/robot/poses.mjs',
|
||||||
|
'shared/components/theme-picker/index.mjs',
|
||||||
|
'shared/components/theme-picker/themes.de.yaml',
|
||||||
|
'shared/components/theme-picker/themes.en.yaml',
|
||||||
|
'shared/components/theme-picker/themes.es.yaml',
|
||||||
|
'shared/components/theme-picker/themes.fr.yaml',
|
||||||
|
'shared/components/theme-picker/themes.nl.yaml',
|
||||||
|
'shared/components/wrappers/img.mjs',
|
||||||
|
'shared/components/wrappers/mdx.mjs',
|
||||||
|
'shared/components/wrappers/page.mjs',
|
||||||
|
'shared/components/wrappers/toc.mjs',
|
||||||
|
'shared/components/wrappers/workbench.mjs',
|
||||||
|
'shared/components/workbench/gist.mjs',
|
||||||
|
'shared/components/workbench/logs.mjs',
|
||||||
|
'shared/components/workbench/preloaders.mjs',
|
||||||
|
'shared/components/workbench/sample.mjs',
|
||||||
|
'shared/components/workbench/exporting/export-handler.mjs',
|
||||||
'shared/components/workbench/exporting/export-worker.js',
|
'shared/components/workbench/exporting/export-worker.js',
|
||||||
'shared/components/workbench/exporting/index.js',
|
'shared/components/workbench/exporting/index.mjs',
|
||||||
'shared/components/workbench/exporting/pdf-maker.js',
|
'shared/components/workbench/exporting/pdf-maker.mjs',
|
||||||
'shared/components/workbench/inputs/design-option-count.js',
|
'shared/components/workbench/inputs/design-option-count.mjs',
|
||||||
'shared/components/workbench/inputs/design-option-list.js',
|
'shared/components/workbench/inputs/design-option-list.mjs',
|
||||||
'shared/components/workbench/inputs/design-option-pct-deg.js',
|
'shared/components/workbench/inputs/design-option-pct-deg.mjs',
|
||||||
'shared/components/workbench/inputs/measurement.js',
|
'shared/components/workbench/inputs/measurement.mjs',
|
||||||
'shared/components/workbench/measurements/index.js',
|
'shared/components/workbench/measurements/index.mjs',
|
||||||
'shared/components/workbench/measurements/non-human.js',
|
'shared/components/workbench/measurements/non-human.mjs',
|
||||||
'shared/components/workbench/layout/cut/index.js',
|
'shared/components/workbench/draft/circle.mjs',
|
||||||
'shared/components/workbench/layout/cut/settings.js',
|
'shared/components/workbench/draft/defs.mjs',
|
||||||
'shared/components/workbench/layout/print/index.js',
|
'shared/components/workbench/draft/error.mjs',
|
||||||
'shared/components/workbench/layout/print/orientation-picker.js',
|
'shared/components/workbench/draft/index.mjs',
|
||||||
'shared/components/workbench/layout/print/pagesize-picker.js',
|
'shared/components/workbench/draft/part.mjs',
|
||||||
'shared/components/workbench/layout/print/plugin.js',
|
'shared/components/workbench/draft/path.mjs',
|
||||||
'shared/components/workbench/layout/print/settings.js',
|
'shared/components/workbench/draft/point.mjs',
|
||||||
'shared/components/workbench/layout/draft/index.js',
|
'shared/components/workbench/draft/snippet.mjs',
|
||||||
'shared/components/workbench/layout/draft/stack.js',
|
'shared/components/workbench/draft/stack.mjs',
|
||||||
'shared/components/workbench/layout/draft/buttons.js',
|
'shared/components/workbench/draft/svg.mjs',
|
||||||
'shared/components/workbench/draft/error.js',
|
'shared/components/workbench/draft/text.mjs',
|
||||||
'shared/components/workbench/draft/index.js',
|
'shared/components/workbench/draft/utils.mjs',
|
||||||
'shared/components/workbench/draft/stack.js',
|
'shared/components/workbench/layout/default.mjs',
|
||||||
'shared/components/workbench/draft/svg-wrapper.js',
|
'shared/components/workbench/layout/cut/index.mjs',
|
||||||
'shared/components/workbench/draft/utils.js',
|
'shared/components/workbench/layout/cut/settings.mjs',
|
||||||
'shared/components/workbench/draft/circle/index.js',
|
'shared/components/workbench/layout/print/index.mjs',
|
||||||
'shared/components/workbench/draft/path/index.js',
|
'shared/components/workbench/layout/print/orientation-picker.mjs',
|
||||||
'shared/components/workbench/draft/defs/index.js',
|
'shared/components/workbench/layout/print/pagesize-picker.mjs',
|
||||||
'shared/components/workbench/draft/part/index.js',
|
'shared/components/workbench/layout/print/plugin.mjs',
|
||||||
'shared/components/workbench/draft/snippet/index.js',
|
'shared/components/workbench/layout/print/settings.mjs',
|
||||||
'shared/components/workbench/draft/point/index.js',
|
'shared/components/workbench/layout/draft/buttons.mjs',
|
||||||
'shared/components/workbench/draft/text/index.js',
|
'shared/components/workbench/layout/draft/index.mjs',
|
||||||
'shared/components/workbench/draft/svg/index.js',
|
'shared/components/workbench/layout/draft/stack.mjs',
|
||||||
'shared/components/workbench/draft/text-on-path/index.js',
|
'shared/components/workbench/menu/index.mjs',
|
||||||
'shared/components/workbench/layout/cut/index.js',
|
'shared/components/workbench/menu/view.mjs',
|
||||||
'shared/components/workbench/layout/cut/settings.js',
|
'shared/components/workbench/menu/design-options/index.mjs',
|
||||||
'shared/components/workbench/layout/draft/buttons.js',
|
'shared/components/workbench/menu/design-options/option-group.mjs',
|
||||||
'shared/components/workbench/layout/draft/index.js',
|
'shared/components/workbench/menu/design-options/option-input.mjs',
|
||||||
'shared/components/workbench/layout/draft/stack.js',
|
'shared/components/workbench/menu/design-options/option-value.mjs',
|
||||||
'shared/components/workbench/layout/print/index.js',
|
'shared/components/workbench/menu/design-options/option.mjs',
|
||||||
'shared/components/workbench/layout/print/orientation-picker.js',
|
'shared/components/workbench/menu/test-design-options/index.mjs',
|
||||||
'shared/components/workbench/layout/print/pagesize-picker.js',
|
'shared/components/workbench/menu/test-design-options/option.mjs',
|
||||||
'shared/components/workbench/layout/print/plugin.js',
|
'shared/components/workbench/menu/core-settings/core-setting-bool.mjs',
|
||||||
'shared/components/workbench/layout/print/settings.js',
|
'shared/components/workbench/menu/core-settings/core-setting-list.mjs',
|
||||||
'shared/components/workbench/menu/index.js',
|
'shared/components/workbench/menu/core-settings/core-setting-mm.mjs',
|
||||||
'shared/components/workbench/menu/view.js',
|
'shared/components/workbench/menu/core-settings/core-setting-nr.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/core-setting-bool.js',
|
'shared/components/workbench/menu/core-settings/core-setting-only.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/core-setting-list.js',
|
'shared/components/workbench/menu/core-settings/core-setting-sa-bool.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/core-setting-mm.js',
|
'shared/components/workbench/menu/core-settings/core-setting-sa-mm.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/core-setting-nr.js',
|
'shared/components/workbench/menu/core-settings/index.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/core-setting-only.js',
|
'shared/components/workbench/menu/core-settings/setting.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/core-setting-sa-mm.js',
|
'shared/components/workbench/menu/xray/attributes.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/index.js',
|
'shared/components/workbench/menu/xray/disable.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/setting.js',
|
'shared/components/workbench/menu/xray/index.mjs',
|
||||||
'shared/components/workbench/menu/core-settings/core-setting-sa-bool.js',
|
'shared/components/workbench/menu/xray/list.mjs',
|
||||||
'shared/components/workbench/menu/design-options/option-group.js',
|
'shared/components/workbench/menu/xray/log.mjs',
|
||||||
'shared/components/workbench/menu/design-options/index.js',
|
'shared/components/workbench/menu/xray/path-ops.mjs',
|
||||||
'shared/components/workbench/menu/design-options/option-value.js',
|
'shared/components/workbench/menu/xray/path.mjs',
|
||||||
'shared/components/workbench/menu/design-options/option.js',
|
'shared/components/workbench/menu/xray/point.mjs',
|
||||||
'shared/components/workbench/menu/design-options/option-input.js',
|
'shared/components/workbench/menu/xray/reset.mjs',
|
||||||
'shared/components/workbench/menu/xray/attributes.js',
|
'lab/components/about.mjs',
|
||||||
'shared/components/workbench/menu/xray/disable.js',
|
'lab/components/design-picker.mjs',
|
||||||
'shared/components/workbench/menu/xray/index.js',
|
'lab/components/footer.mjs',
|
||||||
'shared/components/workbench/menu/xray/list.js',
|
'lab/components/header.mjs',
|
||||||
'shared/components/workbench/menu/xray/log.js',
|
'lab/components/help-us.mjs',
|
||||||
'shared/components/workbench/menu/xray/point.js',
|
'lab/components/search.mjs',
|
||||||
'shared/components/workbench/menu/xray/reset.js',
|
'lab/components/layouts/bare.mjs',
|
||||||
'shared/components/workbench/menu/xray/path-ops.js',
|
'lab/components/layouts/lab.mjs',
|
||||||
'shared/components/workbench/menu/xray/path.js',
|
'lab/components/wrappers/layout.mjs',
|
||||||
'shared/components/workbench/menu/test-design-options/option.js',
|
'lab/components/wrappers/page.mjs',
|
||||||
'shared/components/workbench/menu/test-design-options/index.js',
|
|
||||||
'lab/components/about.js',
|
|
||||||
'lab/components/design-picker.js',
|
|
||||||
'lab/components/wrappers/layout.js',
|
|
||||||
'lab/components/wrappers/page.js',
|
|
||||||
'lab/components/layouts/bare.js',
|
|
||||||
'lab/components/layouts/lab.js',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
import Logo from 'shared/components/logos/freesewing.js'
|
|
||||||
import { useTranslation } from 'next-i18next'
|
|
||||||
import Ribbon from 'shared/components/ribbon.js'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import { FreeSewingLogo } from 'shared/components/logos/freesewing.mjs'
|
||||||
|
import { useTranslation } from 'next-i18next'
|
||||||
|
import { Ribbon } from 'shared/components/ribbon.mjs'
|
||||||
import { WordMark } from 'shared/components/wordmark.js'
|
import { WordMark } from 'shared/components/wordmark.js'
|
||||||
|
|
||||||
import DiscordIcon from 'shared/components/icons/discord.js'
|
import {
|
||||||
import FacebookIcon from 'shared/components/icons/facebook.js'
|
DiscordIcon,
|
||||||
import GithubIcon from 'shared/components/icons/github.js'
|
FacebookIcon,
|
||||||
import InstagramIcon from 'shared/components/icons/instagram.js'
|
GithubIcon,
|
||||||
import RedditIcon from 'shared/components/icons/reddit.js'
|
InstagramIcon,
|
||||||
import TwitterIcon from 'shared/components/icons/twitter.js'
|
RedditIcon,
|
||||||
|
TwitterIcon,
|
||||||
|
} from 'shared/components/icons.mjs'
|
||||||
|
|
||||||
const icon = { className: 'w-8 lg:w-12 h-8 lg:h-12' }
|
const icon = { className: 'w-8 lg:w-12 h-8 lg:h-12' }
|
||||||
const social = {
|
const social = {
|
||||||
|
@ -39,7 +41,7 @@ const social = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const Footer = ({ app }) => {
|
export const Footer = ({ app }) => {
|
||||||
const { t } = useTranslation(['common', 'patrons'])
|
const { t } = useTranslation(['common', 'patrons'])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -80,5 +82,3 @@ const Footer = ({ app }) => {
|
||||||
</footer>
|
</footer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Footer
|
|
|
@ -1,20 +1,17 @@
|
||||||
import { useState, useEffect } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import ThemePicker from 'shared/components/theme-picker.js'
|
import { ThemePicker } from 'shared/components/theme-picker.js'
|
||||||
import LocalePicker from 'shared/components/locale-picker.js'
|
import { LocalePicker } from 'shared/components/locale-picker.js'
|
||||||
import CloseIcon from 'shared/components/icons/close.js'
|
import { CloseIcon, MenuIcon, HelpIcon, DocsIcon } from 'shared/components/icons/close.js'
|
||||||
import MenuIcon from 'shared/components/icons/menu.js'
|
import { Ribbon } from 'shared/components/ribbon.js'
|
||||||
import HelpIcon from 'shared/components/icons/help.js'
|
|
||||||
import Ribbon from 'shared/components/ribbon.js'
|
|
||||||
import { WordMark } from 'shared/components/wordmark.js'
|
import { WordMark } from 'shared/components/wordmark.js'
|
||||||
import DocsIcon from 'shared/components/icons/docs.js'
|
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
|
|
||||||
const btnClasses =
|
const btnClasses =
|
||||||
'btn btn-ghost text-base font-medium btn-sm text-neutral-content ' +
|
'btn btn-ghost text-base font-medium btn-sm text-neutral-content ' +
|
||||||
' capitalize hover:bg-transparent hover:text-secondary-focus'
|
' capitalize hover:bg-transparent hover:text-secondary-focus'
|
||||||
|
|
||||||
const Header = ({ app }) => {
|
export const Header = ({ app }) => {
|
||||||
const { t } = useTranslation(['common'])
|
const { t } = useTranslation(['common'])
|
||||||
|
|
||||||
const [prevScrollPos, setPrevScrollPos] = useState(0)
|
const [prevScrollPos, setPrevScrollPos] = useState(0)
|
||||||
|
@ -83,5 +80,3 @@ const Header = ({ app }) => {
|
||||||
</header>
|
</header>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Header
|
|
|
@ -1,17 +0,0 @@
|
||||||
import { useRouter } from 'next/router'
|
|
||||||
import Aside from 'shared/components/navigation/aside'
|
|
||||||
import { BeforeNav } from './lab'
|
|
||||||
|
|
||||||
const DefaultLayout = ({ app, title=false, children=[] }) => {
|
|
||||||
const router = useRouter()
|
|
||||||
const slug = router.asPath.slice(1)
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Aside app={app} slug={slug} before={<BeforeNav app={app}/>} mobileOnly />
|
|
||||||
{children}
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default DefaultLayout
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
import { useRouter } from 'next/router'
|
||||||
|
import { AsideNavigation } from 'shared/components/navigation/aside.mjs'
|
||||||
|
import { BeforeNav } from './lab'
|
||||||
|
|
||||||
|
export const DefaultLayout = ({ app, title = false, children = [] }) => {
|
||||||
|
const router = useRouter()
|
||||||
|
const slug = router.asPath.slice(1)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<AsideNavigation app={app} slug={slug} before={<BeforeNav app={app} />} mobileOnly />
|
||||||
|
{children}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
|
@ -1,12 +0,0 @@
|
||||||
import React from 'react'
|
|
||||||
import Aside from 'shared/components/navigation/aside'
|
|
||||||
|
|
||||||
const DocsLayout = ({ app, title=false, children=[] }) => (
|
|
||||||
<div className="max-w-7xl m-auto mt-32">
|
|
||||||
{title && <h1 className="capitalize">{title}</h1>}
|
|
||||||
<Aside app={app} mobileOnly />
|
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
|
|
||||||
export default DocsLayout
|
|
10
packages/new-design/shared/lab/components/layouts/home.mjs
Normal file
10
packages/new-design/shared/lab/components/layouts/home.mjs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import React from 'react'
|
||||||
|
import { AsideNavigation } from 'shared/components/navigation/aside.mjs'
|
||||||
|
|
||||||
|
export const HomeLayout = ({ app, title = false, children = [] }) => (
|
||||||
|
<div className="max-w-7xl m-auto mt-32">
|
||||||
|
{title && <h1 className="capitalize">{title}</h1>}
|
||||||
|
<AsideNavigation app={app} mobileOnly />
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
)
|
|
@ -1,5 +1,5 @@
|
||||||
import ThemePicker from 'shared/components/theme-picker.js'
|
import { ThemePicker } from 'shared/components/theme-picker.mjs'
|
||||||
import LocalePicker from 'shared/components/locale-picker.js'
|
import { LocalePicker } from 'shared/components/locale-picker.mjs'
|
||||||
|
|
||||||
export const BeforeNav = ({ app }) => (
|
export const BeforeNav = ({ app }) => (
|
||||||
<>
|
<>
|
||||||
|
@ -7,17 +7,15 @@ export const BeforeNav = ({ app }) => (
|
||||||
<ThemePicker app={app} />
|
<ThemePicker app={app} />
|
||||||
<LocalePicker app={app} />
|
<LocalePicker app={app} />
|
||||||
</div>
|
</div>
|
||||||
<div className="md:hidden flex flex-row flex-wrap sm:flex-nowrap gap-2 mb-2">
|
<div className="md:hidden flex flex-row flex-wrap sm:flex-nowrap gap-2 mb-2"></div>
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
||||||
const LabLayout = ({ app, AltMenu, children=[] }) => (
|
export const LabLayout = ({ app, AltMenu, children = [] }) => (
|
||||||
<div className="py-24 lg:py-36 flex flex-row">
|
<div className="py-24 lg:py-36 flex flex-row">
|
||||||
<div className="w-full px-8">
|
<div className="w-full px-8">{children}</div>
|
||||||
{children}
|
<aside
|
||||||
</div>
|
className={`
|
||||||
<aside className={`
|
|
||||||
fixed top-0 right-0
|
fixed top-0 right-0
|
||||||
pt-20 pb-8 px-8
|
pt-20 pb-8 px-8
|
||||||
md:pt-0
|
md:pt-0
|
||||||
|
@ -37,11 +35,10 @@ const LabLayout = ({ app, AltMenu, children=[] }) => (
|
||||||
md:w-80
|
md:w-80
|
||||||
lg:w-96
|
lg:w-96
|
||||||
shrink-0
|
shrink-0
|
||||||
`}>
|
`}
|
||||||
<BeforeNav app={app}/>
|
>
|
||||||
|
<BeforeNav app={app} />
|
||||||
{AltMenu}
|
{AltMenu}
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
export default LabLayout
|
|
|
@ -1,4 +0,0 @@
|
||||||
// Noop placeholder
|
|
||||||
const Noop = props => null
|
|
||||||
|
|
||||||
export default Noop
|
|
|
@ -1,5 +1,4 @@
|
||||||
// Noop placeholder
|
// Noop placeholder
|
||||||
const Noop = props => null
|
const Noop = (props) => null
|
||||||
|
|
||||||
export default Noop
|
export default Noop
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
// Stores state in local storage
|
// Stores state in local storage
|
||||||
import useLocalStorage from 'shared/hooks/useLocalStorage.js'
|
import { useLocalStorage } from 'shared/hooks/useLocalStorage.mjs'
|
||||||
// Locale and translation
|
// Locale and translation
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import useTheme from 'shared/hooks/useTheme'
|
import { useTheme } from 'shared/hooks/useTheme.mjs'
|
||||||
|
|
||||||
function useApp(full = true) {
|
export const useApp = () => {
|
||||||
// Load translation method
|
// Load translation method
|
||||||
const locale = useRouter().locale
|
const locale = useRouter().locale
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
import { Pattern } from 'design/src/index.mjs'
|
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
|
import { Pattern } from 'design/src/index.mjs'
|
||||||
import Page from 'site/components/wrappers/page.js'
|
import { useApp } from 'site/hooks/useApp.mjs'
|
||||||
import useApp from 'site/hooks/useApp.js'
|
import { PageWrapper } from 'site/components/wrappers/page.mjs'
|
||||||
import WorkbenchWrapper from 'shared/components/wrappers/workbench.js'
|
import { LabLayout } from 'site/components/layouts/lab.mjs'
|
||||||
import Layout from 'site/components/layouts/lab'
|
import { WorkbenchWrapper } from 'shared/components/wrappers/workbench.mjs'
|
||||||
|
|
||||||
const WorkbenchPage = (props) => {
|
const WorkbenchPage = (props) => {
|
||||||
const app = useApp()
|
const app = useApp()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page app={app}>
|
<PageWrapper app={app}>
|
||||||
<WorkbenchWrapper {...{ app, design: Pattern, layout: Layout }} />
|
<WorkbenchWrapper {...{ app, design: Pattern, layout: LabLayout }} />
|
||||||
</Page>
|
</PageWrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import Page from 'site/components/wrappers/page.js'
|
|
||||||
import useApp from 'site/hooks/useApp.js'
|
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
import Layout from 'site/components/layouts/docs'
|
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import FsIcon from 'shared/components/icons/freesewing'
|
|
||||||
import Link from 'next/link'
|
|
||||||
import Popout from 'shared/components/popout'
|
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
|
import Link from 'next/link'
|
||||||
|
import { PageWrapper } from 'site/components/wrappers/page.mjs'
|
||||||
|
import { useApp } from 'site/hooks/useApp.mjs'
|
||||||
|
import { HomeLayout } from 'site/components/layouts/home.mjs'
|
||||||
|
import { FreeSewingIcon } from 'shared/components/icons.mjs'
|
||||||
|
import { Popout } from 'shared/components/popout.mjs'
|
||||||
import themes from 'shared/themes/index.js'
|
import themes from 'shared/themes/index.js'
|
||||||
|
|
||||||
const translations = {
|
const translations = {
|
||||||
|
@ -39,9 +39,9 @@ const HomePage = () => {
|
||||||
const { t } = useTranslation(['common', 'patrons', 'locales', 'themes'])
|
const { t } = useTranslation(['common', 'patrons', 'locales', 'themes'])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page app={app} title={false} layout={Layout}>
|
<PageWrapper app={app} title={false} layout={HomeLayout}>
|
||||||
<div className="text-center w-full pt-20 pb-10 max-w-4xl m-auto">
|
<div className="text-center w-full pt-20 pb-10 max-w-4xl m-auto">
|
||||||
<FsIcon className="w-96 m-auto" />
|
<FreeSewingIcon className="w-96 m-auto" />
|
||||||
<h1>FreeSewing</h1>
|
<h1>FreeSewing</h1>
|
||||||
<h4>{translations.sade[app.locale]}</h4>
|
<h4>{translations.sade[app.locale]}</h4>
|
||||||
<Link href="/design" className="btn btn-primary btn-lg h-20 my-8 mb-12">
|
<Link href="/design" className="btn btn-primary btn-lg h-20 my-8 mb-12">
|
||||||
|
@ -101,7 +101,7 @@ const HomePage = () => {
|
||||||
</div>
|
</div>
|
||||||
{/* here to force Tailwind inclusion of the w-8 h-8 classes */}
|
{/* here to force Tailwind inclusion of the w-8 h-8 classes */}
|
||||||
<span className="w-8 h-8" />
|
<span className="w-8 h-8" />
|
||||||
</Page>
|
</PageWrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
import Page from 'site/components/wrappers/page.js'
|
|
||||||
import useApp from 'site/hooks/useApp.js'
|
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
|
||||||
import Layout from 'site/components/layouts/docs'
|
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
import DiscordIcon from 'shared/components/icons/discord'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
import GithubIcon from 'shared/components/icons/github'
|
import { PageWrapper } from 'site/components/wrappers/page.mjs'
|
||||||
import CcIcon from 'shared/components/icons/community'
|
import { useApp } from 'site/hooks/useApp.mjs'
|
||||||
import HeartIcon from 'shared/components/icons/heart'
|
import { DefaultLayout } from 'site/components/layouts/default.mjs'
|
||||||
import DocsIcon from 'shared/components/icons/docs'
|
import { DiscordIcon, GithubIcon, CcIcon, HeartIcon, DocsIcon } from 'shared/components/icons/docs'
|
||||||
|
|
||||||
const gh = `<a class="text-secondary hover:text-secondary-focus"
|
const gh = `<a class="text-secondary hover:text-secondary-focus"
|
||||||
href="https://github.com/freesewing/freesewing">freesewing/freesewing</a>`
|
href="https://github.com/freesewing/freesewing">freesewing/freesewing</a>`
|
||||||
|
@ -51,7 +47,7 @@ const SupportPage = (props) => {
|
||||||
const app = useApp()
|
const app = useApp()
|
||||||
const { t } = useTranslation(['common', 'patrons'])
|
const { t } = useTranslation(['common', 'patrons'])
|
||||||
return (
|
return (
|
||||||
<Page app={app} title={t('support')} layout={Layout}>
|
<PageWrapper app={app} title={t('support')} layout={DefaultLayout}>
|
||||||
<h2 className="border-0">Discord</h2>
|
<h2 className="border-0">Discord</h2>
|
||||||
<div className="flex flex-row flex-wrap gap-2">
|
<div className="flex flex-row flex-wrap gap-2">
|
||||||
<p className="max-w-3xl">{translations.discord[app.locale]}</p>
|
<p className="max-w-3xl">{translations.discord[app.locale]}</p>
|
||||||
|
@ -116,7 +112,7 @@ const SupportPage = (props) => {
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</PageWrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useBackend } from 'site/hooks/useBackend.mjs'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
import { validateEmail, validateTld } from 'shared/utils.mjs'
|
import { validateEmail, validateTld } from 'site/utils.mjs'
|
||||||
// Components
|
// Components
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { PageWrapper } from 'site/components/wrappers/page.mjs'
|
import { PageWrapper } from 'site/components/wrappers/page.mjs'
|
||||||
|
|
17
sites/org/utils.mjs
Normal file
17
sites/org/utils.mjs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import tlds from 'tlds/index.json' assert { type: 'json' }
|
||||||
|
|
||||||
|
/** Validates an email address for correct syntax */
|
||||||
|
export const validateEmail = (email) => {
|
||||||
|
/* eslint-disable */
|
||||||
|
const re =
|
||||||
|
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
||||||
|
/* eslint-enable */
|
||||||
|
return re.test(email)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Validates the top level domain (TLT) for an email address */
|
||||||
|
export const validateTld = (email) => {
|
||||||
|
const tld = email.split('@').pop().split('.').pop().toLowerCase()
|
||||||
|
if (tlds.indexOf(tld) === -1) return tld
|
||||||
|
else return true
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
import { useLocalStorage } from 'shared/hooks/useLocalStorage'
|
|
||||||
import { useEffect } from 'react'
|
import { useEffect } from 'react'
|
||||||
|
import { useLocalStorage } from 'shared/hooks/useLocalStorage.mjs'
|
||||||
|
|
||||||
export function useTheme() {
|
export const useTheme = () => {
|
||||||
// make a local storage item for the theme
|
// make a local storage item for the theme
|
||||||
const [storedTheme, setStoredTheme, ready] = useLocalStorage('theme', undefined)
|
const [storedTheme, setStoredTheme, ready] = useLocalStorage('theme', undefined)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// This is CJS because Tailwind does not (yet) support ESM
|
||||||
const light = require('./light')
|
const light = require('./light')
|
||||||
const dark = require('./dark')
|
const dark = require('./dark')
|
||||||
const hax0r = require('./hax0r')
|
const hax0r = require('./hax0r')
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import get from 'lodash.get'
|
import get from 'lodash.get'
|
||||||
import set from 'lodash.set'
|
import set from 'lodash.set'
|
||||||
import orderBy from 'lodash.orderby'
|
import orderBy from 'lodash.orderby'
|
||||||
import tlds from 'tlds/index.json' assert { type: 'json' }
|
|
||||||
|
|
||||||
// Generic rounding method
|
// Generic rounding method
|
||||||
export const round = (val, decimals = 1) =>
|
export const round = (val, decimals = 1) =>
|
||||||
|
@ -189,19 +188,3 @@ export const optionsMenuStructure = (options) => {
|
||||||
|
|
||||||
return menu
|
return menu
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Validates an email address for correct syntax */
|
|
||||||
export const validateEmail = (email) => {
|
|
||||||
/* eslint-disable */
|
|
||||||
const re =
|
|
||||||
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
||||||
/* eslint-enable */
|
|
||||||
return re.test(email)
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Validates the top level domain (TLT) for an email address */
|
|
||||||
export const validateTld = (email) => {
|
|
||||||
const tld = email.split('@').pop().split('.').pop().toLowerCase()
|
|
||||||
if (tlds.indexOf(tld) === -1) return tld
|
|
||||||
else return true
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue