forked from Huxpro/huxpro.github.io
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patharchive.html
executable file
·144 lines (129 loc) · 4.27 KB
/
archive.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
---
title: Archive
layout: default
description: 所有的所有,一切的一切
header-img: "img/post-bg-alitrip.jpg"
---
<link href="/css/styles.css" rel="stylesheet">
<!--
Credits: this page shamelessly borrowed a lot from:
https://github.com/kitian616/jekyll-TeXt-theme
-->
<!-- Page Header -->
{% include intro-header.html type='page' short=true %}
<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<!-- Tags (as filter) -->
<div id='tag_cloud' class="tags tags-sup js-tags">
<a class="tag-button--all" data-encode="">
Show All
<sup>{{site.posts.size}}</sup>
</a>
{% capture tags %}
{% for tag in site.tags %}
<a data-sort="{{ site.posts.size | minus: tag[1].size | prepend: '0000' | slice: -4, 4 }}"
data-encode="{{ tag[0] | strip | url_encode }}" class="tag-button" title="{{ tag[0] }}"
rel="{{ tag[1].size }}">
{{ tag[0] }}
<sup>{{tag[1].size}}</sup>
</a>
{% endfor %}
{% endcapture %}
{{ tags | split:'</a>' | sort | join:'</a>' }}
</div>
<!-- Article List -->
<div class="mini-post-list js-result d-none">
{%- assign _sorted_list = site.posts -%}
{%- assign _sorted_list = _sorted_list | sort: 'date' -%}
{%- assign _sorted_list = _sorted_list | reverse -%}
{%- for _article in _sorted_list -%}
{%- assign _tags = '' -%}
{%- for _tag in _article.tags -%}
{%- assign _tag_encode = _tag | strip | url_encode -%}
{%- if forloop.last -%}
{%- assign _tags = _tags | append: _tag_encode -%}
{%- else -%}
{%- assign _tags = _tags | append: _tag_encode | append: ',' -%}
{%- endif -%}
{%- endfor -%}
{% comment %} group by year {% endcomment %}
{%- assign _currentdate = _article.date | date: '%Y' -%}
{%- if _currentdate != _date -%}
{%- unless forloop.first -%}</section>{%- endunless -%}
<section>
<span class="fa listing-seperator">
<span class="tag-text">{{ _currentdate }}</span>
</span>
{%- assign _date = _currentdate -%}
{%- endif -%}
<div class="post-preview item" data-tags="{{ _tags }}">
<a href="{{ _article.url | prepend: site.baseurl }}">
<h2 class="post-title">
{{ _article.title }}
</h2>
</a>
<hr>
</div>
{% endfor %}
</div>
<!-- <div class="mini-post-list js-result d-none">
{% for post in site.posts %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% if forloop.first %}
{% assign last_day = "" %}
{% assign last_month = "" %}
<span class="fa listing-seperator">{{this_year}}</span>
<ul class="list-unstyled">
{% endif %}
<li>
<div>
{% capture this_day %}{{ post.date | date: "%d" }}{% endcapture %}
{% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %}
{% comment %}
{% if last_day and last_day == this_day %}
{% assign same_day = true %}
{% else %}
{% assign last_day = this_day %}
{% assign same_day = false %}
{% endif %}
{% if last_month and last_month == this_month %}
{% assign same_month = true %}
{% else %}
{% assign last_month = this_month %}
{% assign same_month = false %}
{% endif %}
<span
class="date day {% if same_day and same_month %}text-white{% endif %}">{{ this_day }}</span>
<span
class="date month small {% if same_day and same_month %}text-white{% else %}text-muted{% endif %}">
{{ this_month }}
</span>
{% endcomment %}
<span class="date day">{{ this_day }}</span>
<span class="date month small text-muted">{{ this_month }}</span>
<div class="post-preview item" data-tags="{{ _tags }}">
<a href="{{ post.url }}">
<h2 class="post-title">
{{ post.title }}
</h2>
</a>
<hr>
</div>
</div>
</li>
{% if forloop.last %}
</ul>
{% elsif this_year != pre_year %}
</ul>
<span class="fa listing-seperator">{{pre_year}}</span>
<ul >
{% assign last_day = "" %}
{% assign last_month = "" %}
{% endif %}
{% endfor %}
</div> -->
</div>
</div>