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.

333 lines
11 KiB

  1. <!DOCTYPE html>
  2. <head>
  3. <!-- Standard Meta -->
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  6. <meta name="viewport" content="width=device-width" />
  7. <!-- Site Properities -->
  8. <meta http-equiv="X-Powered-By" content="DocPad v6.31.6"/>
  9. <title>Shape | Semantic UI</title>
  10. <meta name="description" content="Semantic empowers designers and developers by creating a shared vocabulary for UI." />
  11. <meta name="keywords" content="html5, ui, library, framework, javascript" />
  12. <link rel="stylesheet" type="text/css" href="/stylesheets/reset.css">
  13. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/icons.css">
  14. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/button.css">
  15. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/checkbox.css">
  16. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/header.css">
  17. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/label.css">
  18. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/divider.css">
  19. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/block.css">
  20. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/elements/segment.css">
  21. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/grid.css">
  22. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/table.css">
  23. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/form.css">
  24. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/collections/menu.css">
  25. <link rel="stylesheet" type="text/css" class="ui" href="/ui/flat/modules/shape.css">
  26. <link rel="stylesheet" type="text/css" href="/stylesheets/semantic.css">
  27. <link rel="stylesheet" type="text/css" href="/stylesheets/library/sidr.css">
  28. <script src="/javascript/library/jquery.js"></script>
  29. <script src="/javascript/library/ace/ace.js"></script>
  30. <script src="/javascript/library/sidr.js"></script>
  31. <script src="/javascript/library/waypoints.js"></script>
  32. <script src="/modules/behavior/state.js"></script>
  33. <script src="/modules/ui/shape.js"></script>
  34. <script src="/javascript/semantic.js"></script>
  35. </head>
  36. <body id="example">
  37. <div class="ui large vertical menu" id="menu">
  38. <div class="item"><a href="/index.html"><b>Introduction</b></a></div>
  39. <div class="item"><a href="/download.html"><b>Download</b></a></div>
  40. <div class="item">
  41. <a href="/element.html"><b>UI Elements</b></a>
  42. <div class="menu">
  43. <div class="item"><a href="/elements/button.html">Button</a></div>
  44. <div class="item"><a href="/elements/label.html">Label</a></div>
  45. </div>
  46. </div>
  47. <div class="item">
  48. <a href="/collection.html"><b>UI Collections</b></a>
  49. <div class="menu">
  50. <div class="item"><a href="/collections/form.html">Form</a></div>
  51. <div class="item"><a href="/elements/header.html">Header</a></div>
  52. <div class="item"><a href="/collections/menu.html">Menu</a></div>
  53. <div class="item"><a href="/collections/table.html">Table</a></div>
  54. <div class="item"><a href="/collections/block.html">Text Block</a></div>
  55. </div>
  56. </div>
  57. <div class="item">
  58. <a href="/module.html"><b>UI Modules</b></a>
  59. <div class="menu">
  60. <div class="active item"><a href="/modules/shape.html">Shape</a></div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="ui fixed transparent contrasting main menu">
  65. <div class="container">
  66. <div class="title item">
  67. <b>Semantic:</b> UI Module
  68. </div>
  69. <div class="icon previous link disabled item">
  70. <i class="icon left-open"></i>
  71. </div>
  72. <div class="section dropdown item">
  73. 1 of 1
  74. <div class="menu">
  75. <div class="active item">
  76. <a href="/modules/shape.html">1. Shape</a>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="icon next disabled link item">
  81. <i class="icon right-open"></i>
  82. </div>
  83. <div class="right menu">
  84. <a class="item" href="https://github.com/quirkyinc/semantic">
  85. <i class="icon github"></i>
  86. </a>
  87. <div class="dropdown item">
  88. <i class="icon tint"></i> Theme
  89. <div class="theme menu">
  90. <div class="active item" data-theme="flat">Flat</div>
  91. <div class="item" data-theme="shaded">Shaded</div>
  92. <div class="item" data-theme="classic">Classic</div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="ui huge left attached vertical side buttons">
  99. <div class="ui large blue sidebar button"><i class="icon th-list"></i></div>
  100. </div>
  101. <div class="segment">
  102. <div class="container">
  103. <h1>Shape</h1>
  104. <p>Shape is a plugin for 3D transitioning elements.</p>
  105. </div>
  106. </div>
  107. <div class="main container">
  108. <div class="peek">
  109. <div class="ui vertical pointing menu">
  110. <div class="active item">Examples</div>
  111. <div class="item">Usage</div>
  112. <div class="item">Settings</div>
  113. </div>
  114. </div>
  115. <p>Shapes makes creating 3D tweens easier by taking care of the dirty business of calculating translations based on content sizing, which can be a confusing, frustrating task.</p>
  116. <p>The module uses 3D transformations which are currently only supported in modern versions of Chrome, Safari, and Firefox.</p>
  117. <p>Shapes is written using the semantic module specification. Semantic is a standard pattern for writing Javascript modules which intends to make understanding new code less confusing, and debugging errors less frustrating, by making coding decisions less arbitrary and more semantic. <a href="module.html">
  118. <p>Click here to read more</a> about Semantic spec, and the upcoming library.</p>
  119. <h2>Examples</h2>
  120. <h3>Standard</h3>
  121. <div class="demo square shape module">
  122. <div class="shape">
  123. <div class="active jira side">
  124. <img src="/images/shape/jira.png">
  125. </div>
  126. <div class="heroku side">
  127. <img src="/images/shape/heroku.png">
  128. </div>
  129. <div class="quirky side">
  130. <img src="/images/shape/quirky.png">
  131. </div>
  132. </div>
  133. </div>
  134. <h3>Shape</h3>
  135. <div class="ui shape buttons">
  136. <div class="active ui button" data-shape="square">Square</div>
  137. <div class="ui button" data-shape="rectangle">Rectangle</div>
  138. <div class="ui button" data-shape="irregular">Irregular</div>
  139. </div>
  140. <h3>Flip</h3>
  141. <div class="ui direction buttons">
  142. <div class="ui button" data-animation="flip" data-direction="left">Left</div>
  143. <div class="ui button" data-animation="flip" data-direction="right">Right</div>
  144. <div class="ui button" data-animation="flip" data-direction="up">Up</div>
  145. <div class="ui button" data-animation="flip" data-direction="down">Down</div>
  146. <div class="ui button" data-animation="flip" data-direction="over">Over</div>
  147. </div>
  148. <h2>Usage</h2>
  149. <p>The plugin must be initialized once before methods can be accessed</p>
  150. <div class="code">$('.shape')
  151. .shape()
  152. ;</div>
  153. <p>Transitions automatically assume next side is the next sibling (or first if last element)</p>
  154. <div class="code">$('.shape')
  155. .shape('flip.up')
  156. ;</div>
  157. <p>To manually set the next side to appear use a selector or jQuery object</p>
  158. <div class="code">$('.shape')
  159. .shape('set.nextSide', '.second')
  160. .shape('flip.up')
  161. ;</div>
  162. <p>Any internal method can be invoked programmatically</p>
  163. <div class="code">$('.shape')
  164. .shape('repaint')
  165. ;</div>
  166. <h2>Settings</h2>
  167. <h3>Changing Settings</h3>
  168. <ol>
  169. <li>A settings object can be passed in when initializing the plugin
  170. <br> <div class="code">$('.foo')
  171. .shape({
  172. moduleName: 'Godzilla'
  173. })
  174. ;</div>
  175. </li>
  176. <li>Default settings for the module can be overridden by modifying $.fn.shape.settings.
  177. <br><div class="code">$.fn.shape.settings.moduleName = 'Godzilla';</div>
  178. </li>
  179. <li>Settings can be changed after a module is initialized by calling the 'settings' method on the module with either a settings object or a name, value pair.
  180. <br><div class="code">$('.foo').shape('setting', 'moduleName', 'Godzilla');</div>
  181. </li>
  182. </ol>
  183. <h3>Reading Settings</h3>
  184. <p>Settings can also be read programmatically: <div class="code">$('.foo').shape('setting', 'moduleName');</div>
  185. <h3>Defaults</h3>
  186. <table class="ui grid settings table">
  187. <thead>
  188. <th>Setting</th>
  189. <th>Default</th>
  190. <th>Description</th>
  191. </thead>
  192. <tbody>
  193. <tr>
  194. <td>useCSS</td>
  195. <td>True</td>
  196. <td>Not currently supported. Will allow for use of javascript requestAnimationFrame transitions instead of css3 transitions.</td>
  197. </tr>
  198. <tr>
  199. <td>duration</td>
  200. <td>1000ms</td>
  201. <td>Duration of animation (javascript only). To modify animation duration for css simply modify the css property transition-duration.</td>
  202. </tr>
  203. <tr>
  204. <td>easing</td>
  205. <td>easeInOutQuad</td>
  206. <td>Easing equation for animation (javascript only). To modify the easing for css simply modify the css property transition-easing</td>
  207. </tr>
  208. <tr>
  209. <td>selector</td>
  210. <td>
  211. <div class="code" data-type="css">{
  212. shape : '.shape',
  213. side : '.side'
  214. }</div>
  215. </td>
  216. <td>Object containing selectors used by module.</td>
  217. </tr>
  218. <tr>
  219. <td>className</td>
  220. <td>
  221. <div class="code">{
  222. css : 'css',
  223. animating : 'animating',
  224. hidden : 'hidden',
  225. active : 'active'
  226. }</div>
  227. </td>
  228. <td>Object containing class names used by module.</td>
  229. </tr>
  230. <tr class="emphasis">
  231. <td colspan="3">Callbacks</td>
  232. </tr>
  233. <tr>
  234. <td>beforeChange</td>
  235. <td>None</td>
  236. <td>Callback before side is changed. This context is the new side.</td>
  237. </tr>
  238. <tr>
  239. <td>onChange</td>
  240. <td>None</td>
  241. <td>Callback after side is changed. This context is new side.</td>
  242. </tr>
  243. <tr class="emphasis">
  244. <td colspan="3">Standard</td>
  245. </tr>
  246. <tr>
  247. <td>moduleName</td>
  248. <td>Shape</td>
  249. <td>Name used in debug logs</td>
  250. </tr>
  251. <tr>
  252. <td>debug</td>
  253. <td>True</td>
  254. <td>Provides standard debug output to console</td>
  255. </tr>
  256. <tr>
  257. <td>performance</td>
  258. <td>False</td>
  259. <td>Provides standard debug output to console</td>
  260. </tr>
  261. <tr>
  262. <td>verbose</td>
  263. <td>False</td>
  264. <td>Provides ancillary debug output to console</td>
  265. </tr>
  266. <tr>
  267. <td>namespace</td>
  268. <td>shape</td>
  269. <td>Event namespace. Makes sure module teardown does not effect other events attached to an element.</td>
  270. </tr>
  271. <tr>
  272. <td>errors</td>
  273. <td colspan="2">
  274. <div class="code">{
  275. side : 'You tried to switch to a side that does not exist.',
  276. method : 'The method you called is not defined'
  277. }</div>
  278. </td>
  279. </tr>
  280. </tbody>
  281. </table>
  282. </div>
  283. </body>
  284. </html>
  285. </body>
  286. </html>