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.

343 lines
11 KiB

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