-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathindex.html
More file actions
184 lines (146 loc) · 7.05 KB
/
index.html
File metadata and controls
184 lines (146 loc) · 7.05 KB
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
---
layout: default
---
{% include get_baseurl.html %}
{% assign allTags = site.p | map: 'tags' | join: ',' | split: ',' | uniq %}
{% include translate_link.html %}
<div class="row">
<div class="col-md-9">
<div class="row pagebar">
<div class="col-sm-3 " style="float:left;width: 15%;margin-top: 10px;">
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" style="color: #999;">
排序: 提问时间 <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a style="color: #999;">提问时间</a></li>
</ul>
</div>
</div>
<span id="btn-post-answer-btm " class="btn btn-cancel pull-right desktop-only">
<a style="color: #333;">
<i class="fa fa-leaf" style="width: 22px;"></i>
问题池
</a>
</span>
</div>
<div>
<span class="visible-sm visible-xs" style="margin: 20px 0;">
</span>
</div>
<div id="post-list">
<div
class="post-body-wrap post-body-wrap-list post-row"
style="padding: 10px 5px 10px 5px;"
data-index="0"
data-pagination="0"
>
<div class="title-box clearfix">
<div class="post-title title">
<a target="_blank" href="{{ baseURL }}/participate.html">
【置顶】如何协作参与品葱备份计划
</a>
</div>
<div class="tags tag-pad" style="margin:3px 0 3px 10px;">
<a class="tag" href="{{ baseURL }}/tags.html#参与">参与</a>
</div>
<!-- <div class="clearfix"></div> -->
<div class="post-action" style="padding:0;margin-top:10px;">
<span class="userlink muted btn-gray">
<span class="btn-gray">
2019-01-12
</span>
</span>
</div>
</div>
</div>
{% assign allPosts = site.p | concat: site.articles | concat: site.news | sort: "date" %}
{% for post in allPosts reversed %}
{% assign postURL = post.url | split: "/" %}
{% assign postID = postURL[2] %}
{% assign answersOfTheQuestion = "" | split: "," %}
{% for answer in site.answers %}
{% assign answerURL = answer.url | split: "/" %}
{% if postID == answerURL[2] %}
{% assign answersOfTheQuestion = answersOfTheQuestion | push: answer %}
{% endif %}
{% endfor %}
{% assign postIndex = forloop.index0 | plus: 1 %}
{% assign postPagination = postIndex | divided_by: 10 %}
<div
class="post-body-wrap post-body-wrap-list post-row {% if postPagination >= 1 %}hidden{% endif %}"
style="padding: 10px 5px 10px 5px;"
id="post-{{ postID }}"
data-index="{{ postIndex }}"
data-pagination="{{ postPagination }}"
>
<div class="title-box clearfix">
<div class="post-title title">
<a target="_blank" href="{{ baseURL }}{{ post.url }}">
{{ post.title }}
</a>
</div>
<div class="tags tag-pad" style="margin:3px 0 3px 10px;">
{% for tag in post.tags %}
<a class="tag" href="{{ baseURL }}/tags.html#{{ tag }}">{{ tag }}</a>
{% endfor %}
</div>
<div class="clearfix"></div>
<div class="post-action" style="padding:0;margin-top:10px;">
<span class="vote upvote mark btn-action fa fa-thumbs-o-up" title="赞同">
<span class="vote-btn-text zhidao-font">赞
<span class="count-wrap">
<span class="mainpost-count" style="font-size: 13px;">
{{ post.upvote | default: 0 }}
</span>
</span>
</span>
</span>
<span class="vote downvote tip btn-action fa fa-thumbs-o-down" title="不赞同">
<span class="count-wrap zhidao-font">
{{ post.downvote }}
</span>
</span>
<span class="label label-default view-comment" style="margin-left:10px;">
{{ post.comments | size | default: 0}}条评论
</span>
<span class="label label-default view-comment" style="margin-left:10px;">
{% if post.collection == "articles" %}
专栏文章
{% elsif post.collection == "news" %}
新闻话题
{% else %}
{{ answersOfTheQuestion.size }}个回答
{% endif %}
</span>
<span class="userlink muted btn-gray">
<span class="btn-gray">
{{ post.date | date: "%Y-%m-%d" }}
</span>
</span>
</div>
</div>
</div>
{% endfor %}
<div class="qpool-page" style="border-top: 1px solid #ECECEC;">
<span class="qpool-prev hidden">上一页</span>
<span class="qpool-next">下一页</span>
</div>
<style type="text/css">
.qpool-page {
text-align: center;
padding: 20px 0;
font-size: 13px;
}
.qpool-prev,
.qpool-next {
color: #999;
cursor: pointer;
margin-left: 20px;
}
</style>
</div>
</div>
{% include sidebar.html %}
</div>
<script src="./lib/index.min.js"></script>