Skip to content

Commit

Permalink
Temporary placeholder before the embed loads.
Browse files Browse the repository at this point in the history
This prevents the content from jumping around
  • Loading branch information
jcoyne committed Dec 4, 2023
1 parent 012dfa7 commit 842edf8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/views/purl/_embed.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<%= tag.div data: { controller: 'oembed', oembed_url_value: embeddable_url(@purl.druid) } do %>
<svg width="100%" height="400" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder" preserveAspectRatio="xMidYMid slice" focusable="false">
<title>Placeholder</title>
<rect width="100%" height="100%" fill="#868e96"></rect>
</svg>
<a class="purl-embed-viewer embed" href="<%= embeddable_url(@purl.druid) %>" data-oembed-provider="<%= oembed_provider_url %>">Show Content</a>
<% end %>
<noscript>
Expand Down

0 comments on commit 842edf8

Please sign in to comment.