zeus.ugent.be/layouts/eventpost.erb

132 lines
4.7 KiB
Plaintext
Raw Permalink Normal View History

2016-07-18 09:06:45 +00:00
<% content_for :head do %>
2017-05-01 21:47:53 +00:00
<% if item[:image] %>
<meta property="og:image" content="<%= item[:image] %>" />
2017-05-01 21:47:53 +00:00
<% end %>
2016-07-18 09:15:03 +00:00
<meta property="og:title" content="<%= item[:title] %>" />
2016-07-19 11:55:27 +00:00
<meta property="og:type" content="article" />
<meta property="og:url" content="<%= url_for(item) %>" />
2016-10-10 17:16:08 +00:00
<meta property="og:description" content="<%= item[:description] %>" />
<meta property="og:site_name" content="Zeus WPI" />
2017-05-01 21:47:53 +00:00
<meta name="twitter:label1" value="Time" />
<meta name="twitter:data1" value="<%= item[:time].strftime '%A %d %B %Y %H:%M' %>" />
<meta name="twitter:label2" value="Place" />
<meta name="twitter:data2" value="<%= item[:location] %>" />
2016-10-10 17:16:08 +00:00
<meta name="twitter:card" content="summary_large_image" />
2018-08-28 19:59:17 +00:00
2018-12-04 19:46:14 +00:00
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js"></script>
2016-07-18 09:06:45 +00:00
<% end %>
<% if item[:banner] %>
2016-10-10 11:59:06 +00:00
<section class="hero is-medium is-primary is-bold" style="background-image:url('<%= item[:banner] %>');background-position:center;">
<% elsif item[:color] %>
<% gradient = if item[:gradient].nil? || item[:gradient]
2018-04-23 11:08:20 +00:00
'linear-gradient(141deg,rgba(255,255,255,0),rgba(0,0,0,.60))'
else
'none'
end %>
<section class="hero is-medium is-primary is-bold" style="background-image: <%= gradient %>; background-color:<%= item[:color] %>;">
<% else %>
2016-10-03 18:52:01 +00:00
<section class="hero is-medium is-primary is-bold">
<% end %>
2016-07-27 18:27:28 +00:00
<div class="hero-head">
<%= render '/partials/_navbar.*', zeus_logo_color: :white, transparent_nav: true %>
2016-07-12 21:58:08 +00:00
</div>
2016-10-03 17:21:29 +00:00
<div class="hero-body">
2016-07-27 18:27:28 +00:00
<div class="container">
2016-09-13 15:13:43 +00:00
<div class="columns">
<div class="column has-vertical-center">
<div class="header-text <%= item[:header_text_background] and !item[:header_text_background_color] ? 'light-background' : '' %>"
<% if item[:header_text_background_color] %>
style="background-color: <%= item[:header_text_background_color] %>"
<% end %>>
2017-04-23 10:46:47 +00:00
<p class="title is-1-responsive event-title">
<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>
2017-04-23 10:46:47 +00:00
<p class="subtitle is-3-responsive">
<%= item[:description] %>
</p>
2017-04-23 10:46:47 +00:00
<ul class="fa-ul is-4-responsive">
2020-10-11 03:07:08 +00:00
<li>
<%= fa 'clock-o', li: true %>
<%= item[:time].strftime '%A %d %B %Y %H:%M' %>
<% if item[:end] %>
<span>
-
</span>
<% if (item[:end].strftime '%d %B %Y') != (item[:time].strftime '%d %B %Y') %>
<span>
<%= item[:end].strftime '%d %B ' %>
</span>
<% end %>
<% if (item[:end].strftime '%Y') != (item[:time].strftime '%Y') %>
<span>
<%= item[:end].strftime '%Y ' %>
</span>
<% end %>
<span>
<%= item[:end].strftime '%H:%M' %>
</span>
<% end %>
</li>
2017-04-21 12:37:31 +00:00
<li><%= fa 'map-marker', li: true %><%= item[:location] %></li>
</ul>
</div>
2016-09-13 15:13:43 +00:00
</div>
2017-04-21 12:37:31 +00:00
<% if item[:image] %>
2016-09-13 15:13:43 +00:00
<div class="is-narrow column banner-image">
2017-04-21 12:37:31 +00:00
<img src="<%= item[:image] %>" alt="banner">
2016-09-13 15:13:43 +00:00
</div>
2017-04-21 12:37:31 +00:00
<% end %>
2016-09-13 15:13:43 +00:00
</div>
2016-07-27 18:27:28 +00:00
</div>
</div>
</section>
<section class="section">
<div class="columns">
2016-08-27 18:15:00 +00:00
<div class="column is-8 is-offset-2">
2017-04-23 10:46:47 +00:00
<div class="content has-text-justified is-medium-responsive">
2016-07-28 15:56:33 +00:00
<%= yield %>
</div>
<!-- LOCATION -->
<% if item[:locationlink] %>
<%= render '/partials/_map.erb', location: item[:locationlink] %>
<% end %>
2017-10-21 09:49:28 +00:00
</div>
</div>
</section>
2018-08-28 19:59:17 +00:00
2017-10-21 09:49:28 +00:00
<!-- SPONSORED BY -->
<% if item[:sponsors] %>
<section class="section">
<div class="columns">
<div class="column is-8 is-offset-2">
<h1 class="title is-1-responsive has-text-centered">Sponsored by</h1>
2017-10-21 09:49:28 +00:00
<div class="sponsors">
<% @item[:sponsors].each do |sp| %>
<a href="<%= sp[:url] %>" target="_blank">
<img src="<%= sp[:img] %>" alt="<%= sp[:name] %>">
</a>
<% end %>
</div>
2016-09-01 22:05:38 +00:00
</div>
</div>
2016-07-27 18:27:28 +00:00
</section>
2017-10-21 09:49:28 +00:00
<% end %>
<!-- END SPONSORED BY -->