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.

446 lines
15 KiB

10 years ago
  1. ---
  2. layout : 'default'
  3. css : 'card'
  4. title : 'Card'
  5. description : 'A card view lists site content as a playing card'
  6. type : 'UI View'
  7. element : 'card'
  8. elementType : 'view'
  9. themes : ['Default', 'Basic']
  10. ---
  11. <%- @partial('header') %>
  12. <link rel="stylesheet/less" type="text/css" href="/build/less/definitions/views/card.less" />
  13. <script src="/javascript/card.js"></script>
  14. <div class="main container">
  15. <div class="peek">
  16. <div class="ui vertical pointing secondary menu">
  17. <a class="active item">Types</a>
  18. <a class="item">Content</a>
  19. <a class="card">Variations</a>
  20. </div>
  21. </div>
  22. <h2 class="ui dividing header">Types</h2>
  23. <div class="example">
  24. <h4 class="ui header">Card</h4>
  25. <p>A single card.</p>
  26. <div class="ui card">
  27. <div class="image">
  28. <img src="/images/demo/highres.jpg">
  29. </div>
  30. <div class="content">
  31. <div class="header">Cute Dog</div>
  32. <div class="meta">
  33. <span class="date">5 days ago</span>
  34. </div>
  35. <div class="description">
  36. This dog has some things going for it. Its pretty cute and looks like it'd be fun to cuddle up with.
  37. </div>
  38. </div>
  39. <div class="extra content">
  40. <i class="like icon"></i>
  41. 22 Likes
  42. </div>
  43. </div>
  44. </div>
  45. <div class="even example">
  46. <h4 class="ui header">Cards</h4>
  47. <p>A group of cards. </p>
  48. <div class="ignored yellow ui message">
  49. <div class="header">
  50. <i class="info icon"></i>
  51. Equal Size Cards
  52. </div>
  53. <p>Your card's content may vary in length. In order to keep cards aligned, it is best to set a <code>min-height</code> that matches your largest card size.</p>
  54. <p>For example:</p>
  55. <div class="code" data-type="css">
  56. /* Sets card height to about 3 lines of description */
  57. #my-container .card .content {
  58. min-height: 145px;
  59. }
  60. </div>
  61. </div>
  62. <div class="ui cards">
  63. <div class="card">
  64. <div class="image">
  65. <img src="/images/demo/highres.jpg">
  66. </div>
  67. <div class="content">
  68. <div class="header">Cute Dog</div>
  69. <div class="meta">Today</div>
  70. <div class="description">This dog has some things going for it. Its pretty cute and looks like it'd be fun to cuddle up with.</div>
  71. </div>
  72. <div class="extra content">
  73. <i class="check icon"></i>
  74. 199 Votes
  75. </div>
  76. </div>
  77. <div class="card">
  78. <div class="image">
  79. <img src="/images/demo/highres2.jpg">
  80. </div>
  81. <div class="content">
  82. <div class="header">Faithful Dog</div>
  83. <div class="meta">5 days ago</div>
  84. <div 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.</div>
  85. </div>
  86. <div class="extra content">
  87. <i class="check icon"></i>
  88. 199 Votes
  89. </div>
  90. </div>
  91. <div class="card">
  92. <div class="image">
  93. <img src="/images/demo/highres3.jpg">
  94. </div>
  95. <div class="content">
  96. <div class="header">Silly Dog</div>
  97. <div class="meta">12 days ago</div>
  98. <div class="description">Silly dogs can be quite fun to have as companions. You never know what kind of ridiculous thing they will do.</div>
  99. </div>
  100. <div class="extra content">
  101. <i class="check icon"></i>
  102. 199 Votes
  103. </div>
  104. </div>
  105. <div class="card">
  106. <div class="image">
  107. <img src="/images/demo/highres4.jpg">
  108. </div>
  109. <div class="content">
  110. <div class="header">Introverted Dog</div>
  111. <div class="meta">18 days ago</div>
  112. <div class="description">Introverted dogs don't like to say much, but thats ok, dogs can't talk anyways.</div>
  113. </div>
  114. <div class="extra content">
  115. <i class="check icon"></i>
  116. 199 Votes
  117. </div>
  118. </div>
  119. <div class="card">
  120. <div class="image">
  121. <img src="/images/demo/highres5.jpg">
  122. </div>
  123. <div class="content">
  124. <div class="header">Large Dog</div>
  125. <div class="meta">22 days ago</div>
  126. <div class="description">Large dogs just take up a lot of space. There's not much to be said.</div>
  127. </div>
  128. <div class="extra content">
  129. <i class="check icon"></i>
  130. 199 Votes
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <h2 class="ui dividing header">Content</h2>
  136. <div class="example">
  137. <h4 class="ui header">Title</h4>
  138. <p>A card can contain content a title</p>
  139. <div class="ui card">
  140. <div class="content">
  141. <div class="header">Cute Dog</div>
  142. <div class="meta">2 days ago</div>
  143. <div class="description">This dog has some things going for it. Its pretty cute and looks like it'd be fun to cuddle up with.</div>
  144. </div>
  145. </div>
  146. </div>
  147. <div class="example">
  148. <h4 class="ui header">Metadata</h4>
  149. <p>A card can contain content metadata</p>
  150. <div class="ui info message">
  151. <i class="info icon"></i>
  152. You can include an arbitrary amount of metadata using your own class conventions, all child elements will automatically be spaced
  153. </div>
  154. <div class="ui card">
  155. <div class="content">
  156. <div class="header">Cute Dog</div>
  157. <div class="meta">
  158. <span class="time">2 days ago</span>
  159. <span class="category">Animals</span>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="example">
  165. <h4 class="ui header">Link</h4>
  166. <p>A card can contain contain links as images, headers, or inside content</p>
  167. <div class="ui yellow message">
  168. <i class="star icon"></i>
  169. To make the entire content of a card link, check out the link variation below
  170. </div>
  171. <div class="ui card">
  172. <a class="image" href="#">
  173. <img src="/images/demo/highres.jpg">
  174. </a>
  175. <div class="content">
  176. <a class="header" href="#">Cute Dog</a>
  177. <div class="meta">
  178. <a class="time">2 days ago</a>
  179. </div>
  180. <div class="description">
  181. Check our this <a href="http://www.dogs.com"> excellent resource</a> on dogs.
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. <div class="example">
  187. <h4 class="ui header">Icons</h4>
  188. <p>A card can contain icons to denote user actions.</p>
  189. <div class="ui info message">
  190. Common actions may contain special formatting, like "star" or "heart". To attach events, on a user action, please check out the <a href="#">state behavior</a>.
  191. </div>
  192. <div class="ui card">
  193. <div class="content">
  194. <i class="right floated like icon"></i>
  195. <i class="right floated star icon"></i>
  196. <div class="header">Cute Dog</div>
  197. </div>
  198. </div>
  199. </div>
  200. <div class="example">
  201. <h4 class="ui header">Description</h4>
  202. <p>A card can contain a description with a single or multiple paragraphs</p>
  203. <div class="ui card">
  204. <div class="content">
  205. <div class="header">Cute Dog</div>
  206. <div class="meta">2 days ago</div>
  207. <div class="description">
  208. <p>Cute dogs come in a variety of shapes and sizes. Some cute dogs are cute for their adorable faces, others for their tiny stature, and even others for their massive size.</p>
  209. <p>Many people also have their own barometers for what makes a cute dog.</p>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. <div class="example">
  215. <h4 class="ui header">Extra Content</h4>
  216. <p>A card can contain extra content meant to be formatted separately from the main content</p>
  217. <div class="ui card">
  218. <div class="content">
  219. <div class="header">Cute Dog</div>
  220. <div class="meta">2 days ago</div>
  221. <div class="description">
  222. <p>Cute dogs come in a variety of shapes and sizes. Some cute dogs are cute for their adorable faces, others for their tiny stature, and even others for their massive size.</p>
  223. <p>Many people also have their own barometers for what makes a cute dog.</p>
  224. </div>
  225. </div>
  226. <div class="extra content">
  227. <i class="check icon"></i>
  228. 121 Votes
  229. </div>
  230. </div>
  231. </div>
  232. <div class="example">
  233. <h4 class="ui header">Image</h4>
  234. <p>A card can contain an image</p>
  235. <div class="ui card">
  236. <div class="image">
  237. <img src="/images/demo/highres.jpg">
  238. </div>
  239. <div class="content">
  240. <div class="header">Cute Dog</div>
  241. <div class="meta">2 days ago</div>
  242. <div class="description">
  243. <p>Cute dogs come in a variety of shapes and sizes. Some cute dogs are cute for their adorable faces, others for their tiny stature, and even others for their massive size.</p>
  244. <p>Many people also have their own barometers for what makes a cute dog.</p>
  245. </div>
  246. </div>
  247. <div class="extra content">
  248. <i class="check icon"></i>
  249. 121 Votes
  250. </div>
  251. </div>
  252. </div>
  253. <h2 class="ui dividing header">Variations</h2>
  254. <div class="example">
  255. <h4 class="ui header">Link Card</h4>
  256. <p>A card can be formatted so that the entire contents link to another page</p>
  257. <a class="ui card" href="http://www.dog.com">
  258. <div class="content">
  259. <div class="header">Cute Dog</div>
  260. <div class="meta">
  261. <span class="category">Animals</span>
  262. </div>
  263. <div class="description">
  264. Click to view more information about this dog at dog.com
  265. </div>
  266. </div>
  267. <div class="extra content">
  268. <div class="right floated author">
  269. <img class="ui avatar image" src="/images/demo/photo2.jpg"> Dog Doggington
  270. </div>
  271. </div>
  272. </a>
  273. </div>
  274. <div class="another example">
  275. <div class="ui link card">
  276. <div class="content">
  277. <div class="header">Cute Dog</div>
  278. <div class="meta">
  279. <span class="category">Animals</span>
  280. </div>
  281. <div class="description">
  282. This card simulates a link without using the A tag for use with javascript links.
  283. </div>
  284. </div>
  285. <div class="extra content">
  286. <div class="right floated author">
  287. <img class="ui avatar image" src="/images/demo/photo2.jpg"> Dog Doggington
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. <div class="example">
  293. <h4 class="ui header">Floated Content</h4>
  294. <p>Any content element can be floated left or right</p>
  295. <div class="ui info message">
  296. <i class="info icon"></i>
  297. You can include an arbitrary amount of metadata using your own class conventions, all child elements will automatically be spaced
  298. </div>
  299. <div class="ui card">
  300. <div class="content">
  301. <div class="header">Cute Dog</div>
  302. <div class="meta">
  303. <span class="right floated time">2 days ago</span>
  304. <span class="category">Animals</span>
  305. </div>
  306. <div class="description">
  307. Here's a description of a cute dog.
  308. </div>
  309. </div>
  310. <div class="extra content">
  311. <div class="right floated author">
  312. <img class="ui avatar image" src="/images/demo/photo2.jpg"> Dog Doggington
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. <div class="even example">
  318. <h4 class="ui header">Column count</h4>
  319. <p>A group of cards can set how many cards should exist in a row</p>
  320. <div class="ui four cards">
  321. <div class="card">
  322. <div class="image">
  323. <img src="/images/demo/highres4.jpg">
  324. </div>
  325. <div class="content">
  326. <div class="header">Cute Dog</div>
  327. <div class="description">This dog has some things going for it. Its pretty cute and looks like it'd be fun to cuddle up with.</div>
  328. </div>
  329. </div>
  330. <div class="card">
  331. <div class="image">
  332. <img src="/images/demo/highres5.jpg">
  333. </div>
  334. <div class="content">
  335. <div class="header">Faithful Dog</div>
  336. <div 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.</div>
  337. </div>
  338. </div>
  339. <div class="card">
  340. <div class="image">
  341. <img src="/images/demo/highres3.jpg">
  342. </div>
  343. <div class="content">
  344. <div class="header">Silly Dog</div>
  345. <div class="description">Silly dogs can be quite fun to have as companions. You never know what kind of ridiculous thing they will do.</div>
  346. </div>
  347. </div>
  348. <div class="card">
  349. <div class="image">
  350. <img src="/images/demo/highres2.jpg">
  351. </div>
  352. <div class="content">
  353. <div class="header">Happy Dog</div>
  354. <div class="description">Happy dogs are pretty interesting if you are an unhappy person.</div>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. <div class="even example">
  360. <h4 class="ui header">Doubling</h4>
  361. <p>A group of cards can double its column width for mobile</p>
  362. <div class="ui ignored warning message">Resize your browser to a smaller size to see the cards stack after reaching mobile breakpoints</div>
  363. <div class="ui six doubling cards">
  364. <div class="card">
  365. <div class="image">
  366. <img src="/images/demo/highres4.jpg">
  367. </div>
  368. <div class="content">
  369. <div class="header">Cute Dog</div>
  370. <div class="description">This dog has some things going for it. Its pretty cute and looks like it'd be fun to cuddle up with.</div>
  371. </div>
  372. </div>
  373. <div class="card">
  374. <div class="image">
  375. <img src="/images/demo/highres5.jpg">
  376. </div>
  377. <div class="content">
  378. <div class="header">Faithful Dog</div>
  379. <div 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.</div>
  380. </div>
  381. </div>
  382. <div class="card">
  383. <div class="image">
  384. <img src="/images/demo/highres3.jpg">
  385. </div>
  386. <div class="content">
  387. <div class="header">Silly Dog</div>
  388. <div class="description">Silly dogs can be quite fun to have as companions. You never know what kind of ridiculous thing they will do.</div>
  389. </div>
  390. </div>
  391. <div class="card">
  392. <div class="image">
  393. <img src="/images/demo/highres2.jpg">
  394. </div>
  395. <div class="content">
  396. <div class="header">Happy Dog</div>
  397. <div class="description">Happy dogs are pretty interesting if you are an unhappy person.</div>
  398. </div>
  399. </div>
  400. <div class="card">
  401. <div class="image">
  402. <img src="/images/demo/highres5.jpg">
  403. </div>
  404. <div class="content">
  405. <div class="header">Faithful Dog</div>
  406. <div 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.</div>
  407. </div>
  408. </div>
  409. <div class="card">
  410. <div class="image">
  411. <img src="/images/demo/highres5.jpg">
  412. </div>
  413. <div class="content">
  414. <div class="header">Faithful Dog</div>
  415. <div 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.</div>
  416. </div>
  417. </div>
  418. </div>
  419. </div>
  420. </div>