-
Notifications
You must be signed in to change notification settings - Fork 139
Expand file tree
/
Copy pathevent.html
More file actions
205 lines (192 loc) · 6.78 KB
/
event.html
File metadata and controls
205 lines (192 loc) · 6.78 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<%
# vim: set ft=eruby ts=2 sw=2 et ai:
%>
<% go_live = @site.config.fetch(:go_live) %>
<% matrix_works = @site.config.fetch(:matrix_works) %>
<ul class="side-box">
<li><i class="icon-road"></i> <strong>Track</strong>: <%= l track(item[:track]) %></li>
<li><i class="icon-home"></i> <strong>Room</strong>: <%= l room(item[:room]) %></li>
<li><i class="icon-calendar"></i> <strong>Day</strong>: <%= l day(item[:day]) %></li>
<li><i class="icon-play"></i> <strong>Start (UTC+1)</strong>: <%= ltt item, :start %></li>
<li><i class="icon-stop"></i> <strong>End (UTC+1)</strong>: <%= ltt item, :end %></li>
<li>
<i class="icon-calendar"></i> <strong>Calendar:</strong>
<%=
[
{ name: 'iCal', identifier: "/schedule/ical/event/#{item[:slug]}/" },
{ name: 'xCal', identifier: "/schedule/xcal/event/#{item[:slug]}/" },
].map{|cal| l(cal[:identifier], cal[:name], show_subtitle: false) }.join(", ")
%>
</li>
<% if item[:live_video_link] %>
<li id="live-stream-with-q-and-a" class="visible-desktop">
<i class="icon-film"></i> <strong>Video only</strong>:
<a href="<%= item[:live_video_link] %>"><%= item[:room] %></a>
</li>
<% end %>
<% if item[:chat_link] %>
<li>
<i class="icon-comment"></i> <strong>Chat</strong>:
<a href="<%= item[:chat_link] %>">Join the conversation!</a>
</li>
<% end %>
</ul>
<br style="clear: both;"/>
<%if item[:logo] %>
<img src="<%= pathof item[:logo].fetch(:identifier) %>" class="event-logo"/>
<% end %>
<% if item[:abstract] or item[:description] %>
<div class="event-blurb">
<% if item[:abstract] %>
<div class="event-abstract"><%= item[:abstract] %></div>
<% end %>
<% if item[:description] %>
<div class="event-description"><%= item[:description] %></div>
<% end %>
</div>
<% end %>
<%
videos = []
videos.push *((item[:attachments] or []).select{|a| a[:mime] == 'video/webm'}.map{|a| $attachments_by_export[a[:filename]][:localname]})
videos.push *((item[:links] or []).select{|l| l[:url] =~ /\.webm$/}.map{|l| l[:url]})
videos
.each do |video|
mime = case video
when /\.webm$/
'video/webm; codecs="vp8, vorbis"'
when /\.og[gv]$/
'video/ogg; codecs="theora, vorbis"'
when /\.(mp4|mpeg)$/
'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'
else
next
end
require 'uri'
url = video
%>
<div class="video">
<video preload="none" controls="controls" width="75%">
<source src="<%= url %>" type='video/webm; codecs="av01.0.08M.08.0.110.01.01.01.0"' />
<source src="<%= url.gsub(/\.av1\.webm$/, ".mp4") %>" type='video/mp4' />
</video>
</div>
<% end %>
<% if item[:registration_link] %><div>
<h3>Registration</h3>
Registration is required for this session. You can
<a href="<%= item[:registration_link]%>">register here</a>
</div>
<% end %>
<% unless item[:speakers].empty? %>
<h3>Speakers</h3>
<table>
<tbody>
<% item[:speakers].map(&$to_speaker).each do |s| %>
<tr>
<% photo = s[:thumbnail] ? $item_by_id.fetch(s[:thumbnail][:identifier]) : nil %>
<td><% if photo %><a href="<%= speaker(s).path %>"><img class="thumb" height="<%= photo[:height] %>" width="<%= photo[:width] %>" src="<%= photo.path %>" alt="Photo of <%= s[:name] %>"/></a><% end %></td>
<td><%= l s %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
<% if item[:attachments] and not item[:attachments].empty? %>
<h3>Attachments</h3>
<ul class="event-attachments unstyled">
<%
item[:attachments].each do |a|
ai = $item_by_id.fetch(a[:identifier])
title = a[:title] ? a[:title] : ai[:title]
icon = case ai[:media]
when 'slides'
'list'
when 'video'
'facetime-video'
when 'audio'
'music'
when 'paper'
'book'
else
'download'
end
%>
<li><i class="icon-<%= icon %>"></i> <a href="<%= ai.path %>"><%= title %></a></li>
<% end %>
</ul>
<% end %>
<% unless item[:links].empty? %>
<h3>Links</h3>
<ul>
<% item[:links].each do |l| %>
<li><a href="<%= l[:url] %>"><%= l[:title] %></a></li>
<% end %>
</ul>
<% end %>
<%
if false
table = $timetable.fetch(item[:day]).fetch(:by_index)
interval = $timetable.fetch(item[:day]).fetch(:interval)
unslug = lambda{|slug| slug == item[:slug]}
sort = lambda{|e| [e[:start_time], e[:end_time], e[:room_rank], e[:conference_room_id]]}
concurrent_events = begin
require 'set'
s = Set.new
(item[:start_time_index]..item[:end_time_index]).each do |i|
table[i].each do |slug|
s << slug
end
end
s.reject(&unslug).map(&$to_event).sort_by(&sort)
end
next_up_minutes = 30
next_up = begin
require 'set'
(item[:end_time_index]..item[:end_time_index] + (next_up_minutes / interval)).each do |i|
(table[i] or []).each do |slug|
s << slug
end
end
s.reject(&unslug).map(&$to_event).sort_by(&sort)
end
next_in_same_room_limit = 3
next_in_same_room = begin
require 'set'
list = room(item[:room])[:events_by_day].fetch(item[:day].to_sym)
i = 0
while i < list.size
break if list[i] == item[:slug]
i += 1
end
raise "failed to find the event item in the list of events in the same room" unless i < list.size
list[(i+1)..(i+next_in_same_room_limit)].map(&$to_event)
end
[
['sametime', "Concurrent events", concurrent_events],
['sameroom', "Next (up to #{next_in_same_room_limit}) talks in the same room (#{@item[:room_name]})", next_in_same_room],
['upcoming', "Events that start after this one (within #{next_up_minutes} minutes)", next_up],
].each do |anchor, heading, event_list|
unless event_list.empty?
%>
<a name="<%= anchor %>"></a><h3><%= heading %>:</h3>
<table class="table table-striped table-bordered table-condensed">
<thead>
<th>When</th>
<th>Title</th>
<th>Track</th>
<th>Where</th>
</thead>
<tbody>
<% event_list.each do |e| %>
<tr>
<td><%= e[:start_time] %>-<%= e[:end_time] %></td>
<td><%= l(e) %></td>
<td><%= l(track(e[:track])) %></td>
<td><%= l(room(e[:room])) %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
<% end %>
<% end %>