forked from JesperDramsch/python-deadlines
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive.html
More file actions
105 lines (91 loc) · 3.96 KB
/
Copy patharchive.html
File metadata and controls
105 lines (91 loc) · 3.96 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
---
namespace: archive
permalink: /archive/
permalink_es: /archivo/
permalink_de: /archiv/
permalink_fr: /archive/
permalink_pt-br: /arquivo/
permalink_zh-cn: /存档/
permalink_ru: /архив/
permalink_id: /arsip/
permalink_hi: /आर्काइव/
title: titles.archive
---
<html>
<head>
{% include head.html %}
</head>
<body>
{% include header.html %} {% capture arch_title %} {% t titles.archive %} {% endcapture %} {% capture arch_hook
%} {% tf frontpage/hook.md %} {% endcapture %} {% capture arch_description %} {% tf frontpage/description.md %}
{% endcapture %} {% include masthead.html url=page.url title=arch_title hook=arch_hook
description=arch_description %}
<div class="container">
<div id="confs">
<h1 id="past-events-title">{% t titles.past_events %}</h1>
{% assign current_year = site.time | date: "%Y" | plus: 0 %} {% for page in site.years %} {% assign year
= page.year | plus: 0 %} {% if year <= current_year %}
<li><a href="{{ page.url }}">Year {{ year }}</a></li>
{% endif %} {% endfor %}
</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>