@@ -7,16 +7,206 @@ import { RuntimeProvider } from "@repo/ui/context/runtimeContext";
77
88export default async function EditorPage ( ) {
99 const pageId = 201 ; //๋ชฉ๋ฐ์ดํฐ์
๋๋ค.
10- //์๋ฒ ์ก์
ํจ์(nodes๋ฐ์ดํฐ ํจ์นญํจ์)
11- const nodes = await getNodesFromDB ( pageId ) ;
10+ // ์ค์ฒฉ ๊ตฌ์กฐ ์คํ์ ์ํ ํ
์คํธ ๋ฐ์ดํฐ
11+ // ๋ ์ด์ด ๊ธฐ๋ฅ์ ํ
์คํธํ๊ธฐ ์ํ ๋ณต์กํ ์ค์ฒฉ ๊ตฌ์กฐ ๋ฐ์ดํฐ
12+ const nodes : any [ ] = [
13+ {
14+ id : "root-container" ,
15+ type : "Stack" ,
16+ page_id : pageId ,
17+ parent_id : null ,
18+ position : 1 ,
19+ style : {
20+ display : "flex" ,
21+ flexDirection : "column" ,
22+ backgroundColor : "#ffffff" ,
23+ padding : "0px" ,
24+ gap : "0px" ,
25+ borderRadius : "0px" ,
26+ position : "absolute" ,
27+ overflow : "hidden" ,
28+ border : "1px solid #e5e7eb" ,
29+ boxShadow : "0 10px 15px -3px rgba(0, 0, 0, 0.1)" ,
30+ } ,
31+ layout : {
32+ x : 50 , y : 50 , width : 800 , height : 600 , zIndex : 1 ,
33+ widthMode : "fixed" , heightMode : "fixed" ,
34+ widthUnit : "px" , heightUnit : "px"
35+ }
36+ } ,
37+ // --- Navigation Bar ---
38+ {
39+ id : "navbar" ,
40+ type : "Stack" ,
41+ page_id : pageId ,
42+ parent_id : "root-container" ,
43+ position : 1 ,
44+ style : {
45+ display : "flex" ,
46+ flexDirection : "row" ,
47+ alignItems : "center" ,
48+ justifyContent : "space-between" ,
49+ padding : "0 24px" ,
50+ height : "64px" ,
51+ backgroundColor : "#ffffff" ,
52+ borderBottom : "1px solid #f3f4f6" ,
53+ } ,
54+ layout : {
55+ x : 0 , y : 0 , width : "100%" , height : 64 , zIndex : 1 ,
56+ widthMode : "fill" , heightMode : "fixed" ,
57+ widthUnit : "%" , heightUnit : "px"
58+ }
59+ } ,
60+ {
61+ id : "logo" ,
62+ type : "Text" ,
63+ page_id : pageId ,
64+ parent_id : "navbar" ,
65+ position : 1 ,
66+ props : { text : "WCX Editor" , level : "h4" } ,
67+ style : { fontWeight : "900" , color : "#111827" , fontSize : "18px" } ,
68+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
69+ } ,
70+ {
71+ id : "nav-links" ,
72+ type : "Stack" ,
73+ page_id : pageId ,
74+ parent_id : "navbar" ,
75+ position : 2 ,
76+ style : { display : "flex" , flexDirection : "row" , gap : "20px" , alignItems : "center" } ,
77+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
78+ } ,
79+ {
80+ id : "link-home" ,
81+ type : "Text" ,
82+ page_id : pageId ,
83+ parent_id : "nav-links" ,
84+ position : 1 ,
85+ props : { text : "Home" , level : "h6" } ,
86+ style : { color : "#4b5563" , fontSize : "14px" } ,
87+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
88+ } ,
89+ {
90+ id : "link-about" ,
91+ type : "Text" ,
92+ page_id : pageId ,
93+ parent_id : "nav-links" ,
94+ position : 2 ,
95+ props : { text : "About" , level : "h6" } ,
96+ style : { color : "#4b5563" , fontSize : "14px" } ,
97+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
98+ } ,
99+ // --- Hero Section ---
100+ {
101+ id : "hero-section" ,
102+ type : "Stack" ,
103+ page_id : pageId ,
104+ parent_id : "root-container" ,
105+ position : 2 ,
106+ style : {
107+ display : "flex" ,
108+ flexDirection : "column" ,
109+ alignItems : "center" ,
110+ justifyContent : "center" ,
111+ flex : 1 ,
112+ padding : "60px 20px" ,
113+ backgroundColor : "#f9fafb" ,
114+ textAlign : "center"
115+ } ,
116+ layout : {
117+ x : 0 , y : 0 , width : "100%" , height : "auto" , zIndex : 1 ,
118+ widthMode : "fill" , heightMode : "fill" ,
119+ widthUnit : "%" , heightUnit : "px"
120+ }
121+ } ,
122+ {
123+ id : "hero-title" ,
124+ type : "Heading" ,
125+ page_id : pageId ,
126+ parent_id : "hero-section" ,
127+ position : 1 ,
128+ props : { text : "Build Your Web App Faster" , level : "h1" } ,
129+ style : { color : "#111827" , fontWeight : "800" , marginBottom : "16px" , fontSize : "36px" } ,
130+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
131+ } ,
132+ {
133+ id : "hero-desc" ,
134+ type : "Text" ,
135+ page_id : pageId ,
136+ parent_id : "hero-section" ,
137+ position : 2 ,
138+ props : { text : "The most powerful no-code editor for modern web developers." , level : "h5" } ,
139+ style : { color : "#6b7280" , maxWidth : "500px" , marginBottom : "32px" } ,
140+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
141+ } ,
142+ {
143+ id : "hero-cta-container" ,
144+ type : "Stack" ,
145+ page_id : pageId ,
146+ parent_id : "hero-section" ,
147+ position : 3 ,
148+ style : { display : "flex" , flexDirection : "row" , gap : "12px" } ,
149+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
150+ } ,
151+ {
152+ id : "btn-primary" ,
153+ type : "Button" ,
154+ page_id : pageId ,
155+ parent_id : "hero-cta-container" ,
156+ position : 1 ,
157+ props : { text : "Get Started" } ,
158+ style : { backgroundColor : "#000000" , color : "#ffffff" , padding : "12px 24px" , borderRadius : "8px" , fontWeight : "600" } ,
159+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
160+ } ,
161+ {
162+ id : "btn-secondary" ,
163+ type : "Button" ,
164+ page_id : pageId ,
165+ parent_id : "hero-cta-container" ,
166+ position : 2 ,
167+ props : { text : "View Demo" } ,
168+ style : { backgroundColor : "#ffffff" , color : "#000000" , padding : "12px 24px" , borderRadius : "8px" , border : "1px solid #e5e7eb" , fontWeight : "600" } ,
169+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
170+ } ,
171+ // --- Footer ---
172+ {
173+ id : "footer" ,
174+ type : "Stack" ,
175+ page_id : pageId ,
176+ parent_id : "root-container" ,
177+ position : 3 ,
178+ style : {
179+ display : "flex" ,
180+ flexDirection : "row" ,
181+ alignItems : "center" ,
182+ justifyContent : "center" ,
183+ padding : "20px" ,
184+ backgroundColor : "#ffffff" ,
185+ borderTop : "1px solid #f3f4f6"
186+ } ,
187+ layout : {
188+ x : 0 , y : 0 , width : "100%" , height : 60 , zIndex : 1 ,
189+ widthMode : "fill" , heightMode : "fixed" ,
190+ widthUnit : "%" , heightUnit : "px"
191+ }
192+ } ,
193+ {
194+ id : "footer-text" ,
195+ type : "Text" ,
196+ page_id : pageId ,
197+ parent_id : "footer" ,
198+ position : 1 ,
199+ props : { text : "ยฉ 2024 WebCreatorX. All rights reserved." , level : "h6" } ,
200+ style : { color : "#9ca3af" , fontSize : "12px" } ,
201+ layout : { x : 0 , y : 0 , width : "auto" , height : "auto" , zIndex : 1 , widthMode : "fit" , heightMode : "fit" , widthUnit : "px" , heightUnit : "px" }
202+ }
203+ ] ;
12204
13205 return (
14- < div className = "flex h-screen w-screen flex-col gap-10" >
15- < h1 className = "text-3xl text-amber-700" > ์๋ํฐ ํ์ด์ง ์
๋๋ค.</ h1 >
206+ < div className = "flex h-screen w-screen flex-col" >
16207 < EditorStoreInitializer initialNodes = { nodes } >
17- { /* ๋ค๋ฅธ ์๋ํฐ ๊ด๋ จ ์ปดํฌ๋ํธ๋ค์ ์ด๊ณณ์์ ๋ ๋๋ง ๋ฉ๋๋ค!(์ฌ์ด๋๋ฐ,๋งค๋ํจ์คํธ ์์ ์ปดํฌ๋ํธ ๋ฑ๋ฑ...) */ }
18208 < RuntimeProvider >
19- < div className = "flex h-full w-full border-2" >
209+ < div className = "flex h-full w-full border-2 overflow-hidden " >
20210 < LeftSidebar />
21211 < Canvas />
22212 < RightSidebar />
0 commit comments