forked from AndroidStudyGroup/conferences
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
33 lines (32 loc) · 1.29 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
---
layout: default
---
<script>
var today = new Date();
</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>
{{ conference.date_start | date: "%Y-%m-%d" }}
<a class="post-link" href="{{ conference.website }}">{{ conference.name }}</a>
{% if conference.location %}
<small>{{ conference.location }}</small>
{% endif %}
<script>
{% if conference.cfp_start %}
if (today >= new Date('{{ conference.cfp_start | date: "%Y-%m-%d" }}') && today <= new Date('{{ conference.cfp_end | date: "%Y-%m-%d" }}')) {
document.write('<a href="{% if conference.cfp_site %}{{ conference.cfp_site }}{% else %}{{ conference.website }}{% endif %}"><span class="label label-success">Call For Papers</span></a>');
}
{% endif %}
if (today >= new Date('{{ conference.date_start | date: "%Y-%m-%d" }}') && today <= new Date('{{ conference.date_end | date: "%Y-%m-%d" }}')) {
document.write('<span class="label label-danger">Happening Now</span>');
}
</script>
</li>
{% endif %}
{% endfor %}
</ul>