You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

189 lines
6.2 KiB

  1. ---
  2. layout : 'default'
  3. css : 'playground'
  4. title : 'Playground'
  5. type : 'Library'
  6. ---
  7. <% uiElements = @getCollection("documents").findAllLive({type: $in: ['UI Element']},[{title: 1}]).toJSON() %>
  8. <% uiCollections = @getCollection("documents").findAllLive({type: $in: ['UI Collection']},[{title: 1}]).toJSON() %>
  9. <% uiModules = @getCollection("documents").findAllLive({type: $in: ['UI Module']},[{title: 1}]).toJSON() %>
  10. <% uiViews = @getCollection("documents").findAllLive({type: $in: ['UI View']},[{title: 1}]).toJSON() %>
  11. <script src="/javascript/library/zencoding.js"></script>
  12. <script src="/javascript/library/handlebars.js"></script>
  13. <script src="/build/uncompressed/definitions/modules/dropdown.js"></script>
  14. <script src="/build/uncompressed/definitions/behaviors/api.js"></script>
  15. <script src="/javascript/playground.js"></script>
  16. <div class="ui page grid center aligned title">
  17. <div class="ten wide column">
  18. <h1 class="ui dividing header">
  19. <i class="icon circular lab"></i> Playground
  20. </h1>
  21. </div>
  22. </div>
  23. <div class="ui page grid">
  24. <div class="ui three wide column">
  25. <div class="ui fluid vertical ui element menu">
  26. <div class="header item">Choose UI</div>
  27. <div class="item">
  28. <form class="ui form">
  29. <div class="field">
  30. <label>Elements</label>
  31. <div class="ui fluid dropdown selection">
  32. <input type="hidden" name="element">
  33. <i class="icon dropdown"></i>
  34. <div class="text">Button</div>
  35. <div class="menu">
  36. <% for element in uiElements: %>
  37. <div data-value="<%= element.title.toLowerCase() %>" class="item">
  38. <%= element.title %>
  39. </div>
  40. <% end %>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="field">
  45. <label>Collections</label>
  46. <div class="ui fluid dropdown selection">
  47. <input type="hidden" name="collection">
  48. <i class="icon dropdown"></i>
  49. <div class="text">---</div>
  50. <div class="menu">
  51. <% for element in uiCollections: %>
  52. <div data-value="<%= element.title.toLowerCase() %>" class="item">
  53. <%= element.title %>
  54. </div>
  55. <% end %>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="field">
  60. <label>Modules</label>
  61. <div class="ui fluid dropdown selection">
  62. <input type="hidden" name="module">
  63. <i class="icon dropdown"></i>
  64. <div class="text">---</div>
  65. <div class="menu">
  66. <% for element in uiModules: %>
  67. <div data-value="<%= element.title.toLowerCase() %>" class="item">
  68. <%= element.title %>
  69. </div>
  70. <% end %>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="field">
  75. <label>Views</label>
  76. <div class="ui fluid dropdown selection">
  77. <input type="hidden" name="view">
  78. <i class="icon dropdown"></i>
  79. <div class="text">---</div>
  80. <div class="menu">
  81. <% for element in uiViews: %>
  82. <div data-value="<%= element.title.toLowerCase() %>" class="item">
  83. <%= element.title %>
  84. </div>
  85. <% end %>
  86. </div>
  87. </div>
  88. </div>
  89. </form>
  90. </div>
  91. <div class="type menu">
  92. <div class="header item">Types</div>
  93. <div class="type item">
  94. <form class="ui form">
  95. </form>
  96. </div>
  97. </div>
  98. <div class="variation menu">
  99. <div class="header item">Variations</div>
  100. <div class="variation item">
  101. <form class="ui form">
  102. </form>
  103. </div>
  104. </div>
  105. <div class="item">
  106. <div class="ui large red fluid add button"><i class="icon add"></i>Add</div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="ui ten wide default page column">
  111. <div class="ui raised segment">
  112. <div class="ui large message warning">
  113. <div class="header"><i class="icon empty heart"></i> No Designs Yet!</div>
  114. Add an element to the left to begin
  115. </div>
  116. </div>
  117. </div>
  118. <div class="three wide column">
  119. <div class="ui purple segment">
  120. <div class="ui small dividing header">Preview</div>
  121. <div class="ui secondary preview segment">
  122. </div>
  123. </div>
  124. <div class="ui blue segment">
  125. <div class="ui small dividing header">Text</div>
  126. <div class="ui form">
  127. <div class="field">
  128. <textarea class="text"></textarea>
  129. </div>
  130. <div class="ui fluid blue button">Update Text</div>
  131. </div>
  132. </div>
  133. <div class="ui green segment">
  134. <div class="ui small dividing header">View</div>
  135. <div class="ui two fluid secondary view buttons">
  136. <div class="ui active preview button">Preview</div>
  137. <div class="ui html button">Code</div>
  138. </div>
  139. <div class="ui small dividing header">Finish Up</div>
  140. <div class="ui positive secondary fluid download button">Download</div>
  141. </div>
  142. </div>
  143. </body>
  144. <script class="checkbox" type="text/x-handlebars-template">
  145. <div class="inline field">
  146. <div class="ui checkbox">
  147. <input type="checkbox" name="{{name}}" value="{{value}}" />
  148. <div class="box"></div>
  149. </div>
  150. {{#if name}}
  151. <label>{{name}}</label>
  152. {{else}}
  153. <label>{{uppercase value}}</label>
  154. {{/if}}
  155. </div>
  156. </script>
  157. <script class="select" type="text/x-handlebars-template">
  158. <div class="field">
  159. <label>{{name}}</label>
  160. <div class="ui fluid dropdown {{value}} selection">
  161. <input type="hidden" name="{{name}}" value="none">
  162. <i class="icon dropdown"></i>
  163. <div class="text">Standard</div>
  164. <div class="menu">
  165. <div class="item" data-value="none">---</div>
  166. {{#each values}}
  167. {{#if @key}}
  168. <div data-value="{{this}}" class="item">
  169. {{@key}}
  170. </div>
  171. {{else}}
  172. <div data-value="{{this}}" class="item">
  173. {{uppercase this}}
  174. </div>
  175. {{/if}}
  176. {{/each}}
  177. </div>
  178. </div>
  179. </div>
  180. </script>
  181. </html>