forked from JesperDramsch/python-deadlines
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathyear.html
More file actions
117 lines (105 loc) · 5.11 KB
/
Copy pathyear.html
File metadata and controls
117 lines (105 loc) · 5.11 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
<html>
<head>
{% include head.html %}
</head>
<body>
{% include header.html %} {% capture fp_title %} {% t titles.archive %} {{page.year}} {% endcapture %} {%
capture fp_hook %} {% tf frontpage/hook.md %} {% endcapture %} {% capture fp_description %} {% tf
frontpage/description.md %} {% endcapture %} {% include masthead.html url=page.url title=fp_title hook=fp_hook
description=fp_description %}
<div class="container">
<div id="confs">
<div id="past_confs">
<h1 id="past-events-title">{% t titles.past_events %}</h1>
{% assign confs = site.data.archive | concat: site.data.legacy | sort: "start" | reverse |
where_exp: "item", "item.year == page.year" %} {% 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 %}"
>
{% 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>
{% assign years = site.years | sort: 'year' %} {% assign current_year = page.year %} {% assign previous_year
= null %} {% assign next_year = null %} {% for year in years %} {% if year.year == current_year %} {% assign
previous_year_index = forloop.index0 | minus: 1 %} {% assign next_year_index = forloop.index0 | plus: 1 %}
{% if previous_year_index >= 0 %} {% assign previous_year = years[previous_year_index] %} {% endif %} {% if
next_year_index < years.size %} {% assign next_year = years[next_year_index] %} {% endif %} {% break %} {%
endif %} {% endfor %}
<div class="d-flex justify-content-between navigation">
{% if previous_year %}
<a href="{{ previous_year.url }}" class="btn btn-link"><<< {{ previous_year.year }}</a>
{% else %}
<span></span>
<!-- Empty span to keep alignment if no previous year -->
{% endif %} {% if next_year %}
<a href="{{ next_year.url }}" class="btn btn-link">{{ next_year.year }} >>></a>
{% endif %}
</div>
</div>
<footer>{% include_cached footer.html %}</footer>
<script type="text/javascript" charset="utf-8">
$(function() {
luxon.Settings.defaultLocale = "{{ site.lang }}";
var DateTime = luxon.DateTime;
var today = DateTime.now();
// Make sure this is >= no. of subs
// Currently not used
var colors = ['#341f97', '#ee5253', '#2e86de',
'#ff9f43', '#10ac84', '#222f3e']
{% include load_data.js %}
{% include utils.js %}
{% include multiselect_handler.js %}
// Set time zone to local timezone on web copy
$('.local-timezone').text(today.toFormat('z'));
{% for conf in site.data.archive %}
{% if conf.cfp_ext %}
{% assign cfp = conf.cfp_ext %}
{% else %}
{% assign cfp = conf.cfp %}
{% endif %}
{% assign subs = conf.sub | split: "," %}
{% for sub in subs %}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .{{sub | strip}}-tag').html("{% t 'subs.{{sub | strip}}' %}".toLocaleLowerCase("{{ site.lang }}"));
{% endfor %}
{% if cfp == "TBA" or cfp == "Cancelled" or cfp == "None" %}
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .timer').html("{{cfp}}");
$('#{{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);
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}}').appendTo($("#past_cfps"));
{% 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.");
}
// deadline in local timezone
$('#{{conf.conference | slugify: "latin"}}-{{conf.year}} .deadline-time').html(cfpDate.setZone('system').toLocaleString(DateTime.DATE_HUGE));
{% endif %}
{% endfor %}
{% include handle_url_retrieval.js %}
// Legacy click handler removed - now handled by conference-filter.js
});
</script>
{% include sneks.html %}
</body>
</html>