light_admin 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +7 -0
  3. data/CHANGELOG.md +5 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +5 -0
  6. data/Gemfile.lock +123 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +122 -0
  9. data/Rakefile +2 -0
  10. data/app/assets/javascripts/light_admin/filters_toggle.js +21 -0
  11. data/app/assets/stylesheets/light_admin/_rules.scss +50 -0
  12. data/app/assets/stylesheets/light_admin/base.scss +34 -0
  13. data/app/assets/stylesheets/light_admin/components/_breadcrumbs.scss +3 -0
  14. data/app/assets/stylesheets/light_admin/components/_buttons.scss +358 -0
  15. data/app/assets/stylesheets/light_admin/components/_comments.scss +66 -0
  16. data/app/assets/stylesheets/light_admin/components/_datepicker_calendar.scss +29 -0
  17. data/app/assets/stylesheets/light_admin/components/_flash_messages.scss +23 -0
  18. data/app/assets/stylesheets/light_admin/components/_footer.scss +3 -0
  19. data/app/assets/stylesheets/light_admin/components/_forms.scss +242 -0
  20. data/app/assets/stylesheets/light_admin/components/_header.scss +149 -0
  21. data/app/assets/stylesheets/light_admin/components/_images.scss +21 -0
  22. data/app/assets/stylesheets/light_admin/components/_list.scss +5 -0
  23. data/app/assets/stylesheets/light_admin/components/_panels.scss +139 -0
  24. data/app/assets/stylesheets/light_admin/components/_sidebars.scss +49 -0
  25. data/app/assets/stylesheets/light_admin/components/_status_tag.scss +12 -0
  26. data/app/assets/stylesheets/light_admin/components/_tables.scss +144 -0
  27. data/app/assets/stylesheets/light_admin/components/_titles.scss +37 -0
  28. data/app/assets/stylesheets/light_admin/components/_toggle_filters.scss +20 -0
  29. data/app/assets/stylesheets/light_admin/variables/_borders.scss +14 -0
  30. data/app/assets/stylesheets/light_admin/variables/_colors.scss +32 -0
  31. data/app/assets/stylesheets/light_admin/variables/_font.scss +4 -0
  32. data/app/assets/stylesheets/light_admin/variables/_shadows.scss +4 -0
  33. data/app/assets/stylesheets/light_admin/views/_login.scss +108 -0
  34. data/app/assets/stylesheets/utilities/_flex.scss +18 -0
  35. data/app/assets/stylesheets/utilities/_sizing.scss +3 -0
  36. data/app/assets/stylesheets/utilities/_spacing.scss +22 -0
  37. data/app/views/active_admin/devise/sessions/new.html.erb +36 -0
  38. data/bin/console +14 -0
  39. data/bin/setup +8 -0
  40. data/doc/index-with-filter.png +0 -0
  41. data/doc/index-with-filter.png:Zone.Identifier +0 -0
  42. data/doc/index.png +0 -0
  43. data/doc/index.png:Zone.Identifier +0 -0
  44. data/doc/panel-with-link.png +0 -0
  45. data/doc/panel-with-link.png:Zone.Identifier +0 -0
  46. data/doc/show.png +0 -0
  47. data/doc/show.png:Zone.Identifier +0 -0
  48. data/lib/light_admin.rb +10 -0
  49. data/lib/light_admin/generators.rb +19 -0
  50. data/lib/light_admin/header.rb +30 -0
  51. data/lib/light_admin/panel_with_link.rb +17 -0
  52. data/lib/light_admin/version.rb +3 -0
  53. data/light_admin.gemspec +19 -0
  54. metadata +117 -0
@@ -0,0 +1,29 @@
1
+ .ui-datepicker {
2
+ box-shadow: $dropdown-shadow;
3
+ left: 1192px !important;
4
+ }
5
+
6
+ .ui-datepicker-calendar {
7
+ background: $bg-white;
8
+ border: $border-style-light;
9
+ border-top: none;
10
+ border-radius: 0 0 4px 4px;
11
+ color: $gray;
12
+ }
13
+
14
+ .ui-datepicker-header {
15
+ background: $global-text-color;
16
+ border-bottom: none;
17
+ border-radius: 4px 4px 0 0;
18
+ }
19
+
20
+ .ui-datepicker-calendar .ui-state-highlight {
21
+ color: $text-info;
22
+ font-weight: bold;
23
+ background: $light-gray;
24
+ padding: 1px 4px;
25
+ }
26
+
27
+ .ui-datepicker-calendar .ui-state-active {
28
+ color: $text-info;
29
+ }
@@ -0,0 +1,23 @@
1
+ body.logged_in .flash.flash_notice {
2
+ background: rgba($success, .3);
3
+ color: $text-success;
4
+ font-weight: bold;
5
+ text-shadow: none;
6
+ margin: auto;
7
+ margin-top: 20px;
8
+ width: 93%;
9
+ border-radius: $global-border-radius;
10
+ border: none;
11
+ }
12
+
13
+ body.logged_in .flash.flash_error {
14
+ background: rgba($danger, .3);
15
+ color: $text-danger;
16
+ font-weight: bold;
17
+ text-shadow: none;
18
+ margin: auto;
19
+ margin-top: 20px;
20
+ width: 93%;
21
+ border-radius: $global-border-radius;
22
+ border: none;
23
+ }
@@ -0,0 +1,3 @@
1
+ #index_footer {
2
+ padding-top: 0;
3
+ }
@@ -0,0 +1,242 @@
1
+ /* GLOBAL FORMS */
2
+ form {
3
+ fieldset {
4
+ legend {
5
+ span {
6
+ background: none;
7
+ border: none;
8
+ box-shadow: none;
9
+ color: inherit;
10
+ padding: 0 24px;
11
+ position: relative;
12
+ top: 30px;
13
+
14
+ &:empty {
15
+ display: none;
16
+ }
17
+ }
18
+ }
19
+
20
+ ol > li.boolean label {
21
+ padding-left: 0;
22
+ }
23
+ }
24
+ fieldset.inputs {
25
+ background: $bg-white;
26
+ margin: 1.5rem 0;
27
+ padding: 10px;
28
+ border-radius: $global-border-radius;
29
+ border: none;
30
+ box-shadow: $global-shadow;
31
+ }
32
+
33
+ fieldset.actions {
34
+ ol {
35
+ margin-top: 20px;
36
+ }
37
+ }
38
+
39
+ ol {
40
+ margin: 24px;
41
+ }
42
+
43
+ ol > li {
44
+ border-bottom: none;
45
+ padding: 0 0 2rem 0 !important;
46
+
47
+ label {
48
+ width: 100% !important;
49
+ margin-bottom: 5px;
50
+ font-weight: 500 !important;
51
+ }
52
+ }
53
+
54
+ .actions {
55
+ display: flex;
56
+ justify-content: center;
57
+ }
58
+
59
+ input[type='text'],
60
+ input[type='password'],
61
+ input[type='email'],
62
+ input[type='number'],
63
+ input[type='url'],
64
+ input[type='tel'],
65
+ input[type='date'],
66
+ textarea {
67
+ width: calc(100% - 24px);
68
+ height: 20px;
69
+ border: $border-style;
70
+ box-shadow: $field-shadow;
71
+ padding: 7.5px 10px;
72
+ font-family: $font-family;
73
+ }
74
+
75
+ textarea {
76
+ height: 200px;
77
+ }
78
+
79
+ input[type='file'] {
80
+ width: calc(100% - 14px);
81
+ margin-left: 0;
82
+ border: $border-style;
83
+ border-radius: 4px;
84
+ box-shadow: $field-shadow;
85
+ padding: 7.5px 5px;
86
+ font-family: $font-family;
87
+ }
88
+
89
+ select {
90
+ width: calc(100% - 2px);
91
+ margin-left: 0;
92
+ border: $border-style;
93
+ border-radius: 4px;
94
+ box-shadow: $field-shadow;
95
+ padding: 7.5px 5px;
96
+ font-family: $font-family;
97
+ }
98
+
99
+ input[type='checkbox'] {
100
+ background: $bg-light;
101
+ border: $border-style;
102
+ border-radius: 2px;
103
+ cursor: pointer;
104
+ height: 14px;
105
+ outline: unset;
106
+ position: relative;
107
+ transition: unset;
108
+ width: 14px;
109
+ vertical-align: middle;
110
+
111
+ &:after {
112
+ background: unset;
113
+ border: unset;
114
+ box-shadow: unset;
115
+ border-radius: unset;
116
+ height: unset;
117
+ left: unset;
118
+ right: unset;
119
+ top: unset;
120
+ transition: unset;
121
+ }
122
+
123
+ &:checked {
124
+ border: unset;
125
+ box-shadow: inset 0 0 0 14px $secondary;
126
+ padding: unset;
127
+ transition: unset;
128
+
129
+ &:after {
130
+ border-color: unset;
131
+ left: 1.5px;
132
+ right: unset;
133
+ transition: unset;
134
+ content: '\2714';
135
+ color: $text-white;
136
+ }
137
+ }
138
+ }
139
+ }
140
+
141
+ .tabs .ui-tabs-panel > fieldset.inputs {
142
+ border-radius: $global-border-radius;
143
+ }
144
+
145
+ /* FILTER FORM */
146
+ #filters_sidebar_section {
147
+ .sidebar_section
148
+ input[type=text] {
149
+ width: inherit;
150
+ }
151
+
152
+ .select2-container
153
+ .select2-selection--single {
154
+ width: 235px;
155
+ }
156
+
157
+ .select2-container--default .select2-selection--single
158
+ .select2-selection__arrow {
159
+ right: -38px;
160
+ }
161
+
162
+ .select2-container--open
163
+ .select2-dropdown--below {
164
+ width: 235px !important;
165
+ }
166
+
167
+ form.filter_form {
168
+ .filter_form_field {
169
+ padding: 24px 0 0 0;
170
+ margin: auto;
171
+ margin-top: 24px;
172
+ border-top: $border-style-light;
173
+ width: 90%;
174
+
175
+ &:first-child {
176
+ padding: 0;
177
+ border-top: none;
178
+ }
179
+ }
180
+
181
+ .filter_form_field.select_and_search input[type=text] {
182
+ margin-left: 0;
183
+ width: inherit;
184
+ }
185
+
186
+ .filter_form_field + .filter_form_field {
187
+ border-top: $border-style-light;
188
+ }
189
+ }
190
+
191
+ .filter_form_field.select_and_search
192
+ input[type='text'] {
193
+ width: calc(50% - 7px);
194
+ height: 20px;
195
+ }
196
+
197
+ .filter_form_field.filter_date_range
198
+ input[type=text] {
199
+ max-width: 112px !important;
200
+ }
201
+
202
+ .filter_form {
203
+ .select_and_search {
204
+ span {
205
+ display: none;
206
+ }
207
+ }
208
+
209
+ .filter_form_field.filter_date_range input[type='text'] {
210
+ height: 37px;
211
+ }
212
+ }
213
+ }
214
+
215
+ /* SIDEBAR FORM */
216
+ .sidebar_section {
217
+ input[type='text'] {
218
+ height: 20px;
219
+ }
220
+ }
221
+
222
+ /* ACTIVE ADMIN ADDONS CLASSES FORM */
223
+ .inputs .select2-container {
224
+ width: 100% !important;
225
+ }
226
+
227
+ .select2-container--default
228
+ .select2-selection--single {
229
+ border: $border-style;
230
+ }
231
+
232
+ .select2-container
233
+ .select2-selection--single {
234
+ height: 37px;
235
+ box-shadow: $field-shadow;
236
+ }
237
+
238
+ .select2-container--default
239
+ .select2-selection--single
240
+ .select2-selection__arrow {
241
+ height: 36px;
242
+ }
@@ -0,0 +1,149 @@
1
+ #header.header {
2
+ background: linear-gradient(to left, $primary, $secondary);
3
+ border-bottom: none;
4
+ box-shadow: none;
5
+ text-shadow: none;
6
+ position: unset;
7
+ height: 170px;
8
+ display: flex;
9
+ flex-direction: row;
10
+ justify-content: flex-start;
11
+ align-items: unset;
12
+ flex-wrap: nowrap;
13
+ padding: 10px 0;
14
+ z-index: unset;
15
+ backdrop-filter: unset;
16
+
17
+ h1 {
18
+ img {
19
+ top: 0;
20
+ }
21
+ }
22
+
23
+ .border-bottom-white-50 {
24
+ border-bottom: .5px solid $white-20;
25
+ }
26
+
27
+ #tabs {
28
+ width: unset;
29
+ margin-top: 20px;
30
+ }
31
+
32
+ ul.tabs {
33
+ display: flex;
34
+ flex-flow: row wrap;
35
+ }
36
+
37
+ /* Header's links dropdown style */
38
+ .header-item {
39
+ a {
40
+ color: $text-dark;
41
+ border-radius: 0;
42
+
43
+ &:hover {
44
+ background: none;
45
+ color: $text-info;
46
+ }
47
+ }
48
+
49
+ ul {
50
+ background: $bg-white;
51
+ margin-top: 34px;
52
+ border-radius : 4px;
53
+ padding: .25rem 0;
54
+ border: $border-style;
55
+ box-shadow: $dropdown-shadow;
56
+ right: 0;
57
+ position: absolute;
58
+ transform: scale(0);
59
+ transform-origin: right top;
60
+ transition: opacity 250ms, transform 250ms;
61
+ }
62
+
63
+ .has_nested {
64
+ &:hover > ul {
65
+ height: auto;
66
+ opacity: 1;
67
+ transform: scale(1);
68
+ }
69
+ }
70
+ }
71
+
72
+ ul.tabs > li.has_nested > a {
73
+ background: none;
74
+ }
75
+
76
+ ul.tabs > li.has_nested > a:before {
77
+ background: none;
78
+ border: 3px solid transparent;
79
+ border-right: 0;
80
+ border-left-color: $white;
81
+ content: '';
82
+ position: absolute;
83
+ top: 45%;
84
+ transform: rotate(90deg);
85
+ right: 10px;
86
+ }
87
+
88
+ .header-item > li.has_nested:hover > a:before {
89
+ color: $text-info;
90
+ border-left-color: $info;
91
+ }
92
+
93
+ .header-item > li.has_nested.current > a:before {
94
+ border-left-color: $white;
95
+ }
96
+
97
+ .header-item > li {
98
+ margin: 0 30px 20px 0;
99
+
100
+ &:last-child {
101
+ margin: 0;
102
+ }
103
+ }
104
+
105
+ .header-item > li > a {
106
+ padding: 10px 0;
107
+ margin: 0;
108
+ color: $header-item-li-color;
109
+ font-weight: 500;
110
+ }
111
+
112
+ .site_title {
113
+ color: $text-white;
114
+ padding: 0;
115
+ }
116
+
117
+ .tabs {
118
+ margin: 0;
119
+ border-radius: 0;
120
+ box-shadow: none;
121
+ }
122
+
123
+ ul.tabs > li {
124
+ ul {
125
+ display: unset;
126
+ }
127
+ }
128
+
129
+ ul.tabs > li.current > a {
130
+ background: none;
131
+ border-radius: 0;
132
+ border-bottom: 1px $white solid;
133
+ }
134
+
135
+ ul.tabs > li:hover > a {
136
+ background: none;
137
+ color: $text-info;
138
+ border-radius: 0;
139
+ border-bottom: 1px $info solid;
140
+ }
141
+
142
+ #utility_nav {
143
+ width: unset;
144
+ display: flex;
145
+ flex-wrap: wrap;
146
+ justify-content: flex-end;
147
+ padding-right: 0;
148
+ }
149
+ }