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.

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