Files
once-campfire/app/views/action_text/attachables/_opengraph_embed.html.erb
2026-07-20 18:37:43 +02:00

18 lines
825 B
Plaintext

<figure class="attachment attachment--content attachment--og">
<actiontext-opengraph-embed>
<div class="og-embed gap <%= "og-embed--twitter-avatar" if opengraph_embed.twitter_avatar? %>">
<div class="og-embed__content">
<div class="og-embed__title">
<%= link_to truncate(opengraph_embed.filename, length: 280, omission: "…"), opengraph_embed.href, rel: "noreferrer", target: "_blank" %>
</div>
<div class="og-embed__description"><%= truncate(opengraph_embed.description.to_s, length: 560, omission: "…").html_safe %></div>
</div>
<% if opengraph_embed.url %>
<div class="og-embed__image">
<%= tag.img src: opengraph_embed.url, class: "image center", alt: "" %>
</div>
<% end %>
</div>
</actiontext-opengraph-embed>
</figure>