Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User list style #17

Merged
merged 2 commits into from
Mar 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ this.VelhaMania.module('UsersApp.List', function(List, App, Backbone, Marionette

List.UserView = Marionette.ItemView.extend({
template: 'users/list/templates/user',
className: 'user-item',
tagName: 'li',
className: 'user-item',
triggers: {
'click': 'user:clicked'
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
img(src= avatar)
span.username= username
.user.waves-effect
.user-avatar
img(src= avatar)
.user-username
span.username= username

.divider
2 changes: 2 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
// -------------------------------------

@import "components/grid";
@import "components/waves";

// -------------------------------------
// Structures
Expand All @@ -33,6 +34,7 @@
@import "structures/body";
@import "structures/nav";
@import "structures/login";
@import "structures/user";

// -------------------------------------
// Inbox
Expand Down
10 changes: 10 additions & 0 deletions app/assets/stylesheets/components/_waves.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// *************************************
//
// Waves
//
// *************************************

// ----- Colors ----- //

.waves-blue .waves-ripple
background-color: $c-waves-blue-background
32 changes: 31 additions & 1 deletion app/assets/stylesheets/foundation/_config.sass
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

$blue: #053554
$light-blue: #155F8E
$light-blue-opacify: rgba(179, 222, 228, 0.2)
$dark-blue: #3D6884
$white: #FFF

Expand All @@ -42,19 +43,40 @@ $c-highlight: lighten($blue, 90%)

// ----- Structures ----- //

// ----- Nav ----- //

$c-nav-background: $blue

// ----- Button ----- //

$c-button-background: $blue
$c-button-highlight-background: $light-blue

// ----- Form ----- //

$c-form-background: $white
$c-input-focus: $light-blue

// ----- Inputs ----- //

$c-input-focus: $light-blue
$c-input-border-is-invalid: $error-color

// ----- Label ----- //

$c-label-is-invalid: $error-color

// ----- Logo ----- //

$c-brand-logo: $dark-blue

// ----- Username ----- //

$c-username-color: $dark-blue

// ----- Waves ----- //

$c-waves-blue-background: $light-blue-opacify

// -------------------------------------
// Base
// -------------------------------------
Expand Down Expand Up @@ -89,6 +111,14 @@ $b-space-m: $b-space * $b-space-scale * 3
$b-space-l: $b-space * $b-space-scale * 4
$b-space-xl: $b-space * $b-space-scale * 5

// ----- User List Space ----- //

$b-user-list-space: $b-space

// ----- User Item Space ----- //

$b-user-item-space: $b-space

// -------------------------------------
// Components
// -------------------------------------
Expand Down
59 changes: 59 additions & 0 deletions app/assets/stylesheets/structures/_user.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// *************************************
//
// User
//
// *************************************

.user
@extend .row
@extend .waves-blue
height: em(70px)
margin-bottom: 0
padding: $b-user-item-space
width: 100%

// -------------------------------------
// Scaffolding
// -------------------------------------

// -------- List -------- //

.user-list
@extend .card
margin: em($b-user-list-space) auto 0
min-width: em(200px)
max-width: em(500px)
padding: $b-user-list-space

// -------- Item -------- //

.user-item
width: 100%

// -------- Avatar -------- //

.user-avatar
@extend .col
@extend .m3
@extend .s12
@extend .card-image
height: em(50px)
text-align: center
img
height: em(50px)
width: em(50px) !important

// -------- Username -------- //

.user-username
@extend .col
@extend .m9
@extend .s12
@extend .card-content
line-height: em(50px)
height: em(50px)
padding: 0 !important
span
@extend .card-title
color: $c-username-color !important
font-weight: 100