-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathupcoming-training.html
38 lines (38 loc) · 1.46 KB
/
upcoming-training.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
<!-- Training -->
<div class="upcoming-training">
<div class="heading-line">
<h2><span>Upcoming Training</span></h2>
</div>
<div class="training-items-list">
{% assign upcomingTrainings = '' | split: ',' %}
{% capture now %}{{site.time | date: '%s' | plus: 0}}{% endcapture %}
{% for training in site.trainings %}
{% capture date %}{{training.when | date: '%s' | plus: 86400}}{% endcapture %}
{% if now <= date %}
{% assign upcomingTrainings = upcomingTrainings | push: training %}
{% endif %}
{% endfor %}
{% for training in upcomingTrainings %}
<a href="{{training.link-out}}" class="training-item card">
<span class="calendar">
<span>
{% capture date %}{{training.date | date: '%B' }}{% endcapture %}
{{date | truncate: 3, ""}}
</span>
<span>{{training.date | date: '%-d' }}</span>
</span>
<div class="card-text">
<h4>{{training.title}}</h4>
<ul>
<li class="online-courses-price">{{training.where | upcase}}</li>
<li class="dot">•</li>
<li class="online-courses-date">{{training.organizer}}</li>
</ul>
</div>
</a>
{% endfor %}
</div>
<div class="call-to-action action-medium">
<p class="align-top">See <a href="/training/">more training</a> or <a href="https://github.com/scala/scala-lang/tree/main/training">add one to our feed</a></p>
</div>
</div>