torba 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/lib/torba.rb +9 -1
- data/lib/torba/css_url_to_erb_asset_path.rb +5 -1
- data/lib/torba/manifest.rb +1 -1
- data/lib/torba/package.rb +12 -8
- data/test/acceptance_test.rb +50 -64
- data/test/css_url_to_erb_asset_path_test.rb +5 -0
- data/test/fixtures/home_path/01/trumbowyg/icons-2x.png +0 -0
- data/test/fixtures/home_path/01/trumbowyg/icons.png +0 -0
- data/test/fixtures/home_path/01/trumbowyg/trumbowyg.css.erb +471 -0
- data/test/fixtures/home_path/01/trumbowyg/trumbowyg.js +1124 -0
- data/test/fixtures/home_path/02/lo_dash/lodash.js +2793 -0
- data/test/fixtures/home_path/04/bourbon/_border-image.scss +59 -0
- data/test/fixtures/home_path/04/bourbon/_font-source-declaration.scss +43 -0
- data/test/fixtures/home_path/04/bourbon/_retina-image.scss +25 -0
- data/test/fixtures/torbafiles/01_gh_release.rb +8 -0
- data/test/fixtures/torbafiles/01_targz.rb +7 -0
- data/test/fixtures/torbafiles/01_zip.rb +7 -0
- data/test/fixtures/torbafiles/02_npm.rb +1 -0
- data/test/fixtures/torbafiles/03_image_asset_not_specified.rb +7 -0
- data/test/fixtures/torbafiles/04_not_existed_assets.rb +5 -0
- data/test/package_test.rb +10 -0
- data/test/test_helper.rb +68 -7
- data/test/torba_test.rb +13 -0
- data/torba.gemspec +1 -1
- metadata +32 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bd70287a39a252b5d531289c3c2781d5ba05ac4
|
4
|
+
data.tar.gz: 773eb4868c3e708319809c17b02c4a8dc4218457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea7e6774e31e07ef6453ef8880ed6c8c183ebfdb6395aefa680880023ca1544573a58cf6cce91707e7029b9646915e9a1cc9ca591e39a664532cac46f4b7cc89
|
7
|
+
data.tar.gz: b640e1c881277a412cf045e2fd35e9e42a81cbc22ac74bd88935e44dc072a7e7110457332f923a30b23b0a48fec4d39fdfa61099e88bad712ba8c96e5de101c3
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/torba.rb
CHANGED
@@ -30,6 +30,14 @@ module Torba
|
|
30
30
|
@cache_path ||= ENV["TORBA_CACHE_PATH"] || File.join(home_path, "cache")
|
31
31
|
end
|
32
32
|
|
33
|
+
# Override cache path with a new value
|
34
|
+
# @param val [String] new cache path
|
35
|
+
# @return [void]
|
36
|
+
# @since 0.6.0
|
37
|
+
def self.cache_path=(val)
|
38
|
+
@cache_path = val
|
39
|
+
end
|
40
|
+
|
33
41
|
# @return [Ui]
|
34
42
|
def self.ui
|
35
43
|
@ui ||= Ui.new
|
@@ -90,7 +98,7 @@ module Torba
|
|
90
98
|
ui.suggest "Make sure that the path has trailing '/' if its a directory."
|
91
99
|
exit(false)
|
92
100
|
rescue Errors::AssetNotFound => e
|
93
|
-
ui.error "
|
101
|
+
ui.error "Unknown asset to process with path '#{e.message}'."
|
94
102
|
ui.suggest "Make sure that you've imported all image/font assets mentioned in a stylesheet(-s)."
|
95
103
|
exit(false)
|
96
104
|
end
|
@@ -52,7 +52,11 @@ module Torba
|
|
52
52
|
content.gsub(URL_RE) do
|
53
53
|
absolute_image_file_path = File.expand_path($2, File.dirname(file_path))
|
54
54
|
sprockets_file_path = yield absolute_image_file_path
|
55
|
-
|
55
|
+
if sprockets_file_path
|
56
|
+
"#{$1}<%= asset_path('#{sprockets_file_path}') %>#{$3}"
|
57
|
+
else
|
58
|
+
$&
|
59
|
+
end
|
56
60
|
end
|
57
61
|
end
|
58
62
|
end
|
data/lib/torba/manifest.rb
CHANGED
data/lib/torba/package.rb
CHANGED
@@ -155,18 +155,22 @@ module Torba
|
|
155
155
|
end
|
156
156
|
|
157
157
|
def process_stylesheets
|
158
|
-
import_list.css_assets.each do |
|
159
|
-
content = File.read(
|
160
|
-
|
161
|
-
new_content = CssUrlToErbAssetPath.call(content,
|
162
|
-
|
163
|
-
|
158
|
+
import_list.css_assets.each do |css_asset|
|
159
|
+
content = File.read(css_asset.absolute_path)
|
160
|
+
|
161
|
+
new_content = CssUrlToErbAssetPath.call(content, css_asset.absolute_path) do |asset_file_path|
|
162
|
+
if File.exist?(asset_file_path)
|
163
|
+
asset = import_list.find_by_absolute_path(asset_file_path)
|
164
|
+
asset.logical_path
|
165
|
+
else
|
166
|
+
nil
|
167
|
+
end
|
164
168
|
end
|
165
169
|
|
166
170
|
if content == new_content
|
167
|
-
new_absolute_path = File.join(load_path,
|
171
|
+
new_absolute_path = File.join(load_path, css_asset.logical_path)
|
168
172
|
else
|
169
|
-
new_absolute_path = File.join(load_path,
|
173
|
+
new_absolute_path = File.join(load_path, css_asset.logical_path + ".erb")
|
170
174
|
end
|
171
175
|
|
172
176
|
ensure_directory(new_absolute_path)
|
data/test/acceptance_test.rb
CHANGED
@@ -2,86 +2,72 @@ require "test_helper"
|
|
2
2
|
|
3
3
|
module Torba
|
4
4
|
class AcceptanceTest < Minitest::Test
|
5
|
-
|
6
|
-
@manifest ||= Manifest.build("test/Torbafile")
|
7
|
-
end
|
8
|
-
|
9
|
-
def find_path(file_path)
|
10
|
-
manifest.load_path.map{ |lp| File.join(lp, file_path) }.find{ |full_path| File.exists?(full_path) }
|
11
|
-
end
|
5
|
+
include Torba::Test::Exec
|
12
6
|
|
13
|
-
def
|
14
|
-
|
7
|
+
def test_pack_zip
|
8
|
+
out, err, status = torba("pack", torbafile: "01_zip.rb")
|
9
|
+
assert status.success?, err
|
10
|
+
assert_includes out, "Torba has been packed!"
|
11
|
+
compare_dirs "test/fixtures/home_path/01", path_to_packaged("trumbowyg")
|
15
12
|
end
|
16
13
|
|
17
|
-
def
|
18
|
-
|
14
|
+
def test_pack_targz
|
15
|
+
out, err, status = torba("pack", torbafile: "01_targz.rb")
|
16
|
+
assert status.success?, err
|
17
|
+
assert_includes out, "Torba has been packed!"
|
18
|
+
compare_dirs "test/fixtures/home_path/01", path_to_packaged("trumbowyg")
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
22
|
-
|
21
|
+
def test_pack_gh_release
|
22
|
+
out, err, status = torba("pack", torbafile: "01_gh_release.rb")
|
23
|
+
assert status.success?, err
|
24
|
+
assert_includes out, "Torba has been packed!"
|
25
|
+
compare_dirs "test/fixtures/home_path/01", path_to_packaged("trumbowyg")
|
23
26
|
end
|
24
27
|
|
25
|
-
def
|
26
|
-
|
27
|
-
|
28
|
+
def test_pack_npm
|
29
|
+
out, err, status = torba("pack", torbafile: "02_npm.rb")
|
30
|
+
assert status.success?, err
|
31
|
+
assert_includes out, "Torba has been packed!"
|
32
|
+
compare_dirs "test/fixtures/home_path/02", path_to_packaged("lo_dash")
|
28
33
|
end
|
29
34
|
|
30
|
-
def
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
assert_exists "trumbowyg-from-zip/trumbowyg.js"
|
38
|
-
refute_exists "trumbowyg-from-zip/trumbowyg.css.erb"
|
39
|
-
refute_exists "trumbowyg-from-zip/icons.png"
|
40
|
-
refute_exists "trumbowyg-from-zip/icons-2x.png"
|
35
|
+
def test_pack_without_image_asset_specified_in_import
|
36
|
+
out, err, status = torba("pack", torbafile: "03_image_asset_not_specified.rb")
|
37
|
+
refute status.success?, err
|
38
|
+
assert_includes out, <<OUT
|
39
|
+
Unknown asset to process with path '#{path_to_packaged "Trumbowyg", Test::TempHome.persistent_tmp_dir}/dist/ui/images/icons-2x.png'.
|
40
|
+
Make sure that you've imported all image/font assets mentioned in a stylesheet(-s).
|
41
|
+
OUT
|
41
42
|
end
|
42
43
|
|
43
|
-
def
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
dist/ui/images/
|
49
|
-
]
|
50
|
-
TORBA
|
51
|
-
|
52
|
-
assert_exists "trumbowyg/trumbowyg.js"
|
53
|
-
assert_exists "trumbowyg/trumbowyg.css.erb"
|
54
|
-
assert_exists "trumbowyg/icons.png"
|
55
|
-
assert_exists "trumbowyg/icons-2x.png"
|
56
|
-
|
57
|
-
css = read_path "trumbowyg/trumbowyg.css.erb"
|
58
|
-
assert_includes css, %[background: transparent url("<%= asset_path('trumbowyg/icons.png') %>") no-repeat;]
|
59
|
-
assert_includes css, %[background-image: url("<%= asset_path('trumbowyg/icons-2x.png') %>")]
|
44
|
+
def test_pack_with_not_existed_assets_mentioned_in_stylesheets
|
45
|
+
out, err, status = torba("pack", torbafile: "04_not_existed_assets.rb")
|
46
|
+
assert status.success?, err
|
47
|
+
assert_includes out, "Torba has been packed!"
|
48
|
+
compare_dirs "test/fixtures/home_path/04", path_to_packaged("bourbon")
|
60
49
|
end
|
61
50
|
|
62
|
-
def
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
assert_exists "trumbowyg-from-tar/images/icons.png"
|
72
|
-
assert_exists "trumbowyg-from-tar/images/icons-2x.png"
|
73
|
-
|
74
|
-
css = read_path "trumbowyg-from-tar/trumbowyg.css.erb"
|
75
|
-
assert_includes css, %[background: transparent url("<%= asset_path('trumbowyg-from-tar/images/icons.png') %>") no-repeat;]
|
76
|
-
assert_includes css, %[background-image: url("<%= asset_path('trumbowyg-from-tar/images/icons-2x.png') %>")]
|
51
|
+
def test_verify_unpacked
|
52
|
+
out, err, status = torba("verify", torbafile: "01_zip.rb")
|
53
|
+
refute status.success?, err
|
54
|
+
assert_equal <<OUT, out
|
55
|
+
Your Torba is not packed yet.
|
56
|
+
Missing packages:
|
57
|
+
* trumbowyg
|
58
|
+
Run `bundle exec torba pack` to install missing packages.
|
59
|
+
OUT
|
77
60
|
end
|
78
61
|
|
79
|
-
def
|
80
|
-
|
81
|
-
|
82
|
-
TORBA
|
62
|
+
def test_verify_packed
|
63
|
+
_, err, status = torba("pack", torbafile: "01_zip.rb")
|
64
|
+
assert status.success?, err
|
83
65
|
|
84
|
-
|
66
|
+
out, err, status = torba("verify", torbafile: "01_zip.rb")
|
67
|
+
assert status.success?, err
|
68
|
+
assert_equal <<OUT, out
|
69
|
+
Torba is prepared!
|
70
|
+
OUT
|
85
71
|
end
|
86
72
|
end
|
87
73
|
end
|
@@ -32,6 +32,11 @@ module Torba
|
|
32
32
|
assert_equal "background-image: url('/icons.png');", filter.call(css, "/current_file")
|
33
33
|
end
|
34
34
|
|
35
|
+
def test_block_returns_nil
|
36
|
+
css = "background-image: url('icons.png');"
|
37
|
+
assert_equal css, filter.call(css, "/current_file") { nil }
|
38
|
+
end
|
39
|
+
|
35
40
|
def test_stylesheet_and_image_in_same_directory
|
36
41
|
current_file = "/home/package/dist/ui/stylesheet.css"
|
37
42
|
css = "background-image: url('icons.png');"
|
Binary file
|
Binary file
|
@@ -0,0 +1,471 @@
|
|
1
|
+
/**
|
2
|
+
* Trumbowyg v1.1.6 - A lightweight WYSIWYG editor
|
3
|
+
* Default stylesheet for Trumbowyg editor
|
4
|
+
* ------------------------
|
5
|
+
* @link http://alex-d.github.io/Trumbowyg
|
6
|
+
* @license MIT
|
7
|
+
* @author Alexandre Demode (Alex-D)
|
8
|
+
* Twitter : @AlexandreDemode
|
9
|
+
* Website : alex-d.fr
|
10
|
+
*/
|
11
|
+
|
12
|
+
.trumbowyg-box, .trumbowyg-editor {
|
13
|
+
display: block;
|
14
|
+
position: relative;
|
15
|
+
border: 1px solid #DDD;
|
16
|
+
width: 96%;
|
17
|
+
min-height: 300px;
|
18
|
+
margin: 17px auto; }
|
19
|
+
|
20
|
+
.trumbowyg-box .trumbowyg-editor {
|
21
|
+
margin: 0 auto; }
|
22
|
+
|
23
|
+
.trumbowyg-box.trumbowyg-fullscreen {
|
24
|
+
background: #FEFEFE; }
|
25
|
+
|
26
|
+
.trumbowyg-editor, .trumbowyg-textarea {
|
27
|
+
position: relative;
|
28
|
+
-webkit-box-sizing: border-box;
|
29
|
+
-moz-box-sizing: border-box;
|
30
|
+
box-sizing: border-box;
|
31
|
+
padding: 1% 2%;
|
32
|
+
min-height: 300px;
|
33
|
+
width: 100%;
|
34
|
+
border-style: none;
|
35
|
+
resize: none;
|
36
|
+
outline: none; }
|
37
|
+
|
38
|
+
.trumbowyg-box-blur .trumbowyg-editor * {
|
39
|
+
color: transparent !important;
|
40
|
+
text-shadow: 0 0 7px #333; }
|
41
|
+
.trumbowyg-box-blur .trumbowyg-editor img {
|
42
|
+
opacity: 0.2; }
|
43
|
+
|
44
|
+
.trumbowyg-textarea {
|
45
|
+
position: relative;
|
46
|
+
display: block;
|
47
|
+
overflow: auto;
|
48
|
+
border: none;
|
49
|
+
white-space: normal; }
|
50
|
+
|
51
|
+
.trumbowyg-editor[contenteditable=true]:empty:before {
|
52
|
+
content: attr(placeholder);
|
53
|
+
color: #999; }
|
54
|
+
|
55
|
+
.trumbowyg-button-pane {
|
56
|
+
position: relative;
|
57
|
+
width: 100%;
|
58
|
+
background: #ecf0f1;
|
59
|
+
border-bottom: 1px solid #d7e0e2;
|
60
|
+
margin: 0;
|
61
|
+
padding: 0;
|
62
|
+
list-style-type: none;
|
63
|
+
line-height: 10px;
|
64
|
+
-webkit-backface-visibility: hidden;
|
65
|
+
backface-visibility: hidden; }
|
66
|
+
.trumbowyg-button-pane li {
|
67
|
+
display: inline-block;
|
68
|
+
text-align: center;
|
69
|
+
overflow: hidden; }
|
70
|
+
.trumbowyg-button-pane li.trumbowyg-separator {
|
71
|
+
width: 1px;
|
72
|
+
background: #d7e0e2;
|
73
|
+
margin: 0 5px;
|
74
|
+
height: 35px; }
|
75
|
+
.trumbowyg-button-pane.trumbowyg-disable li:not(.trumbowyg-not-disable) button:not(.trumbowyg-active) {
|
76
|
+
opacity: 0.2;
|
77
|
+
cursor: default; }
|
78
|
+
.trumbowyg-button-pane.trumbowyg-disable li.trumbowyg-separator {
|
79
|
+
background: #e3e9eb; }
|
80
|
+
.trumbowyg-button-pane:not(.trumbowyg-disable) li button:hover, .trumbowyg-button-pane:not(.trumbowyg-disable) li button:focus, .trumbowyg-button-pane li button.trumbowyg-active, .trumbowyg-button-pane li.trumbowyg-not-disable button:hover, .trumbowyg-button-pane li.trumbowyg-not-disable button:focus {
|
81
|
+
background-color: #FFF;
|
82
|
+
outline: none; }
|
83
|
+
.trumbowyg-button-pane li .trumbowyg-open-dropdown:after {
|
84
|
+
display: block;
|
85
|
+
content: " ";
|
86
|
+
position: absolute;
|
87
|
+
top: 25px;
|
88
|
+
right: 3px;
|
89
|
+
height: 0;
|
90
|
+
width: 0;
|
91
|
+
border: 3px solid transparent;
|
92
|
+
border-top-color: #555; }
|
93
|
+
.trumbowyg-button-pane .trumbowyg-buttons-right {
|
94
|
+
float: right;
|
95
|
+
width: auto; }
|
96
|
+
.trumbowyg-button-pane .trumbowyg-buttons-right button {
|
97
|
+
float: left; }
|
98
|
+
|
99
|
+
.trumbowyg-dropdown {
|
100
|
+
width: 200px;
|
101
|
+
border: 1px solid #ecf0f1;
|
102
|
+
padding: 5px 0;
|
103
|
+
border-top: none;
|
104
|
+
background: #FFF;
|
105
|
+
margin-left: -1px;
|
106
|
+
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0 2px 3px;
|
107
|
+
box-shadow: rgba(0, 0, 0, 0.1) 0 2px 3px; }
|
108
|
+
.trumbowyg-dropdown button {
|
109
|
+
display: block;
|
110
|
+
width: 100%;
|
111
|
+
height: 35px;
|
112
|
+
line-height: 35px;
|
113
|
+
text-decoration: none;
|
114
|
+
background: #FFF;
|
115
|
+
padding: 0 14px;
|
116
|
+
color: #333;
|
117
|
+
border: none;
|
118
|
+
cursor: pointer;
|
119
|
+
text-align: left;
|
120
|
+
font-size: 15px;
|
121
|
+
-webkit-transition: all 0.15s;
|
122
|
+
-o-transition: all 0.15s;
|
123
|
+
transition: all 0.15s; }
|
124
|
+
.trumbowyg-dropdown button:hover, .trumbowyg-dropdown button:focus {
|
125
|
+
background: #ecf0f1; }
|
126
|
+
|
127
|
+
/* Modal box */
|
128
|
+
.trumbowyg-modal {
|
129
|
+
position: absolute;
|
130
|
+
top: 0;
|
131
|
+
left: 50%;
|
132
|
+
margin-left: -260px;
|
133
|
+
width: 520px;
|
134
|
+
height: 290px;
|
135
|
+
overflow: hidden; }
|
136
|
+
|
137
|
+
.trumbowyg-modal-box {
|
138
|
+
position: absolute;
|
139
|
+
top: 0;
|
140
|
+
left: 50%;
|
141
|
+
margin-left: -250px;
|
142
|
+
width: 500px;
|
143
|
+
height: 275px;
|
144
|
+
z-index: 1;
|
145
|
+
background-color: #FFF;
|
146
|
+
text-align: center;
|
147
|
+
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 2px 3px;
|
148
|
+
box-shadow: rgba(0, 0, 0, 0.2) 0 2px 3px;
|
149
|
+
-webkit-backface-visibility: hidden;
|
150
|
+
backface-visibility: hidden; }
|
151
|
+
.trumbowyg-modal-box .trumbowyg-modal-title {
|
152
|
+
font-size: 24px;
|
153
|
+
font-weight: bold;
|
154
|
+
margin: 0 0 20px;
|
155
|
+
padding: 15px 0 13px;
|
156
|
+
display: block;
|
157
|
+
border-bottom: 1px solid #EEE;
|
158
|
+
color: #333;
|
159
|
+
background: #fbfcfc; }
|
160
|
+
.trumbowyg-modal-box .trumbowyg-progress {
|
161
|
+
width: 100%;
|
162
|
+
background: #F00;
|
163
|
+
height: 3px;
|
164
|
+
position: absolute;
|
165
|
+
top: 58px; }
|
166
|
+
.trumbowyg-modal-box .trumbowyg-progress .trumbowyg-progress-bar {
|
167
|
+
background: #2BC06A;
|
168
|
+
height: 100%;
|
169
|
+
-webkit-transition: width 0.15s linear;
|
170
|
+
-o-transition: width 0.15s linear;
|
171
|
+
transition: width 0.15s linear; }
|
172
|
+
.trumbowyg-modal-box label {
|
173
|
+
display: block;
|
174
|
+
position: relative;
|
175
|
+
margin: 15px 12px;
|
176
|
+
height: 27px;
|
177
|
+
line-height: 27px;
|
178
|
+
overflow: hidden; }
|
179
|
+
.trumbowyg-modal-box label .trumbowyg-input-infos {
|
180
|
+
display: block;
|
181
|
+
text-align: left;
|
182
|
+
height: 25px;
|
183
|
+
line-height: 25px;
|
184
|
+
-webkit-transition: all 0.15;
|
185
|
+
-o-transition: all 0.15;
|
186
|
+
transition: all 0.15; }
|
187
|
+
.trumbowyg-modal-box label .trumbowyg-input-infos span {
|
188
|
+
display: block;
|
189
|
+
color: #859fa5;
|
190
|
+
background-color: #fbfcfc;
|
191
|
+
border: 1px solid #DEDEDE;
|
192
|
+
padding: 0 2%;
|
193
|
+
width: 19.5%; }
|
194
|
+
.trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error {
|
195
|
+
color: #e74c3c; }
|
196
|
+
.trumbowyg-modal-box label.trumbowyg-input-error input, .trumbowyg-modal-box label.trumbowyg-input-error textarea {
|
197
|
+
border: 1px solid #e74c3c; }
|
198
|
+
.trumbowyg-modal-box label.trumbowyg-input-error .trumbowyg-input-infos {
|
199
|
+
margin-top: -27px; }
|
200
|
+
.trumbowyg-modal-box label input {
|
201
|
+
position: absolute;
|
202
|
+
top: 0;
|
203
|
+
right: 0;
|
204
|
+
height: 25px;
|
205
|
+
line-height: 25px;
|
206
|
+
border: 1px solid #DEDEDE;
|
207
|
+
background: transparent;
|
208
|
+
width: 72%;
|
209
|
+
padding: 0 2%;
|
210
|
+
margin: 0 0 0 23%;
|
211
|
+
-webkit-transition: all 0.15s;
|
212
|
+
-o-transition: all 0.15s;
|
213
|
+
transition: all 0.15s; }
|
214
|
+
.trumbowyg-modal-box label input:hover, .trumbowyg-modal-box label input:focus {
|
215
|
+
outline: none;
|
216
|
+
border: 1px solid #95a5a6; }
|
217
|
+
.trumbowyg-modal-box label input:focus {
|
218
|
+
background: rgba(230, 230, 255, 0.1); }
|
219
|
+
.trumbowyg-modal-box .error {
|
220
|
+
margin-top: 25px;
|
221
|
+
display: block;
|
222
|
+
color: red; }
|
223
|
+
.trumbowyg-modal-box .trumbowyg-modal-button {
|
224
|
+
position: absolute;
|
225
|
+
bottom: 10px;
|
226
|
+
right: 0;
|
227
|
+
text-decoration: none;
|
228
|
+
color: #FFF;
|
229
|
+
display: block;
|
230
|
+
width: 100px;
|
231
|
+
height: 35px;
|
232
|
+
line-height: 33px;
|
233
|
+
margin: 0 10px;
|
234
|
+
background-color: #333;
|
235
|
+
border: none;
|
236
|
+
border-top: none;
|
237
|
+
cursor: pointer;
|
238
|
+
font-family: "Trebuchet MS", Helvetica, Verdana, sans-serif;
|
239
|
+
font-size: 16px;
|
240
|
+
-webkit-transition: all 0.15s;
|
241
|
+
-o-transition: all 0.15s;
|
242
|
+
transition: all 0.15s; }
|
243
|
+
.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit {
|
244
|
+
right: 110px;
|
245
|
+
background: #2bc069; }
|
246
|
+
.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover, .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus {
|
247
|
+
background: #40d47d;
|
248
|
+
outline: none; }
|
249
|
+
.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active {
|
250
|
+
background: #25a259; }
|
251
|
+
.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset {
|
252
|
+
color: #555;
|
253
|
+
background: #e6e6e6; }
|
254
|
+
.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover, .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus {
|
255
|
+
background: #fbfbfb;
|
256
|
+
outline: none; }
|
257
|
+
.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active {
|
258
|
+
background: #d4d4d4; }
|
259
|
+
|
260
|
+
.trumbowyg-overlay {
|
261
|
+
position: absolute;
|
262
|
+
background-color: rgba(255, 255, 255, 0.5);
|
263
|
+
width: 100%;
|
264
|
+
left: 0;
|
265
|
+
display: none; }
|
266
|
+
|
267
|
+
/**
|
268
|
+
* Fullscreen
|
269
|
+
*/
|
270
|
+
.trumbowyg-fullscreen {
|
271
|
+
position: fixed;
|
272
|
+
top: 0;
|
273
|
+
left: 0;
|
274
|
+
width: 100%;
|
275
|
+
height: 100%;
|
276
|
+
margin: 0;
|
277
|
+
padding: 0;
|
278
|
+
z-index: 99999; }
|
279
|
+
.trumbowyg-fullscreen.trumbowyg-box, .trumbowyg-fullscreen .trumbowyg-editor {
|
280
|
+
border: none; }
|
281
|
+
.trumbowyg-fullscreen .trumbowyg-overlay {
|
282
|
+
height: 100% !important; }
|
283
|
+
|
284
|
+
/*
|
285
|
+
* Reset for resetCss option
|
286
|
+
*/
|
287
|
+
.trumbowyg-editor object, .trumbowyg-editor embed, .trumbowyg-editor video, .trumbowyg-editor img {
|
288
|
+
width: auto;
|
289
|
+
max-width: 100%; }
|
290
|
+
.trumbowyg-editor video, .trumbowyg-editor img {
|
291
|
+
height: auto; }
|
292
|
+
.trumbowyg-editor img {
|
293
|
+
cursor: move; }
|
294
|
+
.trumbowyg-editor.trumbowyg-reset-css {
|
295
|
+
background: #FEFEFE !important;
|
296
|
+
font-family: "Trebuchet MS", Helvetica, Verdana, sans-serif !important;
|
297
|
+
font-size: 14px !important;
|
298
|
+
line-height: 1.45em !important;
|
299
|
+
white-space: normal !important;
|
300
|
+
color: #333; }
|
301
|
+
.trumbowyg-editor.trumbowyg-reset-css a {
|
302
|
+
color: #15c !important;
|
303
|
+
text-decoration: underline !important; }
|
304
|
+
.trumbowyg-editor.trumbowyg-reset-css div, .trumbowyg-editor.trumbowyg-reset-css p, .trumbowyg-editor.trumbowyg-reset-css ul, .trumbowyg-editor.trumbowyg-reset-css ol, .trumbowyg-editor.trumbowyg-reset-css blockquote {
|
305
|
+
-webkit-box-shadow: none !important;
|
306
|
+
box-shadow: none !important;
|
307
|
+
background: none !important;
|
308
|
+
margin: 0 !important;
|
309
|
+
margin-bottom: 15px !important;
|
310
|
+
line-height: 1.4em !important;
|
311
|
+
font-family: "Trebuchet MS", Helvetica, Verdana, sans-serif !important;
|
312
|
+
font-size: 14px !important;
|
313
|
+
border: none; }
|
314
|
+
.trumbowyg-editor.trumbowyg-reset-css iframe, .trumbowyg-editor.trumbowyg-reset-css object, .trumbowyg-editor.trumbowyg-reset-css hr {
|
315
|
+
margin-bottom: 15px !important; }
|
316
|
+
.trumbowyg-editor.trumbowyg-reset-css blockquote {
|
317
|
+
margin-left: 32px !important;
|
318
|
+
font-style: italic !important;
|
319
|
+
color: #555; }
|
320
|
+
.trumbowyg-editor.trumbowyg-reset-css ul, .trumbowyg-editor.trumbowyg-reset-css ol {
|
321
|
+
padding-left: 20px !important; }
|
322
|
+
.trumbowyg-editor.trumbowyg-reset-css ul ul, .trumbowyg-editor.trumbowyg-reset-css ol ol, .trumbowyg-editor.trumbowyg-reset-css ul ol, .trumbowyg-editor.trumbowyg-reset-css ol ul {
|
323
|
+
border: none;
|
324
|
+
margin: 2px !important;
|
325
|
+
padding: 0 !important;
|
326
|
+
padding-left: 24px !important; }
|
327
|
+
.trumbowyg-editor.trumbowyg-reset-css hr {
|
328
|
+
display: block;
|
329
|
+
height: 1px;
|
330
|
+
border: none;
|
331
|
+
border-top: 1px solid #CCC; }
|
332
|
+
.trumbowyg-editor.trumbowyg-reset-css h1, .trumbowyg-editor.trumbowyg-reset-css h2, .trumbowyg-editor.trumbowyg-reset-css h3, .trumbowyg-editor.trumbowyg-reset-css h4 {
|
333
|
+
color: #111;
|
334
|
+
background: none;
|
335
|
+
margin: 0 !important;
|
336
|
+
padding: 0 !important;
|
337
|
+
font-weight: bold; }
|
338
|
+
.trumbowyg-editor.trumbowyg-reset-css h1 {
|
339
|
+
font-size: 32px !important;
|
340
|
+
line-height: 38px !important;
|
341
|
+
margin-bottom: 20px !important; }
|
342
|
+
.trumbowyg-editor.trumbowyg-reset-css h2 {
|
343
|
+
font-size: 26px !important;
|
344
|
+
line-height: 34px !important;
|
345
|
+
margin-bottom: 15px !important; }
|
346
|
+
.trumbowyg-editor.trumbowyg-reset-css h3 {
|
347
|
+
font-size: 22px !important;
|
348
|
+
line-height: 28px !important;
|
349
|
+
margin-bottom: 7px !important; }
|
350
|
+
.trumbowyg-editor.trumbowyg-reset-css h4 {
|
351
|
+
font-size: 16px !important;
|
352
|
+
line-height: 22px !important;
|
353
|
+
margin-bottom: 7px !important; }
|
354
|
+
|
355
|
+
/*
|
356
|
+
* Buttons icons
|
357
|
+
*/
|
358
|
+
.trumbowyg-button-pane li button {
|
359
|
+
display: block;
|
360
|
+
position: relative;
|
361
|
+
text-indent: -9999px;
|
362
|
+
width: 35px;
|
363
|
+
height: 35px;
|
364
|
+
overflow: hidden;
|
365
|
+
background: transparent url("<%= asset_path('trumbowyg/icons.png') %>") no-repeat;
|
366
|
+
border: none;
|
367
|
+
cursor: pointer;
|
368
|
+
-webkit-transition: background-color 0.15s, background-image 0.15s, opacity 0.15s;
|
369
|
+
-o-transition: background-color 0.15s, background-image 0.15s, opacity 0.15s;
|
370
|
+
transition: background-color 0.15s, background-image 0.15s, opacity 0.15s;
|
371
|
+
/* English and others */ }
|
372
|
+
.trumbowyg-button-pane li button.trumbowyg-viewHTML-button {
|
373
|
+
background-position: 5px -545px; }
|
374
|
+
.trumbowyg-button-pane li button.trumbowyg-formatting-button {
|
375
|
+
background-position: 5px -120px; }
|
376
|
+
.trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-button-pane li button.trumbowyg-strong-button {
|
377
|
+
background-position: 5px -45px; }
|
378
|
+
.trumbowyg-button-pane li button.trumbowyg-italic-button, .trumbowyg-button-pane li button.trumbowyg-em-button {
|
379
|
+
background-position: 5px 5px; }
|
380
|
+
.trumbowyg-button-pane li button.trumbowyg-underline-button {
|
381
|
+
background-position: 5px -470px; }
|
382
|
+
.trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-button-pane li button.trumbowyg-del-button {
|
383
|
+
background-position: 5px -445px; }
|
384
|
+
.trumbowyg-button-pane li button.trumbowyg-link-button {
|
385
|
+
background-position: 5px -345px; }
|
386
|
+
.trumbowyg-button-pane li button.trumbowyg-insertImage-button {
|
387
|
+
background-position: 5px -245px; }
|
388
|
+
.trumbowyg-button-pane li button.trumbowyg-justifyLeft-button {
|
389
|
+
background-position: 5px -320px; }
|
390
|
+
.trumbowyg-button-pane li button.trumbowyg-justifyCenter-button {
|
391
|
+
background-position: 5px -70px; }
|
392
|
+
.trumbowyg-button-pane li button.trumbowyg-justifyRight-button {
|
393
|
+
background-position: 5px -395px; }
|
394
|
+
.trumbowyg-button-pane li button.trumbowyg-justifyFull-button {
|
395
|
+
background-position: 5px -295px; }
|
396
|
+
.trumbowyg-button-pane li button.trumbowyg-unorderedList-button {
|
397
|
+
background-position: 5px -495px; }
|
398
|
+
.trumbowyg-button-pane li button.trumbowyg-orderedList-button {
|
399
|
+
background-position: 5px -370px; }
|
400
|
+
.trumbowyg-button-pane li button.trumbowyg-horizontalRule-button {
|
401
|
+
background-position: 5px -220px; }
|
402
|
+
.trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
|
403
|
+
background-position: 5px -170px; }
|
404
|
+
.trumbowyg-button-pane li button.trumbowyg-close-button {
|
405
|
+
background-position: 5px -95px; }
|
406
|
+
|
407
|
+
.trumbowyg-fullscreen .trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
|
408
|
+
background-position: 5px -145px; }
|
409
|
+
|
410
|
+
.trumbowyg-button-pane li:first-child button {
|
411
|
+
margin-left: 6px; }
|
412
|
+
.trumbowyg-button-pane li:last-child button {
|
413
|
+
margin-right: 6px; }
|
414
|
+
|
415
|
+
/* French */
|
416
|
+
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strong-button {
|
417
|
+
background-position: 5px -195px; }
|
418
|
+
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-underline-button {
|
419
|
+
background-position: 5px -420px; }
|
420
|
+
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-del-button {
|
421
|
+
background-position: 5px -270px; }
|
422
|
+
|
423
|
+
@media only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 4/3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
|
424
|
+
/* French */
|
425
|
+
.trumbowyg-button-pane li button {
|
426
|
+
-webkit-background-size: 25px 575px !important;
|
427
|
+
background-size: 25px 575px !important;
|
428
|
+
background-image: url("<%= asset_path('trumbowyg/icons-2x.png') %>") !important;
|
429
|
+
/* English and others */ }
|
430
|
+
.trumbowyg-button-pane li button.trumbowyg-viewHTML-button {
|
431
|
+
background-position: 5px -545px; }
|
432
|
+
.trumbowyg-button-pane li button.trumbowyg-formatting-button {
|
433
|
+
background-position: 5px -120px; }
|
434
|
+
.trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-button-pane li button.trumbowyg-strong-button {
|
435
|
+
background-position: 5px -45px; }
|
436
|
+
.trumbowyg-button-pane li button.trumbowyg-italic-button, .trumbowyg-button-pane li button.trumbowyg-em-button {
|
437
|
+
background-position: 5px 5px; }
|
438
|
+
.trumbowyg-button-pane li button.trumbowyg-underline-button {
|
439
|
+
background-position: 5px -470px; }
|
440
|
+
.trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-button-pane li button.trumbowyg-del-button {
|
441
|
+
background-position: 5px -445px; }
|
442
|
+
.trumbowyg-button-pane li button.trumbowyg-link-button {
|
443
|
+
background-position: 5px -345px; }
|
444
|
+
.trumbowyg-button-pane li button.trumbowyg-insertImage-button {
|
445
|
+
background-position: 5px -245px; }
|
446
|
+
.trumbowyg-button-pane li button.trumbowyg-justifyLeft-button {
|
447
|
+
background-position: 5px -320px; }
|
448
|
+
.trumbowyg-button-pane li button.trumbowyg-justifyCenter-button {
|
449
|
+
background-position: 5px -70px; }
|
450
|
+
.trumbowyg-button-pane li button.trumbowyg-justifyRight-button {
|
451
|
+
background-position: 5px -395px; }
|
452
|
+
.trumbowyg-button-pane li button.trumbowyg-justifyFull-button {
|
453
|
+
background-position: 5px -295px; }
|
454
|
+
.trumbowyg-button-pane li button.trumbowyg-unorderedList-button {
|
455
|
+
background-position: 5px -495px; }
|
456
|
+
.trumbowyg-button-pane li button.trumbowyg-orderedList-button {
|
457
|
+
background-position: 5px -370px; }
|
458
|
+
.trumbowyg-button-pane li button.trumbowyg-horizontalRule-button {
|
459
|
+
background-position: 5px -220px; }
|
460
|
+
.trumbowyg-button-pane li button.trumbowyg-fullscreen-button {
|
461
|
+
background-position: 5px -170px; }
|
462
|
+
.trumbowyg-button-pane li button.trumbowyg-close-button {
|
463
|
+
background-position: 5px -95px; }
|
464
|
+
.trumbowyg-fullscreen .trumbowyg-button-pane li a.trumbowyg-fullscreen-button {
|
465
|
+
background-position: 5px -145px; }
|
466
|
+
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-bold-button, .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strong-button {
|
467
|
+
background-position: 5px -195px; }
|
468
|
+
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-underline-button {
|
469
|
+
background-position: 5px -420px; }
|
470
|
+
.trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-strikethrough-button, .trumbowyg-fr .trumbowyg-button-pane li button.trumbowyg-del-button {
|
471
|
+
background-position: 5px -270px; } }
|