@cocreate/render 1.45.1 → 1.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/index.html CHANGED
@@ -1,195 +1,186 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <title>CoCreate-render Documentation | CoCreateJS</title>
8
- <link
9
- rel="icon"
10
- type="image/png"
11
- sizes="32x32"
12
- href="https://cocreate.app/images/favicon.ico"
13
- />
14
- <meta
15
- name="description"
16
- content="A simple yet powerful drag-and-drop solution powered by javascript."
17
- />
18
- <meta
19
- name="keywords"
20
- content="drag and drop, colaboration, dnd utility, drag and drop utility"
21
- />
22
- <meta name="robots" content="index,follow" />
23
- <meta
24
- property="og:image"
25
- content="https://cdn.cocreate.app/docs/render.png"
26
- />
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <title>CoCreate-render Documentation | CoCreateJS</title>
8
+ <link
9
+ rel="icon"
10
+ type="image/png"
11
+ sizes="32x32"
12
+ href="https://cocreate.app/images/favicon.ico" />
13
+ <meta
14
+ name="description"
15
+ content="A simple yet powerful drag-and-drop solution powered by javascript." />
16
+ <meta
17
+ name="keywords"
18
+ content="drag and drop, colaboration, dnd utility, drag and drop utility" />
19
+ <meta name="robots" content="index,follow" />
20
+ <meta
21
+ property="og:image"
22
+ content="https://cdn.cocreate.app/docs/render.png" />
27
23
 
28
- <link
29
- rel="stylesheet"
30
- href="../index.css"
31
- array="files"
32
- object="60888216117c640e7596303f"
33
- key="src"
34
- type="text/css"
35
- save="true"
36
- />
37
- <link rel="manifest" href="/manifest.webmanifest" />
38
- </head>
24
+ <link
25
+ rel="stylesheet"
26
+ href="../index.css"
27
+ array="files"
28
+ object="60888216117c640e7596303f"
29
+ key="src"
30
+ type="text/css"
31
+ save="true" />
32
+ <link rel="manifest" href="/manifest.webmanifest" />
33
+ </head>
39
34
 
40
- <body>
41
- <!-- Navbar -->
42
- <nav
43
- class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
44
- content_id="content"
45
- scroll="sticky-nav,"
46
- scroll-up="5"
47
- scroll-down="5"
48
- path="../"
49
- src="../components/navbar.html"
50
- ></nav>
51
- <sidenav
52
- id="menuL"
53
- class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
54
- resizable
55
- resize-selector="[content_id='content']"
56
- resize-property="margin-left"
57
- resize-value="width"
58
- >
59
- <menu array="files" object="603717b07de7fb350ae9fec8" key="src"></menu>
60
- <div resize="right"></div>
61
- </sidenav>
62
- <main
63
- class="padding-top:15px padding:15px@lg@xl"
64
- content_id="content"
65
- id="CoCreate-render"
66
- >
67
- <div
68
- class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px"
69
- >
70
- <div class="display:flex align-items:center">
71
- <h2>CoCreate-render</h2>
72
- </div>
73
- <div
74
- class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white"
75
- >
76
- <div
77
- class="display:flex align-items:center transition:0.3s padding-left:10px"
78
- share-network="true"
79
- share-text="Enter decription here"
80
- share-title="testing im a title"
81
- share-height="600"
82
- share-width="700"
83
- share-media="https://cdn.cocreate.app/docs/render.png"
84
- hover="display:block!important"
85
- hover-selector=".social-networks"
86
- >
87
- <div class="display:none social-networks">
88
- <a
89
- class="margin-right:15px"
90
- share-network="twitter"
91
- title="Share on twitter"
92
- ><i src="/assets/svg/twitter.svg"></i
93
- ></a>
94
- <a
95
- class="margin-right:15px"
96
- share-network="facebook"
97
- title="Share on Facebook"
98
- ><i src="/assets/svg/facebook.svg"></i
99
- ></a>
100
- <a
101
- class="margin-right:15px"
102
- share-network="instagram"
103
- title="Share on instagram"
104
- ><i src="/assets/svg/instagram.svg"></i
105
- ></a>
106
- </div>
107
- <a
108
- class="margin-right:15px"
109
- share-network="share"
110
- title="Share on share"
111
- ><i src="/assets/svg/share-alt.svg"></i
112
- ></a>
113
- </div>
114
- <a
115
- href="https://github.com/CoCreate-app/CoCreate-dnd"
116
- target="_blank"
117
- class=""
118
- ><i src="/assets/svg/github.svg"></i
119
- ></a>
120
- </div>
121
- </div>
122
- <h1
123
- class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100"
124
- >
125
- CoCreate-render javascript component. Easy configuration using HTML5
126
- attributes or Javscript api and highly styleable.
127
- </h1>
128
- <div id="render-section" class="display:flex flex-wrap:wrap">
129
- <div
130
- class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px"
131
- >
132
- <div
133
- id="render-install"
134
- class="border-bottom:1px_solid_lightgrey"
135
- scroll
136
- scroll-intersect="color:dodgerblue"
137
- scroll-selector="#render-install-section"
138
- >
139
- <span
140
- class="display:flex align-items:center width:fit-content"
141
- hover="display:block!important"
142
- hover-selector="[href='#render-install']"
143
- >
144
- <h2 class="padding:5px_0px">Install</h2>
145
- <a class="margin-left:10px display:none" href="#render-install"
146
- ><i src="/assets/svg/link.svg"></i
147
- ></a>
148
- </span>
149
- </div>
150
- <pre><code class="language-bash">npm i @cocreate/render</code></pre>
151
- <p class="padding:10px_0px line-height:1.5">
152
- Or you can use cdn link:
153
- </p>
154
- <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/render/latest/CoCreate-render.min.js&lt;/script&gt;</code></pre>
155
- <p class="padding:10px_0px line-height:1.5">
156
- for styling please refer to #id-style
157
- </p>
35
+ <body>
36
+ <!-- Navbar -->
37
+ <nav
38
+ class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
39
+ content_id="content"
40
+ scroll="sticky-nav,"
41
+ scroll-up="5"
42
+ scroll-down="5"
43
+ path="../"
44
+ src="../components/navbar.html"></nav>
45
+ <sidenav
46
+ id="menuL"
47
+ class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
48
+ resizable
49
+ resize-query="[content_id='content']"
50
+ resize-property="margin-left"
51
+ resize-value="width">
52
+ <menu
53
+ array="files"
54
+ object="603717b07de7fb350ae9fec8"
55
+ key="src"></menu>
56
+ <div resize="right"></div>
57
+ </sidenav>
58
+ <main
59
+ class="padding-top:15px padding:15px@lg@xl"
60
+ content_id="content"
61
+ id="CoCreate-render">
62
+ <div
63
+ class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
64
+ <div class="display:flex align-items:center">
65
+ <h2>CoCreate-render</h2>
66
+ </div>
67
+ <div
68
+ class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
69
+ <div
70
+ class="display:flex align-items:center transition:0.3s padding-left:10px"
71
+ share-network="true"
72
+ share-text="Enter decription here"
73
+ share-title="testing im a title"
74
+ share-height="600"
75
+ share-width="700"
76
+ share-media="https://cdn.cocreate.app/docs/render.png"
77
+ hover="display:block!important"
78
+ hover-query=".social-networks">
79
+ <div class="display:none social-networks">
80
+ <a
81
+ class="margin-right:15px"
82
+ share-network="twitter"
83
+ title="Share on twitter"
84
+ ><i src="/assets/svg/twitter.svg"></i
85
+ ></a>
86
+ <a
87
+ class="margin-right:15px"
88
+ share-network="facebook"
89
+ title="Share on Facebook"
90
+ ><i src="/assets/svg/facebook.svg"></i
91
+ ></a>
92
+ <a
93
+ class="margin-right:15px"
94
+ share-network="instagram"
95
+ title="Share on instagram"
96
+ ><i src="/assets/svg/instagram.svg"></i
97
+ ></a>
98
+ </div>
99
+ <a
100
+ class="margin-right:15px"
101
+ share-network="share"
102
+ title="Share on share"
103
+ ><i src="/assets/svg/share-alt.svg"></i
104
+ ></a>
105
+ </div>
106
+ <a
107
+ href="https://github.com/CoCreate-app/CoCreate-dnd"
108
+ target="_blank"
109
+ class=""
110
+ ><i src="/assets/svg/github.svg"></i
111
+ ></a>
112
+ </div>
113
+ </div>
114
+ <h1
115
+ class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
116
+ CoCreate-render javascript component. Easy configuration using
117
+ HTML5 attributes or Javscript api and highly styleable.
118
+ </h1>
119
+ <div id="render-section" class="display:flex flex-wrap:wrap">
120
+ <div
121
+ class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
122
+ <div
123
+ id="render-install"
124
+ class="border-bottom:1px_solid_lightgrey"
125
+ scroll
126
+ scroll-intersect="color:dodgerblue"
127
+ scroll-query="#render-install-section">
128
+ <span
129
+ class="display:flex align-items:center width:fit-content"
130
+ hover="display:block!important"
131
+ hover-query="[href='#render-install']">
132
+ <h2 class="padding:5px_0px">Install</h2>
133
+ <a
134
+ class="margin-left:10px display:none"
135
+ href="#render-install"
136
+ ><i src="/assets/svg/link.svg"></i
137
+ ></a>
138
+ </span>
139
+ </div>
140
+ <pre><code class="language-bash">npm i @cocreate/render</code></pre>
141
+ <p class="padding:10px_0px line-height:1.5">
142
+ Or you can use cdn link:
143
+ </p>
144
+ <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/render/latest/CoCreate-render.min.js&lt;/script&gt;</code></pre>
145
+ <p class="padding:10px_0px line-height:1.5">
146
+ for styling please refer to #id-style
147
+ </p>
158
148
 
159
- <div
160
- id="render-usage"
161
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
162
- scroll
163
- scroll-intersect="color:dodgerblue"
164
- scroll-selector="#render-usage-section"
165
- >
166
- <span
167
- class="display:flex align-items:center width:fit-content"
168
- hover="display:block!important"
169
- hover-selector="[href='#render-usage']"
170
- >
171
- <h2 class="padding:5px_0px">Usage</h2>
172
- <a class="margin-left:10px display:none" href="#render-usage"
173
- ><i src="/assets/svg/link.svg"></i
174
- ></a>
175
- </span>
176
- </div>
177
- <p class="padding:10px_0px line-height:1.5">
178
- CoCreate-render would use that set attributes and renders the
179
- elements based on html and json data.
180
- </p>
149
+ <div
150
+ id="render-usage"
151
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
152
+ scroll
153
+ scroll-intersect="color:dodgerblue"
154
+ scroll-query="#render-usage-section">
155
+ <span
156
+ class="display:flex align-items:center width:fit-content"
157
+ hover="display:block!important"
158
+ hover-query="[href='#render-usage']">
159
+ <h2 class="padding:5px_0px">Usage</h2>
160
+ <a
161
+ class="margin-left:10px display:none"
162
+ href="#render-usage"
163
+ ><i src="/assets/svg/link.svg"></i
164
+ ></a>
165
+ </span>
166
+ </div>
167
+ <p class="padding:10px_0px line-height:1.5">
168
+ CoCreate-render would use that set attributes and
169
+ renders the elements based on html and json data.
170
+ </p>
181
171
 
182
- <h3
183
- class="border-bottom:1px_solid_lightgrey margin-top:40px padding:5px_0px"
184
- >
185
- Example
186
- </h3>
187
- <p class="padding:10px_0px line-height:1.5"></p>
172
+ <h3
173
+ class="border-bottom:1px_solid_lightgrey margin-top:40px padding:5px_0px">
174
+ Example
175
+ </h3>
176
+ <p class="padding:10px_0px line-height:1.5"></p>
188
177
 
189
- <h4 class="margin-top:20px padding:5px_0px">HTML Template</h4>
178
+ <h4 class="margin-top:20px padding:5px_0px">
179
+ HTML Template
180
+ </h4>
190
181
 
191
- <div class="margin-top:10px">
192
- <pre><code class="language-html">
182
+ <div class="margin-top:10px">
183
+ <pre><code class="language-html">
193
184
  &lt;div template_id=&quot;abc1&quot; array=&quot;render_test&quot;&gt;
194
185
  &lt;div class=&quot;template card {{render2.array}} card margin:10px firstname&quot;
195
186
  value=&quot;{{render2.data._id}}&quot;
@@ -223,11 +214,13 @@
223
214
  &lt;/div&gt;
224
215
  &lt;/div&gt;
225
216
  </code></pre>
226
- </div>
217
+ </div>
227
218
 
228
- <h4 class="margin-top:40px padding:5px_0px">CoCreate-render usage</h4>
229
- <p class="padding:10px_0px line-height:1.5">Description.</p>
230
- <pre><code class="language-html">
219
+ <h4 class="margin-top:40px padding:5px_0px">
220
+ CoCreate-render usage
221
+ </h4>
222
+ <p class="padding:10px_0px line-height:1.5">Description.</p>
223
+ <pre><code class="language-html">
231
224
  CoCreate.render.data({
232
225
  selector: '[template=abc1]',
233
226
  data: {
@@ -262,267 +255,295 @@
262
255
  })
263
256
  </code></pre>
264
257
 
265
- <div
266
- id="render-attributes"
267
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
268
- scroll
269
- scroll-intersect="color:dodgerblue"
270
- scroll-selector="#render-attributes-section"
271
- >
272
- <span
273
- class="display:flex align-items:center width:fit-content"
274
- hover="display:block!important"
275
- hover-selector="[href='#render-attributes']"
276
- >
277
- <h2 class="padding:5px_0px">Attributes</h2>
278
- <a class="margin-left:10px display:none" href="#render-attributes"
279
- ><i src="/assets/svg/link.svg"></i
280
- ></a>
281
- </span>
282
- </div>
283
- <ul class="list-style-type:none">
284
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
285
- <h4>
286
- <span>render</span>
287
- <span class="cocreate-badge warning">optional</span
288
- ><span class="cocreate-badge danger">required</span>
289
- </h4>
290
- <p>
291
- To render the array data, this attribute should define by the
292
- object selector path
293
- </p>
294
- </li>
295
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
296
- <h4>
297
- <span>render-as</span>
298
- <span class="cocreate-badge warning">optional</span
299
- ><span class="cocreate-badge">Default: render's value</span>
300
- </h4>
301
- <p>If render defined, this attribute can define</p>
302
- <p>Default value is value of render</p>
303
- </li>
304
- </ul>
258
+ <div
259
+ id="render-attributes"
260
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
261
+ scroll
262
+ scroll-intersect="color:dodgerblue"
263
+ scroll-query="#render-attributes-section">
264
+ <span
265
+ class="display:flex align-items:center width:fit-content"
266
+ hover="display:block!important"
267
+ hover-query="[href='#render-attributes']">
268
+ <h2 class="padding:5px_0px">Attributes</h2>
269
+ <a
270
+ class="margin-left:10px display:none"
271
+ href="#render-attributes"
272
+ ><i src="/assets/svg/link.svg"></i
273
+ ></a>
274
+ </span>
275
+ </div>
276
+ <ul class="list-style-type:none">
277
+ <li
278
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
279
+ <h4>
280
+ <span>render</span>
281
+ <span class="cocreate-badge warning"
282
+ >optional</span
283
+ ><span class="cocreate-badge danger"
284
+ >required</span
285
+ >
286
+ </h4>
287
+ <p>
288
+ To render the array data, this attribute should
289
+ define by the object selector path
290
+ </p>
291
+ </li>
292
+ <li
293
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
294
+ <h4>
295
+ <span>render-as</span>
296
+ <span class="cocreate-badge warning"
297
+ >optional</span
298
+ ><span class="cocreate-badge"
299
+ >Default: render's value</span
300
+ >
301
+ </h4>
302
+ <p>If render defined, this attribute can define</p>
303
+ <p>Default value is value of render</p>
304
+ </li>
305
+ </ul>
305
306
 
306
- <h4
307
- class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px"
308
- >
309
- Funcations
310
- </h4>
311
- <ul class="list-style-type:none">
312
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
313
- <h4>
314
- <span>setValue(elements, data, [stateTo])</span>
315
- </h4>
316
- <p>This is main function.</p>
317
- <div>
318
- <p>
319
- <strong>elements</strong>
320
- <span class="cocreate-badge warning">Type:NoteList</span
321
- ><span class="cocreate-badge danager">required</span>
322
- </p>
323
- <p>Dom elements for render</p>
324
- </div>
325
- <div>
326
- <p>
327
- <strong>data</strong>
328
- <span class="cocreate-badge warning">Type:object</span
329
- ><span class="cocreate-badge danager">required</span>
330
- </p>
331
- <p>Data to render</p>
332
- </div>
333
- <div>
334
- <p>
335
- <strong>stateTo</strong
336
- ><span class="cocreate-badge warning">Type:string</span
337
- ><span class="cocreate-badge warning">optional</span>
338
- </p>
339
- </div>
340
- </li>
341
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
342
- <h4>
343
- <span>render(selector, data)</span>
344
- </h4>
345
- <div>
346
- <p>
347
- <strong>selector</strong>
348
- <span class="cocreate-badge warning">Type:String</span
349
- ><span class="cocreate-badge danager">required</span>
350
- </p>
351
- <p>The selector of element to render</p>
352
- </div>
353
- <div>
354
- <p>
355
- <strong>data</strong>
356
- <span class="cocreate-badge warning">Type:object</span
357
- ><span class="cocreate-badge danager">required</span>
358
- </p>
359
- <p>Data to render</p>
360
- </div>
361
- </li>
362
- <li class="padding:15px_0px border-bottom:1px_solid_lightgrey">
363
- <h4>
364
- <span>setArray(element, data)</span>
365
- </h4>
366
- <div>
367
- <p>
368
- <strong>element</strong>
369
- <span class="cocreate-badge warning">Type:Node</span
370
- ><span class="cocreate-badge danager">required</span>
371
- </p>
372
- <p>
373
- Element to render the array. Geneeral it will be template.
374
- </p>
375
- </div>
376
- <div>
377
- <p>
378
- <strong>data</strong>
379
- <span class="cocreate-badge warning">Type:object</span
380
- ><span class="cocreate-badge danager">required</span>
381
- </p>
382
- <p>Data to render</p>
383
- </div>
384
- </li>
385
- </ul>
307
+ <h4
308
+ class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px">
309
+ Funcations
310
+ </h4>
311
+ <ul class="list-style-type:none">
312
+ <li
313
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
314
+ <h4>
315
+ <span>setValue(elements, data, [stateTo])</span>
316
+ </h4>
317
+ <p>This is main function.</p>
318
+ <div>
319
+ <p>
320
+ <strong>elements</strong>
321
+ <span class="cocreate-badge warning"
322
+ >Type:NoteList</span
323
+ ><span class="cocreate-badge danager"
324
+ >required</span
325
+ >
326
+ </p>
327
+ <p>Dom elements for render</p>
328
+ </div>
329
+ <div>
330
+ <p>
331
+ <strong>data</strong>
332
+ <span class="cocreate-badge warning"
333
+ >Type:object</span
334
+ ><span class="cocreate-badge danager"
335
+ >required</span
336
+ >
337
+ </p>
338
+ <p>Data to render</p>
339
+ </div>
340
+ <div>
341
+ <p>
342
+ <strong>stateTo</strong
343
+ ><span class="cocreate-badge warning"
344
+ >Type:string</span
345
+ ><span class="cocreate-badge warning"
346
+ >optional</span
347
+ >
348
+ </p>
349
+ </div>
350
+ </li>
351
+ <li
352
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
353
+ <h4>
354
+ <span>render(selector, data)</span>
355
+ </h4>
356
+ <div>
357
+ <p>
358
+ <strong>selector</strong>
359
+ <span class="cocreate-badge warning"
360
+ >Type:String</span
361
+ ><span class="cocreate-badge danager"
362
+ >required</span
363
+ >
364
+ </p>
365
+ <p>The selector of element to render</p>
366
+ </div>
367
+ <div>
368
+ <p>
369
+ <strong>data</strong>
370
+ <span class="cocreate-badge warning"
371
+ >Type:object</span
372
+ ><span class="cocreate-badge danager"
373
+ >required</span
374
+ >
375
+ </p>
376
+ <p>Data to render</p>
377
+ </div>
378
+ </li>
379
+ <li
380
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
381
+ <h4>
382
+ <span>setArray(element, data)</span>
383
+ </h4>
384
+ <div>
385
+ <p>
386
+ <strong>element</strong>
387
+ <span class="cocreate-badge warning"
388
+ >Type:Node</span
389
+ ><span class="cocreate-badge danager"
390
+ >required</span
391
+ >
392
+ </p>
393
+ <p>
394
+ Element to render the array. Geneeral it
395
+ will be template.
396
+ </p>
397
+ </div>
398
+ <div>
399
+ <p>
400
+ <strong>data</strong>
401
+ <span class="cocreate-badge warning"
402
+ >Type:object</span
403
+ ><span class="cocreate-badge danager"
404
+ >required</span
405
+ >
406
+ </p>
407
+ <p>Data to render</p>
408
+ </div>
409
+ </li>
410
+ </ul>
386
411
 
387
- <h2
388
- class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px"
389
- >
390
- How Does It Works
391
- </h2>
392
- <p>
393
- CoCreate-render works based on attributes and template, The
394
- attributes to render should be wrapper "{{ }}", and attributes can
395
- include the combine "{{}}" wrapper.
396
- </p>
412
+ <h2
413
+ class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px">
414
+ How Does It Works
415
+ </h2>
416
+ <p>
417
+ CoCreate-render works based on attributes and template,
418
+ The attributes to render should be wrapper "{{ }}", and
419
+ attributes can include the combine "{{}}" wrapper.
420
+ </p>
397
421
 
398
- <p>
399
- To render the array data, Render need to define
400
- <code class="language-js">class="template"</code>.
401
- <code class="language-js">render</code>
402
- </p>
422
+ <p>
423
+ To render the array data, Render need to define
424
+ <code class="language-js">class="template"</code>.
425
+ <code class="language-js">render</code>
426
+ </p>
403
427
 
404
- <h2
405
- class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px"
406
- >
407
- Effects and Styles
408
- </h2>
428
+ <h2
429
+ class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px">
430
+ Effects and Styles
431
+ </h2>
409
432
 
410
- <h2
411
- class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px"
412
- >
413
- Events
414
- </h2>
415
- </div>
416
- <div
417
- class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey"
418
- >
419
- <!-- SandBox -->
420
- <div
421
- id="render-demo"
422
- class="border-bottom:1px_solid_lightgrey"
423
- scroll
424
- scroll-intersect="color:dodgerblue"
425
- scroll-selector="#render-demo-section"
426
- >
427
- <span
428
- class="display:flex align-items:center width:fit-content"
429
- hover="display:block!important"
430
- hover-selector="[href='#render-demo']"
431
- >
432
- <h2 class="padding:5px_0px">Demo</h2>
433
- <a class="margin-left:10px display:none" href="#render-demo"
434
- ><i src="/assets/svg/link.svg"></i
435
- ></a>
436
- </span>
437
- </div>
438
- <div class="position:sticky top:0 padding:15px_0px height:100vh">
439
- <!-- SandBox -->
440
- <div
441
- class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
442
- id="playground"
443
- >
444
- <div
445
- id="demo-code"
446
- resizable
447
- class="position:relative height:50%"
448
- >
449
- <textarea
450
- type="code"
451
- lang="html"
452
- array="demos"
453
- object=""
454
- key="demo"
455
- save="false"
456
- id="demo"
457
- class="height:100% width:100% outline:none border:none resize:none padding:5px"
458
- ></textarea>
459
- <div resize="bottom" class="background:lightgrey"></div>
460
- </div>
433
+ <h2
434
+ class="border-bottom:1px_solid_lightgrey margin-top:20px padding:5px_0px">
435
+ Events
436
+ </h2>
437
+ </div>
438
+ <div
439
+ class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
440
+ <!-- SandBox -->
441
+ <div
442
+ id="render-demo"
443
+ class="border-bottom:1px_solid_lightgrey"
444
+ scroll
445
+ scroll-intersect="color:dodgerblue"
446
+ scroll-query="#render-demo-section">
447
+ <span
448
+ class="display:flex align-items:center width:fit-content"
449
+ hover="display:block!important"
450
+ hover-query="[href='#render-demo']">
451
+ <h2 class="padding:5px_0px">Demo</h2>
452
+ <a
453
+ class="margin-left:10px display:none"
454
+ href="#render-demo"
455
+ ><i src="/assets/svg/link.svg"></i
456
+ ></a>
457
+ </span>
458
+ </div>
459
+ <div
460
+ class="position:sticky top:0 padding:15px_0px height:100vh">
461
+ <!-- SandBox -->
462
+ <div
463
+ class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
464
+ id="playground">
465
+ <div
466
+ id="demo-code"
467
+ resizable
468
+ class="position:relative height:50%">
469
+ <textarea
470
+ type="code"
471
+ lang="html"
472
+ array="demos"
473
+ object=""
474
+ key="demo"
475
+ save="false"
476
+ id="demo"
477
+ class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
478
+ <div
479
+ resize="bottom"
480
+ class="background:lightgrey"></div>
481
+ </div>
461
482
 
462
- <div
463
- id="demo-preview"
464
- class="position:relative overflow:auto background-color:white"
465
- >
466
- <div class="demopreview padding:20px"></div>
467
- </div>
483
+ <div
484
+ id="demo-preview"
485
+ class="position:relative overflow:auto background-color:white">
486
+ <div class="demopreview padding:20px"></div>
487
+ </div>
468
488
 
469
- <div
470
- class="font-size:20px position:absolute top:10px right:10px opacity:0.6"
471
- >
472
- <a
473
- class="margin-right:10px"
474
- id="eye"
475
- show="#eye-slash"
476
- hide="#eye, #demo-preview"
477
- toggle="code-height"
478
- toggle-selector="#demo-code"
479
- ><i class="height:18px" src="/assets/svg/eye.svg"></i
480
- ></a>
481
- <a
482
- class="margin-right:10px"
483
- hidden
484
- id="eye-slash"
485
- show="#eye, #demo-preview"
486
- hide="#eye-slash"
487
- toggle="code-height"
488
- toggle-selector="#demo-code"
489
- ><i src="/assets/svg/eye-slash.svg"></i
490
- ></a>
491
- <a
492
- class="margin-right:10px"
493
- id="code"
494
- show="#code-slash"
495
- hide="#code, #demo-code"
496
- ><i src="/assets/svg/code.svg"></i
497
- ></a>
498
- <a
499
- class="margin-right:10px"
500
- hidden
501
- id="code-slash"
502
- show="#code, #demo-code"
503
- hide="#code-slash"
504
- ><i class="height:18px" src="/assets/svg/code.svg"></i
505
- ></a>
506
- <a
507
- class="margin-right:5px"
508
- fullscreen
509
- fullscreen-selector="#playground"
510
- ></a>
511
- </div>
512
- </div>
513
- <!-- End SandBox -->
514
- </div>
515
- </div>
516
- </div>
517
- <button
518
- href="https://github.com/CoCreate-app/CoCreate-render/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
519
- target="_blank"
520
- class="display:flex justify-content:center align-items:center position:fixed bottom:15px right:15px height:50px width:50px border-radius:50% box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)"
521
- >
522
- <i src="../assets/svg/pencil-alt.svg"></i>
523
- </button>
524
- </main>
489
+ <div
490
+ class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
491
+ <a
492
+ class="margin-right:10px"
493
+ id="eye"
494
+ show="#eye-slash"
495
+ hide="#eye, #demo-preview"
496
+ toggle="code-height"
497
+ toggle-query="#demo-code"
498
+ ><i
499
+ class="height:18px"
500
+ src="/assets/svg/eye.svg"></i
501
+ ></a>
502
+ <a
503
+ class="margin-right:10px"
504
+ hidden
505
+ id="eye-slash"
506
+ show="#eye, #demo-preview"
507
+ hide="#eye-slash"
508
+ toggle="code-height"
509
+ toggle-query="#demo-code"
510
+ ><i src="/assets/svg/eye-slash.svg"></i
511
+ ></a>
512
+ <a
513
+ class="margin-right:10px"
514
+ id="code"
515
+ show="#code-slash"
516
+ hide="#code, #demo-code"
517
+ ><i src="/assets/svg/code.svg"></i
518
+ ></a>
519
+ <a
520
+ class="margin-right:10px"
521
+ hidden
522
+ id="code-slash"
523
+ show="#code, #demo-code"
524
+ hide="#code-slash"
525
+ ><i
526
+ class="height:18px"
527
+ src="/assets/svg/code.svg"></i
528
+ ></a>
529
+ <a
530
+ class="margin-right:5px"
531
+ fullscreen
532
+ fullscreen-query="#playground"></a>
533
+ </div>
534
+ </div>
535
+ <!-- End SandBox -->
536
+ </div>
537
+ </div>
538
+ </div>
539
+ <button
540
+ href="https://github.com/CoCreate-app/CoCreate-render/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
541
+ target="_blank"
542
+ class="display:flex justify-content:center align-items:center position:fixed bottom:15px right:15px height:50px width:50px border-radius:50% box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
543
+ <i src="../assets/svg/pencil-alt.svg"></i>
544
+ </button>
545
+ </main>
525
546
 
526
- <script src="https://CoCreate.app/dist/CoCreate.js"></script>
527
- </body>
547
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
548
+ </body>
528
549
  </html>