-
Notifications
You must be signed in to change notification settings - Fork 3
/
diode.html
65 lines (60 loc) · 2.96 KB
/
diode.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: default
title: "Diode Projects"
image: "diode.jpg"
use_sig_js: true
---
{% assign all_posts_by_year = site.posts | group_by: "year" %}
{% assign all_years = site.posts | group_by: "year" | map: "name" | sort %}
{% assign latest_year = all_years.last %}
<div class="colorlib-blog">
<div class="container">
<ul class="nav-pills-custom mb-3" id="pills-tab" role="tablist">
{% for year in all_years reversed %}
<li class="nav-item-custom">
<a class="nav-link-custom" id="{{year}}-projects-tab" data-toggle="pill" href="#{{year}}-projects" role="tab" aria-controls="{{year}}-projects" aria-selected="true">{{year}}</a>
</li>
{% endfor %}
</ul>
<div class="tab-content" id="pills-tabContent">
{% for year in all_years reversed %}
{% assign card_no = 0 %}
{% for all_posts in all_posts_by_year %}
{% assign post_year = all_posts.name | plus: 0 %}
{% assign curr_year = year | plus: 0 %}
{% if post_year == curr_year %}
{% assign pages_list = all_posts.items | where: "categories", "diode" %}
{% endif %}
{% endfor %}
<div class="tab-pane fade active" id="{{year}}-projects" role="tabpanel" aria-labelledby="{{year}}-projects-tab">
{% for post in pages_list reversed %}
{% assign modx = card_no | modulo: 3 %}
{% if modx == 0 %}<div class="card-deck">{% endif %}
<div class="card col-md-4">
<div class="card-image">
<a href="{{site.baseurl}}{{post.url}}" title="{{post.title}}">
<img src="{{site.baseurl}}/assets/img/thumbnails/{{post.thumbnail}}" alt="{{post.title}}">
</a>
</div>
<div class="card-title">
<a href="{{site.baseurl}}{{post.url}}" title="{{post.title}}">
<h3> {{post.title}} </h3>
</a>
</div>
<div class="card-title">
<a href="{{site.baseurl}}{{post.url}}" title="{{post.title}}">
{{post.description}}
</a>
</div>
<div class="card-links">
<a href="{{site.baseurl}}{{post.url}}" class="btn btn-primary btn-outline with-arrow" style="padding: 1rem 2rem;" title="{{post.title}}">Read More</a>
</div>
</div>
{% if modx == 2 or forloop.last %}</div>{% endif %}
{% assign card_no = card_no | plus: 1 %}
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>