effective_regions 1.8.3 → 1.8.4

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: 976c64c5a328d5cf16c0e03283e0bce98f3de124826cee670cc68e400ff04dae
4
- data.tar.gz: 64bd24889c6f136b80e5bc12126e4aa2282f09066af63f91ddc02366abf3b249
3
+ metadata.gz: 8d3a3479b566768fbfb898e03e543a90766bab7381058e0546c51d77fa6d1aec
4
+ data.tar.gz: b5d6ec90d100f61d249ef0054d1ec550361da8ed3c45fc4053a1b4a454ef4616
5
5
  SHA512:
6
- metadata.gz: 7d28f939878da56fef56b4c66c8570f563b04067ca38ffee7b8bf0ed50470df5377eee5ae70854f3132f2bfe6592fb0585f0f3b48f3e0c4eb23acf64a1c6976f
7
- data.tar.gz: c449ac454e0e2c1076211f93832827a9404d2bd9b4a025be50c0eafeae1b01465206e3c5aac16b50e87a51c54f6c210ede2f572f9890d3b604ab35f62c2bc1a5
6
+ metadata.gz: fbc01feab2e56a1bfa3758225046f51c80a43994f86ed9f4ef709e6a9569db62412022eac66cb6451106f3d74fc29700b1d7ad5dc4cb4fb76cc54ee3aff8d405
7
+ data.tar.gz: a3da1724dd1f9fafd66ef88c7a43cb8a3168d72fbd1f227a13683bfcc98ce87a6b9ae4a24628650178c3b54d70ab5a29551fe307fd14856638a965b772caaa25
@@ -0,0 +1,25 @@
1
+ CKEDITOR.dialog.add 'drop_cap', (editor) -> # Must match the class name of the snippet
2
+ title: 'A drop cap',
3
+ minWidth: 200,
4
+ minHeight: 100,
5
+ contents: [
6
+ {
7
+ id: 'drop_cap_id', # Just an html id, doesn't really matter what is here
8
+ elements: [
9
+ {
10
+ id: 'letter'
11
+ type: 'text',
12
+ label: 'Letter (required)',
13
+ setup: (widget) -> this.setValue(widget.data.letter)
14
+ commit: (widget) -> widget.setData('letter', this.getValue())
15
+ },
16
+ {
17
+ id: 'html_class'
18
+ type: 'text',
19
+ label: 'Additional html classes (optional)',
20
+ setup: (widget) -> this.setValue(widget.data.html_class)
21
+ commit: (widget) -> widget.setData('html_class', this.getValue())
22
+ }
23
+ ]
24
+ }
25
+ ]
@@ -0,0 +1,7 @@
1
+ .dropcap {
2
+ float: left;
3
+ position: relative;
4
+ font-size: larger;
5
+ font-weight: bold;
6
+ margin-right: 0.5rem;
7
+ }
@@ -0,0 +1,11 @@
1
+ module Effective
2
+ module Snippets
3
+ class DropCap < Snippet
4
+
5
+ def snippet_attributes
6
+ super + [:letter, :html_class]
7
+ end
8
+
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,2 @@
1
+ .dropcap{class: drop_cap.html_class.presence}
2
+ %span= drop_cap.letter
@@ -24,7 +24,7 @@ module EffectiveRegions
24
24
  end
25
25
 
26
26
  initializer "effective_regions.append_precompiled_assets" do |app|
27
- Rails.application.config.assets.precompile += ['ck_assets.js', 'ck_assets.css']
27
+ Rails.application.config.assets.precompile += ['ck_assets.js', 'ck_assets.css', 'drop_cap.css']
28
28
  end
29
29
 
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveRegions
2
- VERSION = '1.8.3'.freeze
2
+ VERSION = '1.8.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_regions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
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: 2019-06-10 00:00:00.000000000 Z
11
+ date: 2019-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -53,7 +53,9 @@ files:
53
53
  - app/assets/javascripts/ck_assets.js.coffee
54
54
  - app/assets/javascripts/effective/snippets/current_date_time.js.coffee
55
55
  - app/assets/javascripts/effective/snippets/current_user_info.js.coffee
56
+ - app/assets/javascripts/effective/snippets/drop_cap.js.coffee
56
57
  - app/assets/stylesheets/ck_assets.scss
58
+ - app/assets/stylesheets/drop_cap.scss
57
59
  - app/controllers/effective/ck_assets_controller.rb
58
60
  - app/controllers/effective/regions_controller.rb
59
61
  - app/helpers/effective_regions_controller_helper.rb
@@ -64,6 +66,7 @@ files:
64
66
  - app/models/effective/region.rb
65
67
  - app/models/effective/snippets/current_date_time.rb
66
68
  - app/models/effective/snippets/current_user_info.rb
69
+ - app/models/effective/snippets/drop_cap.rb
67
70
  - app/models/effective/snippets/snippet.rb
68
71
  - app/models/effective/templates/image_and_title.rb
69
72
  - app/models/effective/templates/template.rb
@@ -73,6 +76,7 @@ files:
73
76
  - app/views/effective/ck_assets/index.html.haml
74
77
  - app/views/effective/snippets/_current_date_time.html.haml
75
78
  - app/views/effective/snippets/_current_user_info.html.haml
79
+ - app/views/effective/snippets/_drop_cap.html.haml
76
80
  - app/views/effective/templates/_image_and_title.html.haml
77
81
  - app/views/effective/templates/_three_column.html.haml
78
82
  - app/views/effective/templates/_two_column.html.haml