houdini/app/views/nonprofits/email/_footer.html.erb
2021-01-06 17:15:20 -06:00

69 lines
2.4 KiB
Text

<%- # License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE -%>
<% hide_unsubscribe = false if hide_unsubscribe.nil? %>
<% if @nonprofit %>
<% if @nonprofit.facebook || @nonprofit.twitter || @nonprofit.youtube || @nonprofit.instagram || @nonprofit.blog %>
<table style='width: 100%; border-top: 1px solid rgba(0,0,0,0.05); margin-top: 10px;'>
<tr>
<%= render 'nonprofits/email/footer_link_td',
url: @nonprofit.facebook, text: 'Facebook' if @nonprofit.facebook %>
<%= render 'nonprofits/email/footer_link_td',
url: @nonprofit.twitter, text: 'Twitter' if @nonprofit.twitter %>
<%= render 'nonprofits/email/footer_link_td',
url: @nonprofit.youtube, text: 'YouTube' if @nonprofit.youtube %>
<%= render 'nonprofits/email/footer_link_td',
url: @nonprofit.instagram, text: 'Instagram' if @nonprofit.instagram %>
<%= render 'nonprofits/email/footer_link_td',
url: @nonprofit.blog, text: 'Blog' if @nonprofit.blog %>
</tr>
</table>
<% end %>
<table class='table--blank' style='background: rgb(250, 250, 250)'>
<tr>
<% if @nonprofit.logo.attached? %>
<td style='width: 100px; padding: 10px;'>
<%= image_tag rails_storage_proxy_url(@nonprofit.logo_by_size(:normal)), style:'border: 1px solid rgba(0,0,0,0.05);'%>
</td>
<% end %>
<td style='padding: 10px;'>
<p style='margin: 0; font-size: 13px; line-height: 1.3;'><strong><%= @nonprofit.name %></strong></p>
<% if @nonprofit.website %>
<p style='margin: 0; font-size: 13px; line-height: 1.3;'>
<a href="<%= @nonprofit.website %>" target='_blank'><%= @nonprofit.website %></a>
</p>
<% end %>
<% if @nonprofit.address %>
<p style='margin: 0; font-size: 12px; line-height: 1.3;'><%= @nonprofit.address %></p>
<% end %>
<p style='margin: 0; font-size: 12px; line-height: 1.3;'><%= "#{@nonprofit.city}, #{@nonprofit.state_code} #{@nonprofit.zip_code}" %></p>
</small>
</td>
</tr>
</table>
<% unless hide_unsubscribe %>
<div style='text-align: center; padding: 10px;'>
<small style='text-decoration: underline; color: grey; font-size: 11px;'>
<% if @uuid %>
<a href='<%= root_url %>/nonprofits/<%=@nonprofit.id%>/unsubscribe?SUUID=<%= @uuid %>' target='_blank'>
Unsubscribe
</a>
<% else %>
Unsubscribe
<% end %>
</small>
</div>
<% end %>
<% end %>