trusty-cms 7.0.39 → 7.0.40

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +6 -7
  4. data/README.md +25 -0
  5. data/app/assets/builds/trusty_cms/ckeditor5.css +6966 -0
  6. data/app/assets/builds/trusty_cms/ckeditor5.css.map +7 -0
  7. data/app/assets/builds/trusty_cms/ckeditor5.js +105634 -0
  8. data/app/assets/builds/trusty_cms/ckeditor5.js.map +7 -0
  9. data/app/assets/config/trusty-cms-manifest.js +2 -0
  10. data/app/assets/javascripts/admin.js +0 -1
  11. data/app/assets/stylesheets/admin/_ckeditor.css +109 -0
  12. data/app/assets/stylesheets/admin/main.scss +1 -0
  13. data/app/assets/stylesheets/admin/partials/_content.scss +2 -0
  14. data/app/controllers/admin/assets_controller.rb +78 -23
  15. data/app/controllers/admin/pages_controller.rb +31 -0
  16. data/app/javascript/trusty_cms/ckeditor5.js +391 -0
  17. data/app/models/asset.rb +3 -1
  18. data/app/views/admin/page_parts/_page_part.html.haml +13 -9
  19. data/app/views/layouts/application.html.haml +6 -0
  20. data/config/routes.rb +3 -0
  21. data/lib/generators/trusty_cms/templates/application.rb.erb +0 -1
  22. data/lib/trusty_cms/engine.rb +5 -8
  23. data/lib/trusty_cms/version.rb +1 -1
  24. data/lib/trusty_cms.rb +2 -0
  25. data/package.json +20 -2
  26. data/spec/controllers/assets_controller.rb +66 -0
  27. data/spec/dummy/config/application.rb +1 -1
  28. data/spec/dummy/config/storage.yml +7 -0
  29. data/spec/dummy/db/schema.rb +24 -20
  30. data/spec/fixtures/files/sample.ics +10 -0
  31. data/spec/fixtures/files/sample.txt +1 -0
  32. data/spec/models/asset_spec.rb +39 -0
  33. data/trusty_cms.gemspec +1 -1
  34. data/yarn.lock +2213 -493
  35. metadata +21 -15
  36. data/app/assets/javascripts/ckeditor/config.js +0 -22
  37. data/app/assets/javascripts/ckeditor/contents.css +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5bdddc2ede5bb07ee468212f116fbf5c6f37b0e7ec0c78b4d7f20a8b484cbd4
4
- data.tar.gz: c420a5bcab50ef80184174aebcb84329d997870305286195b28497bd56e4c52a
3
+ metadata.gz: 8058a1c2ed9bb7a78a84f23f4de937e63e3b6a03dc3cab337ed834fc73995772
4
+ data.tar.gz: fb86832ced16103cbdf8c2ac8fcb388f426c0ad564b1ca1da86b78a56e84d442
5
5
  SHA512:
6
- metadata.gz: dedfba1988b017e6d1c132ae101193da96df696033cc6f09c2fe994be25014b5adbb1d0c18af9690770590d9016a7ff200684813d3d8924abe0ff77a6d2cd218
7
- data.tar.gz: 1f94424bbf66982d03ea9c2e74ee3d378c118cdf5b1a58bf49db971374798a56cea1395875b599374fc83fdebb537a38dd0c040d7b0b5342e6053ffd1368ab7c
6
+ metadata.gz: 85573a5b01fd5dd90fb75dbaae0662def297c007d117f5d55778f94718cad4309bf92bfd445328bc09717e9902d0e67579ee05b1ae6fce766df9844013bfe14f
7
+ data.tar.gz: b74e60bba8f365fb846c0eea66575e730d80c8af8e0c0d6ae75bfc9d0178d5ef25064fe27d9c1327fcce5eabdfd8065635122bb491d6066429813b95952b8c63
data/Gemfile CHANGED
@@ -18,6 +18,7 @@ group :development, :test do
18
18
  gem 'devise-two-factor'
19
19
  gem 'factory_bot_rails', '6.4.4'
20
20
  gem 'file_validators'
21
+ gem 'jsbundling-rails', '~> 1.3'
21
22
  gem 'launchy', '~> 3.0.1'
22
23
  gem 'mysql2'
23
24
  gem 'paper_trail', '~> 16.0.0'
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ PATH
8
8
  acts_as_tree (~> 2.9.1)
9
9
  base64
10
10
  bigdecimal
11
- ckeditor (>= 4.2.2, < 4.4.0)
11
+ csso-rails (~> 0.1)
12
12
  delocalize (>= 0.2, < 2.0)
13
13
  devise
14
14
  devise-two-factor
@@ -144,10 +144,6 @@ GEM
144
144
  childprocess (5.1.0)
145
145
  logger (~> 1.5)
146
146
  chunky_png (1.4.0)
147
- ckeditor (4.3.0)
148
- orm_adapter (~> 0.5.0)
149
- terrapin
150
- climate_control (1.2.0)
151
147
  cliver (0.3.2)
152
148
  coderay (1.1.3)
153
149
  concurrent-ruby (1.3.5)
@@ -155,6 +151,8 @@ GEM
155
151
  crass (1.0.6)
156
152
  css_parser (1.19.1)
157
153
  addressable
154
+ csso-rails (0.9.0)
155
+ execjs (>= 1)
158
156
  csv (3.3.0)
159
157
  database_cleaner (2.1.0)
160
158
  database_cleaner-active_record (>= 2, < 3)
@@ -227,6 +225,8 @@ GEM
227
225
  pp (>= 0.6.0)
228
226
  rdoc (>= 4.0.0)
229
227
  reline (>= 0.4.2)
228
+ jsbundling-rails (1.3.1)
229
+ railties (>= 6.0.0)
230
230
  json (2.8.1)
231
231
  kraken-io (0.1.3)
232
232
  activesupport
@@ -439,8 +439,6 @@ GEM
439
439
  stringex (2.8.6)
440
440
  stringio (3.1.2)
441
441
  temple (0.10.3)
442
- terrapin (1.0.1)
443
- climate_control
444
442
  thor (1.3.2)
445
443
  tilt (2.4.0)
446
444
  timeout (0.4.3)
@@ -482,6 +480,7 @@ DEPENDENCIES
482
480
  devise-two-factor
483
481
  factory_bot_rails (= 6.4.4)
484
482
  file_validators
483
+ jsbundling-rails (~> 1.3)
485
484
  launchy (~> 3.0.1)
486
485
  mysql2
487
486
  paper_trail (~> 16.0.0)
data/README.md CHANGED
@@ -247,6 +247,31 @@ In the AWS Lambda Configuration:
247
247
 
248
248
  Your setup is now complete, and **Scheduled Pages** will automatically update their status via the AWS Lambda and EventBridge integration.
249
249
 
250
+ ### Custom CKEditor5 Styles and Stylesheets
251
+
252
+ Add your stylesheets and custom styles to CKEditor in your application.
253
+
254
+ Include your website styles in your editor - add a stylesheet and `@import` the styles you want in `.ck-content`
255
+ ```
256
+ .ck-content {
257
+ @import 'path/to/stylesheets';
258
+ }
259
+ ```
260
+
261
+ ```
262
+ // config/initializers/trusty_cms_editor_stylesheets.rb
263
+ if defined?(TrustyCms) && TrustyCms.respond_to?(:editor_stylesheets)
264
+ TrustyCms.editor_stylesheets |= [
265
+ {site: 'current_site_name_underscore', path: 'path/to/ck-content/stylesheets'}
266
+ ]
267
+ TrustyCms.editor_style_definitions = [
268
+ { name: 'Primary Button', element: 'a', classes: %w[button] },
269
+ { name: 'Button Alt', element: 'a', classes: %w[button button-alt] },
270
+ # etc…
271
+ ]
272
+ end
273
+ ```
274
+
250
275
  ### Contributing to TrustyCMS
251
276
 
252
277
  When you're ready to make a change: