Skip to content

Commit

Permalink
chore: cleanup site
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Oct 5, 2023
1 parent 2fffe69 commit f14e620
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 141 deletions.
2 changes: 1 addition & 1 deletion examples/basic/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
assetPrefix: process.env.NODE_ENV === 'production' ? '/examples/basic' : '',
assetPrefix: process.env.NODE_ENV === 'production' ? '/examples/basic' : '/',
};
2 changes: 1 addition & 1 deletion examples/landing/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
assetPrefix: process.env.NODE_ENV === 'production' ? '/examples/landing' : '',
assetPrefix: process.env.NODE_ENV === 'production' ? '/examples/landing' : '/',
};
2 changes: 1 addition & 1 deletion site/docs/api/useEditor.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const { connectors, actions, query, ...collected } = useEditor(collector);
"(sourceNodeId: NodeId, targetNodeId: NodeId, pos: {x: number, y: number}, nodesToDOM?: (node: Node) => HTMLElement = node => node.dom)",
"Given the target Node and mouse coordinates on the screen, determine the best possible location to drop the source Node. By default, the Node's DOM property is taken into consideration."
],
["node", "(id: NodeId) => NodeHelpers", "Returns an object containing helper methods to describe the specified Node. Click <a href='/docs/api/helpers/'>here</a> for more information."],
["node", "(id: NodeId) => NodeHelpers", "Returns an object containing helper methods to describe the specified Node. Click <a href='/docs/api/helpers'>here</a> for more information."],
["parseReactElement", "(element: React.ReactElement) => Object", [
["toNodeTree", "(normalize?: (node: Node, jsx: React.ReactElement) => void) => NodeTree", "Parse a given React element into a NodeTree"]
]],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: editor-components
id: editor
title: Interacting with the Editor
---

Expand Down
2 changes: 1 addition & 1 deletion site/docs/concepts/nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ By default, a non-Canvas Node is created. So, how do we actually create a Canvas
In the above example, using the `<Element />` component with the `canvas` prop, we've created a Canvas node of the type `div`. Since our `div` element is now handled by a Canvas node, therefore it is now a droppable region. On the other hand, since `h1`, `MyComp` and `MyContainerComp` are child Nodes of a Canvas, they are now draggable.

The `<Element />` component can also be used to configure other values of a Node, which is further detailed [here](../api/Element)
The `<Element />` component can also be used to configure other values of a Node, which is further detailed [here](../api/element)

<!-- We could also specify other things with the `<Element />` component, such as we could tell Craft to prevent parsing the children of an element as Nodes:
Expand Down
57 changes: 0 additions & 57 deletions site/docs/concepts/serializing.md

This file was deleted.

10 changes: 10 additions & 0 deletions site/docs/sponsor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: sponsor
title: Sponsor
---

Craft.js is released under the [MIT license](https://github.com/prevwong/craft.js/blob/master/LICENSE) and is built with 100% love. Since it's first release in early 2020, it has been used by various individuals and companies to power their own page editor solution.

In July 2022, I left my full-time job and in that time to focus on Craft and it's [future](https://github.com/prevwong/craft.js/issues/507). If you found this project useful and would like to ensure its continued development, please consider sponsoring/donating to the project. Your contribution would mean a lot to me!

You can choose to contribute via [Github Sponsors](https://github.com/sponsors/prevwong), [OpenCollective](https://opencollective.com/craftjs), [Patreon](https://patreon.com/imprev) or [Ko-fi](https://ko-fi.com/prevwong).
4 changes: 2 additions & 2 deletions site/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
position: 'right',
items: [
{
to: 'pathname:///examples/landing/',
to: 'pathname:///examples/landing',
label: 'Landing',
},
{
Expand All @@ -47,7 +47,7 @@ module.exports = {
},
],
},
{ to: 'support', label: 'Support', position: 'right' },
{ to: 'docs/sponsor', label: 'Sponsor', position: 'right' },
{
href: 'https://github.com/prevwong/craft.js',
label: 'GitHub',
Expand Down
4 changes: 2 additions & 2 deletions site/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
module.exports = {
docs: {
Migrating: ['migrating/migrating-0.1.x'],
Introduction: ['overview', 'acknowledgements'],
Introduction: ['overview', 'acknowledgements', 'sponsor'],
'Core Concepts': [
'concepts/nodes',
'concepts/user-components',
'concepts/editor-components',
'concepts/editor',
],
Guides: ['guides/basic-tutorial', 'guides/save-load-state'],
'API Reference': [
Expand Down
4 changes: 2 additions & 2 deletions site/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ html {
--ifm-color-primary-light: rgb(70, 203, 174);
--ifm-color-primary-lighter: rgb(102, 212, 189);
--ifm-color-primary-lightest: rgb(146, 224, 208);
--ifm-navbar-background-color: #39423e;
--ifm-navbar-background-color: #1e1e1e;
--ifm-navbar-link-color: rgba(255, 255, 255, 0.85);
--ifm-font-family-base: 'acumin-pro', 'Source Sans Pro', system-ui,
-apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif,
Expand Down Expand Up @@ -63,7 +63,7 @@ html {
}

.navbar__title {
font-size: 20px;
font-size: 1.3rem;
font-weight: 200;
color: #fff;
margin-top: -2px;
Expand Down
73 changes: 0 additions & 73 deletions site/src/pages/support.js

This file was deleted.

0 comments on commit f14e620

Please sign in to comment.