active_admin_face 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +21 -0
  4. data/app/assets/images/active_admin_face/logo.jpg +0 -0
  5. data/app/assets/javascripts/active_admin_face/base.js.coffee +34 -0
  6. data/app/assets/stylesheets/active_admin_face/_base.scss +38 -0
  7. data/app/assets/stylesheets/active_admin_face/_forms.scss +551 -0
  8. data/app/assets/stylesheets/active_admin_face/_header.scss +283 -0
  9. data/app/assets/stylesheets/active_admin_face/_mixins.scss +1 -0
  10. data/app/assets/stylesheets/active_admin_face/_typography.scss +250 -0
  11. data/app/assets/stylesheets/active_admin_face/components/_batch_actions.scss +13 -0
  12. data/app/assets/stylesheets/active_admin_face/components/_blank_slates.scss +32 -0
  13. data/app/assets/stylesheets/active_admin_face/components/_breadcrumbs.scss +27 -0
  14. data/app/assets/stylesheets/active_admin_face/components/_buttons.scss +16 -0
  15. data/app/assets/stylesheets/active_admin_face/components/_ckeditor.scss +6 -0
  16. data/app/assets/stylesheets/active_admin_face/components/_columns.scss +3 -0
  17. data/app/assets/stylesheets/active_admin_face/components/_comments.scss +52 -0
  18. data/app/assets/stylesheets/active_admin_face/components/_date_picker.scss +315 -0
  19. data/app/assets/stylesheets/active_admin_face/components/_dropdown_menu.scss +161 -0
  20. data/app/assets/stylesheets/active_admin_face/components/_flash_messages.scss +44 -0
  21. data/app/assets/stylesheets/active_admin_face/components/_grid.scss +57 -0
  22. data/app/assets/stylesheets/active_admin_face/components/_index_list.scss +12 -0
  23. data/app/assets/stylesheets/active_admin_face/components/_init.scss +16 -0
  24. data/app/assets/stylesheets/active_admin_face/components/_links.scss +8 -0
  25. data/app/assets/stylesheets/active_admin_face/components/_modal_dialog.scss +67 -0
  26. data/app/assets/stylesheets/active_admin_face/components/_nav.scss +64 -0
  27. data/app/assets/stylesheets/active_admin_face/components/_pagination.scss +70 -0
  28. data/app/assets/stylesheets/active_admin_face/components/_panels.scss +89 -0
  29. data/app/assets/stylesheets/active_admin_face/components/_popovers.scss +124 -0
  30. data/app/assets/stylesheets/active_admin_face/components/_scopes.scss +10 -0
  31. data/app/assets/stylesheets/active_admin_face/components/_status_tags.scss +28 -0
  32. data/app/assets/stylesheets/active_admin_face/components/_table_tools.scss +70 -0
  33. data/app/assets/stylesheets/active_admin_face/components/_tables.scss +305 -0
  34. data/app/assets/stylesheets/active_admin_face/mixins/_all.scss +11 -0
  35. data/app/assets/stylesheets/active_admin_face/mixins/_buttons.scss +71 -0
  36. data/app/assets/stylesheets/active_admin_face/mixins/_gradients.scss +52 -0
  37. data/app/assets/stylesheets/active_admin_face/mixins/_icons.scss +31 -0
  38. data/app/assets/stylesheets/active_admin_face/mixins/_reset.scss +214 -0
  39. data/app/assets/stylesheets/active_admin_face/mixins/_rounded.scss +42 -0
  40. data/app/assets/stylesheets/active_admin_face/mixins/_sections.scss +38 -0
  41. data/app/assets/stylesheets/active_admin_face/mixins/_select.scss +22 -0
  42. data/app/assets/stylesheets/active_admin_face/mixins/_shadows.scss +21 -0
  43. data/app/assets/stylesheets/active_admin_face/mixins/_utilities.scss +17 -0
  44. data/app/assets/stylesheets/active_admin_face/mixins/_variables.scss +69 -0
  45. data/app/assets/stylesheets/active_admin_face/pages/_logged_out.scss +96 -0
  46. data/app/assets/stylesheets/active_admin_face/print.scss +283 -0
  47. data/app/assets/stylesheets/active_admin_face/structure/_footer.scss +28 -0
  48. data/app/assets/stylesheets/active_admin_face/structure/_main_structure.scss +86 -0
  49. data/app/assets/stylesheets/active_admin_face/structure/_title_bar.scss +69 -0
  50. data/config/routes.rb +2 -0
  51. data/lib/active_admin_face.rb +11 -0
  52. data/lib/active_admin_face/version.rb +3 -0
  53. data/lib/generators/active_admin_face/variables/USAGE +8 -0
  54. data/lib/generators/active_admin_face/variables/variables_generator.rb +15 -0
  55. metadata +126 -0
@@ -0,0 +1,11 @@
1
+ @import "active_admin_face/mixins/variables";
2
+ @import "active_admin_face/mixins/reset";
3
+ @import "active_admin_face/mixins/gradients";
4
+ @import "active_admin_face/mixins/shadows";
5
+ @import "active_admin_face/mixins/icons";
6
+ @import "active_admin_face/mixins/rounded";
7
+ @import "active_admin_face/mixins/buttons";
8
+ @import "active_admin_face/mixins/sections";
9
+ @import "active_admin_face/mixins/select";
10
+ @import "active_admin_face/mixins/utilities";
11
+ @import "bourbon";
@@ -0,0 +1,71 @@
1
+ @mixin basic-button {
2
+ @include rounded(0);
3
+
4
+ display: inline-block;
5
+ font-weight: bold;
6
+ font-size: 1.0em;
7
+ font-family: $skinFontFamily;
8
+ line-height: 12px;
9
+ margin-right: 3px;
10
+ padding: 7px 16px 6px;
11
+ text-decoration: none;
12
+ -webkit-font-smoothing: antialiased;
13
+
14
+ &.disabled {
15
+ opacity: 0.5;
16
+ cursor: default;
17
+ }
18
+ }
19
+
20
+ @mixin default-button {
21
+ @include basic-button;
22
+
23
+ background: $primary-color;
24
+
25
+ // @include text-shadow(#000);
26
+ // box-shadow: 0 1px 1px rgba(0,0,0,0.10), 0 1px 0 0px rgba(255,255,255, 0.2) inset;
27
+ border: solid 1px #686868;
28
+ color: #efefef;
29
+
30
+ &:not(.disabled) {
31
+ &:hover {
32
+ background: darken($primary-color, 10%);
33
+ }
34
+
35
+ &:active {
36
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) inset, 0 1px 0 0px #FFF;
37
+
38
+ @include gradient(lighten($primary-color, 8%), darken($primary-color, 17%));
39
+ }
40
+ }
41
+ }
42
+
43
+ @mixin light-button {
44
+ @include basic-button;
45
+
46
+ background: $action-button-default-background;
47
+
48
+ @include border-colors(#d3d3d3, #c7c7c7, #c2c2c2);
49
+
50
+ color: $action-button-default-text;
51
+
52
+ &:not(.disabled) {
53
+ &:hover {
54
+ background: $action-button-hover-background;
55
+ color: $action-button-hover-text;
56
+ }
57
+
58
+ &:active {
59
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22) inset, 0 1px 0 0px #EEE;
60
+
61
+ @include border-colors(#c2c2c2, #b9b9b9, #b7b7b7);
62
+
63
+ background: $action-button-active-background;
64
+ color: $action-button-active-text;
65
+ }
66
+ }
67
+ }
68
+
69
+ @mixin dark-button {
70
+ @include default-button;
71
+ }
@@ -0,0 +1,52 @@
1
+ $secondary-gradient-start: #efefef !default;
2
+ $secondary-gradient-stop: #dfe1e2 !default;
3
+
4
+ @mixin gradient($start, $end) {
5
+ background: $start;
6
+ background: -webkit-linear-gradient(-90deg, $start, $end);
7
+ background: -moz-linear-gradient(-90deg, $start, $end);
8
+ background: linear-gradient(-90deg, $start, $end);
9
+
10
+ // IE 6 & 7
11
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start)}', endColorstr='#{ie-hex-str($end)}');
12
+
13
+ // IE 8
14
+ -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start)}', endColorstr='#{ie-hex-str($end)}');
15
+ }
16
+
17
+ @mixin header-background-gradient {
18
+ background: $page-header-background-color;
19
+ }
20
+
21
+ @mixin title-bar-gradient {
22
+ background: $title-bar-background;
23
+ }
24
+
25
+ @mixin primary-gradient {
26
+ // background: $secondary-color;
27
+ @include gradient(lighten($primary-color, 5%), darken($primary-color, 7%));
28
+
29
+ border-bottom: 1px solid darken($primary-color, 11%);
30
+ }
31
+
32
+ // @mixin secondary-gradient {
33
+ // @include gradient($secondary-gradient-start, $secondary-gradient-stop);
34
+ // }
35
+
36
+ @mixin highlight-gradient {
37
+ @include gradient(#75a1c2, #608cb4);
38
+ }
39
+
40
+ @mixin reverse-highlight-gradient {
41
+ @include gradient(#608cb4, #75a1c2);
42
+ }
43
+
44
+ @mixin no-gradient {
45
+ background: none;
46
+
47
+ // IE 6 & 7
48
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
49
+
50
+ // IE 8
51
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
52
+ }
@@ -0,0 +1,31 @@
1
+ span.icon {
2
+ vertical-align: middle;
3
+ display: inline-block;
4
+ }
5
+
6
+ span.icon svg {
7
+ vertical-align: baseline;
8
+ }
9
+
10
+ @mixin icon-color($color) {
11
+ span.icon svg {
12
+ path, polygon, rect, circle {
13
+ fill: $color !important;
14
+ }
15
+ }
16
+ }
17
+
18
+ @mixin icon-size($size) {
19
+ span.icon {
20
+ width: $size;
21
+ height: $size;
22
+ }
23
+ }
24
+
25
+ @mixin icon($color, $size) {
26
+ @include icon-color($color);
27
+
28
+ @include icon-size($size);
29
+ }
30
+
31
+ @include icon-size(0.8em);
@@ -0,0 +1,214 @@
1
+ // FROM The Compass Framework (compass-style.org)
2
+ //
3
+ // Copyright (c) 2009 Christopher M. Eppstein
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ // this software and associated documentation files (the "Software"), to deal in
7
+ // the Software without restriction, including without limitation the rights to
8
+ // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ // the Software, and to permit persons to whom the Software is furnished to do so,
10
+ // subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in all
13
+ // copies or substantial portions of the Software. No attribution is required by
14
+ // products that make use of this software.
15
+ //
16
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18
+ // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19
+ // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
+ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
+ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ //
23
+ // Except as contained in this notice, the name(s) of the above copyright holders
24
+ // shall not be used in advertising or otherwise to promote the sale, use or other
25
+ // dealings in this Software without prior written authorization.
26
+ //
27
+ // Contributors to this project agree to grant all rights to the copyright holder
28
+ // of the primary product. Attribution is maintained in the source control history
29
+ // of the product.
30
+ //
31
+ // Based on [Eric Meyer's reset](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/)
32
+ // Global reset rules.
33
+ // For more specific resets, use the reset mixins provided below
34
+ //
35
+ // *Please Note*: tables still need `cellspacing="0"` in the markup.
36
+ @mixin global-reset {
37
+ html, body, div, span, applet, object, iframe,
38
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
39
+ a, abbr, acronym, address, big, cite, code,
40
+ del, dfn, em, font, img, ins, kbd, q, s, samp,
41
+ small, strike, strong, sub, sup, tt, var,
42
+ dl, dt, dd, ol, ul, li,
43
+ fieldset, form, label, legend,
44
+ table, caption, tbody, tfoot, thead, tr, th, td {
45
+ @include reset-box-model;
46
+
47
+ @include reset-font;
48
+ }
49
+
50
+ body {
51
+ @include reset-body;
52
+ }
53
+
54
+ ol, ul {
55
+ @include reset-list-style;
56
+ }
57
+
58
+ table {
59
+ @include reset-table;
60
+ }
61
+
62
+ caption, th, td {
63
+ @include reset-table-cell;
64
+ }
65
+
66
+ q, blockquote {
67
+ @include reset-quotation;
68
+ }
69
+
70
+ a img {
71
+ @include reset-image-anchor-border;
72
+ }
73
+ }
74
+
75
+ // Reset all elements within some selector scope. To reset the selector itself,
76
+ // mixin the appropriate reset mixin for that element type as well. This could be
77
+ // useful if you want to style a part of your page in a dramatically different way.
78
+ //
79
+ // *Please Note*: tables still need `cellspacing="0"` in the markup.
80
+ @mixin nested-reset {
81
+ div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
82
+ pre, a, abbr, acronym, address, code, del, dfn, em, img,
83
+ dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
84
+ @include reset-box-model;
85
+
86
+ @include reset-font;
87
+ }
88
+
89
+ table {
90
+ @include reset-table;
91
+ }
92
+
93
+ caption, th, td {
94
+ @include reset-table-cell;
95
+ }
96
+
97
+ q, blockquote {
98
+ @include reset-quotation;
99
+ }
100
+
101
+ a img {
102
+ @include reset-image-anchor-border;
103
+ }
104
+ }
105
+
106
+ // Reset the box model measurements.
107
+ @mixin reset-box-model {
108
+ margin: 0;
109
+ padding: 0;
110
+ border: 0;
111
+ outline: 0;
112
+ }
113
+
114
+ // Reset the font and vertical alignment.
115
+ @mixin reset-font {
116
+ font: {
117
+ weight: inherit;
118
+ style: inherit;
119
+ size: 100%;
120
+ family: inherit;
121
+ };
122
+ vertical-align: baseline;
123
+ }
124
+
125
+ // Resets the outline when focus.
126
+ // For accessibility you need to apply some styling in its place.
127
+ @mixin reset-focus {
128
+ outline: 0;
129
+ }
130
+
131
+ // Reset a body element.
132
+ @mixin reset-body {
133
+ line-height: 1;
134
+ color: black;
135
+ background: white;
136
+ }
137
+
138
+ // Reset the list style of an element.
139
+ @mixin reset-list-style {
140
+ list-style: none;
141
+ }
142
+
143
+ // Reset a table
144
+ @mixin reset-table {
145
+ border-collapse: separate;
146
+ border-spacing: 0;
147
+ vertical-align: middle;
148
+ }
149
+
150
+ // Reset a table cell (`th`, `td`)
151
+ @mixin reset-table-cell {
152
+ text-align: left;
153
+ font-weight: normal;
154
+ vertical-align: middle;
155
+ }
156
+
157
+ // Reset a quotation (`q`, `blockquote`)
158
+ @mixin reset-quotation {
159
+ quotes: "" "";
160
+
161
+ &:before, &:after {
162
+ content: "";
163
+ }
164
+ }
165
+
166
+ // Resets the border.
167
+ @mixin reset-image-anchor-border {
168
+ border: none;
169
+ }
170
+
171
+ // Unrecognized elements are displayed inline.
172
+ // This reset provides a basic reset for html5 elements
173
+ // so they are rendered correctly in browsers that don't recognize them
174
+ // and reset in browsers that have default styles for them.
175
+ @mixin reset-html5 {
176
+ article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
177
+ @include reset-box-model;
178
+
179
+ display: block;
180
+ }
181
+ }
182
+
183
+ // Resets the display of inline and block elements to their default display
184
+ // according to their tag type. Elements that have a default display that varies across
185
+ // versions of html or browser are not handled here, but this covers the 90% use case.
186
+ // Usage Example:
187
+ //
188
+ // // Turn off the display for both of these classes
189
+ // .unregistered-only, .registered-only
190
+ // display: none
191
+ // // Now turn only one of them back on depending on some other context.
192
+ // body.registered
193
+ // +reset-display(".registered-only")
194
+ // body.unregistered
195
+ // +reset-display(".unregistered-only")
196
+ @mixin reset-display($selector: "", $important: false) {
197
+ #{append-selector(elements-of-type("inline"), $selector)} {
198
+ @if $important {
199
+ display: inline !important;
200
+ }
201
+ @else {
202
+ display: inline;
203
+ }
204
+ }
205
+
206
+ #{append-selector(elements-of-type("block"), $selector)} {
207
+ @if $important {
208
+ display: block !important;
209
+ }
210
+ @else {
211
+ display: block;
212
+ }
213
+ }
214
+ }
@@ -0,0 +1,42 @@
1
+ @mixin rounded($radius: 3px) {
2
+ -webkit-border-radius: $radius;
3
+ -moz-border-radius: $radius;
4
+ border-radius: $radius;
5
+ }
6
+
7
+ @mixin rounded-all($top-left: 3px, $top-right: 3px, $bottom-right: 3px, $bottom-left: 3px) {
8
+ border-top-right-radius: $top-right;
9
+ -moz-border-radius-topright: $top-right;
10
+ -webkit-border-top-right-radius: $top-right;
11
+ border-top-left-radius: $top-left;
12
+ -moz-border-radius-topleft: $top-left;
13
+ -webkit-border-top-left-radius: $top-left;
14
+ border-bottom-right-radius: $bottom-right;
15
+ -moz-border-radius-bottomright: $bottom-right;
16
+ -webkit-border-bottom-right-radius: $bottom-right;
17
+ border-bottom-left-radius: $bottom-left;
18
+ -moz-border-radius-bottomleft: $bottom-left;
19
+ -webkit-border-bottom-left-radius: $bottom-left;
20
+ }
21
+
22
+ @mixin rounded-top($radius: 3px) {
23
+ @include rounded(0);
24
+
25
+ border-top-right-radius: $radius;
26
+ border-top-left-radius: $radius;
27
+ -moz-border-radius-topright: $radius;
28
+ -moz-border-radius-topleft: $radius;
29
+ -webkit-border-top-right-radius: $radius;
30
+ -webkit-border-top-left-radius: $radius;
31
+ }
32
+
33
+ @mixin rounded-bottom($radius: 3px) {
34
+ @include rounded(0);
35
+
36
+ border-bottom-right-radius: $radius;
37
+ border-bottom-left-radius: $radius;
38
+ -moz-border-radius-bottomright: $radius;
39
+ -moz-border-radius-bottomleft: $radius;
40
+ -webkit-border-bottom-right-radius: $radius;
41
+ -webkit-border-bottom-left-radius: $radius;
42
+ }
@@ -0,0 +1,38 @@
1
+ @mixin section-header {
2
+ border-left: solid 1px #cdcdcd;
3
+ background: $title-bar-background;
4
+ font-size: 1.0em;
5
+ font-weight: bold;
6
+ line-height: 18px;
7
+ margin-bottom: 0.5em;
8
+ color: $section-header-text-color;
9
+
10
+ @include icon($section-header-text-color, 1em);
11
+
12
+ padding: 5px 10px 3px 10px;
13
+ }
14
+
15
+ @mixin section-background {
16
+ background: #fafafa;
17
+
18
+ @include rounded(4px);
19
+ }
20
+
21
+ @mixin section {
22
+ @include section-background;
23
+
24
+ margin-bottom: 20px;
25
+
26
+ > h3 {
27
+ @include section-header;
28
+ }
29
+
30
+ > div {
31
+ padding: 3px $section-padding $section-padding $section-padding;
32
+ }
33
+
34
+ hr {
35
+ border: none;
36
+ border-bottom: 1px solid #E8E8E8;
37
+ }
38
+ }