forked from JesperDramsch/python-deadlines
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummary.html
More file actions
224 lines (206 loc) · 10.2 KB
/
Copy pathsummary.html
File metadata and controls
224 lines (206 loc) · 10.2 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
---
description: Summary of the conference and its instances throughout the years.
---
<!DOCTYPE html>
<html>
<head>
{% include head.html %}
{% if page.mastodon %}
{% include mastodon_head.html %}
{% endif %}
</head>
<body>
{% include header.html %}
{% if page.alt_name and page.alt_name != nil %}
{% assign confs = site.data.archive | concat: site.data.conferences | concat: site.data.legacy | where_exp:"item","page.conference contains item.conference or item.conference contains page.conference or page.alt_name == item.alt_name or page.conference contains item.alt_name or item.conference contains page.alt_name" | sort: "year" | reverse %}
{% else %}
{% assign confs = site.data.archive | concat: site.data.conferences | concat: site.data.legacy | where_exp:"item","page.conference contains item.conference or item.conference contains page.conference" | sort: "year" | reverse %}
{% endif %}
<div class="container">
<div class="page-header" id="conf-title">
<div class="row">
<div class="col-sm-12">
{% include_cached breadcrumbs.html url=page.url %}
<h1>
<span id="conf-title-href" href="{{site.baseurl_root}}/summary/{{page.conference | slugify: 'latin'}}/">{{title}}</span>
<span id="twitter-box"><a href="https://twitter.com/share" class="twitter-share-button"
data-text="Conference instances for the #{{ page.conference }} conference!" data-show-count="false"
style="font-size:13px;">Tweet</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</span>
</h1>
</div>
</div>
<div class="row">
<div class="col-sm-12" id="conf-subs">
<span id="conf-subs" title="Conference subjects">
{% assign subs = page.sub | split: "," %}
{% for sub in subs %}
<span class="{{sub}}-tag badge badge-light conf-sub conf-{{sub}}">
{% for tp in site.data.types %}
{% if sub == tp.sub %}
{{tp.name}}
{% endif %}
{% endfor %}
</span>
{% endfor %}
</span>
</div>
</div>
</div>
<div id="page-content">
<div id="summary-main-section" class="row">
<div id="summary-confs-column" class="col-12{% if confs[0].mastodon %} col-lg-7{% endif %}">
<div id="conf-key-facts" class="row">
<div class="col-12">
<div>
<img src="/static/img/203-earth.svg" class="badge-link" alt="Earth Icon" width="16" height="16" />
<a id="conf-website" target="_blank" rel="noopener noreferrer" href="{{confs[0].link}}">{{confs[0].link}}</a>
</div>
{% if confs[0].twitter %}
<div>
<img src="/static/img/407-twitter.svg" class="badge-link" alt="Twitter icon" width="16" height="16" />
<a id="conf-twitter" target="_blank" rel="noopener noreferrer" href="https://twitter.com/{{confs[0].twitter}}">@{{confs[0].twitter}}</a>
</div>
{% endif %}
{% if confs[0].mastodon %}
<div>
<img src="/static/img/407-mastodon.svg" class="badge-link" alt="Mastodon icon" width="16" height="16" />
<a id="conf-mastodon" target="_blank" rel="noopener noreferrer" href="{{confs[0].mastodon}}">Mastodon</a>
</div>
{% endif %}
{% if confs[0].bluesky %}
<div>
<i class="fa-brands fa-bluesky" style="width:16px;height:16px;" aria-hidden="true"></i>
<a id="conf-bluesky" target="_blank" rel="noopener noreferrer" href="{{confs[0].bluesky}}">Bluesky</a>
</div>
{% endif %}
{% if confs[0].youtube %}
<div>
<i class="fa-brands fa-youtube" style="width:16px;height:16px;" aria-hidden="true"></i>
<a id="conf-youtube" target="_blank" rel="noopener noreferrer" href="{{confs[0].youtube}}">YouTube</a>
</div>
{% endif %}
</div>
</div>
<div id="all_confs">
{% for conf in confs %}
{% assign subs = conf.sub | split: "," %}
<div id="{{conf.conference | slugify: "latin"}}-{{conf.year}}"
class="ConfItem {% for sub in subs %} {{sub | strip}}-conf {% endfor %}"
data-conf-id="{{conf.conference | slugify: "latin"}}-{{conf.year}}"
data-conf-name="{{conf.conference}}"
data-conf-year="{{conf.year}}"
data-location="{{conf.place}}"
data-format="{% if conf.extra_places %}hybrid{% elsif conf.link contains 'virtual' or conf.place contains 'Virtual' or conf.place contains 'Online' %}virtual{% else %}in-person{% endif %}"
data-topics="{{conf.sub}}"
data-cfp="{{conf.cfp}}"
data-cfp-ext="{{conf.cfp_ext}}"
data-start="{{conf.start}}"
data-end="{{conf.end}}"
data-link="{{conf.link}}"
data-cfp-link="{{conf.cfp_link}}"
data-has-finaid="{% if conf.finaid %}true{% else %}false{% endif %}"
data-has-workshop="{% if conf.workshop_deadline %}true{% else %}false{% endif %}"
data-has-sponsor="{% if conf.sponsor %}true{% else %}false{% endif %}">
{% include index_conf_title_row.html %}
{% include_cached index_conf_date_place.html place=conf.place extra_places=conf.extra_places note=conf.note cfp=conf.cfp start=conf.start end=conf.end %}
{% include index_conf_subs.html subs=subs %}
<hr />
</div>
{% endfor %}
</div>
</div>
{% if confs[0].mastodon %}
<div id="summary-feed-column" class="col-12 col-lg-5">
{% assign summary_mastodon = confs[0].mastodon %}
{% include mastodon_feed.html account=summary_mastodon label=page.conference %}
</div>
{% endif %}
</div>
{% if page.place == confs[0].place and confs[0].place == confs[1].place %}
<div class="row">
{% google_map zoom="6" width="100%" %}
</div>
{% endif %}
</div>
</div>
<footer>
{% include_cached footer.html %}
{% assign title_length = page.title | size | minus: 27 %}
{% assign sliced_title = page.title | slice: 0, title_length %}
{% include_cached trademarks.html title=sliced_title %}
</footer>
<script type="text/javascript" charset="utf-8">
$(function () {
var DateTime = luxon.DateTime;
var today = DateTime.now();
{% include load_data.js %}
{% include utils.js %}
// Set time zone to local timezone on web copy
$('.local-timezone').text(today.toFormat('z'));
{% for conf in confs %}
{% if conf.cfp_ext %}
{% assign cfp = conf.cfp_ext %}
{% else %}
{% assign cfp = conf.cfp %}
{% endif %}
{% assign subs = conf.sub | split: "," %}
// Populate subject tag labels
{% for sub in subs %}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .{{sub | strip}}-tag').html("{% t 'subs.{{sub | strip}}' %}".toLocaleLowerCase("{{ site.lang }}"));
{% endfor %}
// Set sorting attributes for conference ordering
{% if cfp == "TBA" or cfp == "Cancelled" or cfp == "None" %}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .deadline-time').html("{{cfp}}");
{% if cfp == "TBA" %}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').attr("cfpDiff", Infinity);
{% else %}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').attr("cfpDiff", -Infinity);
{% endif %}
{% else %}
// Use specified timezone for deadlines if available else use AoE timezone
{% if conf.timezone %}
var cfpDate = DateTime.fromSQL("{{cfp}}", { zone: "{{conf.timezone}}" });
var confDate = DateTime.fromSQL("{{conf.start}}", { zone: "{{conf.timezone}}" });
{% else %}
var cfpDate = DateTime.fromSQL("{{cfp}}", { zone: "UTC-12" });
var confDate = DateTime.fromSQL("{{conf.start}}", { zone: "UTC-12" });
{% endif %}
// Check if timezone is valid otherwise replace by system timezone
if (cfpDate.invalid || confDate.invalid) {
var cfpDate = DateTime.fromSQL("{{cfp}}");
var confDate = DateTime.fromSQL("{{conf.start}}");
console.log("Invalid timezone in {{conf.conference | slugify: "latin"}}-{{conf.year}}. Using system timezone instead.");
}
// Display deadline in local timezone
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .deadline-time').html(cfpDate.setZone('system').toLocaleString(DateTime.DATE_HUGE));
// Store conference data for sorting
var confElement = document.getElementById('{{conf.conference | slugify: "latin"}}-{{conf.year}}');
if (confElement) {
confElement.dataset.cfpDate = cfpDate.toISO();
confElement.dataset.confDate = confDate.toISO();
}
// Calculate time differences for sorting and classification
var cfpDiff = cfpDate.diffNow("seconds");
var confDiff = confDate.diffNow("seconds");
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').attr("cfpDiff", cfpDiff.toMillis());
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').attr("confDiff", confDiff.toMillis());
// Classify past conferences
if (cfpDiff < 0) {
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').addClass('pastcfp');
}
if (confDiff < 0) {
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').addClass('pastconf');
}
{% endif %}
{% endfor %}
// Sort conferences by year (reverse chronological - newest first)
$("#all_confs .ConfItem").sort(function (a, b) {
return parseInt($(b).data('conf-year')) - parseInt($(a).data('conf-year'));
}).appendTo($("#all_confs"));
});
</script>
{% include sneks.html %}
</body>
</html>