durfdoen-2.0/layouts/detail.erb
ajuvercr 3559785257 fix
2020-09-17 20:26:03 +02:00

77 lines
2.9 KiB
Text

<div class="detail-body">
<div class="details-contact">
<%if item[:deelname_link] || item[:contact] || item[:website]%>
<h3>Contact</h3>
<% if item[:deelname_link] %><a href="<%= item[:deelname_link] %>"><%= item[:deelname_link] %></a><% end %>
<div class="contact-container">
<% if item[:contact] %><p>Email-adres: <a href="<%= item[:contact] %>"><%= item[:contact] %></a></p><%end%>
<% if item[:website] %><p>Website: <a href="<%= item[:website] %>"><%= item[:website] %></a></p><%end%>
</div><%end%>
<% if item[:social] %>
<div class="social-container">
<h4>Sociale media</h4>
<ul>
<% for social in item[:social] %>
<a class="social" href="<%= social[:link] %>">
<img src="/assets/social/<%= social[:platform].downcase %>_small.png">
</a>
<% end %>
</ul>
</div>
<% end %>
</div>
<div class="detail_title">
<a target="_blank" href="<%= item[:website] %>"><img src="https://dsa.ugent.be/api/verenigingen/<%= abbreviation(item) %>/logo?size=small" alt="<%= item[:naam] %>"></a>
<h2><%= item[:naam] %></h2>
<% if item[:themas] %>
<% for thema in item[:themas] %>
<div class="vereniging_thema">
<a href="/themas/<%= thema %>.html">
<%= @items["/assets/themas_icon/"+thema+".svg"].compiled_content %>
</a>
</div>
<% end %>
<% end %>
</div>
<div class="detail-content">
<%= yield%>
</div>
</div>
<div class="details-container details-photo">
<div class="showcase-container">
<% if item[:showcase] %>
<% for showcase_img in item[:showcase] %>
<div class="showcase-image">
<img src="<%= showcase_img[:photo]%>" alt="showcase img"></img>
</div>
<% end %>
<% end %>
<div class="thema-container">
<% if item[:themas] %>
<p><span class="thema-title">Thema's:</span>
<ul>
<% for thema in item[:themas] %>
<li><%= thema %></li>
<% end %>
</ul>
</p>
<% end %>
</div>
</div>
<% if item[:verenigingen] %>
<div class="details-container details-verenigingen">
<% for vereniging in item[:verenigingen] %>
<div class="vereninging-container">
<p><%= vereniging[:naam] %></p>
<img src="<%= vereniging[:photo] %>" alt="vereniging logo"></img>
</div>
<% end %>
</div>
<% end %>
<% if item.path.include? "konventen" %>
<div class="fancy_link_container">
<% verenigingen_voor_konvent(item[:id]).sort_by{ |x| x[:naam] }.each do |vereniging| %>
<%= render '/partials/pretty_link.*', :item => vereniging %>
<% end %>
</div>
<% end %>