Skip to content

Commit caa2629

Browse files
Restored basic event view. This is to be amended to look similar to the home page event look.
1 parent 311fad4 commit caa2629

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

_includes/event_layout.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{% comment %}
2+
event_layout.html (event):
3+
4+
Generate a layout for an event.
5+
6+
Creates a basic layout for an event object. For every unique date on which
7+
an event happens the date will be displayed. Events with same dates get the
8+
date displayed only once. This include is to be used inside a for loop in
9+
association with events_arrary_generator.html.
10+
Before the for loop: current_date = "" must be set in the outer scope!
11+
See index.html, line 57 for example of usage.
12+
13+
Parameters:
14+
event: event object
15+
Event object containing yml variables and content.
16+
17+
Returns:
18+
{% endcomment %}
19+
{% assign post = include.event %}
20+
{% include get_host_sponsor.html event = post %}
21+
<div class="upcoming__col col-md-12 no-padding-x">
22+
<div class="row">
23+
<div class="col-12">
24+
{% unless post.date == current_date %}
25+
<p class="upcoming__date">
26+
<i class="upcoming__icon far fa-calendar-alt"></i>{{ post.date | date: "%e %B %Y" }}, {{ post.time }}
27+
</p>
28+
{% endunless %}
29+
{% assign current_date = post.date %}
30+
{% include get_project.html event = post %}
31+
<img class="upcoming__project-logo" src="{{ site.baseurl }}/{{ project.logo }}" alt="Project logo">
32+
<h2 class="upcoming__event-title"> {{ post.title }}</h2>
33+
</div>
34+
</div>
35+
<div class="row">
36+
<div class="col-12">
37+
{% if post.level %}
38+
<h2 class="upcoming__event-subtitle">Level: {{ post.level }}</h2>
39+
{% endif %}
40+
</div>
41+
</div>
42+
<div class="row">
43+
<div class="col-12">
44+
<div class="row">
45+
<div class="col-6 no-padding-x">
46+
<div class="col-12 no-padding-x">
47+
<p class="upcoming__paragraph">
48+
<i class="upcoming__icon fas fa-map-marker-alt"></i>{{ sponsor.address }}
49+
</p>
50+
</div>
51+
</div>
52+
<div class="col-6 no-padding-x text-right my-auto">
53+
<a class="upcoming__button btn" href="{{ post.url }}">
54+
<i class="upcoming__button-icon fas fa-info-circle"></i>
55+
</a>
56+
</div>
57+
</div>
58+
{% unless forloop.last %}
59+
<hr class="upcoming__divider">
60+
{% endunless %}
61+
</div>
62+
</div>
63+
</div>

0 commit comments

Comments
 (0)