forked from stefanoborini/stefanoborini.github.io
/
index.html
48 lines (46 loc) · 2.24 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
---
layout: default
---
<div class="home">
<div class="row pack">
<div class="col-md-3 col-sm-3 card" >
<div class="panel panel-default">
<div class="panel-body sidemenu">
<ul>
{% assign sorted_cats = site.categories | sort %}
{% for category in sorted_cats %}
{% capture category_name %}{{ category | first }}{% endcapture %}
{% if category_name != 'slides' and category_name != 'books' %}
{% capture category_slug %}{{ category_name | slugize }}{% endcapture %}
<li><a href="#{{category_slug}}">{{ category_name | capitalize }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
<div class="col-md-9 col-sm-9">
<div class="row pack">
{% for category in sorted_cats %}
{% capture category_name %}{{ category | first }}{% endcapture %}
{% if category_name != 'slides' and category_name != 'books' %}
{% capture category_slug %}{{ category_name | slugize }}{% endcapture %}
<div class="col-md-12 col-sm-12 card">
<div class="panel panel-default">
<div class="panel-body"><h3 class="panel-title pull-left" id="{{ category_slug }}">{{ category_name | capitalize }}</h3></div>
{% assign sorted_posts = category[1] | sort:"title" %}
{% for post in sorted_posts %}
{% if post.link_to %}
<a href="{{ post.link_to }}" class="index-anchor"><div class="panel-body">{{ post.title }}</div></a>
{% else %}
<a href="{{ post.url | prepend: site.baseurl }}" class="index-anchor"><div class="panel-body">{{ post.title }}</div></a>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>