effective_bootstrap 0.11.11 → 0.11.13
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/app/models/effective/form_inputs/article_editor.rb +96 -25
- data/lib/effective_bootstrap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92c48deef88d8891fbd457afbd1294dab443032fc2fb2c4fceef1f6c6bb76d7a
|
4
|
+
data.tar.gz: bc74c439babfe29ef5ffe484e1bb1b31b1274ff6f73deed035f28d02c3e5bd2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb5873bc5b64b2626e9d981f24a228e84d472706b1bb47c390f6f4ed76e00d9cff42bf7b8736c396e6ee17a1e70ea2f84716b4d7b9ba2b2b102f89afe2be12f0
|
7
|
+
data.tar.gz: b3062220f045454fb4fe86cad596ac9a34ad3aef7b5618db96c8456a1115324abd78ac2dfa25d4eb1ee6bc95afceaad7fe7cb8796d341e8f21864b28a57ee84f
|
@@ -7,16 +7,63 @@ module Effective
|
|
7
7
|
# https://imperavi.com/article/docs/settings/
|
8
8
|
def self.defaults
|
9
9
|
{
|
10
|
+
# This is overridden by the active_storage() method below
|
10
11
|
active_storage: nil,
|
12
|
+
|
13
|
+
# This is overridden by the css() method below
|
11
14
|
css: ['/assets/article_editor/arx-frame.min.css'],
|
15
|
+
|
16
|
+
# This is overridden by the custom_css() method below
|
12
17
|
custom: {
|
13
|
-
css: [
|
18
|
+
css: [
|
19
|
+
'application.css',
|
20
|
+
'/assets/effective_bootstrap_article_editor.css'
|
21
|
+
]
|
22
|
+
},
|
23
|
+
|
24
|
+
# The rest of these are just normal Hash options
|
25
|
+
align: {
|
26
|
+
'left': 'text-left',
|
27
|
+
'center': 'text-center',
|
28
|
+
'right': 'text-right',
|
29
|
+
'justify': false
|
30
|
+
},
|
31
|
+
makebutton: {
|
32
|
+
items: {
|
33
|
+
primary: {
|
34
|
+
title: 'Primary',
|
35
|
+
params: { classname: 'btn btn-primary' }
|
36
|
+
},
|
37
|
+
secondary: {
|
38
|
+
title: 'Secondary',
|
39
|
+
params: { classname: 'btn btn-secondary' }
|
40
|
+
},
|
41
|
+
danger: {
|
42
|
+
title: 'Danger',
|
43
|
+
params: { classname: 'btn btn-danger' }
|
44
|
+
},
|
45
|
+
primary_large: {
|
46
|
+
title: 'Primary (large)',
|
47
|
+
params: { classname: 'btn btn-lg btn-primary' }
|
48
|
+
},
|
49
|
+
secondary_large: {
|
50
|
+
title: 'Secondary (large)',
|
51
|
+
params: { classname: 'btn btn-lg btn-secondary' }
|
52
|
+
},
|
53
|
+
danger_large: {
|
54
|
+
title: 'Danger (large)',
|
55
|
+
params: { classname: 'btn btn-lg btn-danger' }
|
56
|
+
}
|
57
|
+
}
|
14
58
|
},
|
15
59
|
classes: {
|
16
|
-
body: 'article-editor-body',
|
17
60
|
table: 'table'
|
18
61
|
},
|
62
|
+
embed: {
|
63
|
+
script: false # do not strip out script tag from embeds
|
64
|
+
},
|
19
65
|
filelink: nil,
|
66
|
+
format: ['p', 'h2', 'h3', 'h4', 'h5', 'ul', 'ol'],
|
20
67
|
grid: {
|
21
68
|
classname: 'row',
|
22
69
|
columns: 12,
|
@@ -26,26 +73,29 @@ module Effective
|
|
26
73
|
right: '15px',
|
27
74
|
},
|
28
75
|
patterns: {
|
29
|
-
'6|6': 'col-
|
30
|
-
'4|4|4': 'col-
|
31
|
-
'3|3|3|3': 'col-
|
32
|
-
'2|2|2|2|2|2': 'col-
|
33
|
-
'3|6|3': 'col-
|
34
|
-
'2|8|2': 'col-
|
35
|
-
'5|7': 'col-
|
36
|
-
'7|5': 'col-
|
37
|
-
'4|8': 'col-
|
38
|
-
'8|4': 'col-
|
39
|
-
'3|9': 'col-
|
40
|
-
'9|3': 'col-
|
41
|
-
'2|10': 'col-
|
42
|
-
'10|2': 'col-
|
43
|
-
'12': 'col-
|
76
|
+
'6|6': 'col-md-6|col-md-6',
|
77
|
+
'4|4|4': 'col-md-4|col-md-4|col-md-4',
|
78
|
+
'3|3|3|3': 'col-md-3|col-md-3|col-md-3|col-md-3',
|
79
|
+
'2|2|2|2|2|2': 'col-md-2|col-md-2|col-md-2|col-md-2|col-md-2|col-md-2',
|
80
|
+
'3|6|3': 'col-md-3|col-md-6|col-md-3',
|
81
|
+
'2|8|2': 'col-md-2|col-md-8|col-md-2',
|
82
|
+
'5|7': 'col-md-5|col-md-7',
|
83
|
+
'7|5': 'col-md-7|col-md-5',
|
84
|
+
'4|8': 'col-md-4|col-md-8',
|
85
|
+
'8|4': 'col-md-8|col-md-4',
|
86
|
+
'3|9': 'col-md-3|col-md-9',
|
87
|
+
'9|3': 'col-md-9|col-md-3',
|
88
|
+
'2|10': 'col-md-2|col-md-10',
|
89
|
+
'10|2': 'col-md-10|col-md-2',
|
90
|
+
'12': 'col-md-12'
|
44
91
|
}
|
45
92
|
},
|
46
|
-
|
93
|
+
layer: false, # the layer button is confusing for the layperson
|
94
|
+
link: { size: 500 }, # truncate after this length
|
95
|
+
outset: false, # tricky to design around
|
96
|
+
plugins: ['blockcode', 'carousel', 'cellcolor', 'collapse', 'filelink', 'imageposition', 'imageresize', 'inlineformat', 'listitem', 'makebutton', 'removeformat', 'reorder', 'style'],
|
47
97
|
quote: {
|
48
|
-
template: '<blockquote><p></p></blockquote>'
|
98
|
+
template: '<blockquote class="blockquote text-center"><p class="mb-0"><strong>A well-known quote, contained in a blockquote element.</strong></p></blockquote>'
|
49
99
|
},
|
50
100
|
styles: {
|
51
101
|
table: {
|
@@ -86,15 +136,36 @@ module Effective
|
|
86
136
|
end
|
87
137
|
|
88
138
|
def input_js_options
|
89
|
-
self.class.defaults.merge(active_storage: active_storage, custom: { css: custom_css })
|
139
|
+
self.class.defaults.merge(active_storage: active_storage, css: css, custom: { css: custom_css })
|
140
|
+
end
|
141
|
+
|
142
|
+
def css
|
143
|
+
if @template.respond_to?(:asset_pack_path)
|
144
|
+
[@template.asset_pack_path('article_editor/arx-frame.min.css')]
|
145
|
+
elsif @template.respond_to?(:asset_path)
|
146
|
+
[@template.asset_path('article_editor/arx-frame.min.css')]
|
147
|
+
else
|
148
|
+
['/assets/article_editor/arx-frame.min.css']
|
149
|
+
end
|
90
150
|
end
|
91
151
|
|
92
152
|
def custom_css
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
153
|
+
if @template.respond_to?(:asset_pack_path)
|
154
|
+
[
|
155
|
+
@template.asset_pack_path('application.css'),
|
156
|
+
@template.asset_pack_path('effective_bootstrap_article_editor.css')
|
157
|
+
]
|
158
|
+
elsif @template.respond_to?(:asset_path)
|
159
|
+
[
|
160
|
+
@template.asset_path('application.css'),
|
161
|
+
@template.asset_path('effective_bootstrap_article_editor.css')
|
162
|
+
]
|
163
|
+
else
|
164
|
+
[
|
165
|
+
'/assets/application.css',
|
166
|
+
'/assets/effective_bootstrap_article_editor.css'
|
167
|
+
]
|
168
|
+
end
|
98
169
|
end
|
99
170
|
|
100
171
|
def active_storage
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|