aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/action_text/content/_layout.html.erb2
-rw-r--r--app/views/active_storage/blobs/_blob.html.erb5
2 files changed, 4 insertions, 3 deletions
diff --git a/app/views/action_text/content/_layout.html.erb b/app/views/action_text/content/_layout.html.erb
index b8c8ab6fc6..60d65cd0d5 100644
--- a/app/views/action_text/content/_layout.html.erb
+++ b/app/views/action_text/content/_layout.html.erb
@@ -1,3 +1,3 @@
<div class="trix-content">
- <%= sanitize document %>
+ <%= sanitize render_action_text_content(content) %>
</div>
diff --git a/app/views/active_storage/blobs/_blob.html.erb b/app/views/active_storage/blobs/_blob.html.erb
index c7c70c110e..6e4105d5cf 100644
--- a/app/views/active_storage/blobs/_blob.html.erb
+++ b/app/views/active_storage/blobs/_blob.html.erb
@@ -1,8 +1,9 @@
+<% transformations = { resize: local_assigns[:in_gallery] ? "800x600>" : "1024x768>" } %>
<figure class="attachment attachment--<%= blob.representable? ? "preview" : "file" %> attachment--<%= blob.filename.extension %>">
<% if blob.variable? %>
- <%= image_tag blob.variant(resize: "1024x768>") %>
+ <%= image_tag blob.variant(transformations) %>
<% elsif blob.previewable? %>
- <%= image_tag blob.preview(resize: "1024x768>") %>
+ <%= image_tag blob.preview(transformations) %>
<% end %>
<figcaption class="attachment__caption">