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,167 @@
1
+ table.index_table {
2
+ @extend %box;
3
+ background-color: $white;
4
+ border-collapse: separate;
5
+ width: 100%;
6
+
7
+ .centralized {
8
+ text-align: center;
9
+ }
10
+
11
+ tr:last-child {
12
+ td:first-child {
13
+ border-bottom-left-radius: $radius;
14
+ }
15
+
16
+ td:last-child {
17
+ border-bottom-right-radius: $radius;
18
+ }
19
+ }
20
+
21
+ th,
22
+ td {
23
+ padding: 12px 15px;
24
+ text-align: left;
25
+ vertical-align: middle;
26
+
27
+ &:last-child {
28
+ border-right: none;
29
+ }
30
+ }
31
+
32
+ thead th {
33
+ @extend %header;
34
+ border: 1px solid $silver;
35
+ border-width: 0 1px 1px 0;
36
+ vertical-align: bottom;
37
+
38
+ &:first-child {
39
+ border-top-left-radius: $radius;
40
+ }
41
+
42
+ &:last-child {
43
+ border-top-right-radius: $radius;
44
+ }
45
+
46
+ &:only-child {
47
+ border-radius: $radius $radius 0 0;
48
+ }
49
+
50
+ &.sortable a {
51
+ background: asset-url('active_admin/orderable.png') 0 6px no-repeat;
52
+ display: block;
53
+ padding-left: 12px;
54
+ }
55
+
56
+ &.sorted-asc,
57
+ &.sorted-desc {
58
+ background-color: shade($white, 10%);
59
+ background-image: linear-gradient(to bottom, shade($white, 10%), shade($white, 15%));
60
+ }
61
+
62
+ &.sorted-asc a {
63
+ background-position: 0 -25px;
64
+ }
65
+
66
+ &.sorted-desc a {
67
+ background-position: 0 -55px;
68
+ }
69
+
70
+ a {
71
+ text-decoration: none;
72
+ }
73
+ }
74
+
75
+ tbody {
76
+ tr {
77
+ &:nth-child(even) td {
78
+ background-color: shade($white, 2.5%);
79
+ }
80
+
81
+ &:hover td {
82
+ background-color: shade($white, 5%);
83
+ }
84
+
85
+ &:last-child td {
86
+ border-bottom: none;
87
+ }
88
+
89
+ &.selected td {
90
+ background-color: tint($yellow, 90%);
91
+ }
92
+ }
93
+
94
+ td {
95
+ background-color: $white;
96
+ border: 1px solid tint($silver, 35%);
97
+ border-width: 0 1px 1px 0;
98
+ transition: background 250ms;
99
+ }
100
+ }
101
+
102
+ .member_link {
103
+ background-image: asset-url('active_admin/actions.png');
104
+ display: inline-block;
105
+ height: 13px;
106
+ margin-right: 7px;
107
+ opacity: 0.75;
108
+ position: relative;
109
+ text-indent: -99999px;
110
+ top: 5px;
111
+ transition: all 250ms;
112
+ white-space: nowrap;
113
+ width: 16px;
114
+
115
+ &:hover {
116
+ opacity: 1;
117
+ }
118
+ }
119
+
120
+ .view_link {
121
+ background-position: -16px 0;
122
+ }
123
+
124
+ .edit_link {
125
+ background-position: -32px 0;
126
+ }
127
+
128
+ .delete_link {
129
+ background-position: -48px 0;
130
+ }
131
+ }
132
+
133
+ // Resource Attributes Table
134
+ .attributes_table {
135
+ overflow: hidden;
136
+
137
+ table {
138
+ width: 100%;
139
+ }
140
+
141
+ th,
142
+ td {
143
+ padding: 8px 0;
144
+ text-align: left;
145
+ }
146
+
147
+ th {
148
+ width: 200px;
149
+ }
150
+
151
+ tr + tr {
152
+ th,
153
+ td {
154
+ border-top: 1px solid tint($silver, 50%);
155
+ }
156
+ }
157
+
158
+ .empty {
159
+ font-size: 12px;
160
+ opacity: 0.5;
161
+ text-transform: uppercase;
162
+ }
163
+ }
164
+
165
+ .attributes_table table {
166
+
167
+ }
@@ -0,0 +1,42 @@
1
+ .tabs {
2
+ .nav-tabs {
3
+ @extend %header;
4
+ border: 1px solid $silver;
5
+ border-top-left-radius: $radius;
6
+ border-top-right-radius: $radius;
7
+ padding: 6px 15px 0;
8
+
9
+ @include clearfix;
10
+
11
+ li {
12
+ float: left;
13
+ padding: 9px 16px;
14
+ transition: background-color 250ms;
15
+
16
+ &:not(:first-of-type):not(.ui-tabs-active) {
17
+ border-left: 1px solid rgba($silver, 0.5);
18
+ }
19
+
20
+ &.ui-tabs-active {
21
+ background-color: shade($white, 2.5%);
22
+ border: 1px solid $silver;
23
+ border-bottom-width: 0;
24
+ border-radius: $radius $radius 0 0;
25
+ font-weight: bold;
26
+ margin-bottom: -1px;
27
+ padding: 9px 15px;
28
+ }
29
+
30
+ a {
31
+ outline: none;
32
+ text-decoration: none;
33
+ }
34
+ }
35
+ }
36
+
37
+ .ui-tabs-panel > fieldset.inputs {
38
+ border-top: 0;
39
+ border-top-left-radius: 0;
40
+ border-top-right-radius: 0;
41
+ }
42
+ }
@@ -0,0 +1,68 @@
1
+ .table_tools {
2
+ margin-bottom: 20px;
3
+ @include clearfix;
4
+
5
+ .dropdown_menu {
6
+ margin-right: 20px;
7
+ float: left;
8
+ }
9
+
10
+ // Scopes
11
+ .scopes {
12
+ float: left !important;
13
+ width: auto !important;
14
+ }
15
+
16
+ .scopes {
17
+ background-color: $white;
18
+ border: 1px solid $silver;
19
+ border-radius: $radius;
20
+ box-shadow: 0 0 5px rgba($black, 0.05);
21
+ font-size: 14px;
22
+ list-style: none;
23
+ margin: 0;
24
+ overflow: hidden;
25
+ padding: 0;
26
+
27
+ @include clearfix;
28
+ }
29
+
30
+ .scope {
31
+ float: left;
32
+ font-weight: bold;
33
+ text-align: center;
34
+
35
+ &.selected a {
36
+ background-color: $white;
37
+ background-image: linear-gradient(to bottom, shade($white, 5%), $white);
38
+ color: $black;
39
+
40
+ .count {
41
+ opacity: 0.75;
42
+ }
43
+ }
44
+
45
+ a {
46
+ background-color: $white;
47
+ background-image: linear-gradient(to bottom, $white, shade($white, 5%));
48
+ box-shadow: inset 0 1px 0 0 $white;
49
+ display: block;
50
+ padding: 12px 16px;
51
+ text-decoration: none;
52
+ }
53
+
54
+ &:not(.selected) a:hover {
55
+ background: $white;
56
+ }
57
+
58
+ .count {
59
+ font-weight: normal;
60
+ letter-spacing: -1px;
61
+ opacity: 0.5;
62
+ }
63
+
64
+ + .scope {
65
+ border-left: 1px solid $silver;
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,12 @@
1
+ .unsupported_browser {
2
+ padding: 10px 30px;
3
+ background-color: tint($yellow, 90%);
4
+ background-image: linear-gradient(to bottom, tint($yellow, 90%), tint($yellow, 80%));
5
+ border-bottom: 3px solid $yellow;
6
+ margin: 50px 0 -50px;
7
+ text-align: center;
8
+
9
+ h1 {
10
+ font-weight: bold;
11
+ }
12
+ }
@@ -0,0 +1,25 @@
1
+ @keyframes fade-in {
2
+ 0% {
3
+ opacity: 0;
4
+ }
5
+
6
+ 100% {
7
+ opacity: 1;
8
+ }
9
+ }
10
+
11
+ @keyframes scale-up {
12
+ 0% {
13
+ opacity: 0;
14
+ transform: scale(0.5);
15
+ }
16
+
17
+ 50% {
18
+ opacity: 1;
19
+ }
20
+
21
+ 100% {
22
+ opacity: 1;
23
+ transform: scale(1);
24
+ }
25
+ }
@@ -0,0 +1,44 @@
1
+ *,
2
+ *:before,
3
+ *:after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ html,
8
+ body {
9
+ min-height: 100%;
10
+ }
11
+
12
+ body {
13
+ background-color: $background-color;
14
+ color: $text-color;
15
+ font: $font-weight $font-size $font-family;
16
+ font-smoothing: $font-smoothing;
17
+ }
18
+
19
+ a {
20
+ color: inherit;
21
+ }
22
+
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6 {
29
+ font: $header-font-weight 1em $header-font-family;
30
+ line-height: $header-line-height;
31
+ }
32
+
33
+ ::selection {
34
+ background-color: $highlight-background;
35
+ color: $highlight-color;
36
+ }
37
+
38
+ //
39
+ #wrapper {
40
+ display: flex;
41
+ min-height: 100vh;
42
+ flex-direction: column;
43
+ width: 100%;
44
+ }
@@ -0,0 +1,15 @@
1
+ @mixin clearfix {
2
+ &:after {
3
+ clear: both;
4
+ content: '';
5
+ display: table;
6
+ }
7
+ }
8
+
9
+ @function tint($color, $percent){
10
+ @return mix(white, $color, $percent);
11
+ }
12
+
13
+ @function shade($color, $percent){
14
+ @return mix(black, $color, $percent);
15
+ }
@@ -0,0 +1,227 @@
1
+ /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
2
+
3
+ html {
4
+ font-family: sans-serif;
5
+ -ms-text-size-adjust: 100%;
6
+ -webkit-text-size-adjust: 100%;
7
+ }
8
+
9
+ body {
10
+ margin: 0;
11
+ }
12
+
13
+ article,
14
+ aside,
15
+ details,
16
+ figcaption,
17
+ figure,
18
+ footer,
19
+ header,
20
+ main,
21
+ menu,
22
+ nav,
23
+ section,
24
+ summary {
25
+ display: block;
26
+ }
27
+
28
+ audio,
29
+ canvas,
30
+ progress,
31
+ video {
32
+ display: inline-block;
33
+ }
34
+
35
+ audio:not([controls]) {
36
+ display: none;
37
+ height: 0;
38
+ }
39
+
40
+ progress {
41
+ vertical-align: baseline;
42
+ }
43
+
44
+ template,
45
+ [hidden] {
46
+ display: none;
47
+ }
48
+
49
+ a {
50
+ background-color: transparent;
51
+ -webkit-text-decoration-skip: objects;
52
+ }
53
+
54
+ a:active,
55
+ a:hover {
56
+ outline-width: 0;
57
+ }
58
+
59
+ abbr[title] {
60
+ border-bottom: none;
61
+ text-decoration: underline;
62
+ text-decoration: underline dotted;
63
+ }
64
+
65
+ b,
66
+ strong {
67
+ font-weight: inherit;
68
+ }
69
+
70
+ b,
71
+ strong {
72
+ font-weight: bolder;
73
+ }
74
+
75
+ dfn {
76
+ font-style: italic;
77
+ }
78
+
79
+ h1 {
80
+ font-size: 2em;
81
+ margin: 0.67em 0;
82
+ }
83
+
84
+ mark {
85
+ background-color: #ff0;
86
+ color: #000;
87
+ }
88
+
89
+ small {
90
+ font-size: 80%;
91
+ }
92
+
93
+ sub,
94
+ sup {
95
+ font-size: 75%;
96
+ line-height: 0;
97
+ position: relative;
98
+ vertical-align: baseline;
99
+ }
100
+
101
+ sub {
102
+ bottom: -0.25em;
103
+ }
104
+
105
+ sup {
106
+ top: -0.5em;
107
+ }
108
+
109
+ img {
110
+ border-style: none;
111
+ }
112
+
113
+ svg:not(:root) {
114
+ overflow: hidden;
115
+ }
116
+
117
+ code,
118
+ kbd,
119
+ pre,
120
+ samp {
121
+ font-family: monospace, monospace;
122
+ font-size: 1em;
123
+ }
124
+
125
+ figure {
126
+ margin: 1em 40px;
127
+ }
128
+
129
+ hr {
130
+ box-sizing: content-box;
131
+ height: 0;
132
+ overflow: visible;
133
+ }
134
+
135
+ button,
136
+ input,
137
+ select,
138
+ textarea {
139
+ font: inherit;
140
+ margin: 0;
141
+ }
142
+
143
+ optgroup {
144
+ font-weight: bold;
145
+ }
146
+
147
+ button,
148
+ input {
149
+ overflow: visible;
150
+ }
151
+
152
+ button,
153
+ select {
154
+ text-transform: none;
155
+ }
156
+
157
+ button,
158
+ html [type="button"],
159
+ [type="reset"],
160
+ [type="submit"] {
161
+ -webkit-appearance: button;
162
+ }
163
+
164
+ button::-moz-focus-inner,
165
+ [type="button"]::-moz-focus-inner,
166
+ [type="reset"]::-moz-focus-inner,
167
+ [type="submit"]::-moz-focus-inner {
168
+ border-style: none;
169
+ padding: 0;
170
+ }
171
+
172
+ button:-moz-focusring,
173
+ [type="button"]:-moz-focusring,
174
+ [type="reset"]:-moz-focusring,
175
+ [type="submit"]:-moz-focusring {
176
+ outline: 1px dotted ButtonText;
177
+ }
178
+
179
+ fieldset {
180
+ border: 1px solid #c0c0c0;
181
+ margin: 0 2px;
182
+ padding: 0.35em 0.625em 0.75em;
183
+ }
184
+
185
+ legend {
186
+ box-sizing: border-box;
187
+ color: inherit;
188
+ display: table;
189
+ max-width: 100%;
190
+ padding: 0;
191
+ white-space: normal;
192
+ }
193
+
194
+ textarea {
195
+ overflow: auto;
196
+ }
197
+
198
+ [type="checkbox"],
199
+ [type="radio"] {
200
+ box-sizing: border-box;
201
+ padding: 0;
202
+ }
203
+
204
+ [type="number"]::-webkit-inner-spin-button,
205
+ [type="number"]::-webkit-outer-spin-button {
206
+ height: auto;
207
+ }
208
+
209
+ [type="search"] {
210
+ -webkit-appearance: textfield;
211
+ outline-offset: -2px;
212
+ }
213
+
214
+ [type="search"]::-webkit-search-cancel-button,
215
+ [type="search"]::-webkit-search-decoration {
216
+ -webkit-appearance: none;
217
+ }
218
+
219
+ ::-webkit-input-placeholder {
220
+ color: inherit;
221
+ opacity: 0.54;
222
+ }
223
+
224
+ ::-webkit-file-upload-button {
225
+ -webkit-appearance: button;
226
+ font: inherit;
227
+ }
@@ -0,0 +1,94 @@
1
+ //******************//
2
+ // Settings //
3
+ //******************//
4
+
5
+ //-----------------//
6
+ // Breakpoints //
7
+ //-----------------//
8
+ @function screen($breakpoints) {
9
+ $query: "only screen";
10
+ @each $property, $value in $breakpoints {
11
+ $query: "#{$query} and (#{$property}: #{$value})";
12
+ }
13
+
14
+ @return "#{$query}";
15
+ }
16
+
17
+ //--- Breakpoints ---//
18
+ $phone-breakpoint: 480px;
19
+ $tablet-breakpoint: 768px;
20
+
21
+ //--- Page Width ---//
22
+ $minimum-page-width: 320px;
23
+ $maximum-page-width: 1080px;
24
+
25
+ //--- Screens ---//
26
+ $phone-screen: screen((max-width: $phone-breakpoint));
27
+ $tablet-screen: screen((min-width: $phone-breakpoint + 1, max-width: $tablet-breakpoint));
28
+ $desktop-screen: screen((min-width: $tablet-breakpoint + 1));
29
+ $phone-and-tablet-screen: screen((max-width: $tablet-breakpoint));
30
+ $tablet-and-desktop-screen: screen((min-width: $tablet-breakpoint));
31
+
32
+ //--- Others Screens ---//
33
+ $phone-to-tablet-screen: screen((min-width: $phone-breakpoint + 1, max-width: $tablet-breakpoint - 1));
34
+ $tablet-to-desktop-screen: screen((min-width: $tablet-breakpoint + 1, max-width: $maximum-page-width - 1));
35
+ $largest-phone-screen: screen((max-width: $tablet-breakpoint - 1));
36
+ $largest-tablet-screen: screen((max-width: $maximum-page-width - 1));
37
+
38
+
39
+ //-----------//
40
+ // Fonts //
41
+ //-----------//
42
+ $font-smoothing: antialiased;
43
+
44
+ //--- Page ---//
45
+ $font-size: 16px;
46
+ $font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
47
+ $font-weight: normal;
48
+ $line-height: 1.5;
49
+
50
+ //--- Header ---//
51
+ $header-font-family: $font-family;
52
+ $header-font-weight: bold;
53
+ $header-line-height: 1.3;
54
+
55
+
56
+ //------------//
57
+ // Colors //
58
+ //------------//
59
+
60
+ $blue: #005fb2;
61
+ $green: #04844b;
62
+ $red: #a61a14;
63
+ $yellow: #ffb75d;
64
+
65
+ //--- Gray Scale ---//
66
+ $white: #ffffff;
67
+ $silver: #cccccc;
68
+ $gray: #3f3f3f;
69
+ $black: #000000;
70
+
71
+ //--- Emotive ---//
72
+ $positive-color: $green;
73
+ $negative-color: $red;
74
+ $info-color: $blue;
75
+ $warning-color: $yellow;
76
+
77
+ //--- Theme ---//
78
+ $primary-color: #4d5256;
79
+ $secondary-color: $silver;
80
+
81
+ //--- Page ---//
82
+ $background-color: #eeeeee;
83
+ $text-color: $gray;
84
+
85
+ //--- Highlighting ---//
86
+ $highlight-background: rgba($primary-color, 0.5);
87
+ $highlight-color: $white;
88
+
89
+
90
+ //-------------//
91
+ // Borders //
92
+ //-------------//
93
+ $radius: 4px;
94
+ $circular-radius: 500rem;
@@ -0,0 +1,14 @@
1
+ .footer {
2
+ background-color: $white;
3
+ border-top: 1px solid $silver;
4
+ box-shadow: 0 0 10px rgba($black, 0.1);
5
+ font-size: 12px;
6
+ line-height: 1;
7
+ margin-top: 20px;
8
+ padding: 20px 30px;
9
+ text-align: center;
10
+
11
+ p {
12
+ margin: 0;
13
+ }
14
+ }