-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent.twig
57 lines (50 loc) · 2.31 KB
/
event.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{% extends "_layout.twig" %}
{% import "_local_time.twig" as localTime %}
{% block about_content %}
<div class="container">
{% set show_map = event.location is not empty
and record.location.formatted_address is not empty
and record.location.latitude is not empty
and app.config.get('general/services/google_maps_embed') is not empty
%}
<div class="row{% if show_map %} with-map{% endif %}">
<section class="cal-event-details">
<h1 class="main">{{ record.title }}</h1>
{% if record.event_time is not empty %}
<p class="detail"><span class="detail-label">When? </span>
{{ localTime.render(event.event_time, event.event_end_day, event.event_time_zone, event.time_display_mode, true) }}
</p>
{% endif %}
{% if record.location is not empty and record.location.formatted_address is not empty %}
{% if record.location_informal is empty %}
<p class="detail"><span class="detail-label">Where? </span>{{ record.location.formatted_address }}</p>
{% else %}
<p class="detail"><span class="detail-label">Where? </span>{{ record.location_informal }}<br>({{ record.location.formatted_address }})</p>
{% endif %}
{% endif %}
{% if record.web_location is not empty %}
<p class="detail"><span class="detail-label">Link? </span><a href="{{ record.web_location }}">{{ record.web_location_title is empty ? record.web_location : record.web_location_title }}</a></p>
{% endif %}
</section>
{% if show_map %}
<section class="cal-event-map">
<div class="embed-responsive embed-responsive-16by9">
<iframe src="https://www.google.com/maps/embed/v1/place?zoom=14
&q={{ record.location.formatted_address }}
¢er={{ record.location.latitude }},{{ record.location.longitude }}
&key={{ app.config.get('general/services/google_maps_embed') }}">
</iframe>
</div>
</section>
{% endif %}
</div>
</div>
{% endblock %}
{% block content %}
<article class="cal-event-content">
<h1 class="section-heading">Event Description</h1>
<section class="cal-event-body">
{{ record.body }}
</section>
</article>
{% endblock %}