From 8ec48e7db8c80e1307ec8c78790fe21b3f727c2b Mon Sep 17 00:00:00 2001 From: joostdecock Date: Thu, 27 Jul 2023 21:03:49 +0200 Subject: [PATCH] wip(org): Started reworking the home page --- sites/org/components/footer/de.yaml | 7 - sites/org/components/footer/en.yaml | 7 - sites/org/components/footer/es.yaml | 7 - sites/org/components/footer/fr.yaml | 7 - sites/org/components/footer/index.mjs | 158 --------------- sites/org/components/footer/nl.yaml | 7 - sites/org/components/footer/uk.yaml | 7 - sites/org/pages/index.mjs | 242 +++++++++++++++++++---- sites/shared/components/footer/de.yaml | 1 - sites/shared/components/footer/en.yaml | 1 - sites/shared/components/footer/es.yaml | 1 - sites/shared/components/footer/fr.yaml | 1 - sites/shared/components/footer/index.mjs | 11 +- sites/shared/components/footer/nl.yaml | 1 - sites/shared/components/footer/uk.yaml | 1 - sites/shared/i18n/common/en.yaml | 2 + sites/shared/i18n/common/nl.yaml | 3 +- 17 files changed, 212 insertions(+), 252 deletions(-) delete mode 100644 sites/org/components/footer/de.yaml delete mode 100644 sites/org/components/footer/en.yaml delete mode 100644 sites/org/components/footer/es.yaml delete mode 100644 sites/org/components/footer/fr.yaml delete mode 100644 sites/org/components/footer/index.mjs delete mode 100644 sites/org/components/footer/nl.yaml delete mode 100644 sites/org/components/footer/uk.yaml delete mode 100644 sites/shared/components/footer/de.yaml delete mode 100644 sites/shared/components/footer/en.yaml delete mode 100644 sites/shared/components/footer/es.yaml delete mode 100644 sites/shared/components/footer/fr.yaml delete mode 100644 sites/shared/components/footer/nl.yaml delete mode 100644 sites/shared/components/footer/uk.yaml diff --git a/sites/org/components/footer/de.yaml b/sites/org/components/footer/de.yaml deleted file mode 100644 index d6ef817bd7d..00000000000 --- a/sites/org/components/footer/de.yaml +++ /dev/null @@ -1,7 +0,0 @@ -cc: Content on FreeSewing.org is available under a Creative Commons license -mit: The FreeSewing source code is available on Github under the MIT license -sponsors: FreeSewing is sponsored by these awesome companies -algolia: Suche powered by Algolia -crowdin: Übersetzung powered by Crowdin -bugsnag: Error handling by Bugsnag -vercel: Builds & Hosting by Vercel diff --git a/sites/org/components/footer/en.yaml b/sites/org/components/footer/en.yaml deleted file mode 100644 index 2bcd541eb47..00000000000 --- a/sites/org/components/footer/en.yaml +++ /dev/null @@ -1,7 +0,0 @@ -cc: Content on FreeSewing.org is available under a Creative Commons license -mit: The FreeSewing source code is available on Github under the MIT license -sponsors: FreeSewing is sponsored by these awesome companies -algolia: Search powered by Algolia -crowdin: Translation powered by Crowdin -bugsnag: Error handling by Bugsnag -vercel: Builds & Hosting by Vercel diff --git a/sites/org/components/footer/es.yaml b/sites/org/components/footer/es.yaml deleted file mode 100644 index 2dd47a1ad02..00000000000 --- a/sites/org/components/footer/es.yaml +++ /dev/null @@ -1,7 +0,0 @@ -cc: Content on FreeSewing.org is available under a Creative Commons license -mit: The FreeSewing source code is available on Github under the MIT license -sponsors: FreeSewing is sponsored by these awesome companies -algolia: Búsqueda con Algolia -crowdin: Traducción realizada por Crowdin -bugsnag: Error handling by Bugsnag -vercel: Builds & Hosting by Vercel diff --git a/sites/org/components/footer/fr.yaml b/sites/org/components/footer/fr.yaml deleted file mode 100644 index 71bea599856..00000000000 --- a/sites/org/components/footer/fr.yaml +++ /dev/null @@ -1,7 +0,0 @@ -cc: Content on FreeSewing.org is available under a Creative Commons license -mit: The FreeSewing source code is available on Github under the MIT license -sponsors: FreeSewing is sponsored by these awesome companies -algolia: Recherche alimentée par Algolia -crowdin: Traduction optimisée par Crowdin -bugsnag: Error handling by Bugsnag -vercel: Builds & Hosting by Vercel diff --git a/sites/org/components/footer/index.mjs b/sites/org/components/footer/index.mjs deleted file mode 100644 index 7a4fd79f478..00000000000 --- a/sites/org/components/footer/index.mjs +++ /dev/null @@ -1,158 +0,0 @@ -import Link from 'next/link' -import { FreeSewingLogo } from 'shared/components/logos/freesewing.mjs' -import { OsiLogo } from 'shared/components/logos/osi.mjs' -import { CCLogo } from 'shared/components/logos/cc.mjs' -import { CCByLogo } from 'shared/components/logos/cc-by.mjs' -import { Ribbon } from 'shared/components/ribbon.mjs' -import { WordMark } from 'shared/components/wordmark.mjs' -import { useTranslation } from 'next-i18next' -import { useTheme } from 'shared/hooks/use-theme.mjs' -import { freeSewingConfig } from 'site/freesewing.config.mjs' -import { - HelpIcon, - DiscordIcon, - FacebookIcon, - GithubIcon, - InstagramIcon, - RedditIcon, - TwitterIcon, -} from 'shared/components/icons.mjs' - -const icon = { className: 'w-8 lg:w-12 h-8 lg:h-12' } -const social = { - Discord: { - icon: , - href: 'https://discord.freesewing.org/', - }, - Instagram: { - icon: , - href: 'https://instagram.com/freesewing_org', - }, - Facebook: { - icon: , - href: 'https://www.facebook.com/groups/627769821272714/', - }, - Github: { - icon: , - href: 'https://github.com/freesewing', - }, - Reddit: { - icon: , - href: 'https://www.reddit.com/r/freesewing/', - }, - Twitter: { - icon: , - href: 'https://twitter.com/freesewing_org', - }, -} - -export const ns = ['footer'] - -/* - * Named exports are better than default exports - */ -export const Footer = ({ app }) => { - const { t } = useTranslation(ns) - const { theme } = useTheme() - - return ( -
- -
- {/* First col - CC & MIT */} -
-
-
- -
-
- -

- {t('cc')} -

-
- -
-
- - {/* Second col - Social & Sponsors */} -
- {/* Social icons */} -
- - - - {Object.keys(social).map((item) => ( - - {social[item].icon} - - ))} -
- {/* Sponsors */} -
-

- {t('sponsors')} -
-

- -
-
- - {/* Col 3 - Logo & Slogan */} -
-
- -
- -
-

- Come for the sewing patterns -
- Stay for the community -

-
-
-
-
- ) -} diff --git a/sites/org/components/footer/nl.yaml b/sites/org/components/footer/nl.yaml deleted file mode 100644 index 5d685ec7072..00000000000 --- a/sites/org/components/footer/nl.yaml +++ /dev/null @@ -1,7 +0,0 @@ -cc: Inhoud op FreeSewing.org is beschikbaar onder een Creative Commons licentie -mit: De broncode van FreeSewing is beschikbaar op Github onder de MIT-licentie -sponsors: FreeSewing wordt gesponsord door deze geweldige bedrijven -algolia: Zoekfunctie door Algolia -crowdin: Vertaalsoftware door Crowdin -bugsnag: Fout rapportage door Bugsnag -vercel: Builds & Hosting door Vercel diff --git a/sites/org/components/footer/uk.yaml b/sites/org/components/footer/uk.yaml deleted file mode 100644 index d0f2b7a92c7..00000000000 --- a/sites/org/components/footer/uk.yaml +++ /dev/null @@ -1,7 +0,0 @@ -cc: Content on FreeSewing.org is available under a Creative Commons license -mit: The FreeSewing source code is available on Github under the MIT license -sponsors: FreeSewing is sponsored by these awesome companies -algolia: Пошук за допомогою Algolia -crowdin: Переклад зроблено за допомогою Crowdin -bugsnag: Error handling by Bugsnag -vercel: Builds & Hosting by Vercel diff --git a/sites/org/pages/index.mjs b/sites/org/pages/index.mjs index af8de11cb92..dd250aac400 100644 --- a/sites/org/pages/index.mjs +++ b/sites/org/pages/index.mjs @@ -1,13 +1,140 @@ // Dependencies import { serverSideTranslations } from 'next-i18next/serverSideTranslations' -//import { useTranslation } from 'next-i18next' -import Head from 'next/head' +import { nsMerge } from 'shared/utils.mjs' +// Hooks +import { useState, useEffect } from 'react' +import { useTranslation } from 'next-i18next' // Components -import { PageWrapper } from 'shared/components/wrappers/page.mjs' +import Head from 'next/head' +import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs' import { Popout } from 'shared/components/popout/index.mjs' import { PageLink } from 'shared/components/page-link.mjs' import { BareLayout } from 'site/components/layouts/bare.mjs' import { ForceAccountCheck } from 'shared/components/account/force-account-check.mjs' +import { DownIcon } from 'shared/components/icons.mjs' +import { logoPath } from 'shared/components/logos/freesewing.mjs' + +const ns = nsMerge(pageNs, 'common') + +const Animation = ({ + className = 'w-6 h-6', + stroke = 2, + slogan1, slogan2 +}) => ( + + + + + + + + + + + + + FreeSewing + + + {slogan1} + + + {slogan2} + + + + +) + +const BoldLink = ({ href, children }) => ( + + {children} + +) /* * Each page MUST be wrapped in the PageWrapper component. @@ -15,45 +142,78 @@ import { ForceAccountCheck } from 'shared/components/account/force-account-check * when path and locale come from static props (as here) * or set them manually. */ -const HomePage = ({ page }) => ( - - - Welcome to FreeSewing.org - -
-
- - - Create homepage. Meanwhile check - -

What is FreeSewing?

- (by ChatGPT) -

- Freesewing is an open-source pattern making software that allows users to generate custom - sewing patterns based on their own measurements. It is designed to be flexible and - customizable, and can be used to create a wide range of garments, from simple t-shirts and - skirts to more complex dresses and jackets. -

-

- Freesewing is available for free, and users can access a wide range of pre-made patterns - or create their own from scratch. The software is designed to be easy to use, with an - intuitive interface that guides users through the process of creating a pattern - step-by-step. -

-

- In addition to the pattern making software, freesewing also has an active online community - of sewists and pattern makers who share tips, techniques, and advice on all aspects of - sewing. The community also collaborates on creating new patterns and improving existing - ones, and users can contribute their own patterns to the project as well. -

-

- Overall, freesewing is a powerful tool for anyone interested in sewing and pattern making, - whether they are seasoned professionals or beginners just starting out. -

+const HomePage = ({ page }) => { + const [ready, setReady] = useState(false) + const { t } = useTranslation(ns) + + useEffect(() => { + setTimeout(() => setReady(true), 4000) + },[]) + + return ( + + + + Welcome to FreeSewing.org + +
+
+ + + +
-
- -) + +
+
+
+
+

What is FreeSewing?

+

+ FreeSewing is open source software to generate made-to-measure sewing patterns, loved by home sewers and fashion entrepreneurs alike. +

+

+ FreeSewing.org makes this software available to you as an online tool with unmatched custimization and flexibility. + We have over 50 designs, and regularly add new ones. + You can pick any design and generate a pattern to your exact measurements. +

+

+ Because made-to-measure lies at the heart of what we do, we strongly suggest you take accurate measurements. + Industry sizing is a bunch of lies. Join the slow fashion revolution and enjoy clothes that fit you. +

+
+
+ +
+
+

What is FreeSewing not?

+

+ FreeSewing is not a company. We do not sell anything. We do not have staff or employees. We do not have an office. We do not get paid. +

+

+ Our websites do not contain any advertising. + We do not track you or sell your personal data. We do not violate your privacy. +

+

+ FreeSewing is not gendered. We do not exclude or discriminate. Nor do we tolerate discrimination in our community. +

+

+ FreeSewing is not perfect. But we try our best. + When we come up short, we will not be upset when you point it out. +
+ In fact, that is how we got to where we are today. + +

+
+
+ +
+
+ + + + ) +} export default HomePage diff --git a/sites/shared/components/footer/de.yaml b/sites/shared/components/footer/de.yaml deleted file mode 100644 index e47ff6b37a4..00000000000 --- a/sites/shared/components/footer/de.yaml +++ /dev/null @@ -1 +0,0 @@ -sponsors: bla bla diff --git a/sites/shared/components/footer/en.yaml b/sites/shared/components/footer/en.yaml deleted file mode 100644 index e47ff6b37a4..00000000000 --- a/sites/shared/components/footer/en.yaml +++ /dev/null @@ -1 +0,0 @@ -sponsors: bla bla diff --git a/sites/shared/components/footer/es.yaml b/sites/shared/components/footer/es.yaml deleted file mode 100644 index e47ff6b37a4..00000000000 --- a/sites/shared/components/footer/es.yaml +++ /dev/null @@ -1 +0,0 @@ -sponsors: bla bla diff --git a/sites/shared/components/footer/fr.yaml b/sites/shared/components/footer/fr.yaml deleted file mode 100644 index e47ff6b37a4..00000000000 --- a/sites/shared/components/footer/fr.yaml +++ /dev/null @@ -1 +0,0 @@ -sponsors: bla bla diff --git a/sites/shared/components/footer/index.mjs b/sites/shared/components/footer/index.mjs index 157e7f894b9..d842e1a1f74 100644 --- a/sites/shared/components/footer/index.mjs +++ b/sites/shared/components/footer/index.mjs @@ -3,6 +3,7 @@ import orderBy from 'lodash.orderby' import { NavigationContext } from 'shared/context/navigation-context.mjs' // Hooks import { useContext } from 'react' +import { useTranslation } from 'next-i18next' // Components import Link from 'next/link' import { Ribbon } from 'shared/components/ribbon.mjs' @@ -10,13 +11,15 @@ import { WordMark } from 'shared/components/wordmark.mjs' import { SocialIcons } from 'shared/components/social/icons.mjs' import { Sponsors, ns as sponsorsNs } from 'shared/components/sponsors/index.mjs' import { FreeSewingIcon } from 'shared/components/icons.mjs' -export const ns = ['footer', ...sponsorsNs] + +export const ns = ['common', ...sponsorsNs] const onlyFooterLinks = (tree) => orderBy(tree, ['t'], ['asc']).filter((entry) => entry.f) export const Footer = () => { // Grab siteNav from the navigation context const { siteNav } = useContext(NavigationContext) + const { t } = useTranslation(ns) return (
diff --git a/sites/shared/components/footer/nl.yaml b/sites/shared/components/footer/nl.yaml deleted file mode 100644 index e47ff6b37a4..00000000000 --- a/sites/shared/components/footer/nl.yaml +++ /dev/null @@ -1 +0,0 @@ -sponsors: bla bla diff --git a/sites/shared/components/footer/uk.yaml b/sites/shared/components/footer/uk.yaml deleted file mode 100644 index b795b15b9d6..00000000000 --- a/sites/shared/components/footer/uk.yaml +++ /dev/null @@ -1 +0,0 @@ -sponsors: бла-бла-бла. diff --git a/sites/shared/i18n/common/en.yaml b/sites/shared/i18n/common/en.yaml index 389c6114bcb..8b50f2a3cdd 100644 --- a/sites/shared/i18n/common/en.yaml +++ b/sites/shared/i18n/common/en.yaml @@ -1,3 +1,5 @@ freesewing: FreeSewing sitemap: Sitemap youAreHere: You are here +slogan1: Come for the sewing patterns +slogan2: Stay for the community diff --git a/sites/shared/i18n/common/nl.yaml b/sites/shared/i18n/common/nl.yaml index 60cefb8709a..4d513dd00fa 100644 --- a/sites/shared/i18n/common/nl.yaml +++ b/sites/shared/i18n/common/nl.yaml @@ -1,3 +1,4 @@ freesewing: FreeSewing sitemap: Sitemap -youAreHere: U bevindt zich hier +slogan1: Kom voor de naaipatronen op maat +slogan2: Blijf voor je nieuwe naai-maten