Files
once-campfire/app/views/action_text/attachables/_opengraph_embed.html.erb
T
2026-09-26 09:13:44 +02:00

18 lines
849 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_if opengraph_embed.href.present?, 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: "…") %></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>