mazer-rails 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +75 -0
  3. data/lib/mazer-rails.rb +13 -0
  4. data/lib/mazer_rails/engine.rb +27 -0
  5. data/lib/mazer_rails/version.rb +1 -1
  6. data/mazer-rails.gemspec +5 -2
  7. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-300-normal.woff +0 -0
  8. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-400-normal.woff +0 -0
  9. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-600-normal.woff +0 -0
  10. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-700-normal.woff +0 -0
  11. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-800-normal.woff +0 -0
  12. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-300-normal.woff2 +0 -0
  13. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-400-normal.woff2 +0 -0
  14. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-600-normal.woff2 +0 -0
  15. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-700-normal.woff2 +0 -0
  16. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-800-normal.woff2 +0 -0
  17. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-300-normal.woff2 +0 -0
  18. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-400-normal.woff2 +0 -0
  19. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-600-normal.woff2 +0 -0
  20. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-700-normal.woff2 +0 -0
  21. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-800-normal.woff2 +0 -0
  22. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-300-normal.woff2 +0 -0
  23. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-400-normal.woff2 +0 -0
  24. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-600-normal.woff2 +0 -0
  25. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-700-normal.woff2 +0 -0
  26. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-800-normal.woff2 +0 -0
  27. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-300-normal.woff2 +0 -0
  28. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-400-normal.woff2 +0 -0
  29. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-600-normal.woff2 +0 -0
  30. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-700-normal.woff2 +0 -0
  31. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-800-normal.woff2 +0 -0
  32. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-300-normal.woff2 +0 -0
  33. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-400-normal.woff2 +0 -0
  34. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-600-normal.woff2 +0 -0
  35. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-700-normal.woff2 +0 -0
  36. data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-800-normal.woff2 +0 -0
  37. data/vendor/assets/fonts/vendor/bootstrap-icons/bootstrap-icons.woff +0 -0
  38. data/vendor/assets/fonts/vendor/bootstrap-icons/bootstrap-icons.woff2 +0 -0
  39. data/vendor/assets/javascripts/mazer/app.js +2 -0
  40. data/vendor/assets/javascripts/mazer/bootstrap.js +2 -0
  41. data/vendor/assets/javascripts/mazer/initTheme.js +1 -0
  42. data/vendor/assets/javascripts/mazer/mazer.js +2 -0
  43. data/vendor/assets/stylesheets/mazer/app-dark.scss +1 -0
  44. data/vendor/assets/stylesheets/mazer/app.scss +13 -0
  45. metadata +60 -120
  46. data/lib/mazer_rails.rb +0 -7
  47. data/vendor/assets/fonts/iconly/Iconly---Bold.eot +0 -0
  48. data/vendor/assets/fonts/iconly/Iconly---Bold.svg +0 -19
  49. data/vendor/assets/fonts/iconly/Iconly---Bold.ttf +0 -0
  50. data/vendor/assets/fonts/iconly/Iconly---Bold.woff +0 -0
  51. data/vendor/assets/images/bg/4853433.png +0 -0
  52. data/vendor/assets/images/faces/1.jpg +0 -0
  53. data/vendor/assets/images/faces/2.jpg +0 -0
  54. data/vendor/assets/images/faces/3.jpg +0 -0
  55. data/vendor/assets/images/faces/4.jpg +0 -0
  56. data/vendor/assets/images/faces/5.jpg +0 -0
  57. data/vendor/assets/images/faces/6.jpg +0 -0
  58. data/vendor/assets/images/faces/7.jpg +0 -0
  59. data/vendor/assets/images/faces/8.jpg +0 -0
  60. data/vendor/assets/images/logo/favicon.png +0 -0
  61. data/vendor/assets/images/logo/favicon.svg +0 -1
  62. data/vendor/assets/images/logo/logo.svg +0 -1
  63. data/vendor/assets/images/samples/1.png +0 -0
  64. data/vendor/assets/images/samples/2.png +0 -0
  65. data/vendor/assets/images/samples/3.png +0 -0
  66. data/vendor/assets/images/samples/4.png +0 -0
  67. data/vendor/assets/images/samples/architecture1.jpg +0 -0
  68. data/vendor/assets/images/samples/banana.jpg +0 -0
  69. data/vendor/assets/images/samples/bg-mountain.jpg +0 -0
  70. data/vendor/assets/images/samples/building.jpg +0 -0
  71. data/vendor/assets/images/samples/error-403.svg +0 -94
  72. data/vendor/assets/images/samples/error-404.svg +0 -88
  73. data/vendor/assets/images/samples/error-500.svg +0 -76
  74. data/vendor/assets/images/samples/jump.jpg +0 -0
  75. data/vendor/assets/images/samples/motorcycle.jpg +0 -0
  76. data/vendor/assets/images/samples/origami.jpg +0 -0
  77. data/vendor/assets/images/samples/water.jpg +0 -0
  78. data/vendor/assets/images/svg-loaders/audio.svg +0 -29
  79. data/vendor/assets/images/svg-loaders/ball-triangle.svg +0 -1
  80. data/vendor/assets/images/svg-loaders/bars.svg +0 -1
  81. data/vendor/assets/images/svg-loaders/circles.svg +0 -20
  82. data/vendor/assets/images/svg-loaders/grid.svg +0 -1
  83. data/vendor/assets/images/svg-loaders/hearts.svg +0 -1
  84. data/vendor/assets/images/svg-loaders/oval.svg +0 -1
  85. data/vendor/assets/images/svg-loaders/puff.svg +0 -1
  86. data/vendor/assets/images/svg-loaders/rings.svg +0 -1
  87. data/vendor/assets/images/svg-loaders/spinning-circles.svg +0 -1
  88. data/vendor/assets/images/svg-loaders/tail-spin.svg +0 -1
  89. data/vendor/assets/images/svg-loaders/three-dots.svg +0 -1
  90. data/vendor/assets/javascripts/app.js +0 -9
  91. data/vendor/assets/javascripts/bootstrap.js +0 -6
  92. data/vendor/assets/javascripts/components/dark.js +0 -65
  93. data/vendor/assets/javascripts/components/sidebar.js +0 -185
  94. data/vendor/assets/javascripts/helper/isDesktop.js +0 -1
  95. data/vendor/assets/javascripts/initTheme.js +0 -5
  96. data/vendor/assets/javascripts/mazer.js +0 -9
  97. data/vendor/assets/javascripts/pages/ckeditor.js +0 -3
  98. data/vendor/assets/javascripts/pages/component-toasts.js +0 -9
  99. data/vendor/assets/javascripts/pages/dashboard.js +0 -158
  100. data/vendor/assets/javascripts/pages/datatables.js +0 -1
  101. data/vendor/assets/javascripts/pages/filepond.js +0 -181
  102. data/vendor/assets/javascripts/pages/form-editor.js +0 -27
  103. data/vendor/assets/javascripts/pages/form-element-select.js +0 -14
  104. data/vendor/assets/javascripts/pages/horizontal-layout.js +0 -43
  105. data/vendor/assets/javascripts/pages/jquery.js +0 -1
  106. data/vendor/assets/javascripts/pages/jsvectormap.js +0 -60
  107. data/vendor/assets/javascripts/pages/parsley.js +0 -55
  108. data/vendor/assets/javascripts/pages/quill.js +0 -27
  109. data/vendor/assets/javascripts/pages/rater-js.js +0 -38
  110. data/vendor/assets/javascripts/pages/simple-datatables.js +0 -46
  111. data/vendor/assets/javascripts/pages/summernote.js +0 -20
  112. data/vendor/assets/javascripts/pages/sweetalert2.js +0 -142
  113. data/vendor/assets/javascripts/pages/tinymce.js +0 -22
  114. data/vendor/assets/javascripts/pages/toastify.js +0 -81
  115. data/vendor/assets/javascripts/pages/ui-apexchart.js +0 -521
  116. data/vendor/assets/javascripts/pages/ui-chartjs.js +0 -445
  117. data/vendor/assets/javascripts/pages/ui-todolist.js +0 -5
  118. data/vendor/assets/stylesheets/_fonts.scss +0 -5
  119. data/vendor/assets/stylesheets/_mazer.scss +0 -103
  120. data/vendor/assets/stylesheets/_utilities.scss +0 -53
  121. data/vendor/assets/stylesheets/_variables.scss +0 -1626
  122. data/vendor/assets/stylesheets/app.scss +0 -20
  123. data/vendor/assets/stylesheets/bootstrap.scss +0 -58
  124. data/vendor/assets/stylesheets/components/_alert.scss +0 -43
  125. data/vendor/assets/stylesheets/components/_avatar.scss +0 -78
  126. data/vendor/assets/stylesheets/components/_badge.scss +0 -20
  127. data/vendor/assets/stylesheets/components/_breadcrumb.scss +0 -10
  128. data/vendor/assets/stylesheets/components/_buttons.scss +0 -62
  129. data/vendor/assets/stylesheets/components/_card.scss +0 -126
  130. data/vendor/assets/stylesheets/components/_carousel.scss +0 -6
  131. data/vendor/assets/stylesheets/components/_divider.scss +0 -37
  132. data/vendor/assets/stylesheets/components/_dropdowns.scss +0 -24
  133. data/vendor/assets/stylesheets/components/_forms.scss +0 -213
  134. data/vendor/assets/stylesheets/components/_icons.scss +0 -48
  135. data/vendor/assets/stylesheets/components/_modal.scss +0 -46
  136. data/vendor/assets/stylesheets/components/_navbar.scss +0 -280
  137. data/vendor/assets/stylesheets/components/_navs.scss +0 -32
  138. data/vendor/assets/stylesheets/components/_pagination.scss +0 -39
  139. data/vendor/assets/stylesheets/components/_progress.scss +0 -32
  140. data/vendor/assets/stylesheets/components/_sidebar.scss +0 -171
  141. data/vendor/assets/stylesheets/components/_table.scss +0 -36
  142. data/vendor/assets/stylesheets/iconly.scss +0 -327
  143. data/vendor/assets/stylesheets/layouts/main.scss +0 -48
  144. data/vendor/assets/stylesheets/mixins/_navbar.scss +0 -20
  145. data/vendor/assets/stylesheets/pages/auth.scss +0 -51
  146. data/vendor/assets/stylesheets/pages/chat.scss +0 -145
  147. data/vendor/assets/stylesheets/pages/datatables.scss +0 -7
  148. data/vendor/assets/stylesheets/pages/dripicons.scss +0 -20
  149. data/vendor/assets/stylesheets/pages/email.scss +0 -625
  150. data/vendor/assets/stylesheets/pages/error.scss +0 -22
  151. data/vendor/assets/stylesheets/pages/form-element-select.scss +0 -7
  152. data/vendor/assets/stylesheets/pages/simple-datatables.scss +0 -20
  153. data/vendor/assets/stylesheets/pages/summernote.scss +0 -4
  154. data/vendor/assets/stylesheets/themes/dark/_mazer-dark.scss +0 -82
  155. data/vendor/assets/stylesheets/themes/dark/_root.scss +0 -55
  156. data/vendor/assets/stylesheets/themes/dark/_variables-dark.scss +0 -329
  157. data/vendor/assets/stylesheets/themes/dark/app-dark.scss +0 -54
  158. data/vendor/assets/stylesheets/widgets/chat.scss +0 -26
  159. data/vendor/assets/stylesheets/widgets/todo.scss +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38e3390f9975e8bb0459fa566e9e159bbc2e4262f80e6a5eb11e57876cdc1099
4
- data.tar.gz: 728a6ba3d7c37629217eef360c6fdbfd4dbd52c8a38f6b4fabf4d3e5e238cfc1
3
+ metadata.gz: 450a434049c3f528dcf23ea98264e49ca118d7ead1805ea9d6a6b3f7c6fe153c
4
+ data.tar.gz: 8e1b6ccc626bc78fec7e07111432320e2a93359c384514f6edc257c9c9356a02
5
5
  SHA512:
6
- metadata.gz: 23fe0a257dd3738156028760ac6f51c49013e32a167a2370beed473c1ffd1f43273ddbac52b203bcf253161932048dc3dbcb37f43445d39b1c9c85bc7d959a14
7
- data.tar.gz: b1c58eca0b3159a0e9732530f080d48c035ddaec1c03bdf4afc36952f9911212303a3cd1351b8527efee7b033da82205a118224284325eda416e86804b87c2a6
6
+ metadata.gz: 9afa864ea7d5ca2253f42a1355d557ad98dc16c3d703669464dcac382bfc240764df3ad734e8c5135b949a5968bbe8f1041c0c9b6b1b6045752f246646826a30
7
+ data.tar.gz: 332c6b2cc7e8fca4ecf36152a509612b9330c17b6598316e3728284ee3533a1c0e84c10b11e4d9f6cd5b7615776e8e6fffd3169e23a5d129600396ca07486bdf
data/Rakefile CHANGED
@@ -2,7 +2,82 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rubocop/rake_task"
5
+ require "open-uri"
6
+ require "json"
5
7
 
6
8
  RuboCop::RakeTask.new
7
9
 
8
10
  task default: :rubocop
11
+
12
+ def download_release_file(template_url)
13
+ FileUtils.rm_rf('tmp')
14
+ FileUtils.mkdir_p('tmp')
15
+ File.open("tmp/template.zip", "wb") do |saved_file|
16
+ URI.open(template_url, "rb") do |read_file|
17
+ saved_file.write(read_file.read)
18
+ end
19
+ end
20
+
21
+ puts 'No zip to process. Exiting...' and exit unless File.exists? 'tmp/template.zip'
22
+
23
+ puts 'Unzipping "tmp/template.zip"...'
24
+ FileUtils.rm_rf('tmp/dist')
25
+ `unzip -d tmp/dist tmp/template.zip`
26
+ end
27
+
28
+ def clean_existing_assets
29
+ puts 'Cleaning old JS and CSS files...'
30
+
31
+ `rm -rf vendor/assets/fonts`
32
+ `rm -rf vendor/assets/javascripts`
33
+ `rm -rf vendor/assets/stylesheets`
34
+
35
+ FileUtils.mkdir_p('vendor/assets/fonts')
36
+ FileUtils.mkdir_p('vendor/assets/javascripts/mazer')
37
+ FileUtils.mkdir_p('vendor/assets/stylesheets/mazer')
38
+ end
39
+
40
+ def fix_fonts
41
+ puts 'Fixing font URLs in SCSS files...'
42
+
43
+ css_paths = [
44
+ 'vendor/assets/stylesheets/mazer/app.scss',
45
+ 'vendor/assets/stylesheets/mazer/app-dark.scss'
46
+ ]
47
+
48
+ # Replace : url(../../../assets/fonts/vendor/@fontsource/nunito/files/nunito-all-400-normal.woff?0c07f750f73ac5437580c0d0dff431ec)
49
+ # With : url(asset-path("vendor/@fontsource/nunito/files/nunito-all-400-normal.woff"))
50
+ css_paths.each do |css_path|
51
+ css_file = File.read(css_path)
52
+ css_file = css_file.gsub(/url\((\.\.\/\.\.\/\.\.\/assets\/fonts\/)([^"?]+)(\?[\w]+)?\)/, 'url(asset-path("\2"))')
53
+ File.open(css_path, "w") { |old_css_file| old_css_file.print css_file }
54
+ end
55
+ end
56
+
57
+ def copy_assets
58
+ clean_existing_assets
59
+
60
+ puts 'Copying new JS and CSS files...'
61
+ base_input_path = "tmp/dist/assets"
62
+ base_output_path = "vendor/assets"
63
+ `cp -R #{base_input_path}/fonts/* #{base_output_path}/fonts`
64
+ `cp -R #{base_input_path}/js/*.js #{base_output_path}/javascripts/mazer`
65
+ `cp -R #{base_input_path}/css/main/* #{base_output_path}/stylesheets/mazer`
66
+
67
+ puts 'Renaming CSS files to SCSS...'
68
+ `mv #{base_output_path}/stylesheets/mazer/app.css #{base_output_path}/stylesheets/mazer/app.scss`
69
+ `mv #{base_output_path}/stylesheets/mazer/app-dark.css #{base_output_path}/stylesheets/mazer/app-dark.scss`
70
+
71
+ fix_fonts
72
+ end
73
+
74
+ desc "Update assets"
75
+ task 'update' do
76
+ release_url = 'https://api.github.com/repos/zuramai/mazer/releases/latest'
77
+ template_url = JSON.parse(URI.open(release_url).read)['assets'][0]['browser_download_url']
78
+
79
+ download_release_file template_url
80
+ copy_assets
81
+
82
+ puts 'Finished!'
83
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "mazer_rails/version"
4
+
5
+ module MazerRails
6
+ class << self
7
+ def load!
8
+ require 'mazer_rails/engine'
9
+ end
10
+ end
11
+ end
12
+
13
+ MazerRails.load!
@@ -0,0 +1,27 @@
1
+ require 'autoprefixer-rails'
2
+
3
+ module MazerRails
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ initializer 'mazer_rails.assets' do |app|
7
+ %w(extensions fonts images javascripts stylesheets).each do |sub|
8
+ app.config.assets.paths << root.join('vendor', 'assets', sub).to_s
9
+ end
10
+
11
+ # fix for: https://github.com/twbs/bootstrap-sass/issues/960
12
+ # regex no longer supported by assets.precompile
13
+ # sprockets-rails 3 tracks down the calls to `font_path` and `image_path`
14
+ # and automatically precompiles the referenced assets.
15
+ if old_sprockets?
16
+ app.config.assets.precompile << /\.(?:eot|woff|ttf)$/
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ def old_sprockets?
23
+ defined?(Sprockets::Rails) && !Sprockets::Rails::VERSION.starts_with?('3')
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MazerRails
4
- VERSION = "0.1.4"
4
+ VERSION = "0.2.0"
5
5
  end
data/mazer-rails.gemspec CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require_relative "lib/mazer_rails/version"
4
6
 
5
7
  Gem::Specification.new do |spec|
@@ -28,8 +30,9 @@ Gem::Specification.new do |spec|
28
30
  spec.bindir = "exe"
29
31
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
32
  spec.require_paths = ["lib"]
31
-
32
- spec.add_runtime_dependency "sassc-rails", ">= 2.0.0"
33
+
34
+ spec.add_runtime_dependency "rails"
35
+ spec.add_runtime_dependency "dartsass-sprockets"
33
36
  spec.add_runtime_dependency "autoprefixer-rails", ">= 9.1.0"
34
37
 
35
38
  # For more information and examples about making a new gem, check out our