effective_bootstrap 0.11.12 → 0.11.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7aeffb5b3abbf1a71b2092b995ab03f2945ec88fc62558fd6133cfe201ff17c
4
- data.tar.gz: bf0bee697c97e88955e6d68ad44d54f5098987924fa6ea4dfd416fe9b9d0d5f2
3
+ metadata.gz: 92c48deef88d8891fbd457afbd1294dab443032fc2fb2c4fceef1f6c6bb76d7a
4
+ data.tar.gz: bc74c439babfe29ef5ffe484e1bb1b31b1274ff6f73deed035f28d02c3e5bd2d
5
5
  SHA512:
6
- metadata.gz: 0ca84d15a1a3c2cae9fee3481bcf79d3cf21427ce888752f4718036ca747b2da6abcf999c5d79ebb4a1c4f0c73174ab639164a27bb0fff586f67b68d65063fd6
7
- data.tar.gz: 3d2b105641a41fcb866bf458e4efdac8b20dcd224377ff466bb0354df02bfdf2175de92e89f15312d9c2713a9a7d3dc32de710d1cc5735c1bef3a254be0c5560
6
+ metadata.gz: eb5873bc5b64b2626e9d981f24a228e84d472706b1bb47c390f6f4ed76e00d9cff42bf7b8736c396e6ee17a1e70ea2f84716b4d7b9ba2b2b102f89afe2be12f0
7
+ data.tar.gz: b3062220f045454fb4fe86cad596ac9a34ad3aef7b5618db96c8456a1115324abd78ac2dfa25d4eb1ee6bc95afceaad7fe7cb8796d341e8f21864b28a57ee84f
@@ -7,11 +7,21 @@ 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: ['/assets/effective_bootstrap_article_editor.css']
18
+ css: [
19
+ 'application.css',
20
+ '/assets/effective_bootstrap_article_editor.css'
21
+ ]
14
22
  },
23
+
24
+ # The rest of these are just normal Hash options
15
25
  align: {
16
26
  'left': 'text-left',
17
27
  'center': 'text-center',
@@ -126,15 +136,36 @@ module Effective
126
136
  end
127
137
 
128
138
  def input_js_options
129
- 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
130
150
  end
131
151
 
132
152
  def custom_css
133
- [
134
- (@template.asset_pack_path('application.css') if @template.respond_to?(:asset_pack_path)),
135
- (@template.asset_path('application.css') if @template.respond_to?(:asset_path)),
136
- ('/assets/effective_bootstrap_article_editor.css')
137
- ].compact
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
138
169
  end
139
170
 
140
171
  def active_storage
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.11.12'.freeze
2
+ VERSION = '0.11.13'.freeze
3
3
  end
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.12
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-12 00:00:00.000000000 Z
11
+ date: 2022-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails