Show previeable content in the editor
Embedded PDF previewing isnt' reliable (not working in Safari with active storage). Instead let's align the editor with Active Storage previews and support pdf previews
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ FROM base
|
||||
|
||||
# Install packages needed for deployment
|
||||
RUN apt-get update -qq && \
|
||||
apt-get install --no-install-recommends -y curl libsqlite3-0 libvips && \
|
||||
apt-get install --no-install-recommends -y curl libsqlite3-0 libvips build-essential ffmpeg groff libreoffice-writer libreoffice-impress libreoffice-calc mupdf-tools && \
|
||||
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
||||
|
||||
# Copy built artifacts: gems, application
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
<audio controls="true" width="100%" preload="metadata">
|
||||
<source src="<%= rails_blob_url(blob) %>" type="<%= blob.content_type %>">
|
||||
</audio>
|
||||
<% elsif blob.content_type == "application/pdf" %>
|
||||
<embed src="<%= rails_blob_url(blob) %>" width="1024" height="768" type="application/pdf">
|
||||
<% elsif blob.variable? %>
|
||||
<%= image_tag url_for(blob.variant(loader: { n: -1 }, resize_to_limit: size)) %>
|
||||
<% elsif blob.previewable? %>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<%= page_title_tag %>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, interactive-widget=resizes-content">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<meta name="view-transition" content="same-origin">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
|
||||
|
||||
Reference in New Issue
Block a user