chr 0.4.18 → 0.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 694f33f3af909f7b9db991bf0cfc7ad91e52de3c
4
- data.tar.gz: 76d5e2f2569bebdfbbf2bd38bb9352aa82580c52
3
+ metadata.gz: 4e8b7f15e58ff7b8d4d456245f1fb1b5e038b495
4
+ data.tar.gz: c34afc47f2d710bd65a4a11a2fc4eff43151db10
5
5
  SHA512:
6
- metadata.gz: 992ebba60ca4a6354e1f561670117bf5e35bc571af8b59609fea4c501a84d6bc21ff2f81d91e6c7d5d77cd1534fca58f7b412d079a9cc28101955d77674e6563
7
- data.tar.gz: 0eb0db6333f958a0123419c0131abc3a1e0820168456b6118b48eb56758d4c62130c86b1d9c9d841bb63b0dece139007b151c5231926f542b86b1cdd7712e090
6
+ metadata.gz: 0692d6811c5fa7451d0d07d72913f6653ae2c0c1146627bd8b46b42edb17137136a5689d8ed7e7e6f401ed7e35cbb05f06da17d7eb617f224df637754a7e6fa7
7
+ data.tar.gz: f89d66d24ec1d3ecd6992b91d462340b99452377e8734820ffd882952d6de690f820f8a5136fd1a5144aa27bc2d94d6dcda60acfe80fcffb23ae308c30ab5365
@@ -13,3 +13,10 @@
13
13
  #= require ./stores/rails-array
14
14
 
15
15
  #= require formagic
16
+
17
+ @Icons =
18
+ reorder: "<i class='fa fa-ellipsis-v'></i>"
19
+ folder: "<i class='fa fa-angle-right'></i>"
20
+ search: "<i class='fa fa-search'></i>"
21
+ add: "<i class='fa fa-plus'></i>"
22
+ close: "<i class='fa fa-chevron-left'></i>"
@@ -74,14 +74,14 @@ class @Item
74
74
  @_render_subtitle()
75
75
 
76
76
  if @type == 'folder'
77
- @$el.append $("<div class='icon-folder'></div>")
77
+ @$el.append $("<div class='icon-folder'>#{Icons.folder}</div>")
78
78
 
79
79
  if @type == 'object'
80
80
  @_render_thumbnail()
81
81
 
82
82
  if @config.arrayStore and @config.arrayStore.reorderable
83
83
  @$el.addClass('reorderable')
84
- @$el.append $("<div class='icon-reorder'></div>")
84
+ @$el.append $("<div class='icon-reorder'>#{Icons.reorder}</div>")
85
85
 
86
86
  if @type == 'object'
87
87
  @config.onItemRender?(this)
@@ -64,10 +64,10 @@ class @List
64
64
  @$el.append @$header
65
65
 
66
66
  # back
67
+ @$backBtn =$ "<a href='#/' class='back'>#{ Icons.close }</a>"
67
68
  if @parentList
68
- @$backBtn =$ "<a href='#{ @parentList.path }' class='back'>Close</a>"
69
- else
70
- @$backBtn =$ "<a href='#/' class='back'>Close</a>"
69
+ @$backBtn.attr 'href', @parentList.path
70
+
71
71
  @$header.prepend @$backBtn
72
72
 
73
73
  # spinner & title
@@ -76,7 +76,7 @@ class @List
76
76
 
77
77
  # new item
78
78
  if not @config.disableNewItems and @config.formSchema
79
- @$newBtn =$ "<a href='#{ @path }/new' class='new'></a>"
79
+ @$newBtn =$ "<a href='#{ @path }/new' class='new'>#{Icons.add}</a>"
80
80
  @$header.append @$newBtn
81
81
 
82
82
  if @config.items then @_process_config_items()
@@ -8,7 +8,7 @@
8
8
 
9
9
  _bind_search: ->
10
10
  @$search =$ "<div class='search'></div>"
11
- @$searchIcon =$ "<a href='#' class='icon'></a>"
11
+ @$searchIcon =$ "<a href='#' class='icon'>#{Icons.search}</a>"
12
12
  @$searchInput =$ "<input type='text' placeholder='Search' />"
13
13
  @$searchCancel =$ "<a href='#' class='cancel'>Cancel</a>"
14
14
 
@@ -50,7 +50,7 @@ class @View
50
50
  @$el.append @$header
51
51
 
52
52
  # close
53
- @$closeBtn =$ "<a href='#{ @closePath }' class='close'>Close</a>"
53
+ @$closeBtn =$ "<a href='#{ @closePath }' class='close'>#{Icons.close}</a>"
54
54
  @$header.append @$closeBtn
55
55
 
56
56
  # content
@@ -200,7 +200,3 @@ class @View
200
200
  @store.loadObject(objectId, callbacks)
201
201
 
202
202
  include(View, viewTabs)
203
-
204
-
205
-
206
-
@@ -2,7 +2,6 @@
2
2
  $tablet: "screen and (min-width:768px)";
3
3
  $desktop: "screen and (min-width:1024px)";
4
4
 
5
-
6
5
  /* Global ------------------------------------------------------------------ */
7
6
  *,
8
7
  *:before,
@@ -11,34 +10,54 @@ html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibil
11
10
  a { text-decoration: none; }
12
11
  .spinner { @include spinner; }
13
12
 
14
-
15
13
  /* Menu -------------------------------------------------------------------- */
14
+ .menu {
15
+ margin-top: 1em;
16
+ }
17
+
16
18
  .menu a {
17
19
  display : block;
18
20
  position : relative;
19
21
  padding : 1em;
20
22
  }
23
+
21
24
  .menu .fa {
22
25
  margin-left: -.25em;
23
26
  }
24
27
 
25
-
26
28
  /* Header ------------------------------------------------------------------ */
27
29
  .header {
28
- height : 41px;
29
- text-align : center;
30
+ height: 41px;
31
+ text-align: center;
30
32
  }
31
33
 
32
34
  .header {
33
- .title { @include ellipsis(70%); }
34
- .title, a { line-height: 2.5; }
35
- .new { @include position(absolute, 0 0 null null); }
36
- .new + .search { @include position(absolute, 0 40px inherit inherit); } // @todo: refactor to em
37
- .save { @include position(absolute, 0 1em null null); }
38
- .back, .close { @include position(absolute, 0 null null 0);
39
- overflow : hidden;
35
+ .title {
36
+ @include ellipsis(70%);
37
+ line-height: 41px;
38
+ }
39
+ a {
40
+ line-height: 2.5;
40
41
  }
41
- .spinner { @include position(absolute, .4em null null null);
42
+ .new {
43
+ @include position(absolute, 0 0 null null);
44
+ @include header-icon-base;
45
+ }
46
+ .new + .search {
47
+ @include position(absolute, 0 40px inherit inherit);
48
+ }
49
+ .save {
50
+ @include position(absolute, 0 1em null null);
51
+ }
52
+ .back, .close {
53
+ @include position(absolute, 0 null null 0);
54
+ @include header-icon-base;
55
+ &:before {
56
+ display: none;
57
+ }
58
+ }
59
+ .spinner {
60
+ @include position(absolute, .4em null null null);
42
61
  margin-left : -2.25em;
43
62
  visibility : hidden;
44
63
  }
@@ -46,7 +65,6 @@ a { text-decoration: none; }
46
65
 
47
66
  .show-spinner .spinner { visibility: visible; }
48
67
 
49
-
50
68
  /* Item -------------------------------------------------------------------- */
51
69
  .item {
52
70
  display : block;
@@ -55,13 +73,9 @@ a { text-decoration: none; }
55
73
  }
56
74
 
57
75
  .item {
76
+ .icon-folder,
58
77
  .icon-reorder {
59
- @include position(absolute, 50% 0 null null);
60
- margin-top : -20px; // @todo: refactor to em
61
- }
62
- .icon-folder {
63
- @include position(absolute, 50% 0 null null);
64
- margin-top : -20px; // @todo: refactor to em
78
+ @include item-icon-base;
65
79
  }
66
80
  }
67
81
 
@@ -77,7 +91,6 @@ a { text-decoration: none; }
77
91
  .item-thumbnail { @include position(absolute, .5em 0 0 .5em); width: 3.1em; height: 3.1em; }
78
92
  .item-thumbnail img { width: 100%; border-radius: 1.55em; }
79
93
 
80
-
81
94
  /* Search ------------------------------------------------------------------ */
82
95
  .search {
83
96
  @include position(absolute, 0 0 null null);
@@ -85,7 +98,13 @@ a { text-decoration: none; }
85
98
  height : 40px; // @todo: refactor to em
86
99
  overflow : hidden;
87
100
 
88
- .icon { @include position(absolute, 0 null null 0); }
101
+ .icon {
102
+ @include position(absolute, 0 null null 0);
103
+ text-align: center;
104
+ line-height: 40px;
105
+ width: 40px;
106
+ }
107
+
89
108
  .cancel { @include position(absolute, 0 1em null null); }
90
109
 
91
110
  input {
@@ -112,7 +131,6 @@ a { text-decoration: none; }
112
131
  }
113
132
  }
114
133
 
115
-
116
134
  /* View -------------------------------------------------------------------- */
117
135
  .view-saving .save { visibility : hidden; }
118
136
  .view-saving .spinner { visibility : visible; }
@@ -129,8 +147,6 @@ a { text-decoration: none; }
129
147
  a { display : inline-block; }
130
148
  }
131
149
 
132
-
133
-
134
150
  /* Mobile ------------------------------------------------------------------ */
135
151
  .header {
136
152
  @include position(fixed, 0 null null null);
@@ -157,7 +173,6 @@ a { text-decoration: none; }
157
173
  z-index : 0;
158
174
  }
159
175
 
160
-
161
176
  /* Tablet ------------------------------------------------------------------ */
162
177
  @media #{$tablet} {
163
178
  body { overflow: hidden; }
@@ -189,7 +204,6 @@ a { text-decoration: none; }
189
204
  .module .list:first-child .back { display: none; }
190
205
  }
191
206
 
192
-
193
207
  /* Desktop ----------------------------------------------------------------- */
194
208
  @media #{$desktop} {
195
209
  .sidebar { width : 10em; }
@@ -204,7 +218,3 @@ a { text-decoration: none; }
204
218
 
205
219
  .list.list-aside .back { @include header-back-label; }
206
220
  }
207
-
208
-
209
-
210
-
@@ -1,5 +1,4 @@
1
1
  /* Mixins ------------------------------------------------------------------ */
2
-
3
2
  @mixin spinner {
4
3
  display : inline-block;
5
4
  border : .25em solid rgba(black, 0.2);
@@ -26,69 +25,25 @@
26
25
 
27
26
  @mixin header-back-label {
28
27
  @include position(absolute, 0 null null 1em);
29
- width : auto;
30
- &:before { display: none; }
31
- }
32
-
33
- /* Icons ------------------------------------------------------------------- */
34
-
35
- @mixin header-icon-base {
36
- display : block;
37
- width : 40px;
38
- height : 40px;
39
-
40
- &:before {
41
- content : '';
42
- display : block;
43
- width : 40px;
44
- height : 40px;
45
- background-repeat : no-repeat;
28
+ width: auto;
29
+ i {
30
+ display: none;
46
31
  }
47
- }
48
-
49
- @mixin icon-search($color) {
50
- @include header-icon-base;
51
-
52
- &:before {
53
- background-image : url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><circle cx='15' cy='15' r='10' stroke='#{ $color }' stroke-width='2' fill='transparent'></circle><line x1='22' y1='22' x2='30' y2='30' stroke-width='3' stroke='#{ $color }' /></svg>");
54
- background-size : 22px 22px;
55
- background-position : 8px 8px;
56
- }
57
- }
58
-
59
- @mixin icon-plus($color) {
60
- @include header-icon-base;
61
-
62
32
  &:before {
63
- background-image : url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><line x1='10' y1='0' x2='10' y2='20' stroke-width='2' stroke='#{ $color }' /><line x1='0' y1='10' x2='20' y2='10' stroke-width='2' stroke='#{ $color }' /></svg>");
64
- background-size : 20px 20px;
65
- background-position : 10px 10px;
33
+ display: inline;
66
34
  }
67
35
  }
68
36
 
69
- @mixin icon-folder($color) {
70
- @include header-icon-base;
71
-
72
- &:before {
73
- background-image : url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z' fill='#{ $color }'/></svg>");
74
- background-size : 10px 16px;
75
- background-position : 9px 12px;
76
- }
77
-
78
- @include transform(rotate(180deg));
37
+ @mixin header-icon-base {
38
+ width: 40px;
39
+ line-height: 40px;
40
+ text-align: center;
79
41
  }
80
42
 
81
- @mixin icon-arrow($color) {
82
- @include header-icon-base;
83
-
84
- &:before {
85
- background-image : url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z' fill='#{ $color }'/></svg>");
86
- background-size : 12px 20px;
87
- background-position : 12px 9px;
88
- }
43
+ @mixin item-icon-base {
44
+ @include position(absolute, 50% 0 null null);
45
+ margin-top: -20px;
46
+ line-height: 40px;
47
+ width: 30px;
48
+ text-align: center;
89
49
  }
90
-
91
-
92
-
93
-
94
-
@@ -1,47 +1,52 @@
1
1
  /* Settings ---------------------------------------------------------------- */
2
2
 
3
- $base-font-family : 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif !default;
4
-
5
- $thin : 100 !default;
6
- $light : 300 !default;
7
- $regular : 400 !default;
8
- $medium : 500 !default;
9
- $semibold : 600 !default;
10
- $bold : 700 !default;
11
- $extrabold : 800 !default;
12
- $black : 900 !default;
13
-
14
- $base-font-color : #2e2e2e !default;
15
- $positive-color : #4a87ee !default;
16
- $assertive-color : #ee5f4a !default;
17
- $border-color : #f6f6f6 !default;
18
-
19
- $sidebar-color : #aaa !default;
20
- $sidebar-bg-color : #222 !default;
21
- $sidebar-active-color : white !default;
22
- $sidebar-active-bg-color : #1a1a1a !default;
23
-
24
- $list-bg-color : #fafafa !default;
25
-
26
- $formagic-base-color : $base-font-color;
27
- $formagic-positive-color : $positive-color;
28
- $formagic-assertive-color : $assertive-color;
29
- $formagic-border-color : $border-color;
3
+ $base-font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif !default;
30
4
 
31
- /* Theme ------------------------------------------------------------------- */
5
+ $thin: 100 !default;
6
+ $light: 300 !default;
7
+ $regular: 400 !default;
8
+ $medium: 500 !default;
9
+ $semibold: 600 !default;
10
+ $bold: 700 !default;
11
+ $extrabold: 800 !default;
12
+ $black: 900 !default;
13
+
14
+ $white-color: #fff;
15
+
16
+ $base-font-color: #2e2e2e !default;
17
+ $positive-color: #4a87ee !default;
18
+ $assertive-color: #e32e2e !default;
19
+ $border-color: #f1f1f1 !default;
20
+
21
+ $sidebar-color: rgba(255, 255, 255, 0.5) !default;
22
+ $sidebar-bg-color: #414d65 !default;
23
+ $sidebar-active-color: $white-color !default;
24
+ $sidebar-active-bg-color: #29354f !default;
25
+
26
+ $list-bg-color: #fbfbfd !default;
27
+
28
+ $formagic-base-color: $base-font-color;
29
+ $formagic-positive-color: $positive-color;
30
+ $formagic-assertive-color: $assertive-color;
31
+ $formagic-border-color: $border-color;
32
32
 
33
+ /* Theme ------------------------------------------------------------------- */
33
34
  html {
34
- font-family : $base-font-family;
35
- color : $base-font-color;
35
+ font-family: $base-font-family;
36
+ color: $base-font-color;
36
37
  }
37
38
 
38
39
  a {
39
- color : $positive-color;
40
+ color: $positive-color;
40
41
  }
41
42
 
42
43
  .menu a {
43
- color : $base-font-color;
44
- padding : .75em 1em;
44
+ color: $base-font-color;
45
+ padding: .75em 1em;
46
+ }
47
+
48
+ .header .title {
49
+ font-size: .9em;
45
50
  }
46
51
 
47
52
  .header .title,
@@ -87,7 +92,7 @@ a {
87
92
  &:hover,
88
93
  &:active {
89
94
  background-color : $assertive-color;
90
- color : white;
95
+ color : $white-color;
91
96
  }
92
97
  }
93
98
 
@@ -108,16 +113,19 @@ a {
108
113
 
109
114
  &.active {
110
115
  background-color : $positive-color;
111
- color : white;
116
+ color : $white-color;
112
117
  &:hover {
113
- color : white;
118
+ color : $white-color;
114
119
  }
115
120
  }
116
121
  }
117
122
  }
118
123
 
119
- /* Sign in ----------------------------------------------------------------- */
124
+ .search input {
125
+ font-size: .9em;
126
+ }
120
127
 
128
+ /* Sign in ----------------------------------------------------------------- */
121
129
  .signin-modal {
122
130
  @include position(relative);
123
131
 
@@ -137,7 +145,7 @@ a {
137
145
  }
138
146
 
139
147
  input[type=submit] {
140
- background-color : white;
148
+ background-color : $white-color;
141
149
  border-radius : .25em;
142
150
  padding : 1em 3em;
143
151
  display : block;
@@ -147,7 +155,7 @@ a {
147
155
 
148
156
  &:hover {
149
157
  background-color : $positive-color;
150
- color : white;
158
+ color : $white-color;
151
159
  }
152
160
  }
153
161
 
@@ -162,49 +170,47 @@ a {
162
170
  }
163
171
 
164
172
  /* Icons ------------------------------------------------------------------- */
173
+ .list-search .search .icon,
174
+ .icon-reorder,
175
+ .icon-folder {
176
+ color: lighten($base-font-color, 50%);
177
+ }
165
178
 
166
- .search .icon { @include icon-search($positive-color); }
167
- .list-search .search .icon { @include icon-search(lighten($base-font-color, 40%)); }
168
-
169
- .header .new { @include icon-plus($positive-color); }
170
-
171
- .icon-reorder { @include icon-reorder(lighten($base-font-color, 50%)); }
172
- .icon-folder { @include icon-folder(lighten($base-font-color, 50%)); }
173
-
174
- .slip-reordering > .icon-reorder:before,
175
- .slip-reordering > .icon-reorder:after { background-color: $positive-color; }
176
-
177
- .header .back, .header .close { @include icon-arrow($positive-color); }
179
+ .header .back,
180
+ .header .close {
181
+ &:before {
182
+ content: 'Close';
183
+ }
184
+ }
178
185
 
179
186
  /* Layouts ----------------------------------------------------------------- */
180
-
181
187
  @media #{$tablet} {
182
188
  .sidebar {
183
- background-color : $sidebar-bg-color;
189
+ background-color: $sidebar-bg-color;
184
190
  }
185
191
 
186
192
  .menu a {
187
- border-left : 2px solid $sidebar-bg-color;
188
- color : $sidebar-color;
193
+ border-left: 2px solid $sidebar-bg-color;
194
+ color: $sidebar-color;
189
195
  &:hover {
190
- background-color : $sidebar-active-bg-color;
191
- border-color : $sidebar-active-bg-color;
192
- color : $sidebar-active-color;
196
+ background-color: $sidebar-active-bg-color;
197
+ border-color: $sidebar-active-bg-color;
198
+ color: $sidebar-active-color;
193
199
  }
194
200
  &.active {
195
- background-color : $sidebar-active-bg-color;
196
- border-color : $positive-color;
197
- color : $sidebar-active-color;
201
+ background-color: $sidebar-active-bg-color;
202
+ border-color: $white-color;
203
+ color: $sidebar-active-color;
198
204
  }
199
205
  }
200
206
 
201
207
  .admin-devise_overrides-passwords,
202
208
  .admin-devise_overrides-sessions {
203
- background-color : $list-bg-color;
209
+ background-color: $list-bg-color;
204
210
  }
205
211
 
206
212
  .signin-modal {
207
- background : white;
213
+ background : $white-color;
208
214
  max-width : 26em;
209
215
  border : 1px solid $border-color;
210
216
  margin : 5em auto 1em;
@@ -220,9 +226,9 @@ a {
220
226
  background-color : $list-bg-color;
221
227
  }
222
228
  &.list-aside {
223
- background-color : white;
229
+ background-color : $white-color;
224
230
  .header {
225
- background-color : white;
231
+ background-color : $white-color;
226
232
  }
227
233
  }
228
234
  }
@@ -1,5 +1,5 @@
1
1
  module Chr
2
2
  RAILS_VERSION = "~> 4.2.5"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "0.4.18"
4
+ VERSION = "0.4.19"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.18
4
+ version: 0.4.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kravets
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-19 00:00:00.000000000 Z
13
+ date: 2015-11-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails