-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
61 lines (55 loc) · 1.5 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
49
50
51
52
53
54
55
56
57
58
59
60
61
---
layout: page
---
{% if site.posts.size == 0 %}
<h2>No post found</h2>
{% endif %}
<div class="tags">
<ul class="label">
{% for tag in site.categories %}
<li>
<a href="#{{ tag[0] }}">
<span>{{ tag[0] }}</span>
<span class="count">{{ tag[1] | size }}</span>
</a>
</li>
{% endfor %}
</ul>
<!-- Html Elements for Search -->
<div id="search-container">
<input type="text" id="search-input" placeholder="search..."
style="margin: 0px 0px 20px 0px; height: 40px; width: 100%;">
<ul id="results-container"></ul>
</div>
<!-- Script pointing to search-script.js -->
<script src="{{site.baseurl}}/assets/js/search-script.js" type="text/javascript"></script>
<!-- Configuration -->
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '{{site.baseurl}}/search.json'
})
</script>
{% for tag in site.categories %}
<h2 id="{{ tag[0] }}">
{{ tag[0] }}
</h2>
<ul class="tag">
{% for post in tag[1] %}
{% if post.title != null %}
<li>
<time>{{ post.date | date: "%Y-%m-%d" }}</time>
{% if post.link %}
<a href="{{ post.link }}">
{% else %}
<a href="{{ site.baseurl }}{{ post.url }}">
{% endif %}
{{ post.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>