thecore_ui_commons 2.1.2 → 2.1.3

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: d0f12cc5432ed1c8d26ca3e428082ade52158ab1f90435a7b14828bbb2fec583
4
- data.tar.gz: c7568e7bc6f6c88bdad8a3fb205f3ed1daca87b13455abd0e76ad3329dd5e5ab
3
+ metadata.gz: 6332d31cfff2f038b9b812564a922c4dc6aa622705b133ad3d9cbcf6f1fab331
4
+ data.tar.gz: 5159e24aec12b7f0216fb2c200d0216930e722f1480f6fdb0708d8349c7ab6e9
5
5
  SHA512:
6
- metadata.gz: a1c65a49a568a058e74979461fd7dd110fb674eb39f27f55eeb42d9ddabc57061bac385323cf0782e4ba57166059a3c4345c160ecba85a68b3525fee5a4464ce
7
- data.tar.gz: 8ec77f957eb1e6df14da6c284f724a8f0a7b83828a264764d1ddb177d99af4a5d76abfe27a2aa0b43a078b1406e564da7435f93d13b9e795a326141b61604ef1
6
+ metadata.gz: ff3b46a0a29ad5aa11e17f3d0564edbd318457e3b92027088012d86667e372a3ec61c313815ac09f4eb0775444d1a8e2a9f0d4663a38a2056f140336dc1ad2c1
7
+ data.tar.gz: d32e66b52ca718e7f8fe62bf22489c3ad0ef6a8f5d59ab6526e7544dbe6c4e600bdb1192b45e6a9f48896889c664a965dbe840f1bdbbc87c4ff6f7a369bc715f
@@ -0,0 +1,2 @@
1
+ require("trix")
2
+ require("@rails/actiontext")
@@ -0,0 +1,37 @@
1
+ //
2
+ // Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
3
+ // the trix-editor content (whether displayed or under editing). Feel free to incorporate this
4
+ // inclusion directly in any other asset bundle and remove this file.
5
+ //
6
+ //= require trix/dist/trix
7
+
8
+ // We need to override trix.css’s image gallery styles to accommodate the
9
+ // <action-text-attachment> element we wrap around attachments. Otherwise,
10
+ // images in galleries will be squished by the max-width: 33%; rule.
11
+ .trix-content {
12
+ .attachment-gallery {
13
+ > action-text-attachment,
14
+ > .attachment {
15
+ flex: 1 0 33%;
16
+ padding: 0 0.5em;
17
+ max-width: 33%;
18
+ }
19
+
20
+ &.attachment-gallery--2,
21
+ &.attachment-gallery--4 {
22
+ > action-text-attachment,
23
+ > .attachment {
24
+ flex-basis: 50%;
25
+ max-width: 50%;
26
+ }
27
+ }
28
+ }
29
+
30
+ action-text-attachment {
31
+ .attachment {
32
+ padding: 0 !important;
33
+ max-width: 100% !important;
34
+ }
35
+ }
36
+ }
37
+
@@ -0,0 +1,14 @@
1
+ <figure class="attachment attachment--<%= blob.representable? ? "preview" : "file" %> attachment--<%= blob.filename.extension %>">
2
+ <% if blob.representable? %>
3
+ <%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %>
4
+ <% end %>
5
+
6
+ <figcaption class="attachment__caption">
7
+ <% if caption = blob.try(:caption) %>
8
+ <%= caption %>
9
+ <% else %>
10
+ <span class="attachment__name"><%= blob.filename %></span>
11
+ <span class="attachment__size"><%= number_to_human_size blob.byte_size %></span>
12
+ <% end %>
13
+ </figcaption>
14
+ </figure>
@@ -0,0 +1 @@
1
+ Rails.application.config.assets.precompile += %w( thecore_ui_commons/index.js thecore_ui_commons/index.css )
@@ -0,0 +1,14 @@
1
+ # This migration comes from action_text (originally 20180528164100)
2
+ class CreateActionTextTables < ActiveRecord::Migration[6.0]
3
+ def change
4
+ create_table :action_text_rich_texts do |t|
5
+ t.string :name, null: false
6
+ t.text :body, size: :long
7
+ t.references :record, null: false, polymorphic: true, index: false
8
+
9
+ t.timestamps
10
+
11
+ t.index [ :record_type, :record_id, :name ], name: "index_action_text_rich_texts_uniqueness", unique: true
12
+ end
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module ThecoreUiCommons
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
@@ -35,7 +35,11 @@ files:
35
35
  - README.md
36
36
  - Rakefile
37
37
  - app/assets/config/thecore_ui_commons_manifest.js
38
+ - app/assets/stylesheets/thecore_ui_commons/actiontext.scss
39
+ - app/views/active_storage/blobs/_blob.html.erb
40
+ - config/initializers/thecore_ui_commons_action_text.rb
38
41
  - config/routes.rb
42
+ - db/migrate/20190920115550_create_action_text_tables.action_text.rb
39
43
  - lib/tasks/thecore_ui_commons_tasks.rake
40
44
  - lib/thecore_ui_commons.rb
41
45
  - lib/thecore_ui_commons/engine.rb