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.

572 lines
18 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. ---
  2. layout : 'default'
  3. css : 'card'
  4. element : 'card'
  5. elementType : 'view'
  6. title : 'Card'
  7. description : 'A card view lists site content as a playing card'
  8. type : 'UI 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/avatar/large/stevie.jpg">
  29. </div>
  30. <div class="content">
  31. <a class="header">Stevie Feliciano</a>
  32. <div class="meta">
  33. <span class="date">Joined in 2014</span>
  34. </div>
  35. <div class="description">
  36. Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
  37. </div>
  38. </div>
  39. <div class="extra content">
  40. <a>
  41. <i class="user icon"></i>
  42. 22 Friends
  43. </a>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="even example">
  48. <h4 class="ui header">Cards</h4>
  49. <p>A group of cards. </p>
  50. <div class="ui info message">
  51. <h3 class="header">Customizing your views</h3>
  52. <p>Cards are designed to be flexible to your content. Meta content can include custom elements related to your content. Each child element inside the <code>extra content</code> or <code>meta</code> group will be automatically formatted to be spaced appropriately.</p>
  53. <p>This example includes a category group, a sign-up date, and a friend count which are arbitrary class names used to format users as cards.</p>
  54. </div>
  55. <div class="ui cards">
  56. <div class="card">
  57. <div class="image">
  58. <img src="/images/avatar/large/elliot.jpg">
  59. </div>
  60. <div class="content">
  61. <div class="header">Elliot Fu</div>
  62. <div class="meta">
  63. <a class="group">Friends</a>
  64. </div>
  65. <div class="description">
  66. Elliot Fu is a film-maker from New York.
  67. </div>
  68. </div>
  69. <div class="extra content">
  70. <a class="right floated created">
  71. Joined in 2011
  72. </a>
  73. <a class="friends">
  74. <i class="user icon"></i>
  75. 22 Friends
  76. </a>
  77. </div>
  78. </div>
  79. <div class="card">
  80. <div class="image">
  81. <img src="/images/avatar/large/helen.jpg">
  82. </div>
  83. <div class="content">
  84. <div class="header">Helen Troy</div>
  85. <div class="meta">
  86. <a class="group">Friends</a>
  87. </div>
  88. <div class="description">
  89. Helen Troy is an archivist living in New York, who enjoys cooking, fine art, and gardening.
  90. </div>
  91. </div>
  92. <div class="extra content">
  93. <a class="right floated created">
  94. Joined in 2013
  95. </a>
  96. <a class="friends">
  97. <i class="user icon"></i>
  98. 22 Friends
  99. </a>
  100. </div>
  101. </div>
  102. <div class="card">
  103. <div class="image">
  104. <img src="/images/avatar/large/jenny.jpg">
  105. </div>
  106. <div class="content">
  107. <div class="header">Jenny Hess</div>
  108. <div class="meta">
  109. <a class="group">Friends</a>
  110. </div>
  111. <div class="description">
  112. Jenny is a student studying Media Management at the New School.
  113. </div>
  114. </div>
  115. <div class="extra content">
  116. <a class="right floated created">
  117. Joined in 2012
  118. </a>
  119. <a class="friends">
  120. <i class="user icon"></i>
  121. 22 Friends
  122. </a>
  123. </div>
  124. </div>
  125. <div class="card">
  126. <div class="image">
  127. <img src="/images/avatar/large/veronika.jpg">
  128. </div>
  129. <div class="content">
  130. <div class="header">Veronika Ossi</div>
  131. <div class="meta">
  132. <a class="group">Friends</a>
  133. </div>
  134. <div class="description">
  135. Veronika Ossi is a set designer living in New York who enjoys kittens, music, and partying.
  136. </div>
  137. </div>
  138. <div class="extra content">
  139. <a class="right floated created">
  140. Joined in 2013
  141. </a>
  142. <a class="friends">
  143. <i class="user icon"></i>
  144. 22 Friends
  145. </a>
  146. </div>
  147. </div>
  148. <div class="card">
  149. <div class="image">
  150. <img src="/images/avatar/large/stevie.jpg">
  151. </div>
  152. <div class="content">
  153. <a class="header">Stevie Feliciano</a>
  154. <div class="meta">
  155. <span class="date">Joined in 2014</span>
  156. </div>
  157. <div class="description">
  158. Stevie Feliciano is a library scientist living in New York City.
  159. </div>
  160. </div>
  161. <div class="extra content">
  162. <a>
  163. <i class="user icon"></i>
  164. 22 Friends
  165. </a>
  166. </div>
  167. </div>
  168. <div class="card">
  169. <div class="image">
  170. <img src="/images/avatar/large/steve.jpg">
  171. </div>
  172. <div class="content">
  173. <div class="header">Steve Jobes</div>
  174. <div class="meta">
  175. <a class="group">Acquaintances</a>
  176. </div>
  177. <div class="description">
  178. Stevie Jobes is a fictional character designed to resemble someone familiar to readers.
  179. </div>
  180. </div>
  181. <div class="extra content">
  182. <a class="right floated created">
  183. Joined in 2014
  184. </a>
  185. <a class="friends">
  186. <i class="user icon"></i>
  187. 22 Friends
  188. </a>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <h2 class="ui dividing header">Content</h2>
  194. <div class="even example">
  195. <h4 class="ui header">Header</h4>
  196. <p>A card can contain a header</p>
  197. <div class="ignored yellow ui message">
  198. <div class="header">
  199. <i class="info icon"></i>
  200. Equal Size Cards
  201. </div>
  202. <p>If your cards have content that vary in length you must set a <code>min-height</code> for that content area, or the whole card.</p>
  203. <p>For example:</p>
  204. <div class="code" data-type="css">
  205. /* Sets card height to about two lines of description */
  206. #my-container .card .description {
  207. min-height: 35px;
  208. }
  209. </div>
  210. </div>
  211. <div class="ui cards">
  212. <div class="card">
  213. <div class="content">
  214. <div class="header">Elliot Fu</div>
  215. <div class="meta">Friend</div>
  216. <div class="description">
  217. Elliot Fu is a film-maker from New York.
  218. </div>
  219. </div>
  220. </div>
  221. <div class="card">
  222. <div class="content">
  223. <div class="header">Veronika Ossi</div>
  224. <div class="meta">Friend</div>
  225. <div class="description">
  226. Veronika Ossi is a set designer living in New York who enjoys kittens, music, and partying.
  227. </div>
  228. </div>
  229. </div>
  230. <div class="card">
  231. <div class="content">
  232. <div class="header">Jenny Hess</div>
  233. <div class="meta">Friend</div>
  234. <div class="description">
  235. Jenny is a student studying Media Management at the New School
  236. </div>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. <div class="example">
  242. <h4 class="ui header">Metadata</h4>
  243. <p>A card can contain content metadata</p>
  244. <div class="ui info message">
  245. <i class="info icon"></i>
  246. You can include an arbitrary amount of metadata using your own class conventions, all child elements will automatically be spaced
  247. </div>
  248. <div class="ui card">
  249. <div class="content">
  250. <div class="header">Cute Dog</div>
  251. <div class="meta">
  252. <span class="time">2 days ago</span>
  253. <span class="category">Animals</span>
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. <div class="example">
  259. <h4 class="ui header">Link</h4>
  260. <p>A card can contain contain links as images, headers, or inside content</p>
  261. <div class="ui yellow message">
  262. <i class="star icon"></i>
  263. To make the entire content of a card link, check out the link variation below
  264. </div>
  265. <div class="ui card">
  266. <a class="image" href="#">
  267. <img src="/images/demo/highres.jpg">
  268. </a>
  269. <div class="content">
  270. <a class="header" href="#">Cute Dog</a>
  271. <div class="meta">
  272. <a class="time">2 days ago</a>
  273. </div>
  274. <div class="description">
  275. Check our this <a href="http://www.dogs.com"> excellent resource</a> on dogs.
  276. </div>
  277. </div>
  278. </div>
  279. </div>
  280. <div class="example">
  281. <h4 class="ui header">Actions</h4>
  282. <p>A card can contain common actions</p>
  283. <div class="ui info message">
  284. 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>.
  285. </div>
  286. <div class="ui card">
  287. <div class="content">
  288. <i class="right floated like icon"></i>
  289. <i class="right floated star icon"></i>
  290. <div class="header">Cute Dog</div>
  291. <div class="extra content">
  292. <span class="like">
  293. <i class="like icon"></i>
  294. Like
  295. </span>
  296. <span class="star">
  297. <i class="star icon"></i>
  298. Favorite
  299. </span>
  300. </div>
  301. </div>
  302. </div>
  303. </div>
  304. <div class="example">
  305. <h4 class="ui header">Description</h4>
  306. <p>A card can contain a description with a single or multiple paragraphs</p>
  307. <div class="ui card">
  308. <div class="content">
  309. <div class="header">Cute Dog</div>
  310. <div class="meta">2 days ago</div>
  311. <div class="description">
  312. <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>
  313. <p>Many people also have their own barometers for what makes a cute dog.</p>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. <div class="example">
  319. <h4 class="ui header">Extra Content</h4>
  320. <p>A card can contain extra content meant to be formatted separately from the main content</p>
  321. <div class="ui card">
  322. <div class="content">
  323. <div class="header">Cute Dog</div>
  324. <div class="meta">2 days ago</div>
  325. <div class="description">
  326. <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>
  327. <p>Many people also have their own barometers for what makes a cute dog.</p>
  328. </div>
  329. </div>
  330. <div class="extra content">
  331. <i class="check icon"></i>
  332. 121 Votes
  333. </div>
  334. </div>
  335. </div>
  336. <div class="example">
  337. <h4 class="ui header">Image</h4>
  338. <p>A card can contain an image</p>
  339. <div class="ui card">
  340. <div class="image">
  341. <img src="/images/demo/highres.jpg">
  342. </div>
  343. <div class="content">
  344. <div class="header">Cute Dog</div>
  345. <div class="meta">2 days ago</div>
  346. <div class="description">
  347. <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>
  348. <p>Many people also have their own barometers for what makes a cute dog.</p>
  349. </div>
  350. </div>
  351. <div class="extra content">
  352. <i class="check icon"></i>
  353. 121 Votes
  354. </div>
  355. </div>
  356. </div>
  357. <h2 class="ui dividing header">Variations</h2>
  358. <div class="example">
  359. <h4 class="ui header">Link Card</h4>
  360. <p>A card can be formatted so that the entire contents link to another page</p>
  361. <a class="ui card" href="http://www.dog.com">
  362. <div class="content">
  363. <div class="header">Cute Dog</div>
  364. <div class="meta">
  365. <span class="category">Animals</span>
  366. </div>
  367. <div class="description">
  368. Click to view more information about this dog at dog.com
  369. </div>
  370. </div>
  371. <div class="extra content">
  372. <div class="right floated author">
  373. <img class="ui avatar image" src="/images/avatar/small/matt.jpg"> Matt
  374. </div>
  375. </div>
  376. </a>
  377. </div>
  378. <div class="another example">
  379. <div class="ui link card">
  380. <div class="content">
  381. <div class="header">Cute Dog</div>
  382. <div class="meta">
  383. <span class="category">Animals</span>
  384. </div>
  385. <div class="description">
  386. This card simulates a link without using the A tag for use with javascript links.
  387. </div>
  388. </div>
  389. <div class="extra content">
  390. <div class="right floated author">
  391. <img class="ui avatar image" src="/images/avatar/small/matt.jpg"> Matt
  392. </div>
  393. </div>
  394. </div>
  395. </div>
  396. <div class="example">
  397. <h4 class="ui header">Floated Content</h4>
  398. <p>Any content element can be floated left or right</p>
  399. <div class="ui info message">
  400. <i class="info icon"></i>
  401. You can include an arbitrary amount of metadata using your own class conventions, all child elements will automatically be spaced
  402. </div>
  403. <div class="ui card">
  404. <div class="content">
  405. <div class="header">Cute Dog</div>
  406. <div class="meta">
  407. <span class="right floated time">2 days ago</span>
  408. <span class="category">Animals</span>
  409. </div>
  410. <div class="description">
  411. Here's a description of a cute dog.
  412. </div>
  413. </div>
  414. <div class="extra content">
  415. <div class="right floated author">
  416. <img class="ui avatar image" src="/images/avatar/small/matt.jpg"> Matt
  417. </div>
  418. </div>
  419. </div>
  420. </div>
  421. <div class="even example">
  422. <h4 class="ui header">Column count</h4>
  423. <p>A group of cards can set how many cards should exist in a row</p>
  424. <div class="ui four cards">
  425. <div class="card">
  426. <div class="image">
  427. <img src="/images/avatar/large/elliot.jpg">
  428. </div>
  429. <div class="content">
  430. <a class="header">Elliot Fu</a>
  431. </div>
  432. </div>
  433. <div class="card">
  434. <div class="image">
  435. <img src="/images/avatar/large/helen.jpg">
  436. </div>
  437. <div class="content">
  438. <a class="header">Helen Troy</a>
  439. </div>
  440. </div>
  441. <div class="card">
  442. <div class="image">
  443. <img src="/images/avatar/large/jenny.jpg">
  444. </div>
  445. <div class="content">
  446. <a class="header">Jenny Hess</a>
  447. </div>
  448. </div>
  449. <div class="card">
  450. <div class="image">
  451. <img src="/images/avatar/large/veronika.jpg">
  452. </div>
  453. <div class="content">
  454. <a class="header">Veronika Ossi</a>
  455. </div>
  456. </div>
  457. <div class="card">
  458. <div class="image">
  459. <img src="/images/avatar/large/stevie.jpg">
  460. </div>
  461. <div class="content">
  462. <a class="header">Stevie Feliciano</a>
  463. </div>
  464. </div>
  465. <div class="card">
  466. <div class="image">
  467. <img src="/images/avatar/large/steve.jpg">
  468. </div>
  469. <div class="content">
  470. <a class="header">Steve Jobes</a>
  471. </div>
  472. </div>
  473. <div class="card">
  474. <div class="image">
  475. <img src="/images/avatar/large/justen.jpg">
  476. </div>
  477. <div class="content">
  478. <a class="header">Justen Kitsune</a>
  479. </div>
  480. </div>
  481. <div class="card">
  482. <div class="image">
  483. <img src="/images/avatar/large/daniel.jpg">
  484. </div>
  485. <div class="content">
  486. <a class="header">Daniel Louise</a>
  487. </div>
  488. </div>
  489. </div>
  490. </div>
  491. <div class="even example">
  492. <h4 class="ui header">Doubling</h4>
  493. <p>A group of cards can double its column width for mobile</p>
  494. <div class="ui ignored warning message">Resize your browser to a smaller size to see the cards stack after reaching mobile breakpoints</div>
  495. <div class="ui six doubling cards">
  496. <div class="card">
  497. <div class="image">
  498. <img src="/images/avatar/large/elliot.jpg">
  499. </div>
  500. <div class="content">
  501. <a class="header">Elliot Fu</a>
  502. </div>
  503. </div>
  504. <div class="card">
  505. <div class="image">
  506. <img src="/images/avatar/large/helen.jpg">
  507. </div>
  508. <div class="content">
  509. <a class="header">Helen Troy</a>
  510. </div>
  511. </div>
  512. <div class="card">
  513. <div class="image">
  514. <img src="/images/avatar/large/jenny.jpg">
  515. </div>
  516. <div class="content">
  517. <a class="header">Jenny Hess</a>
  518. </div>
  519. </div>
  520. <div class="card">
  521. <div class="image">
  522. <img src="/images/avatar/large/veronika.jpg">
  523. </div>
  524. <div class="content">
  525. <a class="header">Veronika Ossi</a>
  526. </div>
  527. </div>
  528. <div class="card">
  529. <div class="image">
  530. <img src="/images/avatar/large/stevie.jpg">
  531. </div>
  532. <div class="content">
  533. <a class="header">Stevie Feliciano</a>
  534. </div>
  535. </div>
  536. <div class="card">
  537. <div class="image">
  538. <img src="/images/avatar/large/steve.jpg">
  539. </div>
  540. <div class="content">
  541. <a class="header">Steve Jobes</a>
  542. </div>
  543. </div>
  544. </div>
  545. </div>
  546. </div>