rails_modular_admin 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +71 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/config/rails_modular_admin_manifest.js +2 -0
  6. data/app/assets/javascripts/index.js +87 -0
  7. data/app/assets/javascripts/rails_modular_admin.js +3 -0
  8. data/app/assets/javascripts/rails_modular_admin/_common/_helpers/code-helper.js +36 -0
  9. data/app/assets/javascripts/rails_modular_admin/_common/_helpers/for-helper.js +8 -0
  10. data/app/assets/javascripts/rails_modular_admin/_common/_helpers/is-helper.js +98 -0
  11. data/app/assets/javascripts/rails_modular_admin/_common/_helpers/times-helper.js +11 -0
  12. data/app/assets/javascripts/rails_modular_admin/_common/animations/animations.js +14 -0
  13. data/app/assets/javascripts/rails_modular_admin/_common/items-list/items-list.js +19 -0
  14. data/app/assets/javascripts/rails_modular_admin/_common/nprogress/nprogress.js +9 -0
  15. data/app/assets/javascripts/rails_modular_admin/_common/sameheight-items/sameheight-items.js +44 -0
  16. data/app/assets/javascripts/rails_modular_admin/app.js +1429 -0
  17. data/app/assets/javascripts/rails_modular_admin/app/_common/editor/editor-helper.js +10 -0
  18. data/app/assets/javascripts/rails_modular_admin/app/_common/editor/editor.js +34 -0
  19. data/app/assets/javascripts/rails_modular_admin/app/_common/header/nav/nav.js +14 -0
  20. data/app/assets/javascripts/rails_modular_admin/app/_common/modals/modal-media/modal-media.js +23 -0
  21. data/app/assets/javascripts/rails_modular_admin/app/_common/sidebar/customize/customize.js +155 -0
  22. data/app/assets/javascripts/rails_modular_admin/app/_common/sidebar/sidebar.js +38 -0
  23. data/app/assets/javascripts/rails_modular_admin/app/charts/charts-flot/charts-flot.js +329 -0
  24. data/app/assets/javascripts/rails_modular_admin/app/charts/charts-morris/charts-morris.js +125 -0
  25. data/app/assets/javascripts/rails_modular_admin/app/dashboard/history/history.js +145 -0
  26. data/app/assets/javascripts/rails_modular_admin/app/dashboard/items/items.js +41 -0
  27. data/app/assets/javascripts/rails_modular_admin/app/dashboard/sales-breakdown/sales-breakdown.js +37 -0
  28. data/app/assets/javascripts/rails_modular_admin/app/dashboard/sales-by-countries/sales-by-countries.js +50 -0
  29. data/app/assets/javascripts/rails_modular_admin/app/dashboard/tasks/tasks.js +13 -0
  30. data/app/assets/javascripts/rails_modular_admin/app/forms/input-groups/input-groups.js +14 -0
  31. data/app/assets/javascripts/rails_modular_admin/app/items/editor/item-editor.js +34 -0
  32. data/app/assets/javascripts/rails_modular_admin/app/items/list/items-list.js +44 -0
  33. data/app/assets/javascripts/rails_modular_admin/app/pages/error.js +18 -0
  34. data/app/assets/javascripts/rails_modular_admin/auth/login/login.js +35 -0
  35. data/app/assets/javascripts/rails_modular_admin/auth/reset/reset.js +31 -0
  36. data/app/assets/javascripts/rails_modular_admin/auth/signup/signup.js +88 -0
  37. data/app/assets/javascripts/rails_modular_admin/config.js +51 -0
  38. data/app/assets/javascripts/rails_modular_admin/main.js +16 -0
  39. data/app/assets/javascripts/rails_modular_admin/vendor.js +60485 -0
  40. data/app/assets/stylesheets/rails_modular_admin.scss +1 -0
  41. data/app/assets/stylesheets/rails_modular_admin/_common/_styles/_mixins.scss +103 -0
  42. data/app/assets/stylesheets/rails_modular_admin/_common/_styles/layout.scss +74 -0
  43. data/app/assets/stylesheets/rails_modular_admin/_common/_styles/misc.scss +115 -0
  44. data/app/assets/stylesheets/rails_modular_admin/_common/_styles/typography.scss +60 -0
  45. data/app/assets/stylesheets/rails_modular_admin/_common/alert/alert.scss +27 -0
  46. data/app/assets/stylesheets/rails_modular_admin/_common/animations/animations.scss +4 -0
  47. data/app/assets/stylesheets/rails_modular_admin/_common/button/button.scss +117 -0
  48. data/app/assets/stylesheets/rails_modular_admin/_common/card/card.scss +200 -0
  49. data/app/assets/stylesheets/rails_modular_admin/_common/chart/chart.scss +9 -0
  50. data/app/assets/stylesheets/rails_modular_admin/_common/dropdown/dropdown.scss +28 -0
  51. data/app/assets/stylesheets/rails_modular_admin/_common/flex/flex.scss +14 -0
  52. data/app/assets/stylesheets/rails_modular_admin/_common/form/form.scss +235 -0
  53. data/app/assets/stylesheets/rails_modular_admin/_common/images-container/images-container.scss +129 -0
  54. data/app/assets/stylesheets/rails_modular_admin/_common/items-list/items-list.scss +388 -0
  55. data/app/assets/stylesheets/rails_modular_admin/_common/logo/logo.scss +46 -0
  56. data/app/assets/stylesheets/rails_modular_admin/_common/modal/modal-tabs.scss +27 -0
  57. data/app/assets/stylesheets/rails_modular_admin/_common/navigation/navigation.scss +114 -0
  58. data/app/assets/stylesheets/rails_modular_admin/_common/nprogress/nprogress.scss +22 -0
  59. data/app/assets/stylesheets/rails_modular_admin/_common/pagination/pagination.scss +20 -0
  60. data/app/assets/stylesheets/rails_modular_admin/_common/sameheight-items/sameheight-items.scss +5 -0
  61. data/app/assets/stylesheets/rails_modular_admin/_common/scrollbar/scrollbar.scss +24 -0
  62. data/app/assets/stylesheets/rails_modular_admin/_common/table/table.scss +12 -0
  63. data/app/assets/stylesheets/rails_modular_admin/_main.scss +41 -0
  64. data/app/assets/stylesheets/rails_modular_admin/_themes/blue-theme.scss +1 -0
  65. data/app/assets/stylesheets/rails_modular_admin/_themes/custom-theme.scss +0 -0
  66. data/app/assets/stylesheets/rails_modular_admin/_themes/green-theme.scss +10 -0
  67. data/app/assets/stylesheets/rails_modular_admin/_themes/orange-theme.scss +12 -0
  68. data/app/assets/stylesheets/rails_modular_admin/_themes/purple-theme.scss +6 -0
  69. data/app/assets/stylesheets/rails_modular_admin/_themes/red-theme.scss +11 -0
  70. data/app/assets/stylesheets/rails_modular_admin/_themes/seagreen-theme.scss +9 -0
  71. data/app/assets/stylesheets/rails_modular_admin/_variables.scss +109 -0
  72. data/app/assets/stylesheets/rails_modular_admin/app/_common/editor/editor.scss +28 -0
  73. data/app/assets/stylesheets/rails_modular_admin/app/_common/footer/footer.scss +68 -0
  74. data/app/assets/stylesheets/rails_modular_admin/app/_common/header/buttons/buttons.scss +30 -0
  75. data/app/assets/stylesheets/rails_modular_admin/app/_common/header/collapse/collapse.scss +23 -0
  76. data/app/assets/stylesheets/rails_modular_admin/app/_common/header/header.scss +33 -0
  77. data/app/assets/stylesheets/rails_modular_admin/app/_common/header/nav/nav.scss +64 -0
  78. data/app/assets/stylesheets/rails_modular_admin/app/_common/header/nav/notifications/notifications.scss +126 -0
  79. data/app/assets/stylesheets/rails_modular_admin/app/_common/header/nav/profile/profile.scss +93 -0
  80. data/app/assets/stylesheets/rails_modular_admin/app/_common/header/search/search.scss +68 -0
  81. data/app/assets/stylesheets/rails_modular_admin/app/_common/modals/modal-media/modal-media.scss +56 -0
  82. data/app/assets/stylesheets/rails_modular_admin/app/_common/modals/modals.scss +19 -0
  83. data/app/assets/stylesheets/rails_modular_admin/app/_common/sidebar/customize/customize.scss +157 -0
  84. data/app/assets/stylesheets/rails_modular_admin/app/_common/sidebar/header/header.scss +14 -0
  85. data/app/assets/stylesheets/rails_modular_admin/app/_common/sidebar/sidebar.scss +240 -0
  86. data/app/assets/stylesheets/rails_modular_admin/app/app.scss +72 -0
  87. data/app/assets/stylesheets/rails_modular_admin/app/charts/charts-flot/charts-flot.scss +18 -0
  88. data/app/assets/stylesheets/rails_modular_admin/app/dashboard/dashboard.scss +7 -0
  89. data/app/assets/stylesheets/rails_modular_admin/app/dashboard/history/history.scss +6 -0
  90. data/app/assets/stylesheets/rails_modular_admin/app/dashboard/items/items-header.scss +81 -0
  91. data/app/assets/stylesheets/rails_modular_admin/app/dashboard/items/items-list.scss +102 -0
  92. data/app/assets/stylesheets/rails_modular_admin/app/dashboard/sales-breakdown/sales-breakdown.scss +7 -0
  93. data/app/assets/stylesheets/rails_modular_admin/app/dashboard/sales-by-countries/sales-by-countries.scss +14 -0
  94. data/app/assets/stylesheets/rails_modular_admin/app/dashboard/stats/stats.scss +70 -0
  95. data/app/assets/stylesheets/rails_modular_admin/app/dashboard/tasks/tasks.scss +47 -0
  96. data/app/assets/stylesheets/rails_modular_admin/app/items/editor/item-editor.scss +3 -0
  97. data/app/assets/stylesheets/rails_modular_admin/app/items/list/items-list.scss +330 -0
  98. data/app/assets/stylesheets/rails_modular_admin/app/pages/error.scss +73 -0
  99. data/app/assets/stylesheets/rails_modular_admin/app/pages/screenful/screenful.scss +101 -0
  100. data/app/assets/stylesheets/rails_modular_admin/app/tables/responsive-tables/responsive-tables.scss +77 -0
  101. data/app/assets/stylesheets/rails_modular_admin/application.scss +26 -0
  102. data/app/assets/stylesheets/rails_modular_admin/auth/auth.scss +72 -0
  103. data/app/controllers/rails_modular_admin/application_controller.rb +5 -0
  104. data/app/helpers/rails_modular_admin/application_helper.rb +4 -0
  105. data/app/jobs/rails_modular_admin/application_job.rb +4 -0
  106. data/app/mailers/rails_modular_admin/application_mailer.rb +6 -0
  107. data/app/models/rails_modular_admin/application_record.rb +5 -0
  108. data/app/views/layouts/rails_modular_admin/application.html.erb +16 -0
  109. data/config/initializers/assets.rb +1 -0
  110. data/config/routes.rb +2 -0
  111. data/lib/generators/rails_modular_admin/USAGE +8 -0
  112. data/lib/generators/rails_modular_admin/install_generator.rb +12 -0
  113. data/lib/generators/rails_modular_admin/templates/custom-theme.scss +14 -0
  114. data/lib/rails_modular_admin.rb +11 -0
  115. data/lib/rails_modular_admin/engine.rb +5 -0
  116. data/lib/rails_modular_admin/version.rb +3 -0
  117. data/lib/tasks/rails_modular_admin_tasks.rake +47 -0
  118. metadata +205 -0
@@ -0,0 +1,129 @@
1
+ .images-container {
2
+ @include clearfix();
3
+
4
+ // padding-top: 30px;
5
+
6
+ .image-container {
7
+ float: left;
8
+ padding: 3px;
9
+ margin-right: 10px;
10
+ margin-bottom: 35px;
11
+ position: relative;
12
+ border: 1px solid lighten($color-divider, 5%);
13
+ overflow: hidden;
14
+ // box-shadow: 0 0 3px #BFBFBF;
15
+ // border-radius: 3px;
16
+
17
+
18
+ &.active {
19
+ border-color: $color-primary;
20
+ }
21
+
22
+ // .controls {
23
+ // transition: opacity .2s ease;
24
+ // opacity: 0;
25
+ // }
26
+
27
+ &:hover {
28
+ .controls {
29
+ bottom: 0;
30
+ opacity: 1;
31
+ }
32
+ }
33
+ }
34
+
35
+ .controls {
36
+ position: absolute;
37
+ left: 0;
38
+ right: 0;
39
+ opacity: 0;
40
+ bottom: -35px;
41
+ text-align: center;
42
+ height: 35px;
43
+ // background-color: lighten($color-divider, 8%);
44
+ font-size: 24px;
45
+ transition: bottom 0.2s ease, opacity 0.2s ease;
46
+ background-color: #fff;
47
+
48
+ @include clearfix();
49
+
50
+ .control-btn {
51
+ display: inline-block;
52
+ color: $color-text;
53
+ // border-radius: 3px;
54
+ cursor: pointer;
55
+ width: 35px;
56
+ height: 35px;
57
+ line-height: 35px;
58
+ text-align: center;
59
+ // color: $color-text-inverse;
60
+ opacity: 0.5;
61
+ transition: opacity 0.3s ease;
62
+
63
+ &:hover {
64
+ opacity: 1;
65
+ }
66
+
67
+
68
+
69
+ &.move {
70
+ cursor: move;
71
+ }
72
+
73
+ &.star {
74
+ color: #FFB300;
75
+
76
+ i:before{
77
+ content: "\f006";
78
+ }
79
+
80
+ &.active {
81
+ i:before{
82
+ content: "\f005";
83
+ }
84
+ }
85
+ }
86
+
87
+ &.remove {
88
+ color: $color-danger;
89
+ }
90
+ }
91
+ }
92
+
93
+ .image {
94
+ background-size: cover;
95
+ background-position: center;
96
+ background-repeat: no-repeat;
97
+ width: 130px;
98
+ height: 135px;
99
+ // cursor: pointer;
100
+ line-height: 135px;
101
+ text-align: center;
102
+
103
+
104
+
105
+ &:active {
106
+
107
+ }
108
+ }
109
+
110
+ .image-container.main {
111
+ border-color: #FFB300;
112
+ }
113
+
114
+ .image-container.new {
115
+ opacity: 0.6;
116
+ transition: opacity 0.3s ease;
117
+ border-style: dashed;
118
+ border: 1px $color-primary solid;
119
+ color: $color-primary;
120
+
121
+ .image {
122
+ font-size: 2.5rem;
123
+ }
124
+
125
+ &:hover {
126
+ opacity: 1;
127
+ }
128
+ }
129
+ }
@@ -0,0 +1,388 @@
1
+ $item-list-padding-x: 10px !default;
2
+ $item-list-padding-y: 10px !default;
3
+ $item-list-line-height: 1.4rem !default;
4
+ $item-list-col-grow: 3 !default;
5
+ $item-list-col-shrink: 3 !default;
6
+
7
+ /* *******************************************
8
+ * Item List general styles
9
+ ********************************************** */
10
+
11
+ .item-list {
12
+ list-style: none;
13
+ padding: 0;
14
+ margin: 0;
15
+ margin-bottom: 0;
16
+ line-height: $item-list-line-height;
17
+
18
+ @include media(lg) {
19
+ font-size: 1rem;
20
+ }
21
+
22
+ @include media(md) {
23
+ font-size: 0.95rem;
24
+ }
25
+
26
+ @include media-down(sm) {
27
+ font-size: 1.05rem;
28
+ }
29
+
30
+ display: flex;
31
+ flex-flow: column nowrap;
32
+
33
+ &.striped {
34
+ & > li {
35
+ border-bottom: 1px solid $item-list-color-border;
36
+ }
37
+
38
+ & > li:nth-child(2n + 1) {
39
+ background-color: lighten($color-divider, 12%);
40
+
41
+ @include media-down(sm) {
42
+ background-color: lighten($color-divider, 11%);
43
+ }
44
+ }
45
+
46
+ .item-list-footer {
47
+ border-bottom: none;
48
+ }
49
+ }
50
+ }
51
+
52
+
53
+ /* *******************************************
54
+ * Item general styles
55
+ ********************************************** */
56
+
57
+
58
+ .item-list {
59
+ .item {
60
+ display: flex;
61
+ flex-direction: column;
62
+ }
63
+
64
+ .item-row {
65
+ display: flex;
66
+ align-items: stretch;
67
+ flex-direction: row;
68
+ justify-content: space-between;
69
+ flex-wrap: wrap;
70
+ min-width: 100%;
71
+
72
+ &.nowrap {
73
+ flex-wrap: nowrap;
74
+ }
75
+ }
76
+
77
+ .item-col {
78
+ align-items: center;
79
+ display: flex;
80
+ padding: $item-list-padding-y $item-list-padding-x $item-list-padding-y 0;
81
+ flex-basis: 0;
82
+ flex-grow: $item-list-col-grow;
83
+ flex-shrink: $item-list-col-shrink;
84
+ margin-left: auto;
85
+ margin-right: auto;
86
+ min-width: 0;
87
+
88
+ &.fixed {
89
+ flex-grow: 0;
90
+ flex-shrink: 0;
91
+ flex-basis: auto;
92
+ }
93
+
94
+ &.pull-left {
95
+ margin-right: auto;
96
+ }
97
+
98
+ &.pull-right {
99
+ margin-left: auto;
100
+ }
101
+
102
+ & > div {
103
+ width: 100%;
104
+ }
105
+
106
+ &:last-child {
107
+ padding-right: 0;
108
+ }
109
+ }
110
+
111
+ .no-overflow {
112
+ overflow: hidden;
113
+ }
114
+
115
+ .no-wrap {
116
+ overflow: hidden;
117
+ text-overflow: ellipsis;
118
+ white-space: nowrap;
119
+ }
120
+ }
121
+
122
+
123
+ /* *******************************************
124
+ * Item components
125
+ ********************************************** */
126
+
127
+
128
+ .item-list {
129
+
130
+ /********************************************
131
+ * Header
132
+ *********************************************/
133
+
134
+ .item-list-header {
135
+ .item-col.item-col-header {
136
+ span {
137
+ color: #999;
138
+ font-size: 0.8rem;
139
+ font-weight: 700 !important;
140
+ }
141
+ }
142
+ }
143
+
144
+ /********************************************
145
+ * Heading
146
+ *********************************************/
147
+
148
+ .item-heading {
149
+ font-size: 0.9rem;
150
+ display: none;
151
+ color: #666;
152
+ font-weight: 700;
153
+ padding-right: $item-list-padding-x;
154
+
155
+ @include media-down(sm) {
156
+ display: block;
157
+ }
158
+
159
+ @include media(sm) {
160
+ width: 100%;
161
+ }
162
+
163
+ @include media-down(xs) {
164
+ width: 40%;
165
+ }
166
+ }
167
+
168
+ /********************************************
169
+ * Checkbox
170
+ *********************************************/
171
+
172
+ .item-col.item-col-check {
173
+ flex-basis: 20px + $item-list-padding-x;
174
+
175
+ @include media-down(sm) {
176
+ order: -8;
177
+ }
178
+ }
179
+
180
+ .item-check {
181
+ margin-bottom: 0;
182
+
183
+ .checkbox + span {
184
+ padding-right: 0;
185
+
186
+ &:before {
187
+ width: 20px;
188
+ }
189
+ }
190
+ }
191
+
192
+ /********************************************
193
+ * Image
194
+ *********************************************/
195
+
196
+ .item-col.item-col-img {
197
+ display: flex;
198
+ flex-basis: 60px + $item-list-padding-x;
199
+
200
+ &.xs{
201
+ flex-basis: 30px + $item-list-padding-x;
202
+ }
203
+
204
+ &.sm {
205
+ flex-basis: 40px + $item-list-padding-x;
206
+ }
207
+
208
+ &.lg {
209
+ flex-basis: 90px + $item-list-padding-x;
210
+ }
211
+
212
+ &.xl {
213
+ flex-basis: 110px + $item-list-padding-x;
214
+ }
215
+
216
+ a {
217
+ width: 100%;
218
+ // display: flex;
219
+ }
220
+ }
221
+
222
+ .item-img {
223
+ flex-grow: 1;
224
+ align-self: stretch;
225
+ background-color: #efefef;
226
+ padding-bottom: 100%;
227
+ width: 100%;
228
+ height: 0;
229
+
230
+ @include bg-cover();
231
+ }
232
+
233
+ /********************************************
234
+ * Title
235
+ *********************************************/
236
+
237
+ .item-col.item-col-title {
238
+
239
+ @include media-down(sm) {
240
+ order: -4;
241
+ }
242
+
243
+ a {
244
+ display: block;
245
+ }
246
+ }
247
+
248
+ .item-title {
249
+ margin: 0;
250
+ font-size: inherit;
251
+ line-height: inherit;
252
+ font-weight: 600;
253
+ }
254
+
255
+ /********************************************
256
+ * Stats
257
+ *********************************************/
258
+
259
+ .item-stats {
260
+ height: $item-list-line-height;
261
+ }
262
+
263
+ /********************************************
264
+ * Actions
265
+ *********************************************/
266
+
267
+ .item-col.item-col-actions-dropdown {
268
+ flex-basis: 30px + $item-list-padding-x;
269
+ text-align: center;
270
+ padding-left: 0 !important;
271
+
272
+ @include media-down(sm) {
273
+ order: -3;
274
+
275
+ flex-basis: 30px + $item-list-padding-x !important;
276
+ padding-right: $item-list-padding-x;
277
+ }
278
+ }
279
+
280
+ .item-actions-dropdown {
281
+ position: relative;
282
+ font-size: 1.1rem;
283
+
284
+ &.active {
285
+ .item-actions-block {
286
+ max-width: 120px;
287
+ }
288
+
289
+ .item-actions-toggle-btn {
290
+ color: $color-primary;
291
+
292
+ .active {
293
+ display: block;
294
+ }
295
+
296
+ .inactive {
297
+ display: none;
298
+ }
299
+ }
300
+ }
301
+
302
+ .item-actions-toggle-btn {
303
+ color: lighten($color-text-light, 10);
304
+ font-size: 1.2rem;
305
+ cursor: pointer;
306
+ width: 100%;
307
+ line-height: 30px;
308
+ text-align: center;
309
+ text-decoration: none;
310
+
311
+ .active {
312
+ display: none;
313
+ }
314
+ }
315
+
316
+ .item-actions-block {
317
+ height: 30px;
318
+ max-width: 0px;
319
+ line-height: 30px;
320
+ overflow: hidden;
321
+ position: absolute;
322
+ top: 0;
323
+ right: 100%;
324
+ background-color: $color-divider;
325
+ border-radius: 3px;
326
+ transition: all 0.15s ease-in-out;
327
+
328
+ &.direction-right {
329
+ right: auto;
330
+ left: 100%;
331
+ }
332
+
333
+
334
+ .item-actions-list {
335
+ padding: 0;
336
+ list-style: none;
337
+ white-space: nowrap;
338
+ padding: 0 5px;
339
+
340
+ li{
341
+ display: inline-block;
342
+ padding: 0;
343
+ }
344
+
345
+ a {
346
+ display: block;
347
+ padding: 0 5px;
348
+
349
+ &.edit {
350
+ color: #38424C;
351
+ }
352
+
353
+ &.check {
354
+ color: #40B726;
355
+ }
356
+
357
+ &.remove {
358
+ color: #DB0E1E;
359
+ }
360
+ }
361
+ }
362
+ }
363
+
364
+ }
365
+
366
+ /********************************************
367
+ * Something else?
368
+ *********************************************/
369
+
370
+ }
371
+
372
+
373
+ /* *******************************************
374
+ * Adjustments
375
+ ********************************************** */
376
+
377
+ // Item which is located inside card inside item-list
378
+ .card > .item-list .item > .item-row {
379
+ padding: 0 $card-padding-x;
380
+
381
+ @include media-up(xl) {
382
+ padding: 0 $card-padding-x-xl;
383
+ }
384
+
385
+ @include media-down(sm) {
386
+ padding: 0 $card-padding-x-sm;
387
+ }
388
+ }