You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

45 lines
1.4 KiB

<%- content_for :title, node_title(@node) %>
<article class="link__container">
<div class="link">
<%= link_to svg('ico-close'), @node.parent.url, class: 'link__close' %>
<% @node.attachments.limit(1).each do |attachment| %>
<% asset = attachment.asset %>
<%= tag.figure class: 'link__image' do %>
<%= image_tag rails_storage_proxy_url(asset.file.variant(resize_to_fill: [334,456])),
alt: asset.title,
srcset: "
#{rails_storage_proxy_url(asset.file.variant(resize_to_fill: [668,913]))} 668w,
#{rails_storage_proxy_url(asset.file.variant(resize_to_fill: [1002,1369]))} 1002w
",
sizes: "",
loading: 'lazy' if asset&.file&.image? %>
<% end %>
<div class="link__body">
<%= attachment.body.html_safe %>
</div>
<%= tag.div class: "link__learn-more" do %>
<%= link_to t('learn_more'), @node.href %>
<% end %>
<% end %>
</div>
<ul class="link__ctas">
<li><%= link_to t('spot_another_link'), @node.parent.url, class: 'button__base' %></li>
<li>
<button type="button" class="button__base button__base-light" data-share-url="<%= root_url %>">
<%= t 'challange_a_friend' %>
</button>
</li>
</ul>
</article>