rails_modular_admin 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b87a4389dafaf3e36acebc70d287b90dd3da6a16
4
- data.tar.gz: 161253ecd0b57d646cbd0b2332ddb89c0c824eee
3
+ metadata.gz: d98d144774a3c42184a501ca403520e1388d5cf0
4
+ data.tar.gz: 9e027ae6f807501a5e8489dda743b08f39f0d8b6
5
5
  SHA512:
6
- metadata.gz: 7c4e18c9d696c3bb20214989a84ff250f4c1c0d95b56a4bce883caec2d334e12ec8d0659b8d723f96f5b50d0d76a885a027e8e12e80c215ef0c84e0c05032143
7
- data.tar.gz: a07bc23eb1de6afea38b7a49a0206819b927ed95c527038ac655a498d97e974b63fbf27a71a3388b4688bb52e60f4a80d5220d2d298363bafc0b0f4d810c14e0
6
+ metadata.gz: 0110f945defae65bd54ffce5ab0262e9980112f61fb1144e3db376f2d1c16a671528db3187b0efcd181488eb91dcf3d26446558b16484d0e94325cdf926e7848
7
+ data.tar.gz: 717abcd0a3ff58cf9b404eb6693981850fffd9779cc691c5771cf8915ec7dd84030bcb9ac7387b93ca4fa2efab833ab70c91a6f2f82fa452c62c9b2aa478928e
data/README.md CHANGED
@@ -54,18 +54,27 @@ Now install through the included generator:
54
54
  rails g rails_modular_admin:install
55
55
  ```
56
56
 
57
- The install generator copies over the custom theme.scss file, which you can use to include your own color scheme. Finally, add the following line to your application.scss:
57
+ The install generator copies over the custom theme.scss file, which you can use to include your own color scheme. Finally, add the following lines to your application.scss:
58
58
  ```scss
59
+ @import "custom-theme";
59
60
  @import "rails_modular_admin";
60
61
  ```
61
62
 
62
63
  ```javascript
63
64
  //= require rails_modular_admin
64
65
  ```
66
+ Change the variables in custom-theme.scss to change the colors in your application.
65
67
 
66
68
  ## Contributing
67
69
  Write a pull request and I'll get to it as soon as I can.
68
70
 
69
71
  ## License
70
72
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
71
- # RailsModularAdmin
73
+
74
+ ## TODO
75
+
76
+ [] Update install task to automatically adjust package.json and run yarn install.
77
+ [] Theme choices.
78
+ [] Generators to install common views, namely the dashboard and login pages (devise).
79
+ [] Helper methods for commonly used assets or features.
80
+ [] Test suite because it's currently non-existent.
@@ -1,3 +1,4 @@
1
1
  //= require bootstrap
2
+ //= require bootstrap/dist/js/bootstrap.min
2
3
  //= require rails_modular_admin/vendor
3
4
  //= require rails_modular_admin/app
@@ -11,6 +11,7 @@
11
11
  * It is generally better to create a new file per style scope.
12
12
  *
13
13
  */
14
+
14
15
  @import 'animate.css/animate.css';
15
16
 
16
17
  @import 'jqvmap/dist/jqvmap';
@@ -1 +1,2 @@
1
+ @import "font-awesome";
1
2
  @import "rails_modular_admin/application";
@@ -1 +1,2 @@
1
- Rails.application.config.assets.paths << RailsModularAdmin::Engine.root.join('node_modules')
1
+ Rails.application.config.assets.paths << RailsModularAdmin::Engine.root.join('node_modules')
2
+ # Rails.application.config.assets.precompile += %w( rails_modular_admin.js )
@@ -1,5 +1,9 @@
1
1
  module RailsModularAdmin
2
2
  class Engine < ::Rails::Engine
3
3
  isolate_namespace RailsModularAdmin
4
+
5
+ initializer "RailsModularAdmin.precompile" do |app|
6
+ app.config.assets.precompile += %w(rails_modular_admin.js)
7
+ end
4
8
  end
5
9
  end
@@ -1,3 +1,3 @@
1
1
  module RailsModularAdmin
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -1,9 +1,7 @@
1
1
  require "rails_modular_admin/engine"
2
2
 
3
3
  module RailsModularAdmin
4
- def initialize
5
- puts "This is something?"
6
- end
4
+
7
5
 
8
6
  def self.root
9
7
  File.dirname __dir__
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_modular_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Payne
@@ -66,7 +66,6 @@ files:
66
66
  - README.md
67
67
  - Rakefile
68
68
  - app/assets/config/rails_modular_admin_manifest.js
69
- - app/assets/javascripts/index.js
70
69
  - app/assets/javascripts/rails_modular_admin.js
71
70
  - app/assets/javascripts/rails_modular_admin/_common/_helpers/code-helper.js
72
71
  - app/assets/javascripts/rails_modular_admin/_common/_helpers/for-helper.js
@@ -97,8 +96,6 @@ files:
97
96
  - app/assets/javascripts/rails_modular_admin/auth/login/login.js
98
97
  - app/assets/javascripts/rails_modular_admin/auth/reset/reset.js
99
98
  - app/assets/javascripts/rails_modular_admin/auth/signup/signup.js
100
- - app/assets/javascripts/rails_modular_admin/config.js
101
- - app/assets/javascripts/rails_modular_admin/main.js
102
99
  - app/assets/javascripts/rails_modular_admin/vendor.js
103
100
  - app/assets/stylesheets/rails_modular_admin.scss
104
101
  - app/assets/stylesheets/rails_modular_admin/_common/_styles/_mixins.scss
@@ -124,13 +121,6 @@ files:
124
121
  - app/assets/stylesheets/rails_modular_admin/_common/scrollbar/scrollbar.scss
125
122
  - app/assets/stylesheets/rails_modular_admin/_common/table/table.scss
126
123
  - app/assets/stylesheets/rails_modular_admin/_main.scss
127
- - app/assets/stylesheets/rails_modular_admin/_themes/blue-theme.scss
128
- - app/assets/stylesheets/rails_modular_admin/_themes/custom-theme.scss
129
- - app/assets/stylesheets/rails_modular_admin/_themes/green-theme.scss
130
- - app/assets/stylesheets/rails_modular_admin/_themes/orange-theme.scss
131
- - app/assets/stylesheets/rails_modular_admin/_themes/purple-theme.scss
132
- - app/assets/stylesheets/rails_modular_admin/_themes/red-theme.scss
133
- - app/assets/stylesheets/rails_modular_admin/_themes/seagreen-theme.scss
134
124
  - app/assets/stylesheets/rails_modular_admin/_variables.scss
135
125
  - app/assets/stylesheets/rails_modular_admin/app/_common/editor/editor.scss
136
126
  - app/assets/stylesheets/rails_modular_admin/app/_common/footer/footer.scss
@@ -1,87 +0,0 @@
1
- var path = require('path');
2
-
3
- var rootDir = path.resolve("../"); // Root dir
4
- var srcDir = path.resolve("../src"); // Source files
5
- var destDir = path.resolve("../dist"); // Build destination
6
- var npmDir = path.resolve("../node_modules"); // Npm dir
7
-
8
- var config = {
9
- rootDir: rootDir,
10
- srcDir: srcDir,
11
- destDir: destDir,
12
- npmDir: npmDir,
13
- port: 4000,
14
- paths: {}
15
- };
16
-
17
- // Vendor libs paths
18
- config.paths.vendor = {
19
- scripts: [
20
- npmDir + '/jquery/dist/jquery.js',
21
- npmDir + '/jquery-flot/jquery.flot.js',
22
- npmDir + '/jquery-flot/jquery.flot.resize.js',
23
- npmDir + '/jquery-flot/jquery.flot.pie.js',
24
- npmDir + '/jquery-flot/jquery.flot.time.js',
25
- npmDir + '/jquery.flot.tooltip/js/jquery.flot.tooltip.js',
26
- npmDir + '/jquery-validation/dist/jquery.validate.js',
27
- npmDir + '/jquery-sparkline/jquery.sparkline.js',
28
- npmDir + '/jqvmap/dist/jquery.vmap.js',
29
- npmDir + '/jqvmap/dist/maps/jquery.vmap.world.js',
30
- npmDir + '/metismenu/dist/metisMenu.js',
31
- npmDir + '/nprogress/nprogress.js',
32
- npmDir + '/quill/dist/quill.js',
33
- npmDir + '/responsive-toolkit/dist/bootstrap-toolkit.js',
34
- npmDir + '/sortablejs/Sortable.js',
35
- npmDir + '/tether/dist/js/tether.js',
36
- npmDir + '/tinycolor2/tinycolor.js',
37
- npmDir + '/dropzone/dist/dropzone.js',
38
- npmDir + '/jquery-touchswipe/jquery.touchSwipe.js',
39
- npmDir + '/jquery.browser/dist/jquery.browser.js',
40
- npmDir + '/popper.js/dist/umd/popper.js',
41
- npmDir + '/bootstrap/dist/js/bootstrap.js',
42
- npmDir + '/raphael/raphael.js',
43
- npmDir + '/morris.js/morris.js',
44
- ],
45
- styles: [
46
- npmDir + '/animate.css/animate.css',
47
- npmDir + '/font-awesome/css/font-awesome.css',
48
- npmDir + '/jqvmap/dist/jqvmap.css',
49
- npmDir + '/metismenu/dist/metisMenu.css',
50
- npmDir + '/nprogress/nprogress.css',
51
- npmDir + '/dropzone/dist/dropzone.css',
52
- npmDir + '/quill/dist/quill.core.css',
53
- npmDir + '/quill/dist/quill.snow.css',
54
- npmDir + '/morris.js/morris.css',
55
- npmDir + '/bootstrap/dist/css/bootstrap.css',
56
- ],
57
- fonts: [
58
- npmDir + '/font-awesome/fonts/*'
59
- ],
60
- assets: [],
61
- };
62
-
63
- // Application Paths
64
- config.paths.app = {
65
- scripts: [
66
- srcDir + "/config.js",
67
- srcDir + "/**/!(_context|config|main|*-helper)*.js",
68
- srcDir + "/main.js",
69
- "!" + srcDir + "/_vendor/**"
70
- ],
71
- styles: [
72
- srcDir + "/_main.scss",
73
- srcDir + "/**/!(_main|_variables|*-theme)*.scss",
74
- ],
75
- themes: srcDir + "/**/*-theme.scss",
76
- templates: srcDir + "/**/*.hbs",
77
- pages: srcDir + "/**/*-page.hbs",
78
- layouts: srcDir + "/**/*-layout.hbs",
79
- helpers: [
80
- srcDir + "/**/*-helper.js",
81
- rootDir + '/node_modules/handlebars-layouts/index.js',
82
- ],
83
- assets: srcDir + "/_assets/**/*"
84
- };
85
-
86
-
87
- module.exports = config;
@@ -1,51 +0,0 @@
1
- var config = window.config = {};
2
-
3
- // Config reference element
4
- var $ref = $("#ref");
5
-
6
- // Configure responsive bootstrap toolkit
7
- config.ResponsiveBootstrapToolkitVisibilityDivs = {
8
- 'xs': $('<div class="device-xs hidden-sm-up"></div>'),
9
- 'sm': $('<div class="device-sm hidden-xs-down hidden-md-up"></div>'),
10
- 'md': $('<div class="device-md hidden-sm-down hidden-lg-up"></div>'),
11
- 'lg': $('<div class="device-lg hidden-md-down hidden-xl-up"></div>'),
12
- 'xl': $('<div class="device-xl hidden-lg-down "></div>'),
13
- };
14
-
15
- ResponsiveBootstrapToolkit.use('Custom', config.ResponsiveBootstrapToolkitVisibilityDivs);
16
-
17
- //validation configuration
18
- config.validations = {
19
- debug: true,
20
- errorClass:'has-error',
21
- validClass:'success',
22
- errorElement:"span",
23
-
24
- // add error class
25
- highlight: function(element, errorClass, validClass) {
26
- $(element).parents("div.form-group")
27
- .addClass(errorClass)
28
- .removeClass(validClass);
29
- },
30
-
31
- // add error class
32
- unhighlight: function(element, errorClass, validClass) {
33
- $(element).parents(".has-error")
34
- .removeClass(errorClass)
35
- .addClass(validClass);
36
- },
37
-
38
- // submit handler
39
- submitHandler: function(form) {
40
- form.submit();
41
- }
42
- }
43
-
44
- //delay time configuration
45
- config.delayTime = 50;
46
-
47
- // chart configurations
48
- config.chart = {};
49
-
50
- config.chart.colorPrimary = tinycolor($ref.find(".chart .color-primary").css("color"));
51
- config.chart.colorSecondary = tinycolor($ref.find(".chart .color-secondary").css("color"));
@@ -1,16 +0,0 @@
1
- $(function() {
2
-
3
- $("body").addClass("loaded");
4
-
5
- });
6
-
7
-
8
- /***********************************************
9
- * NProgress Settings
10
- ***********************************************/
11
-
12
- // start load bar
13
- NProgress.start();
14
-
15
- // end loading bar
16
- NProgress.done();
@@ -1 +0,0 @@
1
- $color-primary: #52BCD3;
@@ -1,10 +0,0 @@
1
- $color-primary: #85CE36;
2
- $dashboard-stat-icon-color: #BDBDBD;
3
-
4
- // $link-color: darken($color-primary, 5%);
5
- $link-color: #969696;
6
- $link-transition: initial;
7
- $link-decoration: underline;
8
-
9
- $link-hover-color: darken($color-primary, 8%);
10
- $link-hover-decoration: underline;
@@ -1,12 +0,0 @@
1
- $color-primary: lighten(#FE7A0E, 3%);
2
- $dashboard-stat-icon-color: #BDBDBD;
3
-
4
- $link-color: #969696;
5
- $link-transition: initial;
6
- $link-decoration: underline;
7
-
8
- $link-hover-color: desaturate(darken($color-primary, 4%), 4%);
9
- $link-hover-decoration: underline;
10
-
11
- $chart-color-primary: lighten($color-primary, 10%);
12
- $chart-color-secondary: lighten($chart-color-primary, 20%);
@@ -1,6 +0,0 @@
1
- $color-primary: #7867A7;
2
- $dashboard-stat-icon-color: #BDBDBD;
3
-
4
-
5
- $chart-color-primary: lighten($color-primary, 8%);
6
- $chart-color-secondary: lighten($chart-color-primary, 10%);
@@ -1,11 +0,0 @@
1
- $color-primary: #FF6161;
2
-
3
- $link-color: #969696;
4
- $link-transition: initial;
5
- $link-decoration: underline;
6
-
7
- $link-hover-color: #E45252;
8
- $link-hover-decoration: underline;
9
-
10
- $chart-color-primary: #FF8585;
11
- $chart-color-secondary: #ccc;
@@ -1,9 +0,0 @@
1
- $color-primary: #4bcf99;
2
-
3
- // $link-color: darken($color-primary, 5%);
4
- $link-color: #969696;
5
- $link-transition: initial;
6
- $link-decoration: underline;
7
-
8
- $link-hover-color: darken($color-primary, 8%);
9
- $link-hover-decoration: underline;