formadmin 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +45 -0
  3. data/Gemfile +2 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +40 -0
  6. data/Rakefile +1 -0
  7. data/app/assets/stylesheets/formadmin/_formadmin.scss +11 -0
  8. data/app/assets/stylesheets/formadmin/atoms/_box.scss +6 -0
  9. data/app/assets/stylesheets/formadmin/atoms/_button.scss +28 -0
  10. data/app/assets/stylesheets/formadmin/atoms/_drag.scss +12 -0
  11. data/app/assets/stylesheets/formadmin/atoms/_header.scss +7 -0
  12. data/app/assets/stylesheets/formadmin/atoms/_input.scss +19 -0
  13. data/app/assets/stylesheets/formadmin/atoms/_turbolinks.scss +7 -0
  14. data/app/assets/stylesheets/formadmin/components/_blank.scss +19 -0
  15. data/app/assets/stylesheets/formadmin/components/_button.scss +28 -0
  16. data/app/assets/stylesheets/formadmin/components/_comments.scss +82 -0
  17. data/app/assets/stylesheets/formadmin/components/_datepicker.scss +100 -0
  18. data/app/assets/stylesheets/formadmin/components/_dropdown.scss +88 -0
  19. data/app/assets/stylesheets/formadmin/components/_flash.scss +41 -0
  20. data/app/assets/stylesheets/formadmin/components/_form.scss +329 -0
  21. data/app/assets/stylesheets/formadmin/components/_grid.scss +16 -0
  22. data/app/assets/stylesheets/formadmin/components/_indexes.scss +67 -0
  23. data/app/assets/stylesheets/formadmin/components/_modal.scss +66 -0
  24. data/app/assets/stylesheets/formadmin/components/_pagination.scss +76 -0
  25. data/app/assets/stylesheets/formadmin/components/_panel.scss +21 -0
  26. data/app/assets/stylesheets/formadmin/components/_status-tag.scss +38 -0
  27. data/app/assets/stylesheets/formadmin/components/_table.scss +167 -0
  28. data/app/assets/stylesheets/formadmin/components/_tabs.scss +42 -0
  29. data/app/assets/stylesheets/formadmin/components/_tools.scss +68 -0
  30. data/app/assets/stylesheets/formadmin/components/_unsupported_browser.scss +12 -0
  31. data/app/assets/stylesheets/formadmin/core/_animations.scss +25 -0
  32. data/app/assets/stylesheets/formadmin/core/_core.scss +44 -0
  33. data/app/assets/stylesheets/formadmin/core/_mixins.scss +15 -0
  34. data/app/assets/stylesheets/formadmin/core/_reset.scss +227 -0
  35. data/app/assets/stylesheets/formadmin/core/_settings.scss +94 -0
  36. data/app/assets/stylesheets/formadmin/layouts/_footer.scss +14 -0
  37. data/app/assets/stylesheets/formadmin/layouts/_header.scss +167 -0
  38. data/app/assets/stylesheets/formadmin/layouts/_main.scss +30 -0
  39. data/app/assets/stylesheets/formadmin/layouts/_title-bar.scss +66 -0
  40. data/app/assets/stylesheets/formadmin/pages/_logged-out.scss +45 -0
  41. data/bin/console +14 -0
  42. data/bin/setup +7 -0
  43. data/formadmin.gemspec +24 -0
  44. data/lib/formadmin/version.rb +3 -0
  45. data/lib/formadmin.rb +8 -0
  46. metadata +116 -0
@@ -0,0 +1,329 @@
1
+ form {
2
+
3
+ // Resets
4
+ ul,
5
+ ol,
6
+ li,
7
+ fieldset,
8
+ legend,
9
+ input,
10
+ select,
11
+ p {
12
+ margin: 0;
13
+ padding: 0;
14
+ }
15
+
16
+ ol,
17
+ li {
18
+ list-style: none;
19
+ }
20
+
21
+ fieldset {
22
+ border: 0;
23
+ margin-bottom: 20px;
24
+ position: relative;
25
+
26
+ &.inputs {
27
+ @extend %box;
28
+ }
29
+
30
+ &.actions {
31
+ margin: 0;
32
+
33
+ ol {
34
+ margin: 0;
35
+ text-align: center;
36
+ }
37
+
38
+ li {
39
+ display: inline-block;
40
+ border-top: none;
41
+ margin-right: 15px;
42
+ padding: 0;
43
+ }
44
+ }
45
+ }
46
+
47
+ legend {
48
+ display: block;
49
+ left: -1px;
50
+ position: relative;
51
+
52
+ &,
53
+ span {
54
+ width: calc(100% + 2px);
55
+ }
56
+
57
+ span {
58
+ @extend %header;
59
+ border: 1px solid $silver;
60
+ border-radius: $radius $radius 0 0;
61
+ font-weight: bold;
62
+ display: block;
63
+ }
64
+ }
65
+
66
+ ol {
67
+ margin: 10px 0;
68
+ }
69
+
70
+ ol > li {
71
+ border-bottom: 1px solid rgba($silver, 0.25);
72
+ padding: 10px 15px;
73
+ @include clearfix;
74
+
75
+ label {
76
+ color: tint($text-color, 15%);
77
+ float: left;
78
+ font-weight: bold;
79
+ width: 20%;
80
+
81
+ abbr[title] {
82
+ border: none;
83
+ color: $negative-color;
84
+ opacity: 0.5;
85
+ padding-left: 2px;
86
+ text-decoration: none;
87
+ }
88
+ }
89
+
90
+ &:last-of-type {
91
+ border-bottom: none;
92
+ }
93
+ }
94
+
95
+ // Line
96
+ hr {
97
+ background-color: rgba($silver, 0.25);
98
+ background-image: linear-gradient(to right, transparent, transparentize($primary-color, 0.5), transparent);
99
+ border: 0;
100
+ clear: both;
101
+ float: left;
102
+ height: 1px;
103
+ margin: 10px 0 -11px;
104
+ width: 100%;
105
+ }
106
+
107
+ // Fields
108
+ input[type='text'],
109
+ input[type='password'],
110
+ input[type='email'],
111
+ input[type='number'],
112
+ input[type='url'],
113
+ input[type='tel'],
114
+ input[type='date'],
115
+ textarea {
116
+ @extend %input;
117
+ float: right;
118
+ width: calc(80% - 20px);
119
+ }
120
+
121
+ textarea {
122
+ height: 100px;
123
+ max-height: 200px;
124
+ min-height: 75px;
125
+ resize: vertical;
126
+ vertical-align: top;
127
+ }
128
+
129
+ input[type='checkbox'] {
130
+ appearance: none;
131
+ background-color: shade($white, 5%);
132
+ border: 1px solid $silver;
133
+ border-radius: $radius;
134
+ cursor: pointer;
135
+ height: 20px;
136
+ outline: none;
137
+ position: relative;
138
+ transition: border 250ms 150ms, padding 250ms;
139
+ width: 37px;
140
+ vertical-align: top;
141
+
142
+ &:after {
143
+ background-color: shade($white, 2.5%);
144
+ background-image: linear-gradient(to bottom, $white, shade($white, 5%));
145
+ border: 1px solid shade($silver, 15%);
146
+ box-shadow: 0 0 5px rgba($black, 0.05);
147
+ border-radius: $radius;
148
+ content: '';
149
+ cursor: pointer;
150
+ display: block;
151
+ height: 20px;
152
+ left: -1px;
153
+ position: absolute;
154
+ right: 16px;
155
+ top: -1px;
156
+ transition: border 250ms 150ms, left 250ms 100ms, right 150ms 175ms;
157
+ }
158
+
159
+ &:checked {
160
+ border-color: $positive-color;
161
+ box-shadow: inset 0 0 0 13px $positive-color;
162
+ padding-left: 18px;
163
+ transition: border 250ms, box-shadow 250ms, padding 250ms 150ms;
164
+
165
+ &:after {
166
+ border-color: $positive-color;
167
+ left: 16px;
168
+ right: -1px;
169
+ transition: border 250ms, left 150ms 250ms, right 250ms 175ms;
170
+ }
171
+ }
172
+ }
173
+
174
+ input[type='file'],
175
+ select {
176
+ margin-left: 20px;
177
+ }
178
+
179
+ .date_select,
180
+ .time_select,
181
+ .datetime_select {
182
+ fieldset {
183
+ margin: 0;
184
+
185
+ ol {
186
+ margin: 0 0 0 calc(20% + 20px);
187
+ }
188
+
189
+ ol > li {
190
+ border-top: none;
191
+ float: left;
192
+ margin-right: 5px;
193
+ padding: 0;
194
+ width: auto;
195
+
196
+ label {
197
+ display: none;
198
+ }
199
+
200
+ select {
201
+ margin-left: 0;
202
+ }
203
+ }
204
+ }
205
+ }
206
+
207
+ // Utils
208
+ .inline-hints,
209
+ .inline-errors {
210
+ clear: both;
211
+ font-size: 14px;
212
+ margin: 0 0 0 calc(20% + 20px);
213
+ padding-top: 2px;
214
+ }
215
+
216
+ .inline-hints {
217
+ color: rgba($text-color, 0.5);
218
+ transition: color 250ms;
219
+
220
+ img {
221
+ border-radius: $radius;
222
+ margin-top: 10px;
223
+ }
224
+ }
225
+
226
+ .inline-errors {
227
+ color: $negative-color;
228
+ }
229
+
230
+ .boolean {
231
+ label {
232
+ font-weight: normal;
233
+ padding-left: calc(20% + 20px);
234
+ width: 100%;
235
+
236
+ input[type='checkbox'] {
237
+ margin: -1px 5px 0 0;
238
+ }
239
+
240
+ input[type='radio'] {
241
+ margin: 2px 5px 0 0;
242
+ }
243
+ }
244
+ }
245
+ }
246
+
247
+ // Sidebar
248
+ .sidebar_section {
249
+ .boolean label,
250
+ label {
251
+ color: rgba($text-color, 0.75);
252
+ display: block;
253
+ font-size: 12px;
254
+ font-weight: bold;
255
+ padding-left: 0;
256
+ margin-bottom: 3px;
257
+ text-transform: uppercase;
258
+ }
259
+
260
+ select {
261
+ margin-left: 0;
262
+ width: 100%;
263
+ }
264
+
265
+ input[type='text'],
266
+ input[type='password'],
267
+ input[type='email'],
268
+ input[type='url'],
269
+ input[type='tel'],
270
+ textarea {
271
+ font-size: 12px;
272
+ padding: 2px 3px;
273
+ width: 100%;
274
+ }
275
+ }
276
+
277
+ // Filter
278
+ form.filter_form {
279
+ .filter_form_field {
280
+ padding: 10px 15px;
281
+ @include clearfix;
282
+
283
+ &.select_and_search {
284
+ select,
285
+ input[type='text'] {
286
+ width: calc(50% - 5px);
287
+ }
288
+ }
289
+
290
+ &.filter_date_range {
291
+ .separator,
292
+ input[type='text'] {
293
+ display: inline-block;
294
+ float: none;
295
+ }
296
+
297
+ .seperator {
298
+ text-align: center;
299
+ }
300
+
301
+ input[type='text'] {
302
+ background-image: asset-url('active_admin/datepicker/datepicker-input-icon.png');
303
+ background-position: 100% 3px;
304
+ background-repeat: no-repeat;
305
+ padding-right: 25px;
306
+ width: calc(50% - 9px);
307
+ }
308
+ }
309
+
310
+ + .filter_form_field {
311
+ border-top: 1px solid tint($silver, 35%);
312
+ }
313
+ }
314
+
315
+ .buttons {
316
+ border-top: 1px solid $silver;
317
+ text-align: center;
318
+ padding: 12px 15px;
319
+
320
+ a.clear_filters_btn {
321
+ margin-left: 5px;
322
+ }
323
+
324
+ input[type='submit'],
325
+ a.clear_filters_btn {
326
+ padding: 5px 10px;
327
+ }
328
+ }
329
+ }
@@ -0,0 +1,16 @@
1
+ table.index_grid td {
2
+ border: none;
3
+ background: none;
4
+ margin: 0;
5
+ padding: 0 20px 20px 0;
6
+ }
7
+
8
+ .columns {
9
+ clear: both;
10
+ margin-bottom: 10px;
11
+ padding: 0;
12
+
13
+ .column {
14
+ float: left;
15
+ }
16
+ }
@@ -0,0 +1,67 @@
1
+ // Selection Toggler
2
+ .resource_selection_toggle_panel {
3
+ margin-bottom: 20px;
4
+ @include clearfix;
5
+
6
+ .resource_selection_toggle_cell {
7
+ float: left;
8
+ margin: 3px 5px 0 0;
9
+ }
10
+ }
11
+
12
+ // Blog
13
+ .index_as_blog {
14
+ .resource_selection_toggle_cell {
15
+ margin-left: 15px;
16
+ }
17
+
18
+ .banner {
19
+ @extend %box;
20
+ overflow: hidden;
21
+ position: relative;
22
+
23
+ .resource_selection_cell {
24
+ left: 15px;
25
+ position: absolute;
26
+ top: 13px;
27
+ }
28
+
29
+ h3 {
30
+ @extend %header;
31
+ margin: 0;
32
+ padding-left: 60px;
33
+ }
34
+
35
+ .content {
36
+ padding: 15px;
37
+ }
38
+
39
+ .meta {
40
+ border-top: 1px solid $silver;
41
+ color: rgba($text-color, 0.5);
42
+ font-size: 14px;
43
+ margin-top: 15px;
44
+ padding-top: 15px;
45
+ }
46
+
47
+ + .banner {
48
+ margin-top: 20px;
49
+ }
50
+ }
51
+ }
52
+
53
+ // Grid
54
+ .index_as_grid {
55
+ .banner {
56
+ transition: transform 250ms;
57
+
58
+ &:hover {
59
+ transform: scale(1.05);
60
+ }
61
+
62
+ img {
63
+ border-radius: $radius;
64
+ display: block;
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,66 @@
1
+ // Overlay
2
+ .ui-widget-overlay {
3
+ animation: fade-in 250ms;
4
+ position: fixed;
5
+ background: rgba($white, 0.9);
6
+ backdrop-filter: blur(3px);
7
+ bottom: 0;
8
+ left: 0;
9
+ right: 0;
10
+ top: 0;
11
+ z-index: 1001;
12
+ }
13
+
14
+ // Dialog
15
+ .ui-dialog {
16
+ @extend %box;
17
+ animation: scale-up 250ms 50ms forwards;
18
+ opacity: 0;
19
+ outline: 0;
20
+ overflow: hidden;
21
+ position: fixed;
22
+ transform-origin: center;
23
+ z-index: 1002;
24
+
25
+ .ui-dialog-titlebar {
26
+ @extend %header;
27
+
28
+ span {
29
+ font-size: 18px;
30
+ }
31
+ }
32
+
33
+ ul {
34
+ list-style-type: none;
35
+ }
36
+
37
+ li {
38
+ @include clearfix;
39
+ margin: 10px 0;
40
+ }
41
+
42
+ label {
43
+ float: left;
44
+ width: 20%;
45
+ }
46
+
47
+ form,
48
+ .ui-dialog-buttonpane {
49
+ padding: 8px 15px 12px;
50
+ text-align: center;
51
+ }
52
+
53
+ .ui-dialog-buttonpane button {
54
+ &:first-of-type {
55
+ @extend %primary-button;
56
+ }
57
+
58
+ + button {
59
+ margin-left: 5px;
60
+ }
61
+ }
62
+ }
63
+
64
+ .active_admin_dialog.ui-dialog .ui-dialog-titlebar-close {
65
+ display: none;
66
+ }
@@ -0,0 +1,76 @@
1
+ .paginated_collection {
2
+ margin-bottom: 20px;
3
+ }
4
+
5
+ .paginated_collection_contents {
6
+ @include clearfix;
7
+ }
8
+
9
+ #index_footer {
10
+ margin-top: 20px;
11
+ }
12
+
13
+ .pagination,
14
+ .pagination_information,
15
+ .pagination_per_page,
16
+ .download_links {
17
+ font-size: 12px;
18
+ }
19
+
20
+ // Information
21
+ .pagination_information {
22
+ color: rgba($text-color, 0.75);
23
+ float: right;
24
+
25
+ b {
26
+ color: $text-color;
27
+ }
28
+ }
29
+
30
+ // Per Page
31
+ .pagination_per_page {
32
+ float: right;
33
+ margin-left: 20px;
34
+
35
+ select {
36
+ padding: 1px 5px;
37
+ }
38
+ }
39
+
40
+ // Download Links
41
+ .download_links {
42
+ float: left;
43
+ }
44
+
45
+ // Pagination
46
+ .pagination {
47
+ font-weight: bold;
48
+ margin: 0 0 -20px 20px;
49
+ text-align: center;
50
+ text-transform: uppercase;
51
+
52
+ a,
53
+ .current {
54
+ background-color: shade($white, 5%);
55
+ background-image: linear-gradient(to bottom, $white, shade($white, 5%));
56
+ border: 1px solid $silver;
57
+ border-radius: $radius;
58
+ box-shadow: 1px 1px 1px rgba($black, 0.05), inset 0 1px 0 0 $white;
59
+ display: inline-block;
60
+ padding: 6px 10px 5px;
61
+ text-decoration: none;
62
+ transition: background-color 250ms;
63
+ margin: 0 1px;
64
+ }
65
+
66
+ a:not(.current):hover {
67
+ background: $white;
68
+ }
69
+
70
+ .current {
71
+ background: $primary-color;
72
+ border-color: shade($primary-color, 10%);
73
+ box-shadow: inset 0 1px 5px 0 rgba($black, 0.25);
74
+ color: $white;
75
+ }
76
+ }
@@ -0,0 +1,21 @@
1
+ .panel,
2
+ .section,
3
+ .sidebar_section {
4
+ @extend %box;
5
+ margin-bottom: 20px;
6
+ overflow: hidden;
7
+
8
+ h3 {
9
+ @extend %header;
10
+ margin: 0;
11
+ }
12
+
13
+ hr {
14
+ border: none;
15
+ border-bottom: 1px solid $silver;
16
+ }
17
+
18
+ > div {
19
+ padding: 15px;
20
+ }
21
+ }
@@ -0,0 +1,38 @@
1
+ .status_tag {
2
+ background: $silver;
3
+ border-radius: $radius;
4
+ color: $white;
5
+ display: inline-block;
6
+ font-size: 12px;
7
+ letter-spacing: 1px;
8
+ padding: 3px 5px 2px 5px;
9
+ text-transform: uppercase;
10
+
11
+ &.ok,
12
+ &.published,
13
+ &.complete,
14
+ &.completed,
15
+ &.green {
16
+ background: $positive-color;
17
+ }
18
+
19
+ &.error,
20
+ &.errored,
21
+ &.red {
22
+ background: $negative-color;
23
+ }
24
+
25
+ &.warn,
26
+ &.warning,
27
+ &.orange {
28
+ background: $warning-color;
29
+ }
30
+
31
+ &.yes {
32
+ background-color: $info-color;
33
+ }
34
+
35
+ &.no {
36
+ background-color: $gray;
37
+ }
38
+ }