nail_polish 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/nail_polish/backgrounds/black-0_5.png +0 -0
- data/app/assets/images/nail_polish/backgrounds/blue-0_5.png +0 -0
- data/app/assets/images/nail_polish/backgrounds/dark_bg.png +0 -0
- data/app/assets/images/nail_polish/backgrounds/light_bg.png +0 -0
- data/app/assets/images/nail_polish/backgrounds/medium_bg.png +0 -0
- data/app/assets/images/nail_polish/elements/close_icon.png +0 -0
- data/app/assets/images/nail_polish/elements/menu_caret.png +0 -0
- data/app/assets/images/nail_polish/elements/no_image.png +0 -0
- data/app/assets/images/nail_polish/elements/white_close_icon.png +0 -0
- data/app/assets/javascripts/nail_polish/presenters/dropdown.js +22 -0
- data/app/assets/javascripts/nail_polish/view/parent_finder.js +11 -4
- data/app/assets/javascripts/nail_polish/view.js +2 -2
- data/app/assets/javascripts/nail_polish/widget/dropdown.js +46 -0
- data/app/assets/javascripts/nail_polish_widgets.js +1 -0
- data/app/assets/stylesheets/nail_polish/base/buttons.scss +80 -0
- data/app/assets/stylesheets/nail_polish/base/colors.scss +22 -0
- data/app/assets/stylesheets/nail_polish/base/form_elements.scss +106 -0
- data/app/assets/stylesheets/nail_polish/base/grid.scss +46 -0
- data/app/assets/stylesheets/nail_polish/base/layout.scss +23 -0
- data/app/assets/stylesheets/nail_polish/base/mixins.scss +40 -0
- data/app/assets/stylesheets/nail_polish/base/oo_styles.scss +120 -0
- data/app/assets/stylesheets/nail_polish/base/reset.scss +53 -0
- data/app/assets/stylesheets/nail_polish/base/typography_and_tags.scss +71 -0
- data/app/assets/stylesheets/nail_polish/base/variables.scss +13 -0
- data/app/assets/stylesheets/nail_polish/base/widgets/drop_down_menu.scss +32 -0
- data/app/assets/stylesheets/nail_polish/base/widgets/panels.scss +15 -0
- data/app/assets/stylesheets/nail_polish/base.scss +18 -0
- data/app/assets/stylesheets/nail_polish/desktop/grid.scss +29 -0
- data/app/assets/stylesheets/nail_polish/desktop/layout.scss +13 -0
- data/app/assets/stylesheets/nail_polish/desktop/oo_styles.scss +3 -0
- data/app/assets/stylesheets/nail_polish/desktop/widgets/modal.scss +5 -0
- data/app/assets/stylesheets/nail_polish/desktop.scss +12 -0
- data/app/assets/stylesheets/nail_polish/tablet/grid.scss +30 -0
- data/app/assets/stylesheets/nail_polish/tablet/oo_styles.scss +3 -0
- data/app/assets/stylesheets/nail_polish/tablet.scss +11 -0
- data/app/assets/stylesheets/nail_polish/tablet_and_desktop/typography_and_tags.scss +35 -0
- data/app/assets/stylesheets/nail_polish/tablet_and_desktop/variables.scss +1 -0
- data/app/assets/stylesheets/nail_polish/tablet_and_desktop.scss +2 -0
- data/lib/nail_polish/version.rb +1 -1
- metadata +38 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd31c80acb79826e0a80b6281ed36958631d7f54
|
4
|
+
data.tar.gz: d8f226667e3c546d501589f3436a768e7dfb7f58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0d8c9854b4c08f3fd60343c32aa539c2184ee721ae646748dc898c72a499debecd15afd5ddbf585ee019929e0bc8d2a0c416904884deec4e4a93c55d265148e
|
7
|
+
data.tar.gz: ca68fe7068bb405a1294d6357910a72809ef60c3cdd3e051f93334a91e3c2e3192812237831cdcf18bfa3638d0b9deafc47361f0b86cc96984278be3dd7a8036
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,22 @@
|
|
1
|
+
NailPolish.Presenter.Dropdown = NailPolish.Presenter.extend({
|
2
|
+
include: ["selected_value", "selectable_items", "selected_key"],
|
3
|
+
|
4
|
+
selected_value: function(){
|
5
|
+
selected_option = this.presented.options[this.presented.selected]
|
6
|
+
return selected_option || _.values(this.presented.options)[0];
|
7
|
+
},
|
8
|
+
|
9
|
+
selected_key: function() {
|
10
|
+
return this.presented.selected || _.keys(this.presented.options)[0];
|
11
|
+
},
|
12
|
+
|
13
|
+
selectable_items: function(){
|
14
|
+
returnValue = [];
|
15
|
+
|
16
|
+
_.each(this.presented.options, function(value, key){
|
17
|
+
returnValue.unshift({key: key, value: value});
|
18
|
+
});
|
19
|
+
|
20
|
+
return returnValue;
|
21
|
+
}
|
22
|
+
});
|
@@ -8,12 +8,14 @@ _.extend(NailPolish.View.ParentFinder.prototype, {
|
|
8
8
|
perform: function () {
|
9
9
|
if (this.parent) {
|
10
10
|
// If it is a backbone view, use the $el for parent
|
11
|
-
if (this.parent.$el) {
|
11
|
+
if (this.parent.$el) {
|
12
|
+
this.parent = this.parent.$el;
|
13
|
+
}
|
12
14
|
|
13
15
|
if(this.selector) {
|
14
16
|
//pretends it is jquery
|
15
17
|
if (this.parentIsAttachable() && this.parentIsFindable()) {
|
16
|
-
return this.findLocally()
|
18
|
+
return this.findLocally();
|
17
19
|
}
|
18
20
|
} else {
|
19
21
|
// is parent, no selector
|
@@ -26,8 +28,13 @@ _.extend(NailPolish.View.ParentFinder.prototype, {
|
|
26
28
|
},
|
27
29
|
|
28
30
|
findLocally: function() {
|
29
|
-
var found
|
30
|
-
if (
|
31
|
+
var found;
|
32
|
+
if (this.parent.is(this.selector)) {
|
33
|
+
found = this.parent;
|
34
|
+
} else {
|
35
|
+
found = this.parent.find(this.selector);
|
36
|
+
}
|
37
|
+
if (found.length) { return found; }
|
31
38
|
},
|
32
39
|
|
33
40
|
findGlobally: function() {
|
@@ -6,7 +6,7 @@ NailPolish.View = Backbone.View.extend({
|
|
6
6
|
|
7
7
|
initialize: function (opts) {
|
8
8
|
opts = opts || {};
|
9
|
-
this.parent = opts.parent;
|
9
|
+
this.parent = (this.parent && $(this.parent)) || opts.parent;
|
10
10
|
this.repository = opts.repository;
|
11
11
|
this.attachmentMethod = this.attachmentMethod || 'append';
|
12
12
|
this.init(opts);
|
@@ -29,7 +29,7 @@ NailPolish.View = Backbone.View.extend({
|
|
29
29
|
|
30
30
|
renderSubviews: function () {
|
31
31
|
_.each(this.subviews(), function (view) {
|
32
|
-
view.parent = this;
|
32
|
+
view.parent = view.parent || this;
|
33
33
|
view.render();
|
34
34
|
}.bind(this));
|
35
35
|
},
|
@@ -0,0 +1,46 @@
|
|
1
|
+
NailPolish.Widget.Dropdown = NailPolish.View.extend({
|
2
|
+
templateName: 'templates/dropdown',
|
3
|
+
|
4
|
+
events: {
|
5
|
+
'click .dropdown-toggle': 'toggle',
|
6
|
+
'click .menu-item': 'setSelected'
|
7
|
+
},
|
8
|
+
|
9
|
+
init: function(){
|
10
|
+
this.className = this.model.name + '-drop-down';
|
11
|
+
this.menuSelector = '.' + this.model.name + '-dropdown-menu';
|
12
|
+
},
|
13
|
+
|
14
|
+
presenterClass: function () {
|
15
|
+
return NailPolish.Presenter.Dropdown;
|
16
|
+
},
|
17
|
+
|
18
|
+
toggle: function() {
|
19
|
+
$(this.menuSelector).toggleClass(this.hiddenClass);
|
20
|
+
},
|
21
|
+
|
22
|
+
renderTemplate: function () {
|
23
|
+
// switch declared template into a partial for consistent usage
|
24
|
+
var template = HoganTemplates[this.templateName];
|
25
|
+
var rendered = template.render(this.presenter());
|
26
|
+
this.$el.html(rendered);
|
27
|
+
},
|
28
|
+
|
29
|
+
hiddenClass: 'hidden',
|
30
|
+
|
31
|
+
setSelected: function(e){
|
32
|
+
var $target = $(e.target);
|
33
|
+
this.model.selected = $target.attr("data-option");
|
34
|
+
this.render();
|
35
|
+
this.afterSelect();
|
36
|
+
},
|
37
|
+
|
38
|
+
afterSelect: function() {
|
39
|
+
//overwrite me in subclass if you need to do stuffs
|
40
|
+
},
|
41
|
+
|
42
|
+
getSelectedValue: function() {
|
43
|
+
return this.model.selected;
|
44
|
+
}
|
45
|
+
|
46
|
+
});
|
@@ -0,0 +1,80 @@
|
|
1
|
+
button,
|
2
|
+
input[type=submit] {
|
3
|
+
width: 100%;
|
4
|
+
}
|
5
|
+
|
6
|
+
button,
|
7
|
+
input[type=submit],
|
8
|
+
a.button,
|
9
|
+
div.button {
|
10
|
+
font-size: $em*1.2;
|
11
|
+
font-family: $headline-font;
|
12
|
+
font-weight: normal;
|
13
|
+
background-color: $primary-button-base-color;
|
14
|
+
color: $light-color;
|
15
|
+
display: block;
|
16
|
+
padding: $spacing*1.2 $spacing*3;
|
17
|
+
line-height: 1;
|
18
|
+
letter-spacing: 1px;
|
19
|
+
text-align: center;
|
20
|
+
white-space: normal;
|
21
|
+
|
22
|
+
@include rounded;
|
23
|
+
@include shadowed;
|
24
|
+
@include text-shadowed;
|
25
|
+
@include line;
|
26
|
+
|
27
|
+
&:hover {
|
28
|
+
text-decoration: none;
|
29
|
+
background-color: $primary-button-bright-color;
|
30
|
+
}
|
31
|
+
|
32
|
+
&:active {
|
33
|
+
background-color: $primary-button-dark-color;
|
34
|
+
}
|
35
|
+
|
36
|
+
&.accent {
|
37
|
+
background-color: $accent-button-base-color;
|
38
|
+
color: $light-color;
|
39
|
+
|
40
|
+
&:hover {
|
41
|
+
background-color: $accent-button-bright-color;
|
42
|
+
}
|
43
|
+
|
44
|
+
&:active {
|
45
|
+
background-color: $accent-button-dark-color;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
&.neutral {
|
50
|
+
background-color: $neutral-base-color;
|
51
|
+
|
52
|
+
&:hover {
|
53
|
+
background-color: $neutral-bright-color;
|
54
|
+
}
|
55
|
+
|
56
|
+
&:active {
|
57
|
+
background-color: $neutral-dark-color;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
&.success {
|
62
|
+
background-color: $success-base-color;
|
63
|
+
|
64
|
+
&:hover {
|
65
|
+
background-color: $success-bright-color;
|
66
|
+
}
|
67
|
+
|
68
|
+
&:active {
|
69
|
+
background-color: $success-dark-color;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
&.disabled {
|
74
|
+
@include opacity(0.3);
|
75
|
+
}
|
76
|
+
|
77
|
+
&.small {
|
78
|
+
@include small-text;
|
79
|
+
}
|
80
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
$light-color: #fff;
|
2
|
+
$body-color: #333;
|
3
|
+
|
4
|
+
$success-base-color: #28c891;
|
5
|
+
$success-bright-color: #48d0a1;
|
6
|
+
$success-dark-color: #22aa76;
|
7
|
+
|
8
|
+
$primary-button-base-color: #1f85ec;
|
9
|
+
$primary-button-bright-color: #4097ef;
|
10
|
+
$primary-button-dark-color: #1a71cd;
|
11
|
+
|
12
|
+
$accent-button-base-color: #ef5401;
|
13
|
+
$accent-button-bright-color: #f16d26;
|
14
|
+
$accent-button-dark-color: #cb4700;
|
15
|
+
|
16
|
+
$error-color: #ec1f1f;
|
17
|
+
|
18
|
+
$neutral-superlight-color: #eee;
|
19
|
+
$neutral-light-color: #ccc;
|
20
|
+
$neutral-base-color: #666;
|
21
|
+
$neutral-bright-color: lighten($neutral-base-color, 15%);
|
22
|
+
$neutral-dark-color: darken($neutral-base-color, 15%);
|
@@ -0,0 +1,106 @@
|
|
1
|
+
.input-container {
|
2
|
+
// added values are for the border and box-shadow
|
3
|
+
margin-top: $input-top-padding + 3;
|
4
|
+
margin-bottom: $input-top-padding;
|
5
|
+
margin-right: $input-side-padding + 2;
|
6
|
+
margin-left: $input-side-padding;
|
7
|
+
}
|
8
|
+
|
9
|
+
.input,
|
10
|
+
input[type=text],
|
11
|
+
input[type=password],
|
12
|
+
input[type=email],
|
13
|
+
textarea {
|
14
|
+
display: block;
|
15
|
+
width: 100%;
|
16
|
+
|
17
|
+
background-color: $light-color;
|
18
|
+
font-size: $em;
|
19
|
+
padding: $input-top-padding $input-side-padding;
|
20
|
+
@include input-margin-fix;
|
21
|
+
|
22
|
+
@include bordered;
|
23
|
+
@include box-shadow(inset 0px 2px 0px $neutral-light-color);
|
24
|
+
@include border-radius;
|
25
|
+
|
26
|
+
&:focus {
|
27
|
+
@include highlighted-input-padding;
|
28
|
+
border: 2px solid $primary-button-base-color;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
/* A fake input will look like an input, but not be usable.
|
33
|
+
This will be used for */
|
34
|
+
.fake-input {
|
35
|
+
background-color: $light-color;
|
36
|
+
font-size: $em;
|
37
|
+
@include border-radius;
|
38
|
+
|
39
|
+
.input-border {
|
40
|
+
@include line;
|
41
|
+
@include bordered;
|
42
|
+
@include box-shadow(inset 0px 2px 0px $neutral-light-color);
|
43
|
+
@include border-radius;
|
44
|
+
}
|
45
|
+
|
46
|
+
> .inner {
|
47
|
+
padding: $input-top-padding $input-side-padding;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
input[type=checkbox] {
|
52
|
+
// TODO: see about building something custom with Marc
|
53
|
+
-webkit-appearance: checkbox;
|
54
|
+
}
|
55
|
+
|
56
|
+
.input-select {
|
57
|
+
@include line;
|
58
|
+
|
59
|
+
.input-select-trigger {
|
60
|
+
height: 48px;
|
61
|
+
border-left: 1px solid $neutral-light-color;
|
62
|
+
|
63
|
+
.inner {
|
64
|
+
cursor: default;
|
65
|
+
color: $neutral-base-color;
|
66
|
+
padding: 7px 13px; // good for a + text character
|
67
|
+
// below works for drop-down icon
|
68
|
+
// padding: 2*$spacing 1.5*$spacing;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
textarea {
|
74
|
+
width: 100%;
|
75
|
+
font-size: $em * 0.8;
|
76
|
+
background-color: #f1f1f1;
|
77
|
+
min-height: 100px;
|
78
|
+
}
|
79
|
+
|
80
|
+
@-moz-document url-prefix() {
|
81
|
+
textarea {
|
82
|
+
font-family: $body-font;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
form {
|
87
|
+
&.error {
|
88
|
+
input[type=text],
|
89
|
+
input[type=password],
|
90
|
+
input[type=email],
|
91
|
+
textarea {
|
92
|
+
border: 2px solid $error-color;
|
93
|
+
@include highlighted-input-padding;
|
94
|
+
|
95
|
+
&:focus {
|
96
|
+
@include highlighted-input-padding;
|
97
|
+
border: 2px solid $primary-button-base-color;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
h6 {
|
102
|
+
color: $error-color;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
.line, .row, .last-unit,
|
2
|
+
.s-row {
|
3
|
+
width: 100%;
|
4
|
+
@include line;
|
5
|
+
}
|
6
|
+
.unit{float:left;}
|
7
|
+
.unit-right{float:right;}
|
8
|
+
.size1of1{width:100%;float:none;}
|
9
|
+
.size1of2{width:50%;}
|
10
|
+
.size1of3{width:33.33333%;}
|
11
|
+
.size2of3{width:66.66666%;}
|
12
|
+
.size1of4{width:25%;}
|
13
|
+
.size3of4{width:75%;}
|
14
|
+
.size1of5{width:20%;}
|
15
|
+
.size2of5{width:40%;}
|
16
|
+
.size3of5{width:60%;}
|
17
|
+
.size4of5{width:80%;}
|
18
|
+
.size1of6{width:16.66666%;}
|
19
|
+
.size4of6{width:66.66666%;}
|
20
|
+
.size5of6{width:83.33333%;}
|
21
|
+
.size1of10{width:10%;}
|
22
|
+
.size3of10{width:30%;}
|
23
|
+
.size7of10{width:70%;}
|
24
|
+
.size9of10{width: 90%}
|
25
|
+
.size1of20{width:5%;}
|
26
|
+
|
27
|
+
.last-unit{float:none;width:auto;_position:relative;_left:-3px;_margin-right:-3px;}
|
28
|
+
|
29
|
+
.inner {
|
30
|
+
padding: $spacing;
|
31
|
+
@include line;
|
32
|
+
|
33
|
+
&.half {
|
34
|
+
padding: $spacing * 0.5;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.spacer {
|
39
|
+
width: $spacing;
|
40
|
+
height: $spacing;
|
41
|
+
}
|
42
|
+
|
43
|
+
.s-hidden {
|
44
|
+
display: none;
|
45
|
+
}
|
46
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
body {
|
2
|
+
background: $body-color image-url('nail_polish/backgrounds/dark_bg.png') repeat;
|
3
|
+
}
|
4
|
+
|
5
|
+
#overlay {
|
6
|
+
position: absolute;
|
7
|
+
top: 0;
|
8
|
+
bottom: 0;
|
9
|
+
left: 0;
|
10
|
+
right: 0;
|
11
|
+
z-index: 10000;
|
12
|
+
background: transparent image-url('nail_polish/backgrounds/black-0_5.png') repeat;
|
13
|
+
}
|
14
|
+
|
15
|
+
#page {
|
16
|
+
background: $light-color image-url('nail_polish/backgrounds/light_bg.png') repeat;
|
17
|
+
|
18
|
+
#content {
|
19
|
+
background: $neutral-light-color image-url('nail_polish/backgrounds/medium_bg.png') repeat;
|
20
|
+
@include box-shadow(0px 0px 5px rgba(0,0,0,0.25));
|
21
|
+
width: 100%;
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
@mixin line {
|
2
|
+
display: block;
|
3
|
+
overflow: hidden;
|
4
|
+
*overflow: visible;
|
5
|
+
*zoom: 1;
|
6
|
+
}
|
7
|
+
|
8
|
+
@mixin bordered {
|
9
|
+
border: 1px solid $neutral-light-color;
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin rounded {
|
13
|
+
@include border-radius($border-radius-size);
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin shadowed {
|
17
|
+
@include box-shadow(rgba(0,0,0,0.1) 3px 3px 0);
|
18
|
+
}
|
19
|
+
|
20
|
+
@mixin text-shadowed {
|
21
|
+
@include text-shadow(rgba(0,0,0,0.1) 3px 3px 0);
|
22
|
+
}
|
23
|
+
|
24
|
+
@mixin text-shadowed-light {
|
25
|
+
@include text-shadow(1px 1px 0px #fff);
|
26
|
+
}
|
27
|
+
|
28
|
+
@mixin small-text {
|
29
|
+
font-size: $em*0.857;
|
30
|
+
}
|
31
|
+
|
32
|
+
/* form input fixes */
|
33
|
+
@mixin highlighted-input-padding {
|
34
|
+
padding: $input-top-padding - 1px $input-side-padding - 1px;
|
35
|
+
}
|
36
|
+
|
37
|
+
@mixin input-margin-fix {
|
38
|
+
margin-left: -$input-side-padding;
|
39
|
+
margin-top: -$input-top-padding;
|
40
|
+
}
|
@@ -0,0 +1,120 @@
|
|
1
|
+
.block {
|
2
|
+
@include line;
|
3
|
+
}
|
4
|
+
|
5
|
+
.overflown {
|
6
|
+
overflow: visible;
|
7
|
+
}
|
8
|
+
|
9
|
+
.rounded {
|
10
|
+
@include rounded;
|
11
|
+
}
|
12
|
+
|
13
|
+
.bordered {
|
14
|
+
@include bordered;
|
15
|
+
}
|
16
|
+
|
17
|
+
.left-bordered {
|
18
|
+
border-left: 1px solid $neutral-light-color;
|
19
|
+
}
|
20
|
+
|
21
|
+
.right-bordered {
|
22
|
+
border-right: 1px solid $neutral-light-color;
|
23
|
+
}
|
24
|
+
|
25
|
+
.top-bordered {
|
26
|
+
border-top: 1px solid $neutral-light-color;
|
27
|
+
}
|
28
|
+
|
29
|
+
.bottom-bordered {
|
30
|
+
border-bottom: 1px solid $neutral-light-color;
|
31
|
+
}
|
32
|
+
|
33
|
+
.no-border {
|
34
|
+
border: none;
|
35
|
+
}
|
36
|
+
|
37
|
+
.centered-content {
|
38
|
+
text-align: center;
|
39
|
+
}
|
40
|
+
|
41
|
+
.centerable {
|
42
|
+
display: inline-block;
|
43
|
+
}
|
44
|
+
|
45
|
+
.bolded {
|
46
|
+
font-weight: bold;
|
47
|
+
}
|
48
|
+
|
49
|
+
.light-text{
|
50
|
+
color: $neutral-base-color;
|
51
|
+
}
|
52
|
+
|
53
|
+
.light-headline {
|
54
|
+
color: $light-color;
|
55
|
+
@include text-shadow(1px 1px 0px $body-color);
|
56
|
+
}
|
57
|
+
|
58
|
+
/* this is for page-width sections of the page */
|
59
|
+
.page-inner {
|
60
|
+
@include line;
|
61
|
+
padding: $spacing*2 0 $spacing 0;
|
62
|
+
}
|
63
|
+
|
64
|
+
.inner-top {
|
65
|
+
padding-top: $spacing;
|
66
|
+
}
|
67
|
+
|
68
|
+
.inner-bottom {
|
69
|
+
padding-bottom: $spacing;
|
70
|
+
}
|
71
|
+
|
72
|
+
.inner-left {
|
73
|
+
padding-left: $spacing;
|
74
|
+
}
|
75
|
+
|
76
|
+
.inner-right {
|
77
|
+
padding-right: $spacing;
|
78
|
+
}
|
79
|
+
|
80
|
+
.no-padding {
|
81
|
+
padding: 0;
|
82
|
+
}
|
83
|
+
|
84
|
+
.shadow-container {
|
85
|
+
overflow: hidden;
|
86
|
+
padding: 0 ($spacing * 0.3) ($spacing * 0.3) 0;
|
87
|
+
}
|
88
|
+
|
89
|
+
.accent-background {
|
90
|
+
background-color: $accent-button-base-color;
|
91
|
+
}
|
92
|
+
|
93
|
+
/* These three styles aren't very descriptive should have text appended */
|
94
|
+
.small {
|
95
|
+
@include small-text;
|
96
|
+
}
|
97
|
+
|
98
|
+
.accent-text {
|
99
|
+
color: $accent-button-base-color;
|
100
|
+
}
|
101
|
+
|
102
|
+
.primary-text {
|
103
|
+
color: $primary-button-base-color;
|
104
|
+
}
|
105
|
+
|
106
|
+
.no-wrap {
|
107
|
+
white-space: nowrap;
|
108
|
+
}
|
109
|
+
|
110
|
+
.wrap {
|
111
|
+
@include word-break(break-all);
|
112
|
+
}
|
113
|
+
|
114
|
+
.warning-text {
|
115
|
+
color: $error-color;
|
116
|
+
}
|
117
|
+
|
118
|
+
.italic {
|
119
|
+
font-style: italic;
|
120
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/* http://meyerweb.com/eric/tools/css/reset/
|
2
|
+
v2.0 | 20110126
|
3
|
+
License: none (public domain)
|
4
|
+
*/
|
5
|
+
|
6
|
+
html, body, div, span, applet, object, iframe,
|
7
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
8
|
+
a, abbr, acronym, address, big, cite, code,
|
9
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
10
|
+
small, strike, strong, sub, sup, tt, var,
|
11
|
+
b, u, i, center,
|
12
|
+
dl, dt, dd, ol, ul, li,
|
13
|
+
fieldset, form, label, legend,
|
14
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
15
|
+
article, aside, canvas, details, embed,
|
16
|
+
figure, figcaption, footer, header, hgroup,
|
17
|
+
menu, nav, output, ruby, section, summary,
|
18
|
+
time, mark, audio, video, input, button {
|
19
|
+
margin: 0;
|
20
|
+
padding: 0;
|
21
|
+
border: 0;
|
22
|
+
vertical-align: baseline;
|
23
|
+
}
|
24
|
+
/* HTML5 display-role reset for older browsers */
|
25
|
+
article, aside, details, figcaption, figure,
|
26
|
+
footer, header, hgroup, menu, nav, section {
|
27
|
+
display: block;
|
28
|
+
}
|
29
|
+
ol, ul {
|
30
|
+
list-style: none;
|
31
|
+
}
|
32
|
+
blockquote, q {
|
33
|
+
quotes: none;
|
34
|
+
}
|
35
|
+
blockquote:before, blockquote:after,
|
36
|
+
q:before, q:after {
|
37
|
+
content: '';
|
38
|
+
content: none;
|
39
|
+
}
|
40
|
+
table {
|
41
|
+
border-collapse: collapse;
|
42
|
+
border-spacing: 0;
|
43
|
+
}
|
44
|
+
input, textarea, button {
|
45
|
+
outline-style: none;
|
46
|
+
resize: none;
|
47
|
+
background-color: transparent;
|
48
|
+
-webkit-appearance: none;
|
49
|
+
}
|
50
|
+
img {
|
51
|
+
display: block;
|
52
|
+
}
|
53
|
+
|
@@ -0,0 +1,71 @@
|
|
1
|
+
body {
|
2
|
+
color: $body-color;
|
3
|
+
background: $body-color;
|
4
|
+
font-family: $body-font;
|
5
|
+
font-size: $em;
|
6
|
+
text-rendering: optimizeLegibility;
|
7
|
+
line-height: $line-height;
|
8
|
+
}
|
9
|
+
|
10
|
+
h1, h2, h3, h4, h5, h6, p {
|
11
|
+
font-weight: normal;
|
12
|
+
padding-bottom: $em*0.5;
|
13
|
+
}
|
14
|
+
|
15
|
+
h1, h2, h3 {
|
16
|
+
font-family: $headline-font;
|
17
|
+
@include text-shadow(1px 1px 0px #fff);
|
18
|
+
}
|
19
|
+
|
20
|
+
h4,h5,h6,p{
|
21
|
+
font-family: $body-font;
|
22
|
+
}
|
23
|
+
|
24
|
+
h1 {
|
25
|
+
font-size: $em*1.5;
|
26
|
+
}
|
27
|
+
|
28
|
+
h2 {
|
29
|
+
font-size: $em*1.2;
|
30
|
+
}
|
31
|
+
|
32
|
+
h3 {
|
33
|
+
font-size: $em;
|
34
|
+
}
|
35
|
+
|
36
|
+
h4 {
|
37
|
+
font-size: $em*0.75;
|
38
|
+
}
|
39
|
+
|
40
|
+
h5 {
|
41
|
+
@include small-text;
|
42
|
+
}
|
43
|
+
|
44
|
+
h6 {
|
45
|
+
font-size: $em*0.67;
|
46
|
+
}
|
47
|
+
|
48
|
+
a {
|
49
|
+
color: $primary-button-base-color;
|
50
|
+
text-decoration: none;
|
51
|
+
font-weight: bold;
|
52
|
+
}
|
53
|
+
|
54
|
+
a:hover {
|
55
|
+
text-decoration: underline;
|
56
|
+
}
|
57
|
+
|
58
|
+
a.plain {
|
59
|
+
color: $neutral-dark-color;
|
60
|
+
}
|
61
|
+
|
62
|
+
a.plain:hover {
|
63
|
+
text-decoration: none;
|
64
|
+
}
|
65
|
+
|
66
|
+
hr {
|
67
|
+
border: 0;
|
68
|
+
background-color: $neutral-light-color;
|
69
|
+
height: 1px;
|
70
|
+
@include box-shadow($light-color 0 1px 0px);
|
71
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
$headline-font: "Montserrat", helvetica, arial, sans-serif;
|
2
|
+
$body-font: "Open Sans", helvetica, arial, sans-serif;
|
3
|
+
$bold-font: "Open Sans Bold", helvetica, arial, sans-serif;
|
4
|
+
|
5
|
+
$em: 18px;
|
6
|
+
$spacing: 10px;
|
7
|
+
$line-height: 1.6;
|
8
|
+
$border-radius-size: 5px;
|
9
|
+
$page-width: 940px;
|
10
|
+
|
11
|
+
/* form input fix related stuff */
|
12
|
+
$input-top-padding: 1.3*$spacing;
|
13
|
+
$input-side-padding: 1.5*$spacing;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.drop-down-menu {
|
2
|
+
position: absolute;
|
3
|
+
margin-top: 55px;
|
4
|
+
background-color: $light-color;
|
5
|
+
color: $body-color;
|
6
|
+
@include bordered;
|
7
|
+
@include box-shadow(2px 2px 0 rgba(0,0,0,0.07));
|
8
|
+
@include border-radius;
|
9
|
+
min-width: 150px;
|
10
|
+
cursor: pointer;
|
11
|
+
|
12
|
+
display: none;
|
13
|
+
z-index: 200;
|
14
|
+
|
15
|
+
.caret {
|
16
|
+
width: 23px;
|
17
|
+
height: 16px;
|
18
|
+
background: transparent image-url('nail_polish/elements/menu_caret.png') no-repeat;
|
19
|
+
position: absolute;
|
20
|
+
top: -15px;
|
21
|
+
left: $spacing;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
.unit-right .drop-down-menu {
|
26
|
+
right: 0;
|
27
|
+
|
28
|
+
.caret {
|
29
|
+
left: auto;
|
30
|
+
right: $spacing;
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
.panel {
|
2
|
+
background-color: $light-color;
|
3
|
+
@include border-radius($border-radius-size);
|
4
|
+
@include bordered;
|
5
|
+
@include box-shadow(3px 3px 0 rgba(0,0,0,0.07));
|
6
|
+
}
|
7
|
+
|
8
|
+
.flat-panel {
|
9
|
+
background-color: $neutral-superlight-color;
|
10
|
+
@include bordered;
|
11
|
+
|
12
|
+
&.lightest {
|
13
|
+
background-color: $light-color;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
@import 'compass/css3';
|
2
|
+
@import "compass/css3/hyphenation";
|
3
|
+
|
4
|
+
@import "base/reset";
|
5
|
+
@import "base/variables";
|
6
|
+
@import 'base/colors';
|
7
|
+
@import 'base/mixins';
|
8
|
+
|
9
|
+
@import 'base/grid';
|
10
|
+
@import "base/typography_and_tags";
|
11
|
+
@import 'base/layout';
|
12
|
+
@import 'base/form_elements';
|
13
|
+
@import "base/buttons";
|
14
|
+
|
15
|
+
@import 'base/widgets/panels';
|
16
|
+
@import 'base/widgets/drop_down_menu';
|
17
|
+
|
18
|
+
@import 'base/oo_styles'; /* at the end so they win */
|
@@ -0,0 +1,29 @@
|
|
1
|
+
.s-row { float: left; width: auto; }
|
2
|
+
.m-row { float: left; width: auto; }
|
3
|
+
|
4
|
+
.l-unit{float:left;}
|
5
|
+
.l-unit-right{float:right;}
|
6
|
+
.l-1of2{width:50%;}
|
7
|
+
.l-1of3{width:33.33333%;}
|
8
|
+
.l-2of3{width:66.66666%;}
|
9
|
+
.l-1of4{width:25%;}
|
10
|
+
.l-3of4{width:75%;}
|
11
|
+
.l-1of5{width:20%;}
|
12
|
+
.l-2of5{width:40%;}
|
13
|
+
.l-3of5{width:60%;}
|
14
|
+
.l-4of5{width:80%;}
|
15
|
+
.l-1of6{width:16.66666%;}
|
16
|
+
.l-4of6{width:66.66666%;}
|
17
|
+
.l-5of6{width:83.33333%;}
|
18
|
+
.l-1of10{width:10%;}
|
19
|
+
.l-3of10{width:30%;}
|
20
|
+
.l-9of10{width: 90%}
|
21
|
+
|
22
|
+
.m-hidden,
|
23
|
+
.s-hidden {
|
24
|
+
display: block;
|
25
|
+
}
|
26
|
+
|
27
|
+
.l-hidden {
|
28
|
+
display: none;
|
29
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
@import 'compass/css3';
|
2
|
+
|
3
|
+
@import "base/reset";
|
4
|
+
@import "base/variables";
|
5
|
+
@import 'base/colors';
|
6
|
+
@import 'base/mixins';
|
7
|
+
|
8
|
+
@import 'tablet_and_desktop';
|
9
|
+
@import 'desktop/grid';
|
10
|
+
@import 'desktop/layout';
|
11
|
+
@import 'desktop/oo_styles';
|
12
|
+
@import 'desktop/widgets/modal';
|
@@ -0,0 +1,30 @@
|
|
1
|
+
.s-row { float: left; width: auto; }
|
2
|
+
|
3
|
+
.m-row {
|
4
|
+
width: 100%;
|
5
|
+
@include line;
|
6
|
+
}
|
7
|
+
|
8
|
+
.m-1of2{width:50%;}
|
9
|
+
.m-1of3{width:33.33333%;}
|
10
|
+
.m-2of3{width:66.66666%;}
|
11
|
+
.m-1of4{width:25%;}
|
12
|
+
.m-3of4{width:75%;}
|
13
|
+
.m-1of5{width:20%;}
|
14
|
+
.m-2of5{width:40%;}
|
15
|
+
.m-3of5{width:60%;}
|
16
|
+
.m-4of5{width:80%;}
|
17
|
+
.m-1of6{width:16.66666%;}
|
18
|
+
.m-4of6{width:66.66666%;}
|
19
|
+
.m-5of6{width:83.33333%;}
|
20
|
+
.m-1of10{width:10%;}
|
21
|
+
.m-3of10{width:30%;}
|
22
|
+
.m-9of10{width: 90%}
|
23
|
+
|
24
|
+
.s-hidden {
|
25
|
+
display: block;
|
26
|
+
}
|
27
|
+
|
28
|
+
.m-hidden {
|
29
|
+
display: none;
|
30
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
body {
|
2
|
+
font-size: $em;
|
3
|
+
}
|
4
|
+
|
5
|
+
h1{
|
6
|
+
font-size: $em*3.428;
|
7
|
+
}
|
8
|
+
|
9
|
+
h2 {
|
10
|
+
font-size: $em*1.714;
|
11
|
+
}
|
12
|
+
|
13
|
+
h3 {
|
14
|
+
font-size: $em*1.286;
|
15
|
+
}
|
16
|
+
|
17
|
+
h4 {
|
18
|
+
font-size: $em;
|
19
|
+
}
|
20
|
+
|
21
|
+
h5 {
|
22
|
+
font-size: $em;
|
23
|
+
}
|
24
|
+
|
25
|
+
h6 {
|
26
|
+
font-size: $em*0.857;
|
27
|
+
}
|
28
|
+
|
29
|
+
p {
|
30
|
+
font-size: $em;
|
31
|
+
}
|
32
|
+
|
33
|
+
.small {
|
34
|
+
font-size: $em*0.857;
|
35
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
$em: 14px;
|
data/lib/nail_polish/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nail_polish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kane Baccigalupi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2014-01-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -145,6 +145,15 @@ executables: []
|
|
145
145
|
extensions: []
|
146
146
|
extra_rdoc_files: []
|
147
147
|
files:
|
148
|
+
- app/assets/images/nail_polish/backgrounds/black-0_5.png
|
149
|
+
- app/assets/images/nail_polish/backgrounds/blue-0_5.png
|
150
|
+
- app/assets/images/nail_polish/backgrounds/dark_bg.png
|
151
|
+
- app/assets/images/nail_polish/backgrounds/light_bg.png
|
152
|
+
- app/assets/images/nail_polish/backgrounds/medium_bg.png
|
153
|
+
- app/assets/images/nail_polish/elements/close_icon.png
|
154
|
+
- app/assets/images/nail_polish/elements/menu_caret.png
|
155
|
+
- app/assets/images/nail_polish/elements/no_image.png
|
156
|
+
- app/assets/images/nail_polish/elements/white_close_icon.png
|
148
157
|
- app/assets/javascripts/nail_polish/app.js
|
149
158
|
- app/assets/javascripts/nail_polish/events/flasher.js
|
150
159
|
- app/assets/javascripts/nail_polish/events/redirector.js
|
@@ -156,10 +165,12 @@ files:
|
|
156
165
|
- app/assets/javascripts/nail_polish/overrides/global_publisher_adder.js
|
157
166
|
- app/assets/javascripts/nail_polish/presenter.js
|
158
167
|
- app/assets/javascripts/nail_polish/presenters/collection.js
|
168
|
+
- app/assets/javascripts/nail_polish/presenters/dropdown.js
|
159
169
|
- app/assets/javascripts/nail_polish/router.js
|
160
170
|
- app/assets/javascripts/nail_polish/utils/text.js
|
161
171
|
- app/assets/javascripts/nail_polish/view/parent_finder.js
|
162
172
|
- app/assets/javascripts/nail_polish/view.js
|
173
|
+
- app/assets/javascripts/nail_polish/widget/dropdown.js
|
163
174
|
- app/assets/javascripts/nail_polish/widget/flash.js
|
164
175
|
- app/assets/javascripts/nail_polish/widget/modal.js
|
165
176
|
- app/assets/javascripts/nail_polish.js
|
@@ -172,6 +183,30 @@ files:
|
|
172
183
|
- app/assets/javascripts/vendor/underscore.js
|
173
184
|
- app/assets/javascripts/vendor/zepto.cookie.js
|
174
185
|
- app/assets/javascripts/vendor/zepto.js
|
186
|
+
- app/assets/stylesheets/nail_polish/base/buttons.scss
|
187
|
+
- app/assets/stylesheets/nail_polish/base/colors.scss
|
188
|
+
- app/assets/stylesheets/nail_polish/base/form_elements.scss
|
189
|
+
- app/assets/stylesheets/nail_polish/base/grid.scss
|
190
|
+
- app/assets/stylesheets/nail_polish/base/layout.scss
|
191
|
+
- app/assets/stylesheets/nail_polish/base/mixins.scss
|
192
|
+
- app/assets/stylesheets/nail_polish/base/oo_styles.scss
|
193
|
+
- app/assets/stylesheets/nail_polish/base/reset.scss
|
194
|
+
- app/assets/stylesheets/nail_polish/base/typography_and_tags.scss
|
195
|
+
- app/assets/stylesheets/nail_polish/base/variables.scss
|
196
|
+
- app/assets/stylesheets/nail_polish/base/widgets/drop_down_menu.scss
|
197
|
+
- app/assets/stylesheets/nail_polish/base/widgets/panels.scss
|
198
|
+
- app/assets/stylesheets/nail_polish/base.scss
|
199
|
+
- app/assets/stylesheets/nail_polish/desktop/grid.scss
|
200
|
+
- app/assets/stylesheets/nail_polish/desktop/layout.scss
|
201
|
+
- app/assets/stylesheets/nail_polish/desktop/oo_styles.scss
|
202
|
+
- app/assets/stylesheets/nail_polish/desktop/widgets/modal.scss
|
203
|
+
- app/assets/stylesheets/nail_polish/desktop.scss
|
204
|
+
- app/assets/stylesheets/nail_polish/tablet/grid.scss
|
205
|
+
- app/assets/stylesheets/nail_polish/tablet/oo_styles.scss
|
206
|
+
- app/assets/stylesheets/nail_polish/tablet.scss
|
207
|
+
- app/assets/stylesheets/nail_polish/tablet_and_desktop/typography_and_tags.scss
|
208
|
+
- app/assets/stylesheets/nail_polish/tablet_and_desktop/variables.scss
|
209
|
+
- app/assets/stylesheets/nail_polish/tablet_and_desktop.scss
|
175
210
|
- config/initializers/nail_polish.rb
|
176
211
|
- config/routes.rb
|
177
212
|
- lib/nail_polish/engine.rb
|
@@ -200,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
235
|
version: '0'
|
201
236
|
requirements: []
|
202
237
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.0.
|
238
|
+
rubygems_version: 2.0.3
|
204
239
|
signing_key:
|
205
240
|
specification_version: 4
|
206
241
|
summary: NailPolish is a Backbone/OOCSS engine for your Rails 4 app
|