zeus.ugent.be/layouts/eventpost.erb
2017-04-21 14:37:31 +02:00

78 lines
2.9 KiB
Text

<% content_for :head do %>
<meta property="og:image" content="<%= item[:image] %>" />
<meta property="og:title" content="<%= item[:title] %>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<%= url_for(item) %>" />
<meta property="og:description" content="<%= item[:description] %>" />
<meta property="og:site_name" content="Zeus WPI" />
<meta name="twitter:label1" content="Time" />
<meta name="twitter:data1" content="<%= item[:time].strftime '%A %d %B %Y %H:%M' %>" />
<meta name="twitter:label2" content="Place" />
<meta name="twitter:data2" content="<%= item[:location] %>" />
<meta name="twitter:card" content="summary_large_image" />
<% end %>
<% if item[:banner] %>
<section class="hero is-medium is-primary is-bold" style="background-image:url('<%= item[:banner] %>');background-position:center;">
<% elsif item[:color] %>
<section class="hero is-medium is-primary is-bold" style="background-image: linear-gradient(to top right,rgba(255,255,255,0),rgba(0,0,0,.60)); background-color:<%= item[:color] %>;">
<% else %>
<section class="hero is-medium is-primary is-bold">
<% end %>
<div class="hero-head">
<%= render '/partials/_navbar.*', zeus_logo_color: :white %>
</div>
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column has-vertical-center">
<div class="header-text <%= item[:header_text_background] ? 'light-background' : '' %>">
<p class="title is-1">
<b>
<%= item[:title] %>
</b>
<span class="event-social-icons">
<% if item[:facebook] %>
<a href="<%= item[:facebook] %>">
<%= fa :facebook %>
</a>
<% end %>
<a href="<%= item.path rep: :ical %>">
<%= fa :calendar %>
</a>
</span>
</p>
<p class="subtitle is-3">
<%= item[:description] %>
</p>
<ul class="fa-ul event-attributes">
<li><%= fa 'clock-o', li: true %><%= item[:time].strftime '%A %d %B %Y %H:%M' %></li>
<li><%= fa 'map-marker', li: true %><%= item[:location] %></li>
</ul>
</div>
</div>
<% if item[:image] %>
<div class="is-narrow column banner-image">
<img src="<%= item[:image] %>" alt="banner">
</div>
<% end %>
</div>
</div>
</div>
</section>
<section class="section">
<div class="columns">
<div class="column is-8 is-offset-2">
<div class="content has-text-justified is-medium">
<%= yield %>
</div>
</div>
</div>
<div class="columns">
<div class="google-maps column is-8 is-offset-2">
<iframe style="border:0" src="<%= locationlink item[:locationlink] %>" allowfullscreen> </iframe>
</div>
</div>
</section>