-
Notifications
You must be signed in to change notification settings - Fork 6
/
ug-alumni.html
65 lines (55 loc) · 2.22 KB
/
ug-alumni.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
55
56
57
58
59
60
61
62
63
64
65
---
layout: page
permalink: /ug-alumni
title: UG Alumni
description: UG Alumni of Department of Statistcs, Visva-Bharati
---
{% assign unique_years = "" | split: "" %}
{% for student in site.students %}
{% if student.ug %}
{% capture current_year %}{{ "now" | date: "%Y" }}{% endcapture %}
{% assign current_year = current_year | plus: 0 %}
{% assign ug_year = student.ug | plus: 0 %}
{% assign year_difference = current_year | minus: ug_year %}
{% if year_difference > 2 %}
{% unless unique_years contains ug_year %}
{% assign unique_years = unique_years | push: ug_year %}
{% endunless %}
{% endif %}
{% endif %}
{% endfor %}
{% for year in unique_years %}
<div class="row pt-5" id="{{ year | plus: 3 }}">
<a href="#{{ year | plus: 3 }}"><h2><strong>Year {{ year | plus: 3 }}</strong></h2> <hr></a>
{% for student in site.students %}
{% if student.ug %}
{% capture current_year %}{{ "now" | date: "%Y" }}{% endcapture %}
{% assign current_year = current_year | plus: 0 %}
{% assign ug_year = student.ug | plus: 0 %}
{% assign year_difference = current_year | minus: ug_year %}
{% if year_difference > 2 and ug_year == year %}
<div class="col-lg-3 col-md-4 col-sm-6 mb-5">
<a href="{{ student.url | relative_url }}">
<div class="wrapper p-1">
<div class="img-wrapper">
<img loading="lazy" src="{{ student.image }}" class="img-fluid" alt="{{ student.title }}" width="200px">
</div>
<div class="content pt-2">
<h3 class="name">{{ student.title }}</h3>
{% if student.working == null or student.working == "" %}
{% assign last_degree = student.degrees | last %}
{% if last_degree %}
<p class="description">{{ last_degree.name }}</p>
{% endif %}
{% else %}
<p class="description">{{ student.working }}</p>
{% endif %}
</div>
</div>
</a>
</div><!-- Col end -->
{% endif %}
{% endif %}
{% endfor %}
</div><!-- Row end -->
{% endfor %}