Browse Source

Migrates item view to card view, in preperation for a more generic card view, extends docs on cards

pull/993/head
jlukic 10 years ago
parent
commit
989528af91
17 changed files with 1023 additions and 171 deletions
  1. 2
      RELEASE NOTES.md
  2. 263
      server/documents/views/card.html.eco
  3. 166
      server/documents/views/item.html.eco
  4. 1
      server/layouts/default.html.eco
  5. 1
      src/definitions/collections/message.less
  6. 521
      src/definitions/views/card.less
  7. 5
      src/definitions/views/item.less
  8. 1
      src/semantic.config.example
  9. 3
      src/themes/_site/views/card.overrides
  10. 3
      src/themes/_site/views/card.variables
  11. 3
      src/themes/packages/basic/elements/button.variables
  12. 4
      src/themes/packages/default/collections/message.variables
  13. 6
      src/themes/packages/default/elements/label.variables
  14. 2
      src/themes/packages/default/globals/site.variables
  15. 98
      src/themes/packages/default/views/card.overrides
  16. 111
      src/themes/packages/default/views/card.variables
  17. 4
      src/themes/packages/default/views/item.variables

2
RELEASE NOTES.md

@ -7,7 +7,7 @@
- **Checkbox** - Checkbox "enable" and "disable" have been replaced with "check" and "uncheck" - **Checkbox** - Checkbox "enable" and "disable" have been replaced with "check" and "uncheck"
- **Modal** - Modal ``left`` and ``right`` sections are now replaced with ``image`` and ``description`` - **Modal** - Modal ``left`` and ``right`` sections are now replaced with ``image`` and ``description``
- **Accordion** - Accordions are not unstyled by default allowing for more compatability with other modules without having to override styles. Styled accordions are now included as a variation ``ui styled accordion`` - **Accordion** - Accordions are not unstyled by default allowing for more compatability with other modules without having to override styles. Styled accordions are now included as a variation ``ui styled accordion``
- **Item** - "Name" has been renamed "Header" to be consistent with other modules. Additional content is no longer nested inside item content, but as an optional variation of content that is formatted to be less pronounced
- **Item** - Items have now been renamed "card" to allow for a more generic item list that does not use a "card" style. Some 'card' view content has been slightly adjusted. Please refer to documentation
**Enhancements** **Enhancements**
- **Accordion** - Accordion now includes all icons in an embedded font instead of requiring icons - **Accordion** - Accordion now includes all icons in an embedded font instead of requiring icons

263
server/documents/views/card.html.eco

@ -0,0 +1,263 @@
---
layout : 'default'
css : 'card'
title : 'Card'
description : 'A card view can be used to list site content as a playing card'
type : 'UI View'
---
<%- @partial('header') %>
<div class="main container">
<div class="peek">
<div class="ui vertical pointing secondary menu">
<a class="active item">Types</a>
<a class="item">Content</a>
<a class="card">Variations</a>
</div>
</div>
<h2 class="ui dividing header">Types</h2>
<div class="example">
<h4 class="ui header">Card</h4>
<p>A single card.</p>
<div class="ui card">
<div class="image">
<img src="/images/demo/highres.jpg">
</div>
<div class="content">
<div class="header">Cute Dog</div>
<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>
</div>
<div class="extra content">
<img class="ui avatar image" src="/images/demo/photo2.jpg"> Dog Doggington
</div>
</div>
</div>
<div class="clearing example">
<h4 class="ui header">Cards</h4>
<p>A group of cards. </p>
<div class="ignored yellow ui message">
<i class="info icon"></i>
Cards must manually be given a width and height that match up to the content that it displays. Content must also be truncated so that each item will not exceed the maximum height.
</div>
<div class="ui cards">
<div class="card">
<div class="image">
<img src="/images/demo/highres.jpg">
</div>
<div class="content">
<div class="header">Cute Dog</div>
<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>
</div>
<div class="extra content">
199 Votes
</div>
</div>
<div class="card">
<div class="image">
<img src="/images/demo/highres2.jpg">
</div>
<div class="content">
<div class="header">Faithful Dog</div>
<div class="meta">5 days ago</div>
<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>
</div>
<div class="extra content">
199 Votes
</div>
</div>
<div class="card">
<div class="image">
<img src="/images/demo/highres3.jpg">
</div>
<div class="content">
<div class="header">Silly Dog</div>
<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>
</div>
<div class="extra content">
199 Votes
</div>
</div>
</div>
</div>
<h2 class="ui dividing header">Content</h2>
<div class="example">
<h4 class="ui header">Title</h4>
<p>A card can contain content a title</p>
<div class="ui card">
<div class="content">
<div class="header">Cute Dog</div>
<div class="meta">2 days ago</div>
<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>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Metadata</h4>
<p>A card can contain content metadata</p>
<div class="ui info message">
<i class="info icon"></i>
You can include an arbitrary amount of metadata using your own class conventions, all child elements will automatically be spaced
</div>
<div class="ui card">
<div class="content">
<div class="header">Cute Dog</div>
<div class="meta">
<span class="time">2 days ago</span>
<span class="category">Animals</span>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Description</h4>
<p>A card can contain a description with a single or multiple paragraphs</p>
<div class="ui card">
<div class="content">
<div class="header">Cute Dog</div>
<div class="meta">2 days ago</div>
<div class="description">
<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>
<p>Many people also have their own barometers for what makes a cute dog.</p>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Image</h4>
<p>A card can contain an image</p>
<div class="ui card">
<div class="image">
<img src="/images/demo/highres.jpg">
</div>
</div>
</div>
<h2 class="ui dividing header">Variations</h2>
<div class="example">
<h4 class="ui header">Floated Content</h4>
<p>Any content element can be floated left or right</p>
<div class="ui info message">
<i class="info icon"></i>
You can include an arbitrary amount of metadata using your own class conventions, all child elements will automatically be spaced
</div>
<div class="ui card">
<div class="content">
<div class="header">Cute Dog</div>
<div class="meta">
<span class="right floated time">2 days ago</span>
<span class="category">Animals</span>
</div>
<div class="description">
We are one too!
</div>
</div>
<div class="extra content">
<div class="right floated author">
<img class="ui avatar image" src="/images/demo/photo2.jpg"> Dog Doggington
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Column count</h4>
<p>An item list can list how many columns should exist in a row</p>
<div class="ui four cards">
<div class="card">
<div class="image">
<img src="/images/demo/highres4.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Cute Dog</div>
<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>
</div>
</div>
<div class="card">
<div class="image">
<img src="/images/demo/highres5.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Faithful Dog</div>
<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>
</div>
</div>
<div class="card">
<div class="image">
<img src="/images/demo/highres3.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Silly Dog</div>
<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>
</div>
</div>
<div class="card">
<div class="image">
<img src="/images/demo/highres2.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Happy Dog</div>
<div class="description">Happy dogs are pretty interesting if you are an unhappy person.</div>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Stackable</h4>
<div class="ui ignored info message">Resize your browser to a smaller size to see the cards stack after reaching mobile breakpoints</div>
<p>An item view can have its cards take the full width when below a browser resolution threshold to allow for content to display properly at small sizes</p>
<div class="ui stackable cards">
<div class="card">
<div class="image">
<img src="/images/demo/highres5.jpg">
<a class="like ui corner label">
<i class="like icon"></i>
</a>
</div>
<div class="content">
<div class="header">Cute Dog</div>
<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>
<div class="extra content">
11 Votes
</div>
</div>
</div>
<div class="card">
<div class="image">
<img src="/images/demo/highres6.jpg">
</div>
<div class="content">
<div class="header">Faithful Dog</div>
<div class="meta">5 days ago</div>
<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>
<div class="extra content">
11 Votes
</div>
</div>
</div>
</div>
</div>
</div>

166
server/documents/views/item.html.eco

@ -1,10 +1,9 @@
--- ---
layout : 'default' layout : 'default'
standalone : true
css : 'item' css : 'item'
title : 'Item' title : 'Item'
description : 'An item view presents related site content'
description : 'An item view can be used to list site content'
type : 'UI View' type : 'UI View'
--- ---
@ -45,8 +44,8 @@ type : 'UI View'
<img src="/images/demo/highres2.jpg"> <img src="/images/demo/highres2.jpg">
</div> </div>
<div class="content"> <div class="content">
<div class="meta">5 days ago</div>
<div class="header">Faithful Dog</div> <div class="header">Faithful Dog</div>
<div class="meta">5 days ago</div>
<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> <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>
</div> </div>
<div class="extra content"> <div class="extra content">
@ -72,8 +71,8 @@ type : 'UI View'
<div class="ui items"> <div class="ui items">
<div class="item"> <div class="item">
<div class="content"> <div class="content">
<div class="meta">2 days ago</div>
<div class="header">Cute Dog</div> <div class="header">Cute Dog</div>
<div class="meta">2 days ago</div>
<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> <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>
<div class="extra"> <div class="extra">
121 Votes 121 Votes
@ -82,8 +81,8 @@ type : 'UI View'
</div> </div>
<div class="item"> <div class="item">
<div class="content"> <div class="content">
<div class="meta">5 days ago</div>
<div class="header">Faithful Dog</div> <div class="header">Faithful Dog</div>
<div class="meta">5 days ago</div>
<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> <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>
<div class="extra"> <div class="extra">
121 Votes 121 Votes
@ -92,8 +91,8 @@ type : 'UI View'
</div> </div>
<div class="item"> <div class="item">
<div class="content"> <div class="content">
<div class="meta">1 week ago</div>
<div class="header">Silly Dog</div> <div class="header">Silly Dog</div>
<div class="meta">1 week ago</div>
<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> <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>
<div class="extra"> <div class="extra">
121 Votes 121 Votes
@ -128,8 +127,8 @@ type : 'UI View'
<img src="/images/demo/highres2.jpg"> <img src="/images/demo/highres2.jpg">
</div> </div>
<div class="content"> <div class="content">
<div class="meta">5 days ago</div>
<div class="header">Faithful Dog</div> <div class="header">Faithful Dog</div>
<div class="meta">5 days ago</div>
<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> <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>
</div> </div>
<div class="extra content"> <div class="extra content">
@ -179,8 +178,8 @@ type : 'UI View'
<img src="/images/demo/highres6.jpg"> <img src="/images/demo/highres6.jpg">
</div> </div>
<div class="content"> <div class="content">
<div class="meta">5 days ago</div>
<div class="header">Faithful Dog</div> <div class="header">Faithful Dog</div>
<div class="meta">5 days ago</div>
<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> <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>
<div class="extra content"> <div class="extra content">
11 Votes 11 Votes
@ -190,90 +189,6 @@ type : 'UI View'
</div> </div>
</div> </div>
<div class="example">
<h4 class="ui header">Connected</h4>
<p>An item list can be automatically sized to be even height.</p>
<div class="ignored warning ui message">
<i class="info icon"></i>
Connected item lists cannot display extra information. A connected row must also assume an arbitrary column width unless specified.
</div>
<div class="ui connected items">
<div class="row">
<div class="item">
<div class="image">
<img src="/images/demo/highres4.jpg">
</div>
<div class="content">
<div class="header">Cute Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="image">
<img src="/images/demo/highres5.jpg">
</div>
<div class="content">
<div class="header">Faithful Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="image">
<img src="/images/demo/highres3.jpg">
</div>
<div class="content">
<div class="header">Silly Dog</div>
<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>
</div>
</div>
</div>
</div>
</div>
<div class="another text example">
<div class="ui six connected items">
<div class="row">
<div class="item">
<div class="content">
<div class="header">Cute Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="content">
<div class="header">Faithful Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="content">
<div class="header">Silly Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="content">
<div class="header">Cute Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="content">
<div class="header">Faithful Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="content">
<div class="header">Silly Dog</div>
<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>
</div>
</div>
</div>
</div>
</div>
<div class="example"> <div class="example">
<h4 class="ui header">Column count</h4> <h4 class="ui header">Column count</h4>
<p>An item list can list how many columns should exist in a row</p> <p>An item list can list how many columns should exist in a row</p>
@ -323,72 +238,7 @@ type : 'UI View'
</div> </div>
<div class="content"> <div class="content">
<div class="header">Happy Dog</div> <div class="header">Happy Dog</div>
<div class="description">Happy dogs are pretty interesting if you are an unhappy person.</p>
</didiv>
</div>
</div>
</div>
<div class="another example">
<p>A connected item list with a specified column count</p>
<div class="ui five connected items">
<div class="item">
<div class="image">
<img src="/images/demo/highres4.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Cute Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="image">
<img src="/images/demo/highres5.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Faithful Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="image">
<img src="/images/demo/highres3.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Silly Dog</div>
<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>
</div>
</div>
<div class="item">
<div class="image">
<img src="/images/demo/highres2.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Happy Dog</div>
<div class="description">Happy dogs are pretty interesting if you are an unhappy person.</p>
</didiv>
</div>
<div class="item">
<div class="image">
<img src="/images/demo/highres.jpg">
<a class="star ui corner label">
<i class="star icon"></i>
</a>
</div>
<div class="content">
<div class="header">Quiet Dog</div>
<div class="description">A quiet dog is nice if you dont like a lot of upkeep for your dogs.</div>
<div class="description">Happy dogs are pretty interesting if you are an unhappy person.</div>
</div> </div>
</div> </div>
</div> </div>

1
server/layouts/default.html.eco

@ -55,6 +55,7 @@
<link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/collections/message.css"> <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/collections/message.css">
<link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/collections/table.css"> <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/collections/table.css">
<link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/views/card.css">
<link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/views/comment.css"> <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/views/comment.css">
<link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/views/list.css"> <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/views/list.css">
<link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/views/feed.css"> <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/definitions/views/feed.css">

1
src/definitions/collections/message.less

@ -18,7 +18,6 @@
@import '../../semantic.config'; @import '../../semantic.config';
/******************************* /*******************************
Message Message
*******************************/ *******************************/

521
src/definitions/views/card.less

@ -0,0 +1,521 @@
/*
* # Semantic - Item
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2014 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
/*******************************
Theme
*******************************/
@type : 'view';
@element : 'card';
@import '../../semantic.config';
/*******************************
Standard
*******************************/
/*--------------
Items
---------------*/
.ui.cards,
.ui.card {
margin: @groupMargin;
}
.ui.cards:first-child
.ui.card:first-child {
margin-top: 0em;
}
.ui.cards:last-child,
.ui.card:last-child {
margin-bottom: 0em;
}
.ui.cards > .row > .card,
.ui.cards > .card {
display: @groupDisplay;
float: @groupFloat;
}
/* Clearing */
.ui.cards:after,
.ui.card:after {
display: block;
content: ' ';
height: 0px;
clear: both;
overflow: hidden;
visibility: hidden;
}
/*--------------
Item
---------------*/
.ui.cards > .row > .card,
.ui.cards > .card,
.ui.card {
position: relative;
display: @display;
width: @width;
min-height: @minHeight;
margin: @margin;
background: @background;
padding: @padding;
border: @border;
border-radius: @borderRadius;
box-shadow: @boxShadow;
transition: @transition;
z-index: @zIndex;
}
.ui.cards a.card,
.ui.cards .card a,
.ui.card a,
a.ui.cards {
cursor: pointer;
}
/*--------------
Images
---------------*/
.ui.cards .card > .image,
.ui.card > .image {
display: block;
position: relative;
padding: @imagePadding;
background: @imageBackground;
}
.ui.cards .card > .image > img,
.ui.card > .image > img {
display: block;
width: 100%;
height: auto;
border-radius: @imageBorderRadius;
}
.ui.cards .card > .image:only-child > img,
.ui.card > .image:only-child > img {
border-radius: @borderRadius;
}
/*--------------
Floated
---------------*/
.ui.cards .card .left.floated,
.ui.card .left.floated {
float: left;
}
.ui.cards .card .right.floated,
.ui.card .right.floated {
float: right;
}
/*--------------
Content
---------------*/
.ui.cards .card > .content,
.ui.card > .content {
background: @contentBackground;
margin: @contentMargin;
padding: @contentPadding;
box-shadow: @contentBoxShadow;
font-size: @contentFontSize;
border: @contentBorder;
border-radius: @contentBorderRadius;
}
.ui.cards .card > .content:after,
.ui.card > .content:after {
display: block;
content: ' ';
height: 0px;
clear: both;
overflow: hidden;
visibility: hidden;
}
.ui.cards .card > .content > .header,
.ui.card > .content > .header {
display: block;
margin: @titleMargin;
font-family: @titleFont;
font-weight: @titleFontWeight;
font-size: @titleFontSize;
color: @titleColor;
}
.ui.cards .card > .content > .meta + .description,
.ui.cards .card > .content > .header + .description,
.ui.card > .content > .meta + .description,
.ui.card > .content > .header + .description {
margin-top: @descriptionDistance;
}
/*--------------
Image
---------------*/
.ui.cards .card .content img,
.ui.card .content img {
display: inline-block;
vertical-align: @contentImageVerticalAlign;
width: @contentImageWidth;
}
.ui.cards .card img.avatar,
.ui.cards .card .avatar img,
.ui.card img.avatar,
.ui.card .avatar img {
width: @avatarSize;
height: @avatarSize;
border-radius: @avatarBorderRadius;
}
/*--------------
Description
---------------*/
.ui.cards .card > .content > .description,
.ui.card > .content > .description {
clear: both;
color: @descriptionColor;
}
/*--------------
Paragraph
---------------*/
.ui.cards .card > .content p,
.ui.card > .content p {
margin: 0em 0em @paragraphDistance;
}
.ui.cards .card > .content p:last-child,
.ui.card > .content p:last-child {
margin-bottom: 0em;
}
/*--------------
Meta
---------------*/
.ui.cards .card .meta,
.ui.card .meta {
color: @metaColor;
}
.ui.cards .card .meta *,
.ui.card .meta * {
margin-right: @metaSpacing;
}
.ui.cards .card .meta :last-child,
.ui.card .meta :last-child {
margin-right: 0em;
}
/*--------------
Labels
---------------*/
/*-----Star----- */
/* hover */
.ui.cards .card .star.label:hover::after,
.ui.card .star.label:hover::after {
border-right-color: #F6EFC3;
}
.ui.cards .card .star.label:hover::after,
.ui.card .star.label:hover::after {
border-top-color: #F6EFC3;
}
.ui.cards .card .star.label:hover .icon,
.ui.card .star.label:hover .icon {
color: #AC9400
}
/* active */
.ui.cards .card .star.label.active::after,
.ui.card .star.label.active::after {
border-right-color: #F6EFC3;
}
.ui.cards .card .star.label.active::after,
.ui.card .star.label.active::after {
border-top-color: #F6EFC3;
}
.ui.cards .card .star.label.active .icon,
.ui.card .star.label.active .icon {
color: #AC9400
}
/*-----Like----- */
/* hover */
.ui.cards .card .like.label:hover::after,
.ui.card .like.label:hover::after {
border-right-color: #F5E1E2;
}
.ui.cards .card .like.label.active::after,
.ui.card .like.label.active::after {
border-top-color: #F5E1E2;
}
.ui.cards .card .like.label:hover .icon,
.ui.card .like.label:hover .icon {
color: #EF404A
}
/* active */
.ui.cards .card .like.label.active::after,
.ui.card .like.label.active::after {
border-right-color: #F5E1E2;
}
.ui.cards .card .like.label.active::after,
.ui.card .like.label.active::after {
border-top-color: #F5E1E2;
}
.ui.cards .card .like.label.active .icon,
.ui.card .like.label.active .icon {
color: #EF404A
}
/*--------------
Extra Content
---------------*/
.ui.cards .card .extra,
.ui.card .extra {
position: @extraDisplay;
width: @extraWidth;
padding: @extraPadding;
top: @extraTop;
left: @extraLeft;
color: @extraColor;
transition: @extraTransition;
border-top: @extraDivider;
}
/*******************************
States
*******************************/
.ui.cards .card:hover,
.ui.card:hover {
cursor: @hoverCursor;
z-index: @hoverZIndex;
border: @hoverBorder;
box-shadow: @hoverBoxShadow;
}
/*******************************
Variations
*******************************/
/*-------------------
Responsive
--------------------*/
@media only screen and (max-width : 768px) {
.ui.stackable.cards {
display: block !important;
}
.ui.stackable.cards > .card,
.ui.stackable.cards > .row > .card {
display: block !important;
height: auto !important;
width: auto !important;
padding: 0% !important;
}
}
/*--------------
Item Count
---------------*/
.ui.one.cards {
margin-left: -2%;
margin-right: -2%;
}
.ui.one.cards > .card {
width: 100%;
margin-left: 2%;
margin-right: 2%;
}
.ui.two.cards {
margin-left: -1%;
margin-right: -1%;
}
.ui.two.cards > .card {
width: 48%;
margin-left: 1%;
margin-right: 1%;
}
.ui.two.cards > .card:nth-child(2n+1) {
clear: left;
}
.ui.three.cards {
margin-left: -1%;
margin-right: -1%;
}
.ui.three.cards > .card {
width: 31.333%;
margin-left: 1%;
margin-right: 1%;
}
.ui.three.cards > .card:nth-child(3n+1) {
clear: left;
}
.ui.four.cards {
margin-left: -0.5%;
margin-right: -0.5%;
}
.ui.four.cards > .card {
width: 24%;
margin-left: 0.5%;
margin-right: 0.5%;
}
.ui.four.cards > .card:nth-child(4n+1) {
clear: left;
}
.ui.five.cards {
margin-left: -0.5%;
margin-right: -0.5%;
}
.ui.five.cards > .card {
width: 19%;
margin-left: 0.5%;
margin-right: 0.5%;
}
.ui.five.cards > .card:nth-child(5n+1) {
clear: left;
}
.ui.six.cards {
margin-left: -0.5%;
margin-right: -0.5%;
}
.ui.six.cards > .card {
width: 15.66%;
margin-left: 0.5%;
margin-right: 0.5%;
}
.ui.six.cards > .card:nth-child(6n+1) {
clear: left;
}
.ui.seven.cards {
margin-left: -0.5%;
margin-right: -0.5%;
}
.ui.seven.cards > .card {
width: 13.28%;
margin-left: 0.5%;
margin-right: 0.5%;
font-size: 11px;
}
.ui.seven.cards > .card:nth-child(7n+1) {
clear: left;
}
.ui.eight.cards {
margin-left: -0.25%;
margin-right: -0.25%;
}
.ui.eight.cards > .card {
width: 12.0%;
margin-left: 0.25%;
margin-right: 0.25%;
font-size: 11px;
}
.ui.eight.cards > .card:nth-child(8n+1) {
clear: left;
}
.ui.nine.cards {
margin-left: -0.25%;
margin-right: -0.25%;
}
.ui.nine.cards > .card {
width: 10.61%;
margin-left: 0.25%;
margin-right: 0.25%;
font-size: 10px;
}
.ui.nine.cards > .card:nth-child(9n+1) {
clear: left;
}
.ui.ten.cards {
margin-left: -0.2%;
margin-right: -0.2%;
}
.ui.ten.cards > .card {
width: 9.6%;
margin-left: 0.2%;
margin-right: 0.2%;
font-size: 10px;
}
.ui.ten.cards > .card:nth-child(10n+1) {
clear: left;
}
.ui.eleven.cards {
margin-left: -0.2%;
margin-right: -0.2%;
}
.ui.eleven.cards > .card {
width: 8.69%;
margin-left: 0.2%;
margin-right: 0.2%;
font-size: 9px;
}
.ui.eleven.cards > .card:nth-child(11n+1) {
clear: left;
}
.ui.twelve.cards {
margin-left: -0.1%;
margin-right: -0.1%;
}
.ui.twelve.cards > .card {
width: 8.1333%;
margin-left: 0.1%;
margin-right: 0.1%;
font-size: 9px;
}
.ui.twelve.cards > .card:nth-child(12n+1) {
clear: left;
}
/*--------------
Items
---------------*/
.ui.cards > .row > .card,
.ui.cards > .card {
font-size: @medium;
}

5
src/definitions/views/item.less

@ -85,12 +85,12 @@
position: relative; position: relative;
padding: @imagePadding; padding: @imagePadding;
background: @imageBackground; background: @imageBackground;
border-radius: @imageBorderRadius;
} }
.ui.items .item > .image > img { .ui.items .item > .image > img {
display: block; display: block;
width: 100%; width: 100%;
height: auto; height: auto;
border-radius: @imageBorderRadius;
} }
/*-------------- /*--------------
@ -126,6 +126,7 @@
font-size: @titleFontSize; font-size: @titleFontSize;
color: @titleColor; color: @titleColor;
} }
.ui.items .item > .content > .meta + .description,
.ui.items .item > .content > .header + .description { .ui.items .item > .content > .header + .description {
margin-top: @descriptionDistance; margin-top: @descriptionDistance;
} }
@ -165,11 +166,9 @@
---------------*/ ---------------*/
.ui.items .item .meta { .ui.items .item .meta {
float: @metaFloat;
color: @metaColor; color: @metaColor;
} }
/*-------------- /*--------------
Labels Labels
---------------*/ ---------------*/

1
src/semantic.config.example

@ -77,6 +77,7 @@
@video : 'default'; @video : 'default';
/* Views */ /* Views */
@card : 'default';
@comment : 'default'; @comment : 'default';
@feed : 'default'; @feed : 'default';
@item : 'default'; @item : 'default';

3
src/themes/_site/views/card.overrides

@ -0,0 +1,3 @@
/*******************************
User Variable Overrides
*******************************/

3
src/themes/_site/views/card.variables

@ -0,0 +1,3 @@
/*******************************
User Variable Overrides
*******************************/

3
src/themes/packages/basic/elements/button.variables

@ -31,6 +31,9 @@
@loadingBackgroundColor: #F0F0F0; @loadingBackgroundColor: #F0F0F0;
@labeledIconLeftShadow: none;
@labeledIconRightShadow: none;
@mini: 0.6rem; @mini: 0.6rem;
@tiny: 0.7rem; @tiny: 0.7rem;
@small: 0.85rem; @small: 0.85rem;

4
src/themes/packages/default/collections/message.variables

@ -25,11 +25,9 @@
; ;
/* Header */ /* Header */
@headerFontSize: 1.3em; @headerFontSize: 1.3em;
@headerFontWeight: bold; @headerFontWeight: bold;
@headerBottomMargin: 0.25em; @headerBottomMargin: 0.25em;
@headerDisplay: block; @headerDisplay: block;
@headerHorizontalDistance: 0em; @headerHorizontalDistance: 0em;
@ -60,7 +58,7 @@
/* Icon Message */ /* Icon Message */
@iconSize: 2em; @iconSize: 2em;
@iconOpacity: 0.8; @iconOpacity: 0.8;
@iconContentDistance: 1.5em;
@iconContentDistance: 1.5rem;
@iconVerticalAlign: middle; @iconVerticalAlign: middle;
/* Attached */ /* Attached */

6
src/themes/packages/default/elements/label.variables

@ -86,14 +86,14 @@
/* Corner */ /* Corner */
@cornerSizeRatio: 1.2; @cornerSizeRatio: 1.2;
@cornerTriangleSize: 3em;
@cornerTriangleSize: 2.5em;
@cornerTextWidth: 2.5em; @cornerTextWidth: 2.5em;
@cornerTextSize: 0.7em; @cornerTextSize: 0.7em;
@cornerIconSize: 0.7em; @cornerIconSize: 0.7em;
@cornerTopOffset: 0.45em;
@cornerLeftOffset: 0.75em;
@cornerTopOffset: 0.1em;
@cornerLeftOffset: 0.95em;
/* Horizontal */ /* Horizontal */
@horizontalLabelMinWidth: 3em; @horizontalLabelMinWidth: 3em;

2
src/themes/packages/default/globals/site.variables

@ -249,7 +249,9 @@
@borderColor : rgba(0, 0, 0, 0.1); @borderColor : rgba(0, 0, 0, 0.1);
@selectedBorderColor : rgba(0, 0, 0, 0.2); @selectedBorderColor : rgba(0, 0, 0, 0.2);
@solidBorderColor : #DDDDDD; @solidBorderColor : #DDDDDD;
@solidSelectedBorderColor : #B0B0B0;
@whiteBorderColor : rgba(255, 255, 255, 0.2); @whiteBorderColor : rgba(255, 255, 255, 0.2);
@selectedWhiteBorderColor : rgba(255, 255, 255, 0.8); @selectedWhiteBorderColor : rgba(255, 255, 255, 0.8);

98
src/themes/packages/default/views/card.overrides

@ -0,0 +1,98 @@
/*******************************
Item
*******************************/
/*-------------------
View
--------------------*/
/* Item */
@background: #FFFFFF;
@borderRadius: 0.325rem;
@display: block;
@float: left;
@margin: 0em @horizontalSpacing @rowSpacing;
@minHeight: 0px;
@padding: 0em;
@width: 300px;
@boxShadow:
0px 0px 0px 1px @borderColor,
0px 3px 0px 0px @borderColor
;
@border: none;
@zIndex: '';
/* Item Group */
@horizontalSpacing: 0.5em;
@rowSpacing: 2.5em;
@groupMargin: 1em -@horizontalSpacing;
/*-------------------
Content
--------------------*/
/* Image */
@imageBackground: @transparentBlack;
@imagePadding: 0em;
@imageBorderRadius: @borderRadius @borderRadius 0em 0em;
@imageBoxShadow: none;
@imageBorder: none;
/* Content */
@contentMargin: 0em;
@contentPadding: 0.75em 1em;
@contentFontSize: 1em;
@contentBorder: none;
@contentBorderRadius: 0em;
@contentBoxShadow: none;
/* Title */
@titleMargin: 0em;
@titleFont: @headerFont;
@titleFontWeight: bold;
@titleFontSize: 1.25em;
@titleColor: @darkTextColor;
/* Metadata */
@metaColor: @lightTextColor;
/* Description */
@descriptionDistance: 0.75em;
@descriptionColor: @lightTextColor;
/* Image */
@imageSpacing: 0.25em;
@contentImageWidth: 2em;
@contentImageVerticalAlign: middle;
/* Paragraph */
@paragraphDistance: 0.1em;
/* Additional Content */
@extraDisplay: absolute;
@extraTop: 100%;
@extraLeft: 0em;
@extraWidth: 100%;
@extraPadding: 0.5em 0.75em;
@extraColor: @lightTextColor;
@extraTransition: color @transitionDuration @transitionEasing;
/*-------------------
States
--------------------*/
@hoverCursor: pointer;
@hoverZIndex: 5;
@hoverBorder: none;
@hoverBoxShadow:
0px 0px 0px 1px @selectedBorderColor,
0px 3px 0px 0px @selectedBorderColor
;
/*-------------------
Variations
--------------------*/
/* Sizes */
@medium: 1em;

111
src/themes/packages/default/views/card.variables

@ -0,0 +1,111 @@
/*******************************
Item
*******************************/
/*-------------------
View
--------------------*/
/* Shadow */
@shadowDistance: 3px;
@shadowBoxShadow: 0px 3px 0px 0px @solidBorderColor;
/* Item */
@background: #FFFFFF;
@borderRadius: 0.325rem;
@display: block;
@margin: 0em @horizontalSpacing @rowSpacing;
@minHeight: 0px;
@padding: 0em;
@width: 300px;
@boxShadow:
0px 0px 0px 1px @solidBorderColor,
@shadowBoxShadow
;
@border: none;
@zIndex: '';
@transition: box-shadow @transitionDuration @transitionEasing;
/* Item Group */
@groupDisplay: block;
@groupFloat: left;
@horizontalSpacing: 0.5em;
@rowSpacing: 2.5em;
@groupMargin: 1em -@horizontalSpacing;
/*-------------------
Content
--------------------*/
/* Image */
@imageBackground: @transparentBlack;
@imagePadding: 0em;
@imageBorderRadius: @borderRadius @borderRadius 0em 0em;
@imageBoxShadow: none;
@imageBorder: none;
/* Content */
@contentBackground: none;
@contentMargin: 0em;
@contentPadding: 1em 1em;
@contentFontSize: 1em;
@contentBorder: none;
@contentBorderRadius: 0em;
@contentBoxShadow: none;
/* Title */
@titleMargin: 0em;
@titleFont: @headerFont;
@titleFontWeight: bold;
@titleFontSize: 1.25em;
@titleColor: @darkTextColor;
/* Metadata */
@metaSpacing: 0.3em;
@metaColor: @lightTextColor;
/* Description */
@descriptionDistance: 0.75em;
@descriptionColor: rgba(0, 0, 0, 0.5);
/* Content Image */
@contentImageWidth: 2em;
@contentImageVerticalAlign: middle;
/* Avatar Image */
@avatarSize: @contentImageWidth;
@avatarBorderRadius: @circularRadius;
/* Paragraph */
@paragraphDistance: 0.5em;
/* Additional Content */
@extraDivider: none;
@extraDisplay: static;
@extraTop: 0em;
@extraLeft: 0em;
@extraWidth: 100%;
@extraPadding: 0.5em 1em;
@extraColor: @lightTextColor;
@extraTransition: color @transitionDuration @transitionEasing;
/*-------------------
States
--------------------*/
@shadowHoverBoxShadow: 0px 3px 0px 0px @solidSelectedBorderColor;
@hoverCursor: pointer;
@hoverZIndex: 5;
@hoverBorder: none;
@hoverBoxShadow:
@shadowHoverBoxShadow,
0px 0px 0px 1px @selectedBorderColor
;
/*-------------------
Variations
--------------------*/
/* Sizes */
@medium: 1em;

4
src/themes/packages/default/views/item.variables

@ -7,7 +7,7 @@
/* Item */ /* Item */
@background: #FFFFFF; @background: #FFFFFF;
@borderRadius: 0.325em;
@borderRadius: 0.325rem;
@display: block; @display: block;
@float: left; @float: left;
@margin: 0em @horizontalSpacing @rowSpacing; @margin: 0em @horizontalSpacing @rowSpacing;
@ -39,7 +39,7 @@
/* Content */ /* Content */
@contentMargin: 0em; @contentMargin: 0em;
@contentPadding: 0.75em 0.5em;
@contentPadding: 0.75em 1em;
@contentFontSize: 1em; @contentFontSize: 1em;
@contentBorder: none; @contentBorder: none;
@contentBorderRadius: 0em; @contentBorderRadius: 0em;

Loading…
Cancel
Save