activeadmin_medium_editor 0.1.2 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE.txt +1 -1
  3. data/README.md +29 -21
  4. data/Rakefile +2 -2
  5. data/app/assets/javascripts/activeadmin/medium_editor/medium_editor.js +11 -3
  6. data/app/assets/javascripts/activeadmin/medium_editor/medium_editor.min.js +3 -3
  7. data/app/assets/javascripts/activeadmin/medium_editor_input.js +16 -5
  8. data/app/assets/stylesheets/activeadmin/_medium_editor_input.scss +51 -0
  9. data/app/assets/stylesheets/activeadmin/medium_editor/_settings.scss +6 -0
  10. data/app/assets/stylesheets/activeadmin/medium_editor/animations/_image-loading.scss +8 -0
  11. data/app/assets/stylesheets/activeadmin/medium_editor/animations/_pop-upwards.scss +20 -0
  12. data/app/assets/stylesheets/activeadmin/medium_editor/components/_anchor-preview.scss +24 -0
  13. data/app/assets/stylesheets/activeadmin/medium_editor/components/_file-dragging.scss +12 -0
  14. data/app/assets/stylesheets/activeadmin/medium_editor/components/_placeholder.scss +27 -0
  15. data/app/assets/stylesheets/activeadmin/medium_editor/components/_toolbar-form.scss +44 -0
  16. data/app/assets/stylesheets/activeadmin/medium_editor/components/_toolbar.scss +98 -0
  17. data/app/assets/stylesheets/activeadmin/medium_editor/medium_editor.scss +31 -0
  18. data/app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.scss +120 -0
  19. data/app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.scss +101 -0
  20. data/app/assets/stylesheets/activeadmin/medium_editor/themes/default.scss +87 -0
  21. data/app/assets/stylesheets/activeadmin/medium_editor/themes/flat.scss +90 -0
  22. data/app/assets/stylesheets/activeadmin/medium_editor/themes/mani.scss +87 -0
  23. data/app/assets/stylesheets/activeadmin/medium_editor/themes/roman.scss +87 -0
  24. data/app/assets/stylesheets/activeadmin/medium_editor/themes/tim.scss +101 -0
  25. data/app/assets/stylesheets/activeadmin/medium_editor/util/_clearfix.scss +7 -0
  26. data/lib/activeadmin/medium_editor.rb +2 -0
  27. data/lib/activeadmin/medium_editor/engine.rb +2 -0
  28. data/lib/activeadmin/medium_editor/version.rb +3 -1
  29. data/lib/activeadmin_medium_editor.rb +2 -0
  30. data/lib/formtastic/inputs/medium_editor_input.rb +3 -1
  31. metadata +152 -30
  32. data/.gitignore +0 -3
  33. data/Gemfile +0 -4
  34. data/activeadmin_medium_editor.gemspec +0 -19
  35. data/app/assets/stylesheets/activeadmin/_medium_editor_input.sass +0 -35
  36. data/app/assets/stylesheets/activeadmin/medium_editor/medium_editor.css +0 -230
  37. data/app/assets/stylesheets/activeadmin/medium_editor/medium_editor.min.css +0 -1
  38. data/app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.css +0 -78
  39. data/app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.min.css +0 -1
  40. data/app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.css +0 -67
  41. data/app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.min.css +0 -1
  42. data/app/assets/stylesheets/activeadmin/medium_editor/themes/default.css +0 -63
  43. data/app/assets/stylesheets/activeadmin/medium_editor/themes/default.min.css +0 -1
  44. data/app/assets/stylesheets/activeadmin/medium_editor/themes/flat.css +0 -58
  45. data/app/assets/stylesheets/activeadmin/medium_editor/themes/flat.min.css +0 -1
  46. data/app/assets/stylesheets/activeadmin/medium_editor/themes/mani.css +0 -57
  47. data/app/assets/stylesheets/activeadmin/medium_editor/themes/mani.min.css +0 -1
  48. data/app/assets/stylesheets/activeadmin/medium_editor/themes/roman.css +0 -58
  49. data/app/assets/stylesheets/activeadmin/medium_editor/themes/roman.min.css +0 -1
  50. data/app/assets/stylesheets/activeadmin/medium_editor/themes/tim.css +0 -67
  51. data/app/assets/stylesheets/activeadmin/medium_editor/themes/tim.min.css +0 -1
  52. data/screenshot.jpg +0 -0
@@ -0,0 +1,87 @@
1
+ // inspired by http://dribbble.com/shots/848100-Toolbar-Psd
2
+
3
+ // theme settings
4
+ $medium-editor-bgcolor: #fff;
5
+ $medium-editor-border-color: #a8a8a8;
6
+ $medium-editor-button-size: 50px;
7
+ $medium-editor-button-hover-text-color: #fff;
8
+ $medium-editor-button-active-text-color: #000;
9
+ $medium-editor-link-color: #889aac;
10
+ $medium-editor-border-radius: 5px;
11
+
12
+ // theme rules
13
+ .medium-toolbar-arrow-under:after,
14
+ .medium-toolbar-arrow-over:before {
15
+ display: none;
16
+ }
17
+
18
+ .medium-editor-toolbar {
19
+ background-color: $medium-editor-bgcolor;
20
+ background-color: rgba($medium-editor-bgcolor, .95);
21
+ border-radius: $medium-editor-border-radius;
22
+ box-shadow: 0 2px 6px rgba(#000, .45);
23
+
24
+ li {
25
+ button {
26
+ min-width: $medium-editor-button-size;
27
+ height: $medium-editor-button-size;
28
+ border: none;
29
+ border-right: 1px solid $medium-editor-border-color;
30
+ background-color: transparent;
31
+ color: $medium-editor-link-color;
32
+ box-shadow: inset 0 0 3px #f8f8e6;
33
+ background: linear-gradient(to bottom, $medium-editor-bgcolor, rgba(#000, .2));
34
+ text-shadow: 1px 4px 6px #def, 0 0 0 #000, 1px 4px 6px #def;
35
+ transition: background-color .2s ease-in;
36
+ &:hover {
37
+ background-color: #fff;
38
+ color: $medium-editor-button-hover-text-color;
39
+ color: rgba(#000, .8);
40
+ }
41
+ }
42
+
43
+ .medium-editor-button-first {
44
+ border-top-left-radius: $medium-editor-border-radius;
45
+ border-bottom-left-radius: $medium-editor-border-radius;
46
+ }
47
+
48
+ .medium-editor-button-last {
49
+ border-top-right-radius: $medium-editor-border-radius;
50
+ border-bottom-right-radius: $medium-editor-border-radius;
51
+ }
52
+
53
+ .medium-editor-button-active {
54
+ background-color: #ccc;
55
+ color: $medium-editor-button-active-text-color;
56
+ color: rgba(#000, .8);
57
+ background: linear-gradient(to top, $medium-editor-bgcolor, rgba(#000, .1));
58
+ }
59
+ }
60
+ }
61
+
62
+ .medium-editor-toolbar-form {
63
+ background: $medium-editor-bgcolor;
64
+ color: #999;
65
+ border-radius: $medium-editor-border-radius;
66
+
67
+ .medium-editor-toolbar-input {
68
+ margin: 0;
69
+ height: $medium-editor-button-size;
70
+ background: $medium-editor-bgcolor;
71
+ color: $medium-editor-border-color;
72
+ }
73
+
74
+ a {
75
+ color: $medium-editor-link-color;
76
+ }
77
+ }
78
+
79
+ .medium-editor-toolbar-anchor-preview {
80
+ background: $medium-editor-bgcolor;
81
+ color: $medium-editor-link-color;
82
+ border-radius: $medium-editor-border-radius;
83
+ }
84
+
85
+ .medium-editor-placeholder:after {
86
+ color: $medium-editor-border-color;
87
+ }
@@ -0,0 +1,101 @@
1
+ // theme settings
2
+ $medium-editor-bgcolor: #2f1e07;
3
+ $medium-editor-border-color: lighten($medium-editor-bgcolor, 10);
4
+ $medium-editor-button-size: 60px;
5
+ $medium-editor-button-active-text-color: #ffedd5;
6
+ $medium-editor-hover-color: darken($medium-editor-bgcolor, 10);
7
+ $medium-editor-link-color: #ffedd5;
8
+ $medium-editor-border-radius: 6px;
9
+ $medium-editor-placeholder-color: #ffedd5;
10
+
11
+ // theme rules
12
+ .medium-toolbar-arrow-under:after {
13
+ border-color: $medium-editor-bgcolor transparent transparent transparent;
14
+ top: $medium-editor-button-size;
15
+ }
16
+
17
+ .medium-toolbar-arrow-over:before {
18
+ border-color: transparent transparent $medium-editor-bgcolor transparent;
19
+ }
20
+
21
+ .medium-editor-toolbar {
22
+ background-color: $medium-editor-bgcolor;
23
+ border: 1px solid $medium-editor-border-color;
24
+ border-radius: $medium-editor-border-radius;
25
+
26
+ li {
27
+ button {
28
+ background-color: transparent;
29
+ border: none;
30
+ border-right: 1px solid $medium-editor-border-color;
31
+ box-sizing: border-box;
32
+ color: $medium-editor-link-color;
33
+ height: $medium-editor-button-size;
34
+ min-width: $medium-editor-button-size;
35
+ transition: background-color .2s ease-in, color .2s ease-in;
36
+ &:hover {
37
+ background-color: $medium-editor-hover-color;
38
+ color: $medium-editor-button-active-text-color;
39
+ }
40
+ }
41
+
42
+ .medium-editor-button-first {
43
+ border-bottom-left-radius: $medium-editor-border-radius;
44
+ border-top-left-radius: $medium-editor-border-radius;
45
+ }
46
+
47
+ .medium-editor-button-last {
48
+ border-bottom-right-radius: $medium-editor-border-radius;
49
+ border-right: none;
50
+ border-top-right-radius: $medium-editor-border-radius;
51
+ }
52
+
53
+ .medium-editor-button-active {
54
+ background-color: $medium-editor-hover-color;
55
+ color: $medium-editor-button-active-text-color;
56
+ }
57
+ }
58
+ }
59
+
60
+ .medium-editor-toolbar-form {
61
+ background: $medium-editor-bgcolor;
62
+ border-radius: $medium-editor-border-radius;
63
+ color: #ffedd5;
64
+
65
+ .medium-editor-toolbar-input {
66
+ background: $medium-editor-bgcolor;
67
+ color: $medium-editor-link-color;
68
+ height: $medium-editor-button-size;
69
+
70
+ &::-webkit-input-placeholder {
71
+ color: $medium-editor-placeholder-color;
72
+ color: rgba($medium-editor-placeholder-color, .8);
73
+ }
74
+ &:-moz-placeholder { /* Firefox 18- */
75
+ color: $medium-editor-placeholder-color;
76
+ color: rgba($medium-editor-placeholder-color, .8);
77
+ }
78
+ &::-moz-placeholder { /* Firefox 19+ */
79
+ color: $medium-editor-placeholder-color;
80
+ color: rgba($medium-editor-placeholder-color, .8);
81
+ }
82
+ &:-ms-input-placeholder {
83
+ color: $medium-editor-placeholder-color;
84
+ color: rgba($medium-editor-placeholder-color, .8);
85
+ }
86
+ }
87
+
88
+ a {
89
+ color: $medium-editor-link-color;
90
+ }
91
+ }
92
+
93
+ .medium-editor-toolbar-anchor-preview {
94
+ background: $medium-editor-bgcolor;
95
+ border-radius: $medium-editor-border-radius;
96
+ color: $medium-editor-link-color;
97
+ }
98
+
99
+ .medium-editor-placeholder:after {
100
+ color: $medium-editor-border-color;
101
+ }
@@ -0,0 +1,7 @@
1
+ %clearfix {
2
+ &:after {
3
+ clear: both;
4
+ content: "";
5
+ display: table;
6
+ }
7
+ }
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'activeadmin/medium_editor/engine'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_admin'
2
4
 
3
5
  module ActiveAdmin
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveAdmin
2
4
  module MediumEditor
3
- VERSION = '0.1.2'
5
+ VERSION = '0.2.8'
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'activeadmin/medium_editor'
2
4
 
3
5
  require 'formtastic/inputs/medium_editor_input'
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Formtastic
2
4
  module Inputs
3
5
  class MediumEditorInput < Formtastic::Inputs::TextInput
4
6
  def input_html_options
5
- super.merge( class: 'medium-editor' )
7
+ super.merge(class: 'medium-editor')
6
8
  end
7
9
  end
8
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_medium_editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-30 00:00:00.000000000 Z
11
+ date: 2020-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -16,57 +16,180 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activestorage
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 6.0.3.2
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 6.0.3.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: capybara
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.33.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.33.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.13.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.13.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: puma
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 4.3.5
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 4.3.5
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec_junit_formatter
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.4.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.4.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 4.0.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 4.0.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.90.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.90.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: selenium-webdriver
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 3.142.7
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 3.142.7
139
+ - !ruby/object:Gem::Dependency
140
+ name: sqlite3
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 1.4.2
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.4.2
27
153
  description: An Active Admin plugin to use Medium Editor
28
154
  email: mat@blocknot.es
29
155
  executables: []
30
156
  extensions: []
31
157
  extra_rdoc_files: []
32
158
  files:
33
- - ".gitignore"
34
- - Gemfile
35
159
  - LICENSE.txt
36
160
  - README.md
37
161
  - Rakefile
38
- - activeadmin_medium_editor.gemspec
39
162
  - app/assets/javascripts/activeadmin/medium_editor/medium_editor.js
40
163
  - app/assets/javascripts/activeadmin/medium_editor/medium_editor.min.js
41
164
  - app/assets/javascripts/activeadmin/medium_editor_input.js
42
- - app/assets/stylesheets/activeadmin/_medium_editor_input.sass
43
- - app/assets/stylesheets/activeadmin/medium_editor/medium_editor.css
44
- - app/assets/stylesheets/activeadmin/medium_editor/medium_editor.min.css
45
- - app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.css
46
- - app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.min.css
47
- - app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.css
48
- - app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.min.css
49
- - app/assets/stylesheets/activeadmin/medium_editor/themes/default.css
50
- - app/assets/stylesheets/activeadmin/medium_editor/themes/default.min.css
51
- - app/assets/stylesheets/activeadmin/medium_editor/themes/flat.css
52
- - app/assets/stylesheets/activeadmin/medium_editor/themes/flat.min.css
53
- - app/assets/stylesheets/activeadmin/medium_editor/themes/mani.css
54
- - app/assets/stylesheets/activeadmin/medium_editor/themes/mani.min.css
55
- - app/assets/stylesheets/activeadmin/medium_editor/themes/roman.css
56
- - app/assets/stylesheets/activeadmin/medium_editor/themes/roman.min.css
57
- - app/assets/stylesheets/activeadmin/medium_editor/themes/tim.css
58
- - app/assets/stylesheets/activeadmin/medium_editor/themes/tim.min.css
165
+ - app/assets/stylesheets/activeadmin/_medium_editor_input.scss
166
+ - app/assets/stylesheets/activeadmin/medium_editor/_settings.scss
167
+ - app/assets/stylesheets/activeadmin/medium_editor/animations/_image-loading.scss
168
+ - app/assets/stylesheets/activeadmin/medium_editor/animations/_pop-upwards.scss
169
+ - app/assets/stylesheets/activeadmin/medium_editor/components/_anchor-preview.scss
170
+ - app/assets/stylesheets/activeadmin/medium_editor/components/_file-dragging.scss
171
+ - app/assets/stylesheets/activeadmin/medium_editor/components/_placeholder.scss
172
+ - app/assets/stylesheets/activeadmin/medium_editor/components/_toolbar-form.scss
173
+ - app/assets/stylesheets/activeadmin/medium_editor/components/_toolbar.scss
174
+ - app/assets/stylesheets/activeadmin/medium_editor/medium_editor.scss
175
+ - app/assets/stylesheets/activeadmin/medium_editor/themes/beagle.scss
176
+ - app/assets/stylesheets/activeadmin/medium_editor/themes/bootstrap.scss
177
+ - app/assets/stylesheets/activeadmin/medium_editor/themes/default.scss
178
+ - app/assets/stylesheets/activeadmin/medium_editor/themes/flat.scss
179
+ - app/assets/stylesheets/activeadmin/medium_editor/themes/mani.scss
180
+ - app/assets/stylesheets/activeadmin/medium_editor/themes/roman.scss
181
+ - app/assets/stylesheets/activeadmin/medium_editor/themes/tim.scss
182
+ - app/assets/stylesheets/activeadmin/medium_editor/util/_clearfix.scss
59
183
  - lib/activeadmin/medium_editor.rb
60
184
  - lib/activeadmin/medium_editor/engine.rb
61
185
  - lib/activeadmin/medium_editor/version.rb
62
186
  - lib/activeadmin_medium_editor.rb
63
187
  - lib/formtastic/inputs/medium_editor_input.rb
64
- - screenshot.jpg
65
188
  homepage: https://github.com/blocknotes/activeadmin_medium_editor
66
189
  licenses:
67
190
  - MIT
68
191
  metadata: {}
69
- post_install_message:
192
+ post_install_message:
70
193
  rdoc_options: []
71
194
  require_paths:
72
195
  - lib
@@ -81,9 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
204
  - !ruby/object:Gem::Version
82
205
  version: '0'
83
206
  requirements: []
84
- rubyforge_project:
85
- rubygems_version: 2.6.13
86
- signing_key:
207
+ rubygems_version: 3.0.3
208
+ signing_key:
87
209
  specification_version: 4
88
210
  summary: medium-editor for ActiveAdmin
89
211
  test_files: []