-
Notifications
You must be signed in to change notification settings - Fork 0
/
schedule.html.haml
91 lines (76 loc) · 3.38 KB
/
schedule.html.haml
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
!!!
%html
%head
%meta(name="viewport" content="width=device-width, initial-scale=1")
%script(src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous")
%script(src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js")
%script(src="https://use.typekit.net/abb5hmw.js")
:javascript
try{Typekit.load({ async: true });}catch(e){}
%link(rel="stylesheet" href="css/bootstrap.min.css")
%link(href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous")
%link(rel="stylesheet" href="css/main.css?")
%body
%nav.navbar.navbar-inverse.navbar-static-top
.container
.navbar-header
%button.navbar-toggle.collapsed(data-toggle="collapse" data-target="#navbar-collapse")
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.navbar-brand(href="/") The 1545
.collapse.navbar-collapse#navbar-collapse
%ul.nav.navbar-nav
%li
%a(href="/teams.html") Teams
%li
%a(href="/results.html") Results
%li
%a(href="/rules.html") Rules
%ul.nav.navbar-nav.navbar-right
%li
%a(href="https://discord.gg/ZYfBpdk" target="_blank") Discord
%li
%a(href="https://twitch.tv/1545race" target="_blank") Twitch
%li
%a(href="https://twitter.com/1545race" target="_blank") Twitter
.container
.row
.col-sm-10
.page-header
%h1 Run Schedule
%p The table below shows the relative estimated timing of each run in the relay. Times on the left-hand-side are shown in UTC.
- schedule = YAML.load_file('./schedule.yaml')
.run-schedule
.schedule-column.timeline
- start_time = Time.utc(2017,7,14,21,0,0).to_datetime
- end_time = Time.utc(2017,7,17,5,0,0).to_datetime
- start_time.step(end_time, 1.to_f/24).each do |hour|
.time
%span.hours= hour.strftime("%I:%M%P")
%span.date= hour.strftime("%B %d")
- schedule.each do |team_name, runs|
.team
.name=team_name
.schedule-column
- runs.each do |run|
- parsed_estimate = Time.parse(run["estimate"])
- estimate_units = (parsed_estimate.hour * 60 + parsed_estimate.min) / 5
.schedule-element{class: run["series"], style: "grid-row: span #{estimate_units}"}
%span.game-name= run["game"]
by
%span.runner-name= run["runner"]
%span.estimate= parsed_estimate.strftime("%H:%M:%S")
%footer
.container
.row
.col-sm-10
.pull-right
%p © 2017 fifteenfortyfive.org
%ul
%li
%a(href="https://discord.gg/ZYfBpdk" target="_blank") Discord
%li
%a(href="https://twitch.tv/1545race" target="_blank") Twitch
%li
%a(href="https://twitter.com/1545race" target="_blank") Twitter