mirador_rails 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/app/controllers/mirador_rails/locales_controller.rb +10 -0
- data/config/routes.rb +7 -0
- data/lib/mirador_rails/exceptions.rb +6 -0
- data/lib/mirador_rails/locale.rb +24 -0
- data/lib/mirador_rails/version.rb +1 -1
- data/lib/mirador_rails.rb +9 -2
- data/mirador_rails.gemspec +3 -0
- data/tasks/mirador_rails.rake +44 -10
- data/vendor/assets/images/border_type_4.png +0 -0
- data/vendor/assets/images/border_type_5.png +0 -0
- data/vendor/assets/javascripts/mirador/mirador.js.erb +20105 -0
- data/vendor/assets/javascripts/mirador.js +4 -1
- data/vendor/assets/locales/de/translation.json +3 -0
- data/vendor/assets/locales/en/translation.json +11 -7
- data/vendor/assets/locales/ko/translation.json +18 -9
- data/vendor/assets/stylesheets/enhancements.scss +36 -0
- data/vendor/assets/stylesheets/mirador-combined.css +1488 -1642
- data/vendor/assets/stylesheets/mirador.css +1 -0
- metadata +52 -174
- data/vendor/assets/javascripts/mirador.min.js +0 -89
- data/vendor/assets/javascripts/mirador.min.js.map +0 -1
- data/vendor/assets/plugins/plugins/advlist/plugin.js +0 -97
- data/vendor/assets/plugins/plugins/advlist/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/anchor/plugin.js +0 -45
- data/vendor/assets/plugins/plugins/anchor/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/autolink/plugin.js +0 -194
- data/vendor/assets/plugins/plugins/autolink/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/autoresize/plugin.js +0 -152
- data/vendor/assets/plugins/plugins/autoresize/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/autosave/plugin.js +0 -165
- data/vendor/assets/plugins/plugins/autosave/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/bbcode/plugin.js +0 -123
- data/vendor/assets/plugins/plugins/bbcode/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/charmap/plugin.js +0 -370
- data/vendor/assets/plugins/plugins/charmap/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/code/plugin.js +0 -60
- data/vendor/assets/plugins/plugins/code/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/colorpicker/plugin.js +0 -112
- data/vendor/assets/plugins/plugins/colorpicker/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/compat3x/css/dialog.css +0 -118
- data/vendor/assets/plugins/plugins/compat3x/img/buttons.png +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/icons.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/items.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/menu_arrow.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/menu_check.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/progress.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/tabs.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/plugin.js +0 -297
- data/vendor/assets/plugins/plugins/compat3x/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/compat3x/tiny_mce_popup.js +0 -542
- data/vendor/assets/plugins/plugins/compat3x/utils/editable_selects.js +0 -70
- data/vendor/assets/plugins/plugins/compat3x/utils/form_utils.js +0 -210
- data/vendor/assets/plugins/plugins/compat3x/utils/mctabs.js +0 -164
- data/vendor/assets/plugins/plugins/compat3x/utils/validate.js +0 -252
- data/vendor/assets/plugins/plugins/contextmenu/plugin.js +0 -87
- data/vendor/assets/plugins/plugins/contextmenu/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/directionality/plugin.js +0 -64
- data/vendor/assets/plugins/plugins/directionality/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/plugin.js +0 -65
- data/vendor/assets/plugins/plugins/emoticons/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/example/dialog.html +0 -8
- data/vendor/assets/plugins/plugins/example/plugin.js +0 -68
- data/vendor/assets/plugins/plugins/example/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/example_dependency/plugin.js +0 -22
- data/vendor/assets/plugins/plugins/example_dependency/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/fullpage/plugin.js +0 -490
- data/vendor/assets/plugins/plugins/fullpage/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/fullscreen/plugin.js +0 -136
- data/vendor/assets/plugins/plugins/fullscreen/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/hr/plugin.js +0 -30
- data/vendor/assets/plugins/plugins/hr/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/image/plugin.js +0 -439
- data/vendor/assets/plugins/plugins/image/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/importcss/plugin.js +0 -195
- data/vendor/assets/plugins/plugins/importcss/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/insertdatetime/plugin.js +0 -121
- data/vendor/assets/plugins/plugins/insertdatetime/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/layer/plugin.js +0 -225
- data/vendor/assets/plugins/plugins/layer/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/legacyoutput/plugin.js +0 -211
- data/vendor/assets/plugins/plugins/legacyoutput/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/link/plugin.js +0 -400
- data/vendor/assets/plugins/plugins/link/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/lists/plugin.js +0 -791
- data/vendor/assets/plugins/plugins/lists/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/media/moxieplayer.swf +0 -0
- data/vendor/assets/plugins/plugins/media/plugin.js +0 -774
- data/vendor/assets/plugins/plugins/media/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/nonbreaking/plugin.js +0 -53
- data/vendor/assets/plugins/plugins/nonbreaking/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/noneditable/plugin.js +0 -540
- data/vendor/assets/plugins/plugins/noneditable/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/pagebreak/plugin.js +0 -88
- data/vendor/assets/plugins/plugins/pagebreak/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/paste/classes/Clipboard.js +0 -634
- data/vendor/assets/plugins/plugins/paste/classes/Plugin.js +0 -110
- data/vendor/assets/plugins/plugins/paste/classes/Quirks.js +0 -159
- data/vendor/assets/plugins/plugins/paste/classes/Utils.js +0 -130
- data/vendor/assets/plugins/plugins/paste/classes/WordFilter.js +0 -493
- data/vendor/assets/plugins/plugins/paste/plugin.dev.js +0 -120
- data/vendor/assets/plugins/plugins/paste/plugin.js +0 -1625
- data/vendor/assets/plugins/plugins/paste/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/preview/plugin.js +0 -88
- data/vendor/assets/plugins/plugins/preview/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/print/plugin.js +0 -32
- data/vendor/assets/plugins/plugins/print/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/save/plugin.js +0 -94
- data/vendor/assets/plugins/plugins/save/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/searchreplace/plugin.js +0 -594
- data/vendor/assets/plugins/plugins/searchreplace/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/spellchecker/classes/DomTextMatcher.js +0 -470
- data/vendor/assets/plugins/plugins/spellchecker/classes/Plugin.js +0 -436
- data/vendor/assets/plugins/plugins/spellchecker/plugin.dev.js +0 -117
- data/vendor/assets/plugins/plugins/spellchecker/plugin.js +0 -996
- data/vendor/assets/plugins/plugins/spellchecker/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/tabfocus/plugin.js +0 -120
- data/vendor/assets/plugins/plugins/tabfocus/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/table/classes/CellSelection.js +0 -176
- data/vendor/assets/plugins/plugins/table/classes/Dialogs.js +0 -749
- data/vendor/assets/plugins/plugins/table/classes/Plugin.js +0 -422
- data/vendor/assets/plugins/plugins/table/classes/Quirks.js +0 -372
- data/vendor/assets/plugins/plugins/table/classes/TableGrid.js +0 -864
- data/vendor/assets/plugins/plugins/table/plugin.dev.js +0 -118
- data/vendor/assets/plugins/plugins/table/plugin.js +0 -2680
- data/vendor/assets/plugins/plugins/table/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/template/plugin.js +0 -262
- data/vendor/assets/plugins/plugins/template/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/textcolor/plugin.js +0 -272
- data/vendor/assets/plugins/plugins/textcolor/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/textpattern/plugin.js +0 -268
- data/vendor/assets/plugins/plugins/textpattern/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/visualblocks/css/visualblocks.css +0 -135
- data/vendor/assets/plugins/plugins/visualblocks/img/address.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/article.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/aside.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/blockquote.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/div.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/dl.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/figure.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h1.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h2.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h3.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h4.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h5.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h6.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/hgroup.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/ol.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/p.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/pre.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/section.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/ul.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/plugin.js +0 -86
- data/vendor/assets/plugins/plugins/visualblocks/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/visualchars/plugin.js +0 -88
- data/vendor/assets/plugins/plugins/visualchars/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/wordcount/plugin.js +0 -69
- data/vendor/assets/plugins/plugins/wordcount/plugin.min.js +0 -1
- data/vendor/assets/skins/skins/lightgray/content.inline.min.css +0 -1
- data/vendor/assets/skins/skins/lightgray/content.min.css +0 -1
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.svg +0 -62
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce.eot +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce.svg +0 -63
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce.woff +0 -0
- data/vendor/assets/skins/skins/lightgray/img/anchor.gif +0 -0
- data/vendor/assets/skins/skins/lightgray/img/loader.gif +0 -0
- data/vendor/assets/skins/skins/lightgray/img/object.gif +0 -0
- data/vendor/assets/skins/skins/lightgray/img/trans.gif +0 -0
- data/vendor/assets/skins/skins/lightgray/skin.ie7.min.css +0 -1
- data/vendor/assets/skins/skins/lightgray/skin.min.css +0 -1
- data/vendor/assets/themes/themes/modern/theme.js +0 -617
- data/vendor/assets/themes/themes/modern/theme.min.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 679bf3fdaa9d65a617d66b8200f1c7171524c44e
|
4
|
+
data.tar.gz: f0e4ab8e8614570b837de736a0dad548ba4a4e18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d73aab219e38369f8c9a7b0c7fce392a8cbf3812e51dd170c9471b47ecc4896f3210f626a3645cb03c98e6278af60f8618756a08d0dcd4025e369c99992ac6f4
|
7
|
+
data.tar.gz: 59fbe2b01f083c7283eff5187ef0de444ff16e5ff6f3292181dd204e0c37e9bfd1bfec9f86fb423a095a4f6b72e6bb96834217fdf1f59c30158c3f76ca264769
|
data/README.md
CHANGED
@@ -20,6 +20,12 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
$ gem install mirador_rails
|
22
22
|
|
23
|
+
### Mount the Engine
|
24
|
+
In your `routes.rb` file mount the MiradorRails::Engine
|
25
|
+
```ruby
|
26
|
+
mount MiradorRails::Engine, at: MiradorRails::Engine.locales_mount_path
|
27
|
+
```
|
28
|
+
|
23
29
|
## Usage
|
24
30
|
|
25
31
|
You can require the mirador js by requiring the following:
|
data/config/routes.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
module MiradorRails
|
2
|
+
class Locale
|
3
|
+
attr_reader :language
|
4
|
+
|
5
|
+
def initialize(language)
|
6
|
+
@language = language
|
7
|
+
end
|
8
|
+
|
9
|
+
def path
|
10
|
+
"#{language}/translation.json"
|
11
|
+
end
|
12
|
+
|
13
|
+
def file_source
|
14
|
+
raise MiradorRails::Exceptions::LocaleNotFound, "Could not find #{path}" if file.blank?
|
15
|
+
file.source.force_encoding('UTF-8')
|
16
|
+
end
|
17
|
+
|
18
|
+
def file
|
19
|
+
# Rails.application.assets is `nil` in production mode (where compile assets is enabled).
|
20
|
+
# This workaround is based off of this comment: https://github.com/fphilipe/premailer-rails/issues/145#issuecomment-225992564
|
21
|
+
(Rails.application.assets || ::Sprockets::Railtie.build_environment(Rails.application)).find_asset(path)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/mirador_rails.rb
CHANGED
@@ -1,12 +1,19 @@
|
|
1
|
+
require 'mirador_rails/exceptions'
|
2
|
+
require 'mirador_rails/locale'
|
1
3
|
require 'mirador_rails/version'
|
2
4
|
require 'mirador_rails/view_helpers'
|
3
5
|
require 'font-awesome-rails'
|
4
6
|
require 'material_icons'
|
7
|
+
require 'openseadragon'
|
8
|
+
require 'jquery-rails'
|
9
|
+
require 'tinymce-rails'
|
5
10
|
|
6
11
|
module MiradorRails
|
12
|
+
##
|
13
|
+
# MiradorRails Engine
|
7
14
|
class Engine < ::Rails::Engine
|
8
|
-
|
9
|
-
|
15
|
+
cattr_accessor :locales_mount_path do
|
16
|
+
'/locales'
|
10
17
|
end
|
11
18
|
|
12
19
|
initializer 'mirador_rails.helpers' do
|
data/mirador_rails.gemspec
CHANGED
@@ -23,6 +23,9 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_dependency 'font-awesome-rails'
|
25
25
|
spec.add_dependency 'material_icons'
|
26
|
+
spec.add_dependency 'openseadragon'
|
27
|
+
spec.add_dependency 'jquery-rails'
|
28
|
+
spec.add_dependency 'tinymce-rails'
|
26
29
|
|
27
30
|
spec.add_development_dependency "bundler", "~> 1.14"
|
28
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/tasks/mirador_rails.rake
CHANGED
@@ -25,25 +25,59 @@ task :update, [:version] do |_t, args|
|
|
25
25
|
end
|
26
26
|
mirador_dir = File.join(tmp_dir, 'build', 'mirador')
|
27
27
|
vendor_dir = File.join(File.expand_path('..', File.dirname(__FILE__)), 'vendor', 'assets')
|
28
|
-
dirs_to_modify = %w(images locales
|
29
|
-
dirs_to_remap = %w(plugins skins themes)
|
28
|
+
dirs_to_modify = %w(images locales)
|
30
29
|
|
31
30
|
puts "Removing and copying #{dirs_to_modify}"
|
32
31
|
dirs_to_modify.map { |d| FileUtils.rm_rf(File.join(vendor_dir, d)) }
|
33
32
|
dirs_to_modify.map do |d|
|
34
|
-
|
35
|
-
FileUtils.mkdir_p(File.join(vendor_dir, d))
|
36
|
-
FileUtils.cp_r(File.join(mirador_dir, d), File.join(vendor_dir, d, d))
|
37
|
-
else
|
38
|
-
FileUtils.cp_r(File.join(mirador_dir, d), File.join(vendor_dir, d))
|
39
|
-
end
|
33
|
+
FileUtils.cp_r(File.join(mirador_dir, d), File.join(vendor_dir, d))
|
40
34
|
end
|
41
35
|
|
42
36
|
puts 'Copying stylesheets'
|
43
37
|
FileUtils.cp(File.join(mirador_dir, 'css', 'mirador-combined.css') , File.join(vendor_dir, 'stylesheets'))
|
44
38
|
|
45
39
|
puts 'Copying javascripts'
|
46
|
-
FileUtils.cp(Dir.glob(File.join(mirador_dir, 'mirador.
|
40
|
+
FileUtils.cp(Dir.glob(File.join(mirador_dir, 'mirador.js')), File.join(vendor_dir, 'javascripts', 'mirador'))
|
41
|
+
|
42
|
+
puts 'Updating js to use erb'
|
43
|
+
mirador_erb = File.join(vendor_dir, 'javascripts', 'mirador', 'mirador.js.erb')
|
44
|
+
mirador_js = File.join(vendor_dir, 'javascripts', 'mirador', 'mirador.js')
|
45
|
+
|
46
|
+
text = File.read(mirador_js)
|
47
|
+
puts 'Replacing images with erb tags'
|
48
|
+
content = text.gsub("var backgroundImage = _this.state.getStateProperty('buildPath') + _this.state.getStateProperty('imagesPath') + 'debut_dark.png';", "var backgroundImage = \"<%= asset_path('debut_dark.png') %>\"")
|
49
|
+
|
50
|
+
puts 'Comment out border image replacement, using SCSS instead'
|
51
|
+
content = content.gsub("el.css('background-image','url('+this.getImagePath(imageName)+')');", 'el // Comment out, using SCSS instead \1')
|
52
|
+
|
53
|
+
puts 'Replacing i18next template, with MiradorRails controller route (default)'
|
54
|
+
content = content.gsub("loadPath: _this.state.getStateProperty('buildPath') + _this.state.getStateProperty('i18nPath')+'{{lng}}/{{ns}}.json'", "loadPath: '<%= MiradorRails::Engine.locales_mount_path %>' + '/{{lng}}/{{ns}}.json'")
|
55
|
+
|
56
|
+
puts 'Removes tinymce library'
|
57
|
+
content = content.gsub(/^!function\(e,t\).*(tinymce\S*){10,}.*\/\*!\n\n handlebars/m, "/*!\n\n handlebars")
|
58
|
+
|
59
|
+
puts 'Removing OpenSeaDragon'
|
60
|
+
content = content.gsub(/\/\/! openseadragon .*\/\/# sourceMappingURL=openseadragon.js.map/m, '')
|
61
|
+
|
62
|
+
puts 'Removing jQuery'
|
63
|
+
content = content.gsub(/\/\*! jQuery v.*\/*! jQuery Migrate/m, '/*! jQuery Migrate')
|
64
|
+
|
65
|
+
puts 'Remove qtip map'
|
66
|
+
content = content.gsub("//# sourceMappingURL=jquery.qtip.min.js.map", "\n")
|
67
|
+
|
68
|
+
File.open(mirador_erb, 'w') { |f| f << content }
|
69
|
+
FileUtils.rm(mirador_js)
|
70
|
+
|
71
|
+
puts 'Removing FontAwesome from css'
|
72
|
+
css_file = File.join(vendor_dir, 'stylesheets', 'mirador-combined.css')
|
73
|
+
text = File.read(css_file)
|
74
|
+
content = text.gsub(/\/\*!\n\s\*\s\sFont Awesome.*\/*! jQuery UI/m, '/*! jQuery UI')
|
75
|
+
File.open(css_file, 'w') { |f| f << content }
|
47
76
|
|
48
|
-
puts '
|
77
|
+
puts 'Removing MaterialIcons from css'
|
78
|
+
css_file = File.join(vendor_dir, 'stylesheets', 'mirador-combined.css')
|
79
|
+
text = File.read(css_file)
|
80
|
+
content = text.gsub(/@font-face {\s*font-family: 'Material Icons';.*}/m, '')
|
81
|
+
content = content.gsub(/\.material-icons {\s*font-family: 'Material Icons';.*}/m, '')
|
82
|
+
File.open(css_file, 'w') { |f| f << content }
|
49
83
|
end
|
Binary file
|
Binary file
|