diff --git a/craft/src/components/layout/FooterZone.tsx b/craft/src/components/layout/FooterZone.tsx deleted file mode 100644 index 5908bbd..0000000 --- a/craft/src/components/layout/FooterZone.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import React, { CSSProperties } from 'react'; -import { useNode, Element, UserComponent } from '@craftjs/core'; -import { Container } from './Container'; -import { cssPropsToString } from '../../utils/style-helpers'; - -interface FooterZoneProps { - style?: CSSProperties; - children?: React.ReactNode; -} - -export const FooterZone: UserComponent = ({ style = {}, children }) => { - const { connectors: { connect, drag } } = useNode(); - - return ( - - ); -}; - -const FooterZoneSettings: React.FC = () => { - const { actions: { setProp }, props } = useNode((node) => ({ - props: node.data.props as FooterZoneProps, - })); - - const bgPresets = ['#ffffff', '#f9fafb', '#1f2937', '#111827', '#0f172a']; - - return ( -
-

- Footer Zone -- This section appears on all pages. -

-
- -
- {bgPresets.map((c) => ( -
-
-
- ); -}; - -FooterZone.craft = { - displayName: 'Footer Zone', - props: { - style: { backgroundColor: '#0f172a', color: '#94a3b8', padding: '40px 20px', textAlign: 'center' as const }, - }, - rules: { - canDrag: () => false, - canMoveIn: () => true, - canMoveOut: () => true, - }, - related: { - settings: FooterZoneSettings, - }, -}; - -(FooterZone as any).toHtml = (props: FooterZoneProps, childrenHtml: string) => { - const styleStr = cssPropsToString({ - width: '100%', - ...props.style, - }); - return { html: `${childrenHtml}` }; -}; diff --git a/craft/src/components/layout/HeaderZone.tsx b/craft/src/components/layout/HeaderZone.tsx deleted file mode 100644 index 2f4ab6b..0000000 --- a/craft/src/components/layout/HeaderZone.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import React, { CSSProperties } from 'react'; -import { useNode, Element, UserComponent } from '@craftjs/core'; -import { Container } from './Container'; -import { cssPropsToString } from '../../utils/style-helpers'; - -interface HeaderZoneProps { - style?: CSSProperties; - children?: React.ReactNode; -} - -export const HeaderZone: UserComponent = ({ style = {}, children }) => { - const { connectors: { connect, drag } } = useNode(); - - return ( -
{ if (ref) connect(drag(ref)); }} - data-zone="header" - style={{ - width: '100%', - minHeight: '50px', - borderBottom: '1px solid rgba(148,163,184,0.15)', - ...style, - }} - > - - {children} - -
- ); -}; - -const HeaderZoneSettings: React.FC = () => { - const { actions: { setProp }, props } = useNode((node) => ({ - props: node.data.props as HeaderZoneProps, - })); - - const bgPresets = ['#ffffff', '#f9fafb', '#1f2937', '#111827', '#0f172a']; - - return ( -
-

- Header Zone -- This section appears on all pages. -

-
- -
- {bgPresets.map((c) => ( -
-
-
- ); -}; - -HeaderZone.craft = { - displayName: 'Header Zone', - props: { - style: { backgroundColor: '#ffffff' }, - }, - rules: { - canDrag: () => false, // Header stays at the top, can't be moved - canMoveIn: () => true, - canMoveOut: () => true, - }, - related: { - settings: HeaderZoneSettings, - }, -}; - -(HeaderZone as any).toHtml = (props: HeaderZoneProps, childrenHtml: string) => { - const styleStr = cssPropsToString({ - width: '100%', - ...props.style, - }); - return { html: `${childrenHtml}` }; -};