-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (59 loc) · 2.27 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
---
layout: default
title: "eat, sleep, and travel"
---
<section>
<ul class="posts">
{% for post in paginator.posts %}
<li>
<article>
<header>
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
<time class="published" datetime="{{ post.date | date: '%Y-%m-%d' }}">
{{ post.date | date_to_string }}
{% for category in post.categories %}
{% if category == "travel" %}
Travel <i class="fa fa-plane" aria-hidden="true"></i>
{% elsif category == "food" %}
Food <i class="fa fa-cutlery" aria-hidden="true"></i>
{% elsif category == "tripreport" %}
Trip Report <i class="fa fa-map-marker" aria-hidden="true"></i>
{% elsif category == "announce" %}
Announce <i class="fa fa-bullhorn" aria-hidden="true"></i>
{% elsif category == "apps" %}
Apps <i class="fa fa-mobile" aria-hidden="true"></i>
{% elsif category == "digitalnomad" %}
Digital Nomad <i class="fa fa-briefcase" aria-hidden="true"></i><i class="fa fa-plane" aria-hidden="true"></i>
{% else %}
Unknown Category <i class="fa fa-question" aria-hidden="true"></i>
{% endif %}
{% endfor %}
</time>
</header>
<script>
var randomNumber = Math.floor((Math.random() * 12) + 1);
if (randomNumber < 10) {
randomNumber = "0" + randomNumber.toString();
} else {
randomNumber = randomNumber.toString();
}
document.write('<a href="{{ post.url }}" class="image"><img src="/template/images/pic' + randomNumber + '.jpg" alt="" /></a>');
</script>
</article>
</li>
{% endfor %}
</ul>
</section>
<!-- Pagination links -->
<section class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}" class="previous">Previous Page</a>
{% endif %}
<span class="page_number ">
Page {{ paginator.page }} of {{ paginator.total_pages }}
</span>
{% if paginator.page != paginator.total_pages %}
<a href="{{ paginator.next_page_path }}" class="next">Next Page</a>
{% endif %}
</section>
<div> </div>