-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
159 lines (142 loc) · 4.62 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
layout: page
exclude: true
image: "/seo/default.png"
---
{% assign index_page_html = null %}
{% capture index_page_html %}
{% for p in paginator.posts %}
<div class="ghpb-post">
<div class="well ghpb-well-outline">
{% if p.title %}
<h1><a href="{{ site.url }}{{ p.url }}">{{ p.title }}</a></h1>
{% else %}
<h2><a href="{{ site.url }}{{ p.url }}">{{ site.description }}</a></h2>
{% endif %}
{% if p.subtitle %}
<h4>{{ p.subtitle }}</h4>
{% endif %}
{% if p.alert or p.notice %}
<br>
{% if p.alert %}
<div class="alert alert-block">
{{ p.alert }}
</div>
{% endif %}
{% if p.notice %}
<div class="alert alert-block alert-success">
{{ p.notice }}
</div>
{% endif %}
{% endif %}
<br>
{{ p.content }}
<br>
<div class="row">
<small>
<div class="span3 offset1">
{% if site.font_awesome.enabled %}
<i class="fas fa-user"></i>
{% endif %}
Authored by
{% if p.author %}
{{ p.author }}.
{% else %}
{{ site.author }}.
{% endif %}
<br>
{% if site.font_awesome.enabled %}
<i class="fas fa-pencil-alt"></i>
{% endif %}
Published on {{ p.date | date_to_long_string }}.
<br>
{% assign enable_disqus_show_comments = false %}
{% if site.disqus.enabled and site.disqus.show_comment_count and p.disqus == null %}
{% assign enable_disqus_show_comments = true %}
{% elsif site.disqus.enabled and site.disqus.show_comment_count and p.disqus.enabled == null %}
{% assign enable_disqus_show_comments = true %}
{% elsif site.disqus.enabled and site.disqus.show_comment_count and p.disqus.enabled %}
{% assign enable_disqus_show_comments = true %}
{% endif %}
{% if enable_disqus_show_comments %}
{% if site.font_awesome.enabled %}
<i class="fas fa-comments"></i>
{% endif %}
<a href="{{ site.url }}{{ p.url }}#disqus_thread">Comments</a>
<br>
{% endif %}
</div>
<div class="span3">
{% if p.category.size > 0 %}
{% if site.font_awesome.enabled %}
<i class="fas fa-folder-open"></i>
{% endif %}
Category:
<a href="{{ site.url }}/filter.html?category={{ p.category | replace: ' ', '___' | downcase }}">
{{ p.category | capitalize }}
</a>
<br>
{% endif %}
{% if p.tags.size > 0 %}
{% assign index_post_tag_names = null %}
{% capture index_post_tag_names %}
{% for index_post_t in p.tags %}
{{ index_post_t | replace: ' ', '___' }}
{% endfor %}
{% endcapture %}
{% capture index_post_sorted_tag_names %}
{{ index_post_tag_names | split:' ' | sort | join:' ' }}
{% endcapture %}
{% capture index_post_number_of_tags %}
{{ index_post_sorted_tag_names | number_of_words }}
{% endcapture %}
{% if site.font_awesome.enabled %}
<i class="fas fa-tags"></i>
{% endif %}
Tags:
{% assign index_post_first_tag = true %}
{% assign index_post_prev_tag = '' %}
{% for index_post_i in (1..index_post_number_of_tags) %}
{% capture index_post_tag %}{{ index_post_sorted_tag_names | truncatewords:index_post_i | remove:'...' | split:' ' | last | downcase }}{% endcapture %}
{% if index_post_prev_tag != index_post_tag %}
{% if index_post_first_tag %}
{% assign index_post_first_tag = false %}
{% else %}
,
{% endif %}
{% assign index_post_prev_tag = index_post_tag %}
<a href="{{ site.url }}/filter.html?tag={{ index_post_tag }}">{{ index_post_tag | replace: '___', ' ' }}</a>
{% endif %}
{% endfor %}
{% endif %}
</div>
</small>
</div>
</div>
</div>
<br>
<br>
{% endfor %}
<div class="pagination">
<div class="row">
<div class="span2 offset1">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a href="{{ site.url }}" class="previous">Previous</a>
{% else %}
<a href="{{ site.url }}/page{{paginator.previous_page}}" class="previous">Previous</a>
{% endif %}
{% endif %}
</div>
<div class="span2">
<span class="page_number">Page: {{paginator.page}} of {{paginator.total_pages}}</span>
</div>
<div class="span2">
{% if paginator.next_page %}
<a href="{{ site.url }}/page{{paginator.next_page}}" class="next">Next</a>
{% endif %}
</div>
</div>
</div>
{% endcapture %}
{{ index_page_html | remove:' ' }}