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,73 @@
1
+ .error-card {
2
+ width: 410px;
3
+ min-height: 330px;
4
+ margin: 60px auto;
5
+
6
+ .error-title {
7
+ font-size: 150px;
8
+ line-height: 150px;
9
+ font-weight: 700;
10
+ color: #252932;
11
+ text-align: center;
12
+ text-shadow: rgba(61, 61, 61, 0.3) .5px .5px, rgba(61, 61, 61, 0.2) 1px 1px, rgba(61, 61, 61, 0.3) 1.5px 1.5px;
13
+ }
14
+
15
+ .error-sub-title {
16
+ font-weight: 100;
17
+ text-align: center;
18
+ }
19
+
20
+ .error-container {
21
+ text-align: center;
22
+ visibility: hidden;
23
+
24
+ &.visible {
25
+ visibility: visible;
26
+ }
27
+ }
28
+
29
+ &.global {
30
+ position: absolute;
31
+ top: 50%;
32
+ left: 50%;
33
+ transform: translateY(-50%) translateX(-50%);
34
+ margin: 0;
35
+
36
+ .error-title {
37
+ color: #ffffff;
38
+ }
39
+
40
+ .error-sub-title,
41
+ .error-container {
42
+ color: #ffffff;
43
+ }
44
+ }
45
+ }
46
+
47
+ @include media(md) {
48
+ .error-card {
49
+ width: 50%;
50
+
51
+ &.global {
52
+ position: relative;
53
+ top: 25%;
54
+ left: 0;
55
+ transform: inherit;
56
+ margin: 40px auto;
57
+ }
58
+ }
59
+ }
60
+
61
+ @include media-down(sm) {
62
+ .error-card {
63
+ width: 90%;
64
+
65
+ &.global {
66
+ position: relative;
67
+ top: 25%;
68
+ left: 0;
69
+ transform: inherit;
70
+ margin: 40px auto;
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,101 @@
1
+ .screenful-page {
2
+
3
+ .section {
4
+ text-align: center;
5
+ }
6
+
7
+ .subtitle {
8
+ margin-bottom: 30px;
9
+ }
10
+
11
+ .description {
12
+ margin-bottom: 50px;
13
+ }
14
+
15
+ .screenful-logo {
16
+ width: 300px;
17
+ height: 160px;
18
+ border-radius: 10px;
19
+ background-size: cover;
20
+ background-position: center;
21
+ background-image: url('../assets/screenful/logo.png');
22
+ background-repeat: no-repeat;
23
+ display: inline-block;
24
+ margin-bottom: 20px;
25
+ }
26
+
27
+ .integrations {
28
+
29
+
30
+ }
31
+
32
+ .integrations-tools {
33
+ width: 100%;
34
+ display: flex;
35
+ justify-content: center;
36
+ flex-wrap: wrap;
37
+ }
38
+
39
+ .integrations-title {
40
+ margin-bottom: 40px;
41
+ }
42
+
43
+ .integration-item {
44
+ margin: 0 1%;
45
+ margin-bottom: 30px;
46
+ }
47
+
48
+ .integration-logo {
49
+ width: 190px;
50
+ height: 90px;
51
+ border: 1px solid #fff;
52
+ border-radius: 10px;
53
+ transition: all .25s ease;
54
+ }
55
+
56
+ .integration-logo:hover {
57
+ border: 1px solid #6769d4;
58
+ }
59
+
60
+
61
+
62
+ .benefits-title {
63
+ margin-bottom: 70px;
64
+ }
65
+
66
+ .screen-colum {
67
+ display: flex;
68
+ justify-content: center;
69
+ }
70
+
71
+ .screen-item {
72
+ max-width: 500px;
73
+ }
74
+
75
+ .ex-pic {
76
+ width: 100%;
77
+ border-radius: 10px;
78
+ background-size: cover;
79
+ }
80
+
81
+ .title {
82
+ margin-bottom: 20px;
83
+ }
84
+
85
+ a {
86
+ text-decoration: none;
87
+ }
88
+
89
+ ul {
90
+ display: inline-block;
91
+ text-align: left;
92
+ width: 100%;
93
+ }
94
+
95
+ .divider {
96
+ background-color: #fff;
97
+ padding-bottom: 1px;
98
+ margin-bottom: 50px;
99
+ }
100
+
101
+ }
@@ -0,0 +1,77 @@
1
+ .table-flip-scroll table {
2
+ width: 100%
3
+ }
4
+
5
+ @media only screen and (max-width: 800px) {
6
+
7
+ .table-flip-scroll .flip-content:after,
8
+ .table-flip-scroll .flip-header:after {
9
+ visibility: hidden;
10
+ display: block;
11
+ font-size: 0;
12
+ content: " ";
13
+ clear: both;
14
+ height: 0
15
+ }
16
+ .table-flip-scroll html .flip-content,
17
+ .table-flip-scroll html .flip-header {
18
+ -ms-zoom: 1;
19
+ zoom: 1
20
+ }
21
+ .table-flip-scroll *:first-child+html .flip-content,
22
+ .table-flip-scroll *:first-child+html .flip-header {
23
+ -ms-zoom: 1;
24
+ zoom: 1
25
+ }
26
+ .table-flip-scroll table {
27
+ width: 100%;
28
+ border-collapse: collapse;
29
+ border-spacing: 0;
30
+ display: block;
31
+ position: relative
32
+ }
33
+ .table-flip-scroll th,
34
+ .table-flip-scroll td {
35
+ margin: 0;
36
+ vertical-align: top
37
+ }
38
+ .table-flip-scroll th:last-child,
39
+ .table-flip-scroll td:last-child {
40
+ border-bottom: 1px solid #ddd
41
+ }
42
+ .table-flip-scroll th {
43
+ border: 0 !important;
44
+ border-right: 1px solid #ddd !important;
45
+ //font-size: 13px !important;
46
+ //padding: 5px;
47
+ width: auto !important;
48
+ display: block;
49
+ text-align: right;
50
+ }
51
+ .table-flip-scroll td {
52
+ display: block;
53
+ text-align: left;
54
+ border: 0 !important;
55
+ border-bottom: 1px solid #ddd !important;
56
+ }
57
+ .table-flip-scroll thead {
58
+ display: block;
59
+ float: left
60
+ }
61
+ .table-flip-scroll thead tr {
62
+ display: block;
63
+ }
64
+ .table-flip-scroll tbody {
65
+ display: block;
66
+ width: auto;
67
+ position: relative;
68
+ overflow-x: auto;
69
+ white-space: nowrap
70
+ }
71
+ .table-flip-scroll tbody tr {
72
+ display: inline-block;
73
+ vertical-align: top;
74
+ margin-left: -5px;
75
+ border-left: 1px solid #ddd
76
+ }
77
+ }
@@ -0,0 +1,26 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ */
14
+ @import 'animate.css/animate.css';
15
+
16
+ @import 'jqvmap/dist/jqvmap';
17
+ @import 'metismenu/dist/metisMenu';
18
+ @import 'nprogress/nprogress';
19
+ @import 'dropzone/dist/dropzone.css';
20
+ @import 'quill/dist/quill.core.css';
21
+ @import 'quill/dist/quill.snow.css';
22
+ @import 'morris.js/morris.css';
23
+ @import 'bootstrap/dist/css/bootstrap.css';
24
+
25
+ @import "/\*";
26
+ @import "/**/*";
@@ -0,0 +1,72 @@
1
+ .auth {
2
+ position: absolute;
3
+ width: 100%;
4
+ height: 100%;
5
+ left: 0;
6
+ background-color: #667380;
7
+ overflow-x: hidden;
8
+ overflow-y: auto;
9
+ }
10
+
11
+ .auth-container {
12
+ width: 450px;
13
+ min-height: 330px;
14
+ position: absolute;
15
+ top: 50%;
16
+ left: 50%;
17
+ transform: translateY(-50%) translateX(-50%);
18
+
19
+ .auth-header {
20
+ //background-color: $color-primary;
21
+ text-align: center;
22
+ border-bottom: 1px solid $color-primary;
23
+ }
24
+
25
+ .auth-title {
26
+ color: #97A4B1;
27
+ padding: 20px;
28
+ line-height: 30px;
29
+ font-size: 26px;
30
+ font-weight: 600;
31
+ margin: 0;
32
+ }
33
+
34
+ .auth-content {
35
+ padding: 30px 50px;
36
+ min-height: 260px;
37
+ }
38
+
39
+ .forgot-btn {
40
+ line-height: 28px;
41
+ }
42
+
43
+ .checkbox {
44
+ label {
45
+ padding: 0;
46
+ }
47
+
48
+ a {
49
+ vertical-align: text-top;
50
+ }
51
+
52
+ span {
53
+ color: #4f5f6f;
54
+ }
55
+ }
56
+ }
57
+
58
+ @include media-down(sm) {
59
+ .auth-container {
60
+ width: 100%;
61
+ position: relative;
62
+ left: 0;
63
+ top: 0;
64
+ transform: inherit;
65
+ margin: 0;
66
+ margin-bottom: 10px;
67
+
68
+ .auth-content {
69
+ padding: 30px 25px;
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,5 @@
1
+ module RailsModularAdmin
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery with: :exception
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ module RailsModularAdmin
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module RailsModularAdmin
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module RailsModularAdmin
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module RailsModularAdmin
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Rails modular admin</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag "rails_modular_admin/application", media: "all" %>
9
+ <%= javascript_include_tag "rails_modular_admin/application" %>
10
+ </head>
11
+ <body>
12
+
13
+ <%= yield %>
14
+
15
+ </body>
16
+ </html>
@@ -0,0 +1 @@
1
+ Rails.application.config.assets.paths << RailsModularAdmin::Engine.root.join('node_modules')
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ RailsModularAdmin::Engine.routes.draw do
2
+ end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ This is the basic install generator for the Rails Modular Admin gem.
3
+
4
+ Example:
5
+ rails generate rails_modular_admin:install
6
+
7
+ This will create:
8
+ app/assets/stylesheets/custom-theme.scss
@@ -0,0 +1,12 @@
1
+ require 'rails/generators/base'
2
+ module RailsModularAdmin
3
+ module Generators
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc "This install generator copies over the custom-theme.scss file for you to modify to create your custom theme."
6
+ source_root File.expand_path('templates', __dir__)
7
+ def copy_custom_theme_file
8
+ copy_file "custom-theme.scss", "app/assets/stylesheets/custom-theme.scss"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ /*
2
+ * This is the file to modify for your custom theme colors. If you choose not to use one of the following options, simply comment it out or remove it.
3
+ */
4
+ $color-primary: #FF6161;
5
+
6
+ $link-color: #969696;
7
+ $link-transition: initial;
8
+ $link-decoration: underline;
9
+
10
+ $link-hover-color: #E45252;
11
+ $link-hover-decoration: underline;
12
+
13
+ $chart-color-primary: #FF8585;
14
+ $chart-color-secondary: #ccc;