-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (52 loc) · 2.39 KB
/
index.html
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
---
layout: hu
title: Közelgő
---
<script>
function dateTimestamp(date = undefined) {
var day = (date == undefined) ? new Date() : new Date(date);
return day.setHours(0, 0, 0, 0)
}
var today = dateTimestamp();
</script>
<ul class="conference-list list-unstyled">
{% assign sorted_conferences = site.conferences | sort: 'date_start' %}
{% assign today = site.time | date: "%s" %}
{% for conference in sorted_conferences %}
{% assign date_end = conference.date_end | date: "%s" %}
{% if today <= date_end %}
<li id='{{ forloop.index }}'>
{{ conference.date_start | date: "%Y-%m-%d" }}
<a class="post-link" href="{{ conference.website }}" target="_blank">{{ conference.name }}</a>
{% if conference.location %}
<small>{{ conference.location }}</small>
{% endif %}
<script>
{% if conference.cfp.start %}
if (today >= dateTimestamp('{{ conference.cfp.start | date: "%Y-%m-%d" }}') && today <= dateTimestamp('{{ conference.cfp.end | date: "%Y-%m-%d" }}')) {
document.write('<a href="{% if conference.cfp.site %}{{ conference.cfp.site }}{% else %}{{ conference.website }}{% endif %}" target="_blank"><span class="label label-success">Témajavaslatok benyújtása {{ conference.cfp.end | date: "%Y-%m-%d" }}-ig</span></a>');
}
{% endif %}
{% if conference.status == "Canceled" %}
document.write('<span class="label label-danger">Törölve</span>');
{% elsif conference.status == "Postponed" %}
document.write('<span class="label label-danger">Elhalasztva</span>');
{% endif %}
{% if conference.online %}
document.write('<span class="label label-primary">Online</span>');
{% endif %}
{% if conference.lang %}
document.write('<span class="label label-info">{{ conference.lang }}</span>');
{% endif %}
if (today >= dateTimestamp('{{ conference.date_start | date: "%Y-%m-%d" }}') && today <= dateTimestamp('{{ conference.date_end | date: "%Y-%m-%d" }}')) {
document.write('<span class="label label-danger">Most zajlik</span>');
}
if (today > dateTimestamp('{{ conference.date_end | date: "%Y-%m-%d" }}')) {
document.getElementById('{{ forloop.index }}').style.color="gray";
document.getElementById('{{ forloop.index }}').getElementsByClassName("post-link")[0].classList.add("post-link-past");
}
</script>
</li>
{% endif %}
{% endfor %}
</ul>