From 72d8b4e6bee0ffac79e96dd649a9da2adb86b507 Mon Sep 17 00:00:00 2001 From: name Date: Wed, 27 Sep 2023 11:34:23 +0000 Subject: 2023-09-26 --- docusaurus/.dockerignore | 6 +- docusaurus/.gitignore | 6 +- docusaurus/babel.config.js | 7 +- docusaurus/docs/acknowledgment.mdx | 81 +++-- docusaurus/docs/community.mdx | 50 +-- docusaurus/docs/dmca.mdx | 12 - docusaurus/docs/index.mdx | 95 +++-- docusaurus/docs/mirror.mdx | 18 +- docusaurus/docs/source.mdx | 37 +- docusaurus/docusaurus.config.js | 41 +-- docusaurus/package.json | 10 +- docusaurus/sidebars.config.js | 19 + docusaurus/sidebars.js | 29 -- docusaurus/src/components/ButtonLink.tsx | 35 +- docusaurus/src/components/FormCTA.tsx | 27 +- docusaurus/src/components/FormQuickStart.tsx | 35 -- docusaurus/src/components/InputMathProblems.tsx | 26 +- docusaurus/src/components/ShowStepButton.tsx | 25 -- docusaurus/src/components/SubmitButton.tsx | 22 ++ docusaurus/src/css/custom.css | 52 ++- docusaurus/src/functions/submitMathInputForm.ts | 23 ++ docusaurus/src/functions/submitMathInputForm.tsx | 23 -- docusaurus/src/functions/typescriptNever.ts | 10 + docusaurus/src/theme/Footer/InputPreloader.tsx | 46 ++- docusaurus/src/theme/Footer/index.tsx | 27 +- docusaurus/src/theme/NotFound/DDoSProtection.tsx | 13 +- docusaurus/src/theme/NotFound/Redirection.tsx | 59 ++++ docusaurus/src/theme/NotFound/index.tsx | 37 +- docusaurus/src/theme/NotFound/redirectInput.tsx | 70 ---- docusaurus/static/.htaccess | 1 + .../chunks/pages/examples-26aec7eb12db3258.js | 0 .../static/images/blueLaptopLarge_2mT4E7sC.png | 0 .../static/images/blueLaptopSmall_2HE8DlL-.png | 0 .../static/images/purpleLaptopLarge_3J6pajKV.png | 0 .../static/images/purpleLaptopSmall_QQ5wFSVR.png | 0 .../static/images/tealLaptopLarge_2Y_KGBw9.png | 0 .../static/images/tealLaptopSmall_1Xxic2d8.png | 0 .../libs/wolfree/2023.8.31/css/Placeholder.css | 85 +++++ .../ajax/libs/wolfree/2023.8.31/css/PodsParser.css | 120 +++++++ .../ajax/libs/wolfree/23.7.8/css/Placeholder.css | 90 ----- .../ajax/libs/wolfree/23.7.8/css/PodsParser.css | 125 ------- .../static/ajax/libs/wolfree/23.7.8/js/AJAX.js | 56 --- .../static/ajax/libs/wolfree/23.7.8/js/AppID.js | 57 --- .../ajax/libs/wolfree/23.7.8/js/Entrypoint.js | 26 -- .../ajax/libs/wolfree/23.7.8/js/Placeholder.js | 69 ---- .../static/ajax/libs/wolfree/23.7.8/js/Pods.js | 56 --- .../ajax/libs/wolfree/23.7.8/js/PodsParser.js | 201 ----------- .../ajax/libs/wolfree/23.7.8/js/PostProcessor.js | 63 ---- .../ajax/libs/wolfree/23.7.8/js/Preprocessor.js | 29 -- .../ajax/libs/wolfree/23.7.8/js/Processor.js | 54 --- .../ajax/libs/wolfree/23.7.8/js/SearchParams.js | 44 --- .../static/ajax/libs/wolfree/23.7.8/js/onload.js | 51 --- docusaurus/static/instances.json | 2 +- docusaurus/static/n/v1/api/autocomplete/index.html | 5 + docusaurus/static/n/v1/api/randomizer | 14 + .../static/n/v1/api/samplefiles/fileinput/examples | 0 docusaurus/static/n/v1/api/sourcer/dataSources | 12 + docusaurus/static/n/v1/api/sourcer/index.html | 10 + docusaurus/static/users/me/account | 388 +++++++++++++++++++++ docusaurus/tsconfig.json | 17 +- docusaurus/wolfree.config.js | 6 + 61 files changed, 1088 insertions(+), 1434 deletions(-) delete mode 100644 docusaurus/docs/dmca.mdx create mode 100644 docusaurus/sidebars.config.js delete mode 100644 docusaurus/sidebars.js delete mode 100644 docusaurus/src/components/FormQuickStart.tsx delete mode 100644 docusaurus/src/components/ShowStepButton.tsx create mode 100644 docusaurus/src/components/SubmitButton.tsx create mode 100644 docusaurus/src/functions/submitMathInputForm.ts delete mode 100644 docusaurus/src/functions/submitMathInputForm.tsx create mode 100644 docusaurus/src/functions/typescriptNever.ts create mode 100644 docusaurus/src/theme/NotFound/Redirection.tsx delete mode 100644 docusaurus/src/theme/NotFound/redirectInput.tsx create mode 100644 docusaurus/static/.htaccess create mode 100644 docusaurus/static/_next/static/chunks/pages/examples-26aec7eb12db3258.js create mode 100644 docusaurus/static/_next/static/images/blueLaptopLarge_2mT4E7sC.png create mode 100644 docusaurus/static/_next/static/images/blueLaptopSmall_2HE8DlL-.png create mode 100644 docusaurus/static/_next/static/images/purpleLaptopLarge_3J6pajKV.png create mode 100644 docusaurus/static/_next/static/images/purpleLaptopSmall_QQ5wFSVR.png create mode 100644 docusaurus/static/_next/static/images/tealLaptopLarge_2Y_KGBw9.png create mode 100644 docusaurus/static/_next/static/images/tealLaptopSmall_1Xxic2d8.png create mode 100644 docusaurus/static/ajax/libs/wolfree/2023.8.31/css/Placeholder.css create mode 100644 docusaurus/static/ajax/libs/wolfree/2023.8.31/css/PodsParser.css delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/css/Placeholder.css delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/css/PodsParser.css delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/AJAX.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/AppID.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/Entrypoint.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/Placeholder.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/Pods.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/PodsParser.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/PostProcessor.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/Preprocessor.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/Processor.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/SearchParams.js delete mode 100644 docusaurus/static/ajax/libs/wolfree/23.7.8/js/onload.js delete mode 100644 docusaurus/static/n/v1/api/samplefiles/fileinput/examples create mode 100644 docusaurus/wolfree.config.js (limited to 'docusaurus') diff --git a/docusaurus/.dockerignore b/docusaurus/.dockerignore index 019391a..ecec047 100644 --- a/docusaurus/.dockerignore +++ b/docusaurus/.dockerignore @@ -1,7 +1,3 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later -# This file is part of Wolfree. -# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - # Dependencies /node_modules @@ -24,3 +20,5 @@ yarn-debug.log* yarn-error.log* package-lock.json + +# SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/docusaurus/.gitignore b/docusaurus/.gitignore index 019391a..ecec047 100644 --- a/docusaurus/.gitignore +++ b/docusaurus/.gitignore @@ -1,7 +1,3 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later -# This file is part of Wolfree. -# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - # Dependencies /node_modules @@ -24,3 +20,5 @@ yarn-debug.log* yarn-error.log* package-lock.json + +# SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/docusaurus/babel.config.js b/docusaurus/babel.config.js index e4fb2e2..6b4342b 100644 --- a/docusaurus/babel.config.js +++ b/docusaurus/babel.config.js @@ -1,9 +1,4 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ // @ts-check diff --git a/docusaurus/docs/acknowledgment.mdx b/docusaurus/docs/acknowledgment.mdx index e711148..3e10178 100644 --- a/docusaurus/docs/acknowledgment.mdx +++ b/docusaurus/docs/acknowledgment.mdx @@ -1,87 +1,94 @@ +--- +title: Acknowledgment +hide_title: true +--- + + + # Acknowledgment -We extend our heartfelt gratitude to the communities and projects that promote diversity, equity, and inclusion on the Internet. Their efforts have been instrumental in distributing our free and open-source software. +Wolfree developers extend heartfelt gratitude to the communities and projects that promote diversity, equity, and inclusion on the Internet. Their efforts have been instrumental in distributing free and open-source software for Wolfree developers. ## The Fediverse -Our community distributes source code on the Fediverse. +Wolfree developers distribute source code on the Fediverse. The Fediverse is a federation of numerous independently hosted servers that connect various social media platforms. It enables seamless interactions across compatible platforms, encompassing social media services for blogging, photo sharing, and video sharing. Discover the Fediverse with these resources: -- [**Fediverse Info**](https://fediverse.info/): A beginner-friendly introduction to the Fediverse. -- [**FediDB**](https://fedidb.org/): Visualized network statistics of the Fediverse. -- [**Mastodon Documentation**](https://docs.joinmastodon.org/): Comprehensive documentation for Mastodon, a self-hosted social networking service similar to Twitter. -- [**JoinFediverse Wiki**](https://joinfediverse.wiki/): An informative encyclopedia for the Fediverse. -- [**FediList**](http://demo.fedilist.com/): A simple website to explore instances on the Fediverse and facilitate discovery and connections. -- [**The Federation**](https://the-federation.info/): Indexed instances and statistics for the Fediverse. +- [Fediverse Info](https://fediverse.info/): A beginner-friendly introduction to the Fediverse. +- [Mastodon Documentation](https://docs.joinmastodon.org/): Comprehensive documentation for Mastodon, a self-hosted social networking service similar to Twitter. +- [JoinFediverse Wiki](https://joinfediverse.wiki/): An informative encyclopedia for the Fediverse. +- [FediDB](https://fedidb.org/): Visualized network statistics of the Fediverse. +- [FediList](http://demo.fedilist.com/): A simple website to explore instances on the Fediverse and facilitate discovery and connections. +- [The Federation](https://the-federation.info/): Indexed instances and statistics for the Fediverse. ## ForgeFed -Our community hosts source code on web services compatible with ForgeFed. +Wolfree developers host source code on web services compatible with ForgeFed. ForgeFed specifies an essential federation protocol for version control services, promoting collaboration and cooperation. Explore ForgeFed and related projects: -- [**ForgeFed**](https://forgefed.org/): The canonical website to learn more about the benefits and workings of ForgeFed. -- [**Gitea**](https://about.gitea.com/): A self-hosted Git service powering numerous instances across the Fediverse. -- [**Forgejo**](https://forgejo.org/): A soft fork of Gitea maintained by an inclusive community. +- [ForgeFed](https://forgefed.org/): The canonical website to learn more about the benefits and workings of ForgeFed. +- [Gitea](https://about.gitea.com/): A self-hosted Git service powering numerous instances across the Fediverse. +- [Forgejo](https://forgejo.org/): A soft fork of Gitea maintained by an inclusive community. ## Copyleft -Our community releases source code under a copyleft license. +Wolfree developers release source code under a copyleft license. Copyleft is a legal technique that safeguards the freedom to copy and modify derivative works. Discover the significance of copyleft through these resources: -- [**Blue Oak Council**](https://blueoakcouncil.org/primer): A comprehensive guide to open software licensing, making it accessible and understandable. -- [**What is Copyleft**](https://www.gnu.org/licenses/copyleft.html.en): An explanation of copyleft, reinforcing the importance of free software. -- [**Why Copyleft**](https://www.gnu.org/philosophy/why-copyleft.html.en): A showcase of the benefits of copyleft licenses to inspire more creators to embrace copyleft licensing. -- [**Why I Use the GPL and Not Cuck Licenses**](https://lukesmith.xyz/articles/why-i-use-the-gpl-and-not-cuck-licenses/): An elaboration on the advantages of copyleft. +- [Blue Oak Council](https://blueoakcouncil.org/primer): A comprehensive guide to open software licensing, making it accessible and understandable. +- [What is Copyleft](https://www.gnu.org/licenses/copyleft.html.en): An explanation of copyleft, reinforcing the importance of free software. +- [Why Copyleft](https://www.gnu.org/philosophy/why-copyleft.html.en): A showcase of the benefits of copyleft licenses to inspire more creators to embrace copyleft licensing. +- [Why I Use the GPL and Not Cuck Licenses](https://lukesmith.xyz/articles/why-i-use-the-gpl-and-not-cuck-licenses/): An elaboration on the advantages of copyleft. ## Anna's Archive Anna's Archive is a non-profit online shadow library metasearch engine that provides access to a curated collection of book resources managed by anonymous archivists. Anna's Archive keeps backups of popular shadow libraries like Sci-Hub, Library Genesis, and Z-Library. -- [**Anna's Archive - Wikipedia**](https://en.wikipedia.org/wiki/Anna's_Archive): A wiki page about Anna's Archive on the free encyclopedia. +- [Anna's Archive - Wikipedia](https://en.wikipedia.org/wiki/Anna's_Archive): A wiki page about Anna's Archive on the free encyclopedia. ## The Internet Archive -Our community archives source code on the Internet Archive. +Wolfree developers archive source code on the Internet Archive. The Internet Archive is a non-profit library that lends digital copies of books. Despite facing challenges related to copyright issues, they continue to fight for the rights of libraries to own and lend ebooks. Learn more about their ongoing efforts through these articles: -- [**Hachette v. Internet Archive**](https://www.eff.org/cases/hachette-v-Internet-archive) -- [**Fair Use Creep Is A Feature, Not a Bug**](https://www.eff.org/deeplinks/2023/01/fair-use-creep-feature-not-bug) -- [**The Fight Continues**](https://blog.archive.org/2023/03/25/the-fight-continues/) +- [Hachette v. Internet Archive](https://www.eff.org/cases/hachette-v-internet-archive) +- [Fair Use Creep Is A Feature, Not a Bug](https://www.eff.org/deeplinks/2023/01/fair-use-creep-feature-not-bug) +- [Internet Archive Seeks Summary Judgment in Federal Lawsuit Filed By Publishing Companies](https://blog.archive.org/2022/07/08/internet-archive-seeks-summary-judgment-in-federal-lawsuit-filed-by-publishing-companies/) +- [What the Hachette v. Internet Archive Decision Means for Our Library](https://blog.archive.org/2023/08/17/what-the-hachette-v-internet-archive-decision-means-for-our-library/) -## Censorship Circumvention +## Censorship circumvention Safely circumventing censorship is crucial in fostering diversity, equity, and inclusion on the Internet. Enhance your knowledge of safety measures for censorship circumvention with these resources: -- [**Privacy Guides**](https://privacyguides.org/): A user-friendly guide promoting data security and privacy. -- [**Mullvad Browser**](https://mullvad.net/en/browser): A privacy-focused web browser developed in collaboration between Mullvad VPN and the Tor Project. -- [**Tor Browser**](https://torproject.org/): A web browser capable of accessing the Tor network. -- [**Tails**](https://tails.net/): A Linux distribution aimed at preserving privacy and anonymity. -- [**Qubes OS**](https://qubes-os.org/): A Linux distribution that provides security through isolation. -- [**The Hitchhiker's Guide to Online Anonymity**](https://anonymousplanet.org/): An in-depth guide detailing online anonymity methods. +- [Privacy Guides](https://privacyguides.org/): A user-friendly guide promoting data security and privacy. +- [Mullvad Browser](https://mullvad.net/en/browser): A privacy-focused web browser developed in collaboration between Mullvad VPN and the Tor Project. +- [Tor Browser](https://torproject.org/): A web browser capable of accessing the Tor network. +- [Tails](https://tails.net/): A Linux distribution aimed at preserving privacy and anonymity. +- [Qubes OS](https://qubes-os.org/): A Linux distribution that provides security through isolation. +- [The Hitchhiker's Guide to Online Anonymity](https://anonymousplanet.org/): An in-depth guide detailing online anonymity methods. -## Net Neutrality +## Net neutrality -Upholding net neutrality is pivotal in nurturing diversity, equity, and inclusion on the Internet. It ensures that broadband Internet access services do not impair or degrade lawful Internet traffic based on content, application, or service, subject to reasonable network management. +Upholding net neutrality is pivotal in nurturing diversity, equity, and inclusion on the Internet. Net neutrality ensures that broadband Internet access services do not impair or degrade lawful Internet traffic based on content, application, or service, subject to reasonable network management. Learn more about net neutrality and its importance through these articles: -- [**We Need to Talk About Infrastructure**](https://www.eff.org/deeplinks/2022/12/we-need-talk-about-infrastructure): The importance of content-neutral essential Internet infrastructure and the challenges in defining what falls under this category. -- [**The Internet Is Not Facebook: Why Infrastructure Providers Should Stay Out of Content Policing**](https://www.eff.org/deeplinks/2022/10/Internet-not-facebook-why-infrastructure-providers-should-stay-out-content): The content policing of infrastructure providers due to complex challenges and potential harm to marginalized communities. -- [**International Coalition of Rights Groups Call on Internet Infrastructure Providers to Avoid Content Policing**](https://www.eff.org/press/releases/international-coalition-rights-groups-call-Internet-infrastructure-providers-avoid): Urging Internet infrastructure providers to avoid content policing, citing harm to users and human rights risks. -- [**Where the Sidewalk Ends: The Death of the Internet**](https://madattheInternet.substack.com/p/where-the-sidewalk-ends-the-death): The fragmenting of the Internet as national borders and government regulations stifle its openness and connectivity. - - +- [We Need to Talk About Infrastructure](https://www.eff.org/deeplinks/2022/12/we-need-talk-about-infrastructure): The importance of content-neutral essential Internet infrastructure and the challenges in defining what falls under this category. +- [The Internet Is Not Facebook: Why Infrastructure Providers Should Stay Out of Content Policing](https://www.eff.org/deeplinks/2022/10/Internet-not-facebook-why-infrastructure-providers-should-stay-out-content): The content policing of infrastructure providers due to complex challenges and potential harm to marginalized communities. +- [International Coalition of Rights Groups Call on Internet Infrastructure Providers to Avoid Content Policing](https://www.eff.org/press/releases/international-coalition-rights-groups-call-Internet-infrastructure-providers-avoid): Urging Internet infrastructure providers to avoid content policing, citing harm to users and human rights risks. +- [ISPs Should Not Police Online Speech - No Matter How Awful It Is.](https://www.eff.org/deeplinks/2023/08/isps-should-not-police-online-speech-no-matter-how-awful-it): Why ISPs should not be responsible for policing online speech, regardless of how offensive or harmful it may be. How endorsing censorship by ISPs sets a dangerous precedent against marginalized speakers and forums. +- [Where the Sidewalk Ends: The Death of the Internet](https://madattheInternet.substack.com/p/where-the-sidewalk-ends-the-death): The fragmenting of the Internet as national borders and government regulations stifle its openness and connectivity. diff --git a/docusaurus/docs/community.mdx b/docusaurus/docs/community.mdx index aebf053..4d848b9 100644 --- a/docusaurus/docs/community.mdx +++ b/docusaurus/docs/community.mdx @@ -1,21 +1,17 @@ -# Community +--- +title: Community +hide_title: true +--- -Welcome to our diverse and inclusive community! We encourage open discussions and warmly invite you to join the conversations. 🎉 - -:::note - -Our community thrives on the Fediverse, a decentralized social network that encompasses various platforms such as: + -- [Mastodon](https://joinmastodon.org/) -- [Pleroma](https://pleroma.social/) -- [Gitea](https://about.gitea.com/) -- [Forgejo](https://forgejo.org/) +# Wolfree community -::: +Welcome to the Wolfree community, a diverse and inclusive space where we encourage open discussions and invite you to join the conversations. 🎉 -## Mastodon and Pleroma +## Mastodon / Pleroma -We would love to hear your thoughts! Express yourself freely on Mastodon and Pleroma. +We would love to hear your thoughts. Express yourself freely on Mastodon and Pleroma. 1. https://poa.st/@wolfree 2. https://sb.bae.st/@wolfree @@ -23,19 +19,25 @@ We would love to hear your thoughts! Express yourself freely on Mastodon and Ple 4. https://spinster.xyz/@wolfree 5. https://freespeechextremist.com/wolfree -## Gitea and Forgejo +## Gitea / Forgejo -Feel free to contribute and [report issues](https://docs.github.com/en/issues) on Gitea and Forgejo. +Feel free to [report issues](https://docs.github.com/en/issues) on Gitea and Forgejo. -1. https://try.gitea.io/wolfree/issues/issues -2. https://codeberg.org/wolfree/issues/issues -3. https://git.disroot.org/wolfree/issues/issues -4. https://next.forgejo.org/wolfree/issues/issues -5. https://git.kiwifarms.net/wolfree/issues/issues -6. http://it7otdanqu7ktntxzm427cba6i53w6wlanlh23v5i3siqmos47pzhvyd.onion/wolfree/issues/issues +1. https://gitea.com/wolfree/issues/issues +2. https://try.gitea.io/wolfree/issues/issues +3. https://codeberg.org/wolfree/issues/issues +4. https://git.disroot.org/wolfree/issues/issues +5. https://next.forgejo.org/wolfree/issues/issues +6. https://git.kiwifarms.net/wolfree/issues/issues +7. http://it7otdanqu7ktntxzm427cba6i53w6wlanlh23v5i3siqmos47pzhvyd.onion/wolfree/issues/issues -## Diversity, Equity, and Inclusion +## Embracing diversity, equity, and inclusion -At our core, we strive to cultivate an environment that celebrates diversity, promotes equity, and upholds inclusion on the Internet. ❤️ We value and respect every voice. Let's connect and build a healthy, supportive community! +The Wolfree community thrives on the Fediverse, a decentralized social network that encompasses various platforms such as: - +- [Mastodon](https://joinmastodon.org/) +- [Pleroma](https://pleroma.social/) +- [Gitea](https://about.gitea.com/) +- [Forgejo](https://forgejo.org/) + +Wolfree developers strive to cultivate an environment that celebrates diversity, promotes equity, and upholds inclusion on the Internet. Let's connect and build a healthy, supportive community. ❤️ diff --git a/docusaurus/docs/dmca.mdx b/docusaurus/docs/dmca.mdx deleted file mode 100644 index 4bffc1e..0000000 --- a/docusaurus/docs/dmca.mdx +++ /dev/null @@ -1,12 +0,0 @@ -# DMCA takedown - -Below are some of the DMCA takedown notices issued by Wolfram Alpha LLC: - -1. [2021-08-11-wolfram.md](https://github.com/github/dmca/blob/master/2021/08/2021-08-11-wolfram.md) -2. [2021-08-16-wolfram.md](https://github.com/github/dmca/blob/master/2021/08/2021-08-16-wolfram.md) -3. [2022-09-22-wolfram.md](https://github.com/github/dmca/blob/master/2022/09/2022-09-22-wolfram.md) - -If you believe someone is using your copyrighted content unauthorizedly on GitHub or npm.js, please fill out the [Copyright claims form](https://github.com/contact/dmca) to submit a DMCA takedown notice to request that the content be changed or removed. -Before you begin, please read [GitHub's Copyright - DMCA Takedown Policy](https://docs.github.com/en/site-policy/content-removal-policies/dmca-takedown-policy). - -As with all legal matters, it is always best to consult a professional about your questions or situation. We strongly encourage you to do so before taking action that might impact your rights. This guide isn't legal advice. diff --git a/docusaurus/docs/index.mdx b/docusaurus/docs/index.mdx index 487c0b8..c6c6673 100644 --- a/docusaurus/docs/index.mdx +++ b/docusaurus/docs/index.mdx @@ -1,97 +1,90 @@ --- -slug: / title: Home page +hide_title: true +slug: / --- -#
Free Wolfram Alpha Step-by-Step Solutions - -Get free access to **step-by-step** solutions. Unlock the power of **Wolfram|Alpha Pro** for free. Wolfree is **free** and **open-source** software. Thousands of learners use Wolfree to bypass paywalls. + import FormCTA from "../src/components/FormCTA.tsx"; -import FormQuickStart from "../src/components/FormQuickStart.tsx"; +import submitMathInputForm from "../src/functions/submitMathInputForm.ts"; +import InputMathProblems from "../src/components/InputMathProblems.tsx"; +import SubmitButton from "../src/components/SubmitButton.tsx"; import ButtonLink from "../src/components/ButtonLink.tsx"; - +# Free Wolfram Alpha step-by-step solutions + +Get free access to **step-by-step** solutions. Unlock the power of **Wolfram|Alpha Pro** for free. Wolfree is **free** and **open-source** software. Thousands of learners use Wolfree to bypass paywalls. + + + +## How to get Wolfram Alpha step-by-step solutions for free + +
-
-
+1. Type your math problem in the text box. -## How To Use Wolfree + - +2. Click the "Show Steps" button. -
-
+ -## Mirror Sites +3. Explore the step-by-step solution provided. 🎉 -Wolfree operates through a network of mirror sites to ensure uninterrupted access to step-by-step solutions. If you can't access this web page, visit one of our [mirror sites](/mirror) to continue your learning journey. + -

- -

+## Mirror sites -
-
+If you can't access this web page, visit one of the [mirror sites](/mirror) to continue your learning journey. Wolfree operates through a network of mirror sites to ensure uninterrupted access to step-by-step solutions. -## Source Code + -Wolfree is **free** and **open-source** software. Our inclusive community welcomes individuals from diverse backgrounds to collaborate on our [source code](/source). Let's foster diversity, equity, and inclusion on the Internet. ❤️ +## Source code -

- -

+Wolfree is **free** and **open-source** software built on transparency and openness, welcoming individuals from diverse backgrounds to collaborate on [source code](/source). Let's foster diversity, equity, and inclusion on the Internet. ❤️ -
-
+ -## How Wolfree Works +## How Wolfree works Here's a simplified breakdown of how Wolfree works: 1. Programmers distribute the Dockerfile on Fediverse, including platforms compatible with ForgeFed, like Forgejo and Gitea. -2. Website operators install and run Docker. -3. Docker automatically downloads the Dockerfile from Fediverse and builds a Docker image. +2. Website operators install and run Docker Engine. +3. Docker Engine automatically downloads the Dockerfile from Fediverse and builds a Docker image. 4. Web hosting service providers deploy Wolfree mirror sites. 5. Internet service providers allow your web browser to connect to Wolfree mirror sites. -6. You gain **free** access to the computational capabilities of **Wolfram|Alpha Pro**. 🎉 +6. You gain access to the computational capabilities of **Wolfram|Alpha Pro**. 🎉 Wolfree leverages a [shadow library](https://en.wikipedia.org/wiki/Shadow_library) that shares **step-by-step** solutions, ensuring you have free access to the learning resources you need. -
-
- -## Testimonials - -Here's what our community has to say about Wolfree: +## Trusted by thousands of learners > "Wolfree has been a transformative addition to my academic journey. The **step-by-step** solutions powered by **Wolfram|Alpha Pro** have profoundly enriched my understanding of complex math concepts. Thanks to Wolfree, my grades have seen remarkable improvement. I now approach math confidently." - Olivia (they/them), Student. -> "As a math teacher, I wholeheartedly endorse Wolfree for my students. The **step-by-step** solutions promote genuine comprehension of math concepts. By incorporating the computational capabilities of **Wolfram|Alpha Pro** into my classroom, Wolfree has significantly elevated my students' learning experiences." - Mx. Smith (they/them), Educator. - -
-
+> "As a math teacher, I wholeheartedly endorse Wolfree for my students. The **step-by-step** solutions promote genuine comprehension of math concepts. By incorporating the computational capabilities of **Wolfram|Alpha Pro** into my classroom, Wolfree has measurably enhanced my students' learning outcomes." - Mx. Smith, Educator. -## What You'll Get with Wolfree +## What you'll get with Wolfree -By using Wolfree, you'll get **free** access to the full potential of **Wolfram|Alpha Pro**, including: +By using Wolfree, you'll get **free** access to the full power of **Wolfram|Alpha Pro**, including: -- Get answers and hints for your math homework problems. -- Use **step-by-step** calculators for chemistry, calculus, algebra, trigonometry, and equation solving. -- Develop a deeper understanding of your homework with detailed steps and hints guiding you from problems to answers. +- **Step-by-step** calculators for calculus, differential equations, and linear algebra. +- Immediate feedback and guidance hints for your math homework problems. +- Detailed, comprehensible steps guiding you from problems to answers. Unleash the full potential of your learning with Wolfree and elevate your studies to a whole new level. 🚀 -It's **free**! Type your math problem and click "**Show Steps**" now! +It's **free**. Type your math problem and click "**Show Steps**" now. - - -
-
+ + + @@ -105,5 +98,3 @@ It's **free**! Type your math problem and click "**Show Steps**" now! My pronouns are: they/them • Pronouns.page https://en.pronouns.page/they --> - - diff --git a/docusaurus/docs/mirror.mdx b/docusaurus/docs/mirror.mdx index 8af5f77..1bf5d88 100644 --- a/docusaurus/docs/mirror.mdx +++ b/docusaurus/docs/mirror.mdx @@ -1,10 +1,13 @@ --- title: Mirror site +hide_title: true --- -# Mirror Sites: Alternative Instances + + +# Mirror sites: alternative instances -Wolfree operates through a network of mirror sites to ensure uninterrupted access to step-by-step solutions. If you can't access this web page, visit one of our mirror sites to continue your learning journey. +Wolfree operates through a network of mirror sites. If you can't access this web page, visit the mirror sites. 1. https://wolfree.chickenkiller.com/ 2. https://wolfree.crabdance.com/ @@ -38,13 +41,16 @@ Wolfree operates through a network of mirror sites to ensure uninterrupted acces 30. https://wolfreealpha.twilightparadox.com/ 31. https://wolfreealpha.uk.to/ 32. https://wolfreealpha.us.to/ +33. https://wf.opnxng.com/ + +## Bookmarking all mirror sites -:::note Please note that Internet Service Providers may block access to this website without prior notice. Therefore, we recommend bookmarking the mirror sites in advance to ensure easier access. -::: -If you cannot access any of the mirror sites, we recommend installing the [Tor Browser](https://www.torproject.org/) to bypass censorship. +## Fetching JSON list of instances If you have programming knowledge, you can deserialize the [instances.json](pathname://../instances.json) file. - +## Accessing Wolfree in censored countries + +If you cannot access any of the mirror sites, we recommend installing the [Tor Browser](https://www.torproject.org/) to bypass censorship. diff --git a/docusaurus/docs/source.mdx b/docusaurus/docs/source.mdx index e9d0192..8314422 100644 --- a/docusaurus/docs/source.mdx +++ b/docusaurus/docs/source.mdx @@ -1,32 +1,37 @@ --- title: Source code +hide_title: true --- -# Access and Download the Source Code of Wolfree + -Wolfree is free and open-source software. You can access and download the source code from the following websites: +# Accessing the source code of Wolfree -1. https://try.gitea.io/wolfree -2. https://codeberg.org/wolfree -3. https://git.disroot.org/wolfree -4. https://next.forgejo.org/wolfree -5. https://git.kiwifarms.net/wolfree -6. http://it7otdanqu7ktntxzm427cba6i53w6wlanlh23v5i3siqmos47pzhvyd.onion/wolfree +Wolfree is **free** and **open-source** software. You can access and download the source code from the following websites: -## The Unreliability of GitHub +1. https://gitea.com/wolfree +2. https://try.gitea.io/wolfree +3. https://codeberg.org/wolfree +4. https://git.disroot.org/wolfree +5. https://next.forgejo.org/wolfree +6. https://git.kiwifarms.net/wolfree +7. http://it7otdanqu7ktntxzm427cba6i53w6wlanlh23v5i3siqmos47pzhvyd.onion/wolfree + +## The unreliability of GitHub We do not recommend pushing the source code to GitHub. Their [DMCA Takedown Policy](https://docs.github.com/en/site-policy/content-removal-policies/dmca-takedown-policy) makes storing the source code on GitHub unreliable. -## The High Availability of ForgeFed +## The high availability of ForgeFed For a more reliable and collaborative development experience, we recommend using [Gitea](https://about.gitea.com/) and [Forgejo](https://forgejo.org/). These platforms support [ActivityPub](https://www.w3.org/TR/activitypub/) and [ForgeFed](https://forgefed.org/) protocols, enabling seamless collaboration and communication among developers. -:::note -If you cannot access Gitea or Forgejo, we recommend installing the [Tor Browser](https://www.torproject.org/). The Tor Browser is a reputable tool designed to bypass censorship. -::: +## Accessing the source code in censored countries + +If you cannot access Gitea or Forgejo, we recommend installing the [Tor Browser](https://www.torproject.org/) to bypass censorship. -## License +## Submitting a DMCA takedown notice -SPDX-License-Identifier: AGPL-3.0-or-later +If you believe someone is using your copyrighted content unauthorizedly on GitHub or npm.js, please fill out the [Copyright claims form](https://github.com/contact/dmca) to submit a DMCA takedown notice to request that the content be changed or removed. +Before you begin, please read [GitHub's Copyright - DMCA Takedown Policy](https://docs.github.com/en/site-policy/content-removal-policies/dmca-takedown-policy). -This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +As with all legal matters, it is always best to consult a professional about your questions or situation. We strongly encourage you to do so before taking action that might impact your rights. This guide isn't legal advice. diff --git a/docusaurus/docusaurus.config.js b/docusaurus/docusaurus.config.js index 1cb19b7..0c1833c 100644 --- a/docusaurus/docusaurus.config.js +++ b/docusaurus/docusaurus.config.js @@ -1,15 +1,17 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ // @ts-check +/** @type { { config: { libredirect: false } } } */ +const wolfree = require("./wolfree.config.js"); +const lightCodeTheme = require("prism-react-renderer/themes/github"); +const darkCodeTheme = require("prism-react-renderer/themes/dracula"); + /** @type {import('@docusaurus/types').Config} */ module.exports = { - title: "Wolfree - Free WolframAlpha step-by-step solution", + title: wolfree.config.libredirect + ? "Paywall-respecting instances: Wolfree instances that do not bypass paywalls" + : "Wolfree - Free WolframAlpha step-by-step solution", url: "http://example.com", baseUrl: "/", favicon: "data:,", @@ -19,7 +21,7 @@ module.exports = { /** @type {import('@docusaurus/preset-classic').Options} */ { docs: { - sidebarPath: require.resolve("./sidebars.js"), + sidebarPath: require.resolve("./sidebars.config.js"), routeBasePath: "/", breadcrumbs: false, }, @@ -46,7 +48,9 @@ module.exports = { items: [ { to: "/", - label: "Wolfree", + label: wolfree.config.libredirect + ? "Paywall-respecting instances" + : "Wolfree", position: "left", }, { @@ -55,16 +59,6 @@ module.exports = { position: "right", target: "_self", }, - { - to: "/mirror", - label: "Mirror", - position: "right", - }, - { - to: "/source", - label: "Source", - position: "right", - }, ], }, footer: { @@ -92,11 +86,12 @@ module.exports = { label: "Acknowledgment", href: "/acknowledgment", }, - { - label: "DMCA takedown", - href: "/dmca", - }, ], + copyright: "SPDX-License-Identifier: AGPL-3.0-or-later", + }, + prism: { + theme: lightCodeTheme, + darkTheme: darkCodeTheme, }, }, }; diff --git a/docusaurus/package.json b/docusaurus/package.json index 2e58a5e..a27490d 100644 --- a/docusaurus/package.json +++ b/docusaurus/package.json @@ -15,21 +15,19 @@ "typecheck": "tsc" }, "dependencies": { - "@docusaurus/core": "2.4.1", - "@docusaurus/preset-classic": "2.4.1", + "@docusaurus/core": "2.4.3", + "@docusaurus/preset-classic": "2.4.3", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mdx-js/react": "^1.6.22", - "@mui/material": "^5.14.1", - "@types/dompurify": "^3.0.2", - "@types/jquery": "^3.5.16", + "@mui/material": "^5.14.10", "clsx": "^1.2.1", "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.4.1", + "@docusaurus/module-type-aliases": "2.4.3", "@tsconfig/docusaurus": "^1.0.5", "typescript": "^4.7.4" }, diff --git a/docusaurus/sidebars.config.js b/docusaurus/sidebars.config.js new file mode 100644 index 0000000..7d4711a --- /dev/null +++ b/docusaurus/sidebars.config.js @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ + +// @ts-check + +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +module.exports = { + sidebarId: [ + "index", + { + type: "html", + value: 'Input math problems', + className: "menu__list-item", + }, + "mirror", + "source", + "community", + "acknowledgment", + ], +}; diff --git a/docusaurus/sidebars.js b/docusaurus/sidebars.js deleted file mode 100644 index 3a62009..0000000 --- a/docusaurus/sidebars.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ - -// @ts-check - -/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ -module.exports = { - sidebarId: [ - "index", - { - type: "html", - value: 'Input math problems', - className: "menu__list-item", - }, - "mirror", - "source", - { - type: "category", - label: "Detail", - collapsible: true, - collapsed: true, - items: ["community", "acknowledgment", "dmca"], - }, - ], -}; diff --git a/docusaurus/src/components/ButtonLink.tsx b/docusaurus/src/components/ButtonLink.tsx index 12fc559..5fd69e1 100644 --- a/docusaurus/src/components/ButtonLink.tsx +++ b/docusaurus/src/components/ButtonLink.tsx @@ -1,25 +1,26 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ -import React from "react"; +import Button from "@mui/material/Button"; import Link from "@docusaurus/Link"; -import { Button } from "@mui/material"; +import React from "react"; -const ButtonLink = ({ to = String(), text = String() }) => ( - - - +export default ({ + to = "", + text = "", +}: Readonly<{ + to: string; + text: string; +}>): React.JSX.Element => ( +

+ + + +

); -export default ButtonLink; - // Typography - MUI System // https://mui.com/system/typography/ diff --git a/docusaurus/src/components/FormCTA.tsx b/docusaurus/src/components/FormCTA.tsx index 1b5a81e..0912dec 100644 --- a/docusaurus/src/components/FormCTA.tsx +++ b/docusaurus/src/components/FormCTA.tsx @@ -1,23 +1,20 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ +import InputMathProblems from "./InputMathProblems"; import React from "react"; +import SubmitButton from "./SubmitButton"; import submitMathInputForm from "../functions/submitMathInputForm"; -import InputMathProblems from "./InputMathProblems"; -import ShowStepButton from "./ShowStepButton"; -const FormCTA = ({ autoFocus = Boolean() }) => ( +export default ({ + autoFocus = false, + submitText = "", +}: Readonly<{ + autoFocus: boolean; + submitText: string; +}>): React.JSX.Element => (
+

- -

- -

+ ); - -export default FormCTA; diff --git a/docusaurus/src/components/FormQuickStart.tsx b/docusaurus/src/components/FormQuickStart.tsx deleted file mode 100644 index 60589fb..0000000 --- a/docusaurus/src/components/FormQuickStart.tsx +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ - -import React from "react"; -import submitMathInputForm from "../functions/submitMathInputForm"; -import InputMathProblems from "./InputMathProblems"; -import ShowStepButton from "./ShowStepButton"; - -const FormQuickStart = () => ( -
-
    -
  1. -

    Type your math problem in the text box.

    - -
  2. -
  3. -

    - Click the "Show Steps" button. -

    - -
  4. -
  5. -

    - Explore the step-by-step solution provided. 🎉 -

    -
  6. -
-
-); - -export default FormQuickStart; diff --git a/docusaurus/src/components/InputMathProblems.tsx b/docusaurus/src/components/InputMathProblems.tsx index c7b49ce..27313d2 100644 --- a/docusaurus/src/components/InputMathProblems.tsx +++ b/docusaurus/src/components/InputMathProblems.tsx @@ -1,19 +1,15 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ import React from "react"; import TextField from "@mui/material/TextField"; -// TextField API - Material UI -// https://mui.com/material-ui/api/text-field/ -const InputMathProblems = ({ - autoFocus = Boolean(), - defaultValue = String(), -}) => ( +export default ({ + autoFocus = false, + defaultValue = "", +}: Readonly<{ + autoFocus: boolean; + defaultValue: string; +}>): React.JSX.Element => ( ); -export default InputMathProblems; +// TextField API - Material UI +// https://mui.com/material-ui/api/text-field/ + +// : The Input (Form Input) element - HTML: HyperText Markup Language | MDN +// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input diff --git a/docusaurus/src/components/ShowStepButton.tsx b/docusaurus/src/components/ShowStepButton.tsx deleted file mode 100644 index 3ae7ba3..0000000 --- a/docusaurus/src/components/ShowStepButton.tsx +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ - -import React from "react"; -import { Button } from "@mui/material"; - -const ShowStepButton = () => ( - -); - -export default ShowStepButton; - -// Typography - MUI System -// https://mui.com/system/typography/ diff --git a/docusaurus/src/components/SubmitButton.tsx b/docusaurus/src/components/SubmitButton.tsx new file mode 100644 index 0000000..e9b1c72 --- /dev/null +++ b/docusaurus/src/components/SubmitButton.tsx @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ + +import Button from "@mui/material/Button"; +import React from "react"; + +export default ({ + text = "", +}: Readonly<{ text: string }>): React.JSX.Element => ( +

+ +

+); + +// Typography - MUI System +// https://mui.com/system/typography/ diff --git a/docusaurus/src/css/custom.css b/docusaurus/src/css/custom.css index a027863..ce621e1 100644 --- a/docusaurus/src/css/custom.css +++ b/docusaurus/src/css/custom.css @@ -1,15 +1,51 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ + +.markdown { + --ifm-h2-vertical-rhythm-top: 4; +} :root { --ifm-menu-link-padding-vertical: calc(var(--ifm-menu-link-padding-horizontal) * 1.5); + --ifm-toc-padding-vertical: calc(var(--ifm-toc-padding-horizontal) * 2); --ifm-color-primary: blue; - --ifm-color-gray-900: var(--ifm-color-gray-900); - --ifm-color-secondary-contrast-foreground: var(--ifm-color-gray-900); + --ifm-color-gray-700: black; + --ifm-color-gray-800: black; + --ifm-color-gray-900: black; + --ifm-color-secondary-contrast-foreground: black; + --ifm-color-content-secondary: black; +} + +.markdown>h1 { + /* Style the

on http://localhost/source */ + margin-top: calc(var(--ifm-h2-vertical-rhythm-top) * var(--ifm-leading)); +} + +:root { + --wolfree-heading-zoom: 0.75; +} + +h1 { + font-size: calc(max(1rem, var(--ifm-h1-font-size) * var(--wolfree-heading-zoom))); +} + +h2 { + font-size: calc(max(1rem, var(--ifm-h2-font-size) * var(--wolfree-heading-zoom))); +} + +h3 { + font-size: calc(max(1rem, var(--ifm-h3-font-size) * var(--wolfree-heading-zoom))); +} + +h4 { + font-size: calc(max(1rem, var(--ifm-h4-font-size) * var(--wolfree-heading-zoom))); +} + +h5 { + font-size: calc(max(1rem, var(--ifm-h5-font-size) * var(--wolfree-heading-zoom))); +} + +h6 { + font-size: calc(max(1rem, var(--ifm-h6-font-size) * var(--wolfree-heading-zoom))); } .footer__link-item { diff --git a/docusaurus/src/functions/submitMathInputForm.ts b/docusaurus/src/functions/submitMathInputForm.ts new file mode 100644 index 0000000..cf3294b --- /dev/null +++ b/docusaurus/src/functions/submitMathInputForm.ts @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ + +import React from "react"; + +export default (event: React.FormEvent): void => { + event.preventDefault(); + const htmlFormElement = event.currentTarget; + const formData = new FormData(htmlFormElement); + const i = formData.get("i"); + + const url = new URL("/input/", window.location.href); + + if (typeof i === "string") { + url.searchParams.set("i", i); + } else if (i instanceof File) { + console.warn({ i }); + } else { + const typescriptExhaustivenessCheck: never = i; + console.warn({ typescriptExhaustivenessCheck }); + } + + window.location.assign(url); +}; diff --git a/docusaurus/src/functions/submitMathInputForm.tsx b/docusaurus/src/functions/submitMathInputForm.tsx deleted file mode 100644 index a90894e..0000000 --- a/docusaurus/src/functions/submitMathInputForm.tsx +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ - -import { FormEventHandler } from "react"; - -const submitMathInputForm: FormEventHandler = (event) => { - event.preventDefault(); - const form = event.currentTarget; - const formData = new FormData(form); - - const i = formData.get("i") || ""; - if (i instanceof File) return; - - const url = new URL("/input/", window.location.href); - url.searchParams.set("i", i); - window.location.href = url.href; -}; - -export default submitMathInputForm; diff --git a/docusaurus/src/functions/typescriptNever.ts b/docusaurus/src/functions/typescriptNever.ts new file mode 100644 index 0000000..42becd5 --- /dev/null +++ b/docusaurus/src/functions/typescriptNever.ts @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ + +export default (typescriptNeverValue: never): never => { + console.warn({ typescriptNeverValue }); + + return typescriptNeverValue; +}; + +// How do I check that a switch block is exhaustive in TypeScript? - Stack Overflow +// https://stackoverflow.com/questions/39419170/how-do-i-check-that-a-switch-block-is-exhaustive-in-typescript diff --git a/docusaurus/src/theme/Footer/InputPreloader.tsx b/docusaurus/src/theme/Footer/InputPreloader.tsx index 325f8a7..2ba2e19 100644 --- a/docusaurus/src/theme/Footer/InputPreloader.tsx +++ b/docusaurus/src/theme/Footer/InputPreloader.tsx @@ -1,35 +1,31 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ - -import React, { useEffect, useState } from "react"; - -const InputPreloader = () => { - const [showIframe, setShowIframe] = useState(false); - - useEffect(() => { - const handleIframeLoad = () => { - // Show the iframe after a 3000ms delay - const timerId = setTimeout(() => setShowIframe(true), 3000); - // Cleanup the timer when the component unmounts - return () => clearTimeout(timerId); - }; +/* SPDX-License-Identifier: AGPL-3.0-or-later */ - window.scroll(0, 0); +import React from "react"; + +export default (): React.JSX.Element => { + const [insertIframe, setInsertIframe] = React.useState(false); + + React.useEffect((): (() => void) => { + const handleIframeLoad = (): (() => void) => { + // Insert the iframe after a 3000ms delay. + const timerId = setTimeout((): void => setInsertIframe(true), 3000); + + // Cleanup the timer when the component unmounts. + return (): void => clearTimeout(timerId); + }; window.addEventListener("load", handleIframeLoad); - // Cleanup the event listener when the component unmounts - return () => window.removeEventListener("load", handleIframeLoad); - }, []); // Empty dependency array means the effect runs only once after initial render + window.scroll(0, 0); + + // Cleanup the event listener when the component unmounts. + return (): void => window.removeEventListener("load", handleIframeLoad); + }, []); // Empty dependency array means the effect runs only once after initial render. return ( <> {/* Use a descriptive title for accessibility */} - {showIframe && ( + {insertIframe && (