Uh oh!
There was an error while loading. Please reload this page.
forked from JesperDramsch/python-deadlines
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
Latest commit
174 lines (153 loc) · 7.82 KB
/
Copy pathindex.html
File metadata and controls
174 lines (153 loc) · 7.82 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
---
layout: home
---
<divid="confs">
<divid="coming_confs">
{% assign confs = site.data.conferences | sort: "cfp" | reverse %}
{% for conf in confs %}
{% assign subs = conf.sub | split: "," %}
<divid="{{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>
<divid="past_cfps">
<h1id="past-cfps-title">{% t titles.past_cfps %}</h1>
</div>
<divid="past_confs">
<h1id="past-events-title">{% t titles.past_events %}</h1>
</div>
<divid="conf_archive">
<h1id="archive-link"><ahref="{% tl archive %}">{% t titles.visit_archive %}</a></h1>
</div>
</div>
<br><br>
</div>
<scripttype="text/javascript" charset="utf-8">
// Global conference data for lazy loading
window.conferenceData=window.conferenceData||{};
$(function(){
luxon.Settings.defaultLocale="{{ site.lang }}";
varDateTime=luxon.DateTime;
vartoday=DateTime.now();
// Make sure this is >= no. of subs
// Currently not used
varcolors=['#341f97','#ee5253','#2e86de',
'#ff9f43','#10ac84','#222f3e']
{%includeload_data.js%}
{%includeutils.js%}
{%includemultiselect_handler.js%}
// Set time zone to local timezone on web copy
$('.local-timezone').text(today.toFormat('z'));
{%forconfinsite.data.conferences%}
{%ifconf.cfp_ext%}
{%assigncfp=conf.cfp_ext%}
{%else%}
{%assign cfp =conf.cfp%}
{%endif%}
{%assign subs =conf.sub|split: "," %}
{%forsubinsubs%}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .{{sub | strip}}-tag').html("{% t 'subs.{{sub | strip}}' %}".toLocaleLowerCase("{{ site.lang }}"));
{%endfor%}
{%ifcfp=="TBA"orcfp=="Cancelled"orcfp=="None"%}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .timer').html("{{cfp}}");
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .deadline-time').html("{{cfp}}");
{%ifcfp=="TBA"%}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').attr("cfpDiff",Infinity);
{%else%}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').attr("cfpDiff",-Infinity);
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').appendTo($("#past_cfps"));
{%endif%}
{%else%}
// Use specified timezone for deadlines if available else use AoE timezone
{%ifconf.timezone%}
varcfpDate=DateTime.fromSQL("{{cfp}}",{zone: "{{conf.timezone}}"});
varconfDate=DateTime.fromSQL("{{conf.start}}",{zone: "{{conf.timezone}}"});
{%else%}
varcfpDate=DateTime.fromSQL("{{cfp}}",{zone: "UTC-12"});
varconfDate=DateTime.fromSQL("{{conf.start}}",{zone: "UTC-12"});
{%endif%}
// check if timezone is valid otherwise replace by system timezone
if(cfpDate.invalid===true||confDate.invalid===true){
var cfpDate =DateTime.fromSQL("{{cfp}}");
varconfDate=DateTime.fromSQL("{{conf.start}}");
console.log("Invalid timezone in {{conf.conference | slugify: "latin"}}-{{conf.year}}. Using system timezone instead.");
}
// Store conference data for other features
varconfElement=document.getElementById('{{conf.conference | slugify: "latin"}}-{{conf.year}}');
if(confElement){
confElement.dataset.confId='{{conf.conference | slugify: "latin"}}-{{conf.year}}';
confElement.dataset.cfpDate=cfpDate.toISO();
confElement.dataset.confDate=confDate.toISO();
}
// deadline in local timezone
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .deadline-time')
.html(cfpDate.setZone('system').toLocaleString(DateTime.DATE_HUGE))
.attr('data-deadline',cfpDate.toISO());
// add calendar button
try{
varmyCalendar=createCalendarFromObject({
id: '{{conf.conference | slugify: "latin"}}-{{conf.year}}',
title: '{{conf.conference}} {{conf.year}} deadline',
start_date: cfpDate.toJSDate(),
duration: 60,
place: '{{conf.place}}',
link: '{{conf.link}}'
});
varcalendarContainer=document.querySelector('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .calendar');
if(calendarContainer){
calendarContainer.appendChild(myCalendar);
}
}catch(err){
varcalendarContainer=document.querySelector('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .calendar');
if(calendarContainer){
varerrorMsg=document.createElement('p');
errorMsg.textContent='Calendar not available.';
calendarContainer.appendChild(errorMsg);
}
console.log("Error in cfp date.");
}
// check if date has passed, add 'past' class to it
cfpDiff=cfpDate.diffNow("seconds");
confDiff=confDate.diffNow("seconds");
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').attr("cfpDiff",cfpDiff.toMillis());
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').attr("confDiff",confDiff.toMillis());
if(cfpDiff<0){
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').addClass('pastcfp');
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').appendTo($("#past_cfps"));
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .calendar').remove();
}
if(confDiff<0){
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').addClass('pastconf');
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').appendTo($("#past_confs"));
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .calendar').remove();
}
{%endif%}
{%endfor%}
// Sort coming_confs and past_confs
$("#coming_confs .ConfItem").sort(function(a,b){
return$(a).attr('cfpDiff')-$(b).attr('cfpDiff');
}).appendTo($("#coming_confs"));
{%includehandle_url_retrieval.js%}
// Legacy click handler removed - now handled by conference-filter.js
});
</script>