-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update to readme, demo, added cdn scripts
- Loading branch information
1 parent
3334753
commit bb69220
Showing
3 changed files
with
114 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<html> | ||
<head> | ||
<title>Render | CoCreateJS</title> | ||
|
||
<!-- CoCreate Favicon --> | ||
<link rel="icon" href="https://cdn.cocreate.app/favicon.ico" type="image/ico" sizes="16x16"> | ||
</head> | ||
<body> | ||
|
||
<div data-template_id="abc1" data-fetch_collection="render_test"> | ||
<div class="template card {{render2.collection}} card margin:10px firstname" | ||
data-value="{{render2.data._id}}" | ||
data-template_id="abc1" | ||
data-render_array="render2.data"> | ||
<div class="card-body padding:15px" data-collection="{{render2.collection}}"> | ||
<h3 class="{{render2.data.firstname}} blue" value="{{render2.data.lastname}} - {{render2.data.firstname}}">--</h3> | ||
<h3 data-value="{{ render2.data.lastname }}" value="{{lastname}}"></h3> | ||
<input value="{{ render2.collection }}"/> | ||
<h3 class="email" value="{{render2.data.email}}">--</h3> | ||
<textarea value="{{render2.data.lastname}}"></textarea> | ||
<h3 data-attribute="{{render2.data.personal_info.email}}" name="email" value="{{render2.data.personal_info.email}}"></h3> | ||
|
||
<div class="template card " | ||
data-render_array="render2.data.testing_array"> | ||
|
||
<h3 data-attribute="{{render2.data.testing_array.email}}" name="email" class="{{render2.data.testing_array.email}}" value="{{render2.data.testing_array.email}}"></h3> | ||
<h3 value="{{render2.collection}}"></h3> | ||
|
||
<h3 value="{{render2.data.personal_info.email}}"></h3> | ||
</div> | ||
<div class="template card " | ||
data-render_array="render2.data.string_array" data-render_key="string_"> | ||
|
||
<h3 name="test" | ||
data-attribute="{{string_.--}}" | ||
class="{{string_.--}}" | ||
value="{{string_.--}}"></h3> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<pre> | ||
<h1>Paste in your browser console</h1> | ||
|
||
/** Example of array object from db -- render2 is an example of data-render_id**/ | ||
CoCreate.render.data({ | ||
selector: '[data-template_id=abc1]', | ||
data: { | ||
render2: { | ||
collection : 'dededede', | ||
data: [{ | ||
_id : '123kijfhgfkel45', | ||
firstname : 'Jin', | ||
lastname : 'codingmachinine', | ||
personal_info : {email:'[email protected]','phone':'56666'}, | ||
email: '[email protected]', | ||
testing_array : [ | ||
{email:'[email protected]','phone':'0','home':'home1'}, | ||
{email:'[email protected]','phone':'1','home':'home2'}, | ||
{email:'[email protected]','phone':'2','home':'home3'}, | ||
{email:'[email protected]','phone':'3','home':'home4'}, | ||
{email:'[email protected]','phone':'4','home':'home5'}, | ||
], | ||
string_array: ['string1', 'string2', 1, 3] | ||
},{ | ||
_id : '5678efe32qd2ol', | ||
firstname : 'jean', | ||
lastname : 'Mendoza', | ||
personal_info : {email:'[email protected]','phone':'56666'}, | ||
email: '[email protected]', | ||
testing_array : [ | ||
{email:'[email protected]','phone':'10','home':'home11'}, | ||
{email:'[email protected]','phone':'11','home':'home12'}, | ||
{email:'[email protected]','phone':'12','home':'home13'}, | ||
{email:'[email protected]','phone':'13','home':'home14'}, | ||
{email:'[email protected]','phone':'14','home':'home15'}, | ||
{email:'[email protected]','phone':'15','home':'home16'}, | ||
{email:'[email protected]','phone':'16','home':'home17'}, | ||
{email:'[email protected]','phone':'17','home':'home18'}, | ||
{email:'[email protected]','phone':'18','home':'home19'} | ||
], | ||
string_array: ['string1', 'string2', 1, 3] | ||
}, | ||
] | ||
} | ||
} | ||
}) | ||
|
||
</pre> | ||
<script> | ||
var config = { | ||
apiKey: 'c2b08663-06e3-440c-ef6f-13978b42883a', | ||
organization_Id: '5de0387b12e200ea63204d6c' | ||
} | ||
</script> | ||
|
||
<!-- CoCreate JS CDN --> | ||
<script src="https://cdn.cocreate.app/render/latest/CoCreate-render.min.js" ></script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters