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.
- checksums.yaml +4 -4
- data/Rakefile +75 -0
- data/lib/mazer-rails.rb +13 -0
- data/lib/mazer_rails/engine.rb +27 -0
- data/lib/mazer_rails/version.rb +1 -1
- data/mazer-rails.gemspec +5 -2
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-300-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-400-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-600-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-700-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-all-800-normal.woff +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-cyrillic-ext-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-latin-ext-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-300-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-400-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-600-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-700-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/@fontsource/nunito/files/nunito-vietnamese-800-normal.woff2 +0 -0
- data/vendor/assets/fonts/vendor/bootstrap-icons/bootstrap-icons.woff +0 -0
- data/vendor/assets/fonts/vendor/bootstrap-icons/bootstrap-icons.woff2 +0 -0
- data/vendor/assets/javascripts/mazer/app.js +2 -0
- data/vendor/assets/javascripts/mazer/bootstrap.js +2 -0
- data/vendor/assets/javascripts/mazer/initTheme.js +1 -0
- data/vendor/assets/javascripts/mazer/mazer.js +2 -0
- data/vendor/assets/stylesheets/mazer/app-dark.scss +1 -0
- data/vendor/assets/stylesheets/mazer/app.scss +13 -0
- metadata +60 -120
- data/lib/mazer_rails.rb +0 -7
- data/vendor/assets/fonts/iconly/Iconly---Bold.eot +0 -0
- data/vendor/assets/fonts/iconly/Iconly---Bold.svg +0 -19
- data/vendor/assets/fonts/iconly/Iconly---Bold.ttf +0 -0
- data/vendor/assets/fonts/iconly/Iconly---Bold.woff +0 -0
- data/vendor/assets/images/bg/4853433.png +0 -0
- data/vendor/assets/images/faces/1.jpg +0 -0
- data/vendor/assets/images/faces/2.jpg +0 -0
- data/vendor/assets/images/faces/3.jpg +0 -0
- data/vendor/assets/images/faces/4.jpg +0 -0
- data/vendor/assets/images/faces/5.jpg +0 -0
- data/vendor/assets/images/faces/6.jpg +0 -0
- data/vendor/assets/images/faces/7.jpg +0 -0
- data/vendor/assets/images/faces/8.jpg +0 -0
- data/vendor/assets/images/logo/favicon.png +0 -0
- data/vendor/assets/images/logo/favicon.svg +0 -1
- data/vendor/assets/images/logo/logo.svg +0 -1
- data/vendor/assets/images/samples/1.png +0 -0
- data/vendor/assets/images/samples/2.png +0 -0
- data/vendor/assets/images/samples/3.png +0 -0
- data/vendor/assets/images/samples/4.png +0 -0
- data/vendor/assets/images/samples/architecture1.jpg +0 -0
- data/vendor/assets/images/samples/banana.jpg +0 -0
- data/vendor/assets/images/samples/bg-mountain.jpg +0 -0
- data/vendor/assets/images/samples/building.jpg +0 -0
- data/vendor/assets/images/samples/error-403.svg +0 -94
- data/vendor/assets/images/samples/error-404.svg +0 -88
- data/vendor/assets/images/samples/error-500.svg +0 -76
- data/vendor/assets/images/samples/jump.jpg +0 -0
- data/vendor/assets/images/samples/motorcycle.jpg +0 -0
- data/vendor/assets/images/samples/origami.jpg +0 -0
- data/vendor/assets/images/samples/water.jpg +0 -0
- data/vendor/assets/images/svg-loaders/audio.svg +0 -29
- data/vendor/assets/images/svg-loaders/ball-triangle.svg +0 -1
- data/vendor/assets/images/svg-loaders/bars.svg +0 -1
- data/vendor/assets/images/svg-loaders/circles.svg +0 -20
- data/vendor/assets/images/svg-loaders/grid.svg +0 -1
- data/vendor/assets/images/svg-loaders/hearts.svg +0 -1
- data/vendor/assets/images/svg-loaders/oval.svg +0 -1
- data/vendor/assets/images/svg-loaders/puff.svg +0 -1
- data/vendor/assets/images/svg-loaders/rings.svg +0 -1
- data/vendor/assets/images/svg-loaders/spinning-circles.svg +0 -1
- data/vendor/assets/images/svg-loaders/tail-spin.svg +0 -1
- data/vendor/assets/images/svg-loaders/three-dots.svg +0 -1
- data/vendor/assets/javascripts/app.js +0 -9
- data/vendor/assets/javascripts/bootstrap.js +0 -6
- data/vendor/assets/javascripts/components/dark.js +0 -65
- data/vendor/assets/javascripts/components/sidebar.js +0 -185
- data/vendor/assets/javascripts/helper/isDesktop.js +0 -1
- data/vendor/assets/javascripts/initTheme.js +0 -5
- data/vendor/assets/javascripts/mazer.js +0 -9
- data/vendor/assets/javascripts/pages/ckeditor.js +0 -3
- data/vendor/assets/javascripts/pages/component-toasts.js +0 -9
- data/vendor/assets/javascripts/pages/dashboard.js +0 -158
- data/vendor/assets/javascripts/pages/datatables.js +0 -1
- data/vendor/assets/javascripts/pages/filepond.js +0 -181
- data/vendor/assets/javascripts/pages/form-editor.js +0 -27
- data/vendor/assets/javascripts/pages/form-element-select.js +0 -14
- data/vendor/assets/javascripts/pages/horizontal-layout.js +0 -43
- data/vendor/assets/javascripts/pages/jquery.js +0 -1
- data/vendor/assets/javascripts/pages/jsvectormap.js +0 -60
- data/vendor/assets/javascripts/pages/parsley.js +0 -55
- data/vendor/assets/javascripts/pages/quill.js +0 -27
- data/vendor/assets/javascripts/pages/rater-js.js +0 -38
- data/vendor/assets/javascripts/pages/simple-datatables.js +0 -46
- data/vendor/assets/javascripts/pages/summernote.js +0 -20
- data/vendor/assets/javascripts/pages/sweetalert2.js +0 -142
- data/vendor/assets/javascripts/pages/tinymce.js +0 -22
- data/vendor/assets/javascripts/pages/toastify.js +0 -81
- data/vendor/assets/javascripts/pages/ui-apexchart.js +0 -521
- data/vendor/assets/javascripts/pages/ui-chartjs.js +0 -445
- data/vendor/assets/javascripts/pages/ui-todolist.js +0 -5
- data/vendor/assets/stylesheets/_fonts.scss +0 -5
- data/vendor/assets/stylesheets/_mazer.scss +0 -103
- data/vendor/assets/stylesheets/_utilities.scss +0 -53
- data/vendor/assets/stylesheets/_variables.scss +0 -1626
- data/vendor/assets/stylesheets/app.scss +0 -20
- data/vendor/assets/stylesheets/bootstrap.scss +0 -58
- data/vendor/assets/stylesheets/components/_alert.scss +0 -43
- data/vendor/assets/stylesheets/components/_avatar.scss +0 -78
- data/vendor/assets/stylesheets/components/_badge.scss +0 -20
- data/vendor/assets/stylesheets/components/_breadcrumb.scss +0 -10
- data/vendor/assets/stylesheets/components/_buttons.scss +0 -62
- data/vendor/assets/stylesheets/components/_card.scss +0 -126
- data/vendor/assets/stylesheets/components/_carousel.scss +0 -6
- data/vendor/assets/stylesheets/components/_divider.scss +0 -37
- data/vendor/assets/stylesheets/components/_dropdowns.scss +0 -24
- data/vendor/assets/stylesheets/components/_forms.scss +0 -213
- data/vendor/assets/stylesheets/components/_icons.scss +0 -48
- data/vendor/assets/stylesheets/components/_modal.scss +0 -46
- data/vendor/assets/stylesheets/components/_navbar.scss +0 -280
- data/vendor/assets/stylesheets/components/_navs.scss +0 -32
- data/vendor/assets/stylesheets/components/_pagination.scss +0 -39
- data/vendor/assets/stylesheets/components/_progress.scss +0 -32
- data/vendor/assets/stylesheets/components/_sidebar.scss +0 -171
- data/vendor/assets/stylesheets/components/_table.scss +0 -36
- data/vendor/assets/stylesheets/iconly.scss +0 -327
- data/vendor/assets/stylesheets/layouts/main.scss +0 -48
- data/vendor/assets/stylesheets/mixins/_navbar.scss +0 -20
- data/vendor/assets/stylesheets/pages/auth.scss +0 -51
- data/vendor/assets/stylesheets/pages/chat.scss +0 -145
- data/vendor/assets/stylesheets/pages/datatables.scss +0 -7
- data/vendor/assets/stylesheets/pages/dripicons.scss +0 -20
- data/vendor/assets/stylesheets/pages/email.scss +0 -625
- data/vendor/assets/stylesheets/pages/error.scss +0 -22
- data/vendor/assets/stylesheets/pages/form-element-select.scss +0 -7
- data/vendor/assets/stylesheets/pages/simple-datatables.scss +0 -20
- data/vendor/assets/stylesheets/pages/summernote.scss +0 -4
- data/vendor/assets/stylesheets/themes/dark/_mazer-dark.scss +0 -82
- data/vendor/assets/stylesheets/themes/dark/_root.scss +0 -55
- data/vendor/assets/stylesheets/themes/dark/_variables-dark.scss +0 -329
- data/vendor/assets/stylesheets/themes/dark/app-dark.scss +0 -54
- data/vendor/assets/stylesheets/widgets/chat.scss +0 -26
- data/vendor/assets/stylesheets/widgets/todo.scss +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 450a434049c3f528dcf23ea98264e49ca118d7ead1805ea9d6a6b3f7c6fe153c
|
4
|
+
data.tar.gz: 8e1b6ccc626bc78fec7e07111432320e2a93359c384514f6edc257c9c9356a02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/mazer-rails.rb
ADDED
@@ -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
|
data/lib/mazer_rails/version.rb
CHANGED
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 "
|
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
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|