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.

321 lines
9.8 KiB

  1. ---
  2. layout : 'default'
  3. css : 'shape'
  4. title : 'Shape'
  5. description : 'A shape is a three dimensional object displayed on a two dimensional plane'
  6. type : 'UI Module'
  7. ---
  8. <link rel="stylesheet" type="text/css" href="/stylesheets/shape.css">
  9. <script src="/build/uncompressed/modules/shape.js"></script>
  10. <script src="/javascript/shape.js"></script>
  11. <%- @partial('header') %>
  12. <div class="main container">
  13. <div class="peek">
  14. <div class="ui vertical pointing secondary menu">
  15. <a class="active item">Types</a>
  16. <a class="item">Examples</a>
  17. <a class="item">Getting Started</a>
  18. </div>
  19. </div>
  20. <h2 class="ui dividing header">Types</h2>
  21. <div class="ui info message">The module uses 3D transformations which are currently only supported in modern versions of Chrome, Safari, and Firefox.</div>
  22. <div class="shown example">
  23. <h4 class="ui header">Shape</h4>
  24. <p>A shape has multiple sides of arbitrary content. Only one is visible</p>
  25. <div class="ui shape">
  26. <div class="sides">
  27. <div class="active side">This side is visible.</div>
  28. <div class="side">This side is not visible.</div>
  29. <div class="side">This side is not visible.</div>
  30. </div>
  31. </div>
  32. </div>
  33. <h2 class="ui dividing header">Examples</h2>
  34. <h3 class="ui header">Interactive</h3>
  35. <div class="demo square ui shape">
  36. <div class="sides">
  37. <div class="active jira side">
  38. <img src="/images/shape/jira.png">
  39. </div>
  40. <div class="heroku side">
  41. <img src="/images/shape/heroku.png">
  42. </div>
  43. <div class="quirky side">
  44. <img src="/images/shape/quirky.png">
  45. </div>
  46. </div>
  47. </div>
  48. <h3 class="ui header">Shape</h3>
  49. <div class="ui shape buttons">
  50. <div class="active ui button" data-shape="square">Square</div>
  51. <div class="ui button" data-shape="rectangle">Rectangle</div>
  52. <div class="ui button" data-shape="irregular">Irregular</div>
  53. </div>
  54. <h3 class="ui header">Flip</h3>
  55. <div class="ui direction buttons">
  56. <div class="ui button" data-animation="flip" data-direction="left">Left</div>
  57. <div class="ui button" data-animation="flip" data-direction="right">Right</div>
  58. <div class="ui button" data-animation="flip" data-direction="up">Up</div>
  59. <div class="ui button" data-animation="flip" data-direction="down">Down</div>
  60. <div class="ui button" data-animation="flip" data-direction="over">Over</div>
  61. <div class="ui button" data-animation="flip" data-direction="back">Back</div>
  62. </div>
  63. <div class="ui clearing section divider"></div>
  64. <h3 class="ui header">Shape with Content</h3>
  65. <div class="dog ui shape">
  66. <div class="sides">
  67. <div class="active side">
  68. <div class="ui items">
  69. <div class="item">
  70. <div class="image">
  71. <a class="ui like corner label">
  72. <i class="like icon"></i>
  73. </a>
  74. <img src="/images/demo/highres2.jpg">
  75. </div>
  76. <div class="content">
  77. <div class="name">Cute Dog</div>
  78. <p class="description">This dog has some things going for it. Its pretty cute and looks like it'd be fun to cuddle up with.</p>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <div class="side">
  84. <div class="ui items">
  85. <div class="item">
  86. <div class="image">
  87. <a class="ui like corner label">
  88. <i class="like icon"></i>
  89. </a>
  90. <img src="/images/demo/highres5.jpg">
  91. </div>
  92. <div class="content">
  93. <div class="name">Silly Dog</div>
  94. <p class="description">Silly dogs can be quite fun to have as companions. You never know what kind of ridiculous thing they will do.</p>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="side">
  100. <div class="ui items">
  101. <div class="item">
  102. <div class="image">
  103. <a class="ui like corner label">
  104. <i class="like icon"></i>
  105. </a>
  106. <img src="/images/demo/highres4.jpg">
  107. </div>
  108. <div class="content">
  109. <div class="meta">5 days ago</div>
  110. <div class="name">Faithful Dog</div>
  111. <p class="description">Sometimes its more important to have a dog you know you can trust. But not every dog is trustworthy, you can tell by looking at its smile.</p>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. <div class="dog ui shape">
  119. <div class="sides">
  120. <div class="active side">
  121. <div class="ui items">
  122. <div class="item">
  123. <div class="image">
  124. <a class="ui like corner label">
  125. <i class="like icon"></i>
  126. </a>
  127. <img src="/images/demo/highres.jpg">
  128. </div>
  129. <div class="content">
  130. <div class="name">Cute Dog</div>
  131. <p class="description">This dog has some things going for it. Its pretty cute and looks like it'd be fun to cuddle up with.</p>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="side">
  137. <div class="ui items">
  138. <div class="item">
  139. <div class="image">
  140. <a class="ui like corner label">
  141. <i class="like icon"></i>
  142. </a>
  143. <img src="/images/demo/highres4.jpg">
  144. </div>
  145. <div class="content">
  146. <div class="name">Silly Dog</div>
  147. <p class="description">Silly dogs can be quite fun to have as companions. You never know what kind of ridiculous thing they will do.</p>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <div class="side">
  153. <div class="ui items">
  154. <div class="item">
  155. <div class="image">
  156. <a class="ui like corner label">
  157. <i class="like icon"></i>
  158. </a>
  159. <img src="/images/demo/highres6.jpg">
  160. </div>
  161. <div class="content">
  162. <div class="meta">5 days ago</div>
  163. <div class="name">Faithful Dog</div>
  164. <p class="description">Sometimes its more important to have a dog you know you can trust. But not every dog is trustworthy, you can tell by looking at its smile.</p>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="ui clearing divider"></div>
  172. <div class="code" data-demo="true">
  173. $('.dog.shape')
  174. .eq(0)
  175. .shape('flip over')
  176. .end()
  177. .eq(1)
  178. .shape('flip left')
  179. ;
  180. </div>
  181. <h2 class="ui dividing header">Getting Started</h2>
  182. <p>Initializing a shape</p>
  183. <div class="code">$('.shape')
  184. .shape()
  185. ;</div>
  186. <p>Transitions automatically assume next side is the next sibling (or first if last element)</p>
  187. <div class="code">$('.shape')
  188. .shape('flip up')
  189. ;</div>
  190. <p>To manually set the next side to appear use a selector or jQuery object</p>
  191. <div class="code">$('.shape')
  192. .shape('set next side', '.second')
  193. .shape('flip up')
  194. ;</div>
  195. <p>Any internal method can be invoked programmatically</p>
  196. <div class="code">$('.shape')
  197. .shape('repaint')
  198. ;</div>
  199. <h3 class="ui header">Defaults</h3>
  200. <table class="ui celled sortable definition table">
  201. <thead>
  202. <th colspan="3">Shape Settings</th>
  203. </thead>
  204. <tbody>
  205. <tr>
  206. <td>duration</td>
  207. <td>1000ms</td>
  208. <td>Duration of animation (javascript only). To modify animation duration for css simply modify the css property transition-duration.</td>
  209. </tr>
  210. <tr>
  211. <td>easing</td>
  212. <td>easeInOutQuad</td>
  213. <td>Easing equation for animation (javascript only). To modify the easing for css simply modify the css property transition-easing</td>
  214. </tr>
  215. <tr>
  216. <td>selector</td>
  217. <td>
  218. <div class="code" data-type="css">{
  219. shape : '.shape',
  220. side : '.side'
  221. }</div>
  222. </td>
  223. <td>Object containing selectors used by module.</td>
  224. </tr>
  225. <tr>
  226. <td>className</td>
  227. <td>
  228. <div class="code">{
  229. css : 'css',
  230. animating : 'animating',
  231. hidden : 'hidden',
  232. active : 'active'
  233. }</div>
  234. </td>
  235. <td>Object containing class names used by module.</td>
  236. </tr>
  237. </table>
  238. <table class="ui celled sortable definition table">
  239. <thead>
  240. <th colspan="3">Callbacks</th>
  241. </thead>
  242. <tr>
  243. <td>beforeChange</td>
  244. <td>None</td>
  245. <td>Callback before side is changed. This context is the new side.</td>
  246. </tr>
  247. <tr>
  248. <td>onChange</td>
  249. <td>None</td>
  250. <td>Callback after side is changed. This context is new side.</td>
  251. </tr>
  252. </table>
  253. <table class="ui celled sortable definition table">
  254. <thead>
  255. <th colspan="3">UI Module Settings</th>
  256. </thead>
  257. <tr>
  258. <td>Name</td>
  259. <td>Shape</td>
  260. <td>Name used in debug logs</td>
  261. </tr>
  262. <tr>
  263. <td>debug</td>
  264. <td>True</td>
  265. <td>Provides standard debug output to console</td>
  266. </tr>
  267. <tr>
  268. <td>performance</td>
  269. <td>False</td>
  270. <td>Provides standard debug output to console</td>
  271. </tr>
  272. <tr>
  273. <td>verbose</td>
  274. <td>False</td>
  275. <td>Provides ancillary debug output to console</td>
  276. </tr>
  277. <tr>
  278. <td>namespace</td>
  279. <td>shape</td>
  280. <td>Event namespace. Makes sure module teardown does not effect other events attached to an element.</td>
  281. </tr>
  282. <tr>
  283. <td>errors</td>
  284. <td colspan="2">
  285. <div class="code">{
  286. side : 'You tried to switch to a side that does not exist.',
  287. method : 'The method you called is not defined'
  288. }</div>
  289. </td>
  290. </tr>
  291. </tbody>
  292. </table>
  293. </div>
  294. </body>
  295. </html>