-
Notifications
You must be signed in to change notification settings - Fork 6
/
blog.html
84 lines (74 loc) · 2.84 KB
/
blog.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
---
layout: default
title: 博客
permalink: /blog/
---
<div class="container mtb">
<div class="row">
<! -- BLOG POSTS LIST -->
<div class="col-lg-9">
{% for post in site.categories['blog'] %}
<div class="blog-list-container" id="allArticles">
<! -- Blog Post -->
<div class="row">
<div class="col-lg-12">
<a href="{{ post.url | prepend: site.baseurl }}">
<h3 class="ctitle">{{ post.title }}</h3>
</a>
<div class="post-meta"> {{post.author}}, {{ post.date | date: "%Y-%-m-%-d" }} </div>
</div>
<div class="{%if post.thumb%}col-lg-9{%else%}col-log-12{%endif%}">
{{ post.excerpt }}
<p><a href="{{ post.url | prepend: site.baseurl }}">[详情]</a></p>
</div>
{% if post.thumb %}
<div class="col-lg-3">
<img class="img-responsive"
src="{%if post.thumb contains 'http:' or post.thumb contains 'https:'%}{{post.thumb}}{%else%}{{"
/assets/img/blog/"|prepend: site.url}}{{post.thumb}}{%endif%}" />
</div>
{% endif %}
</div>
<div class="hline"></div>
<div class="spacing"></div>
</div>
{% endfor %}
{% for tag in site.tags %}
{% assign t = tag | first %}
{% assign posts = tag | last %}
<div class="blog-list-container hidden" id="{{ t }}-container">
{% for post in posts %}
{% if post.tags contains t and post.categories contains 'blog' %}
<! -- Blog Post -->
<div class="row">
<div class="col-lg-12">
<a href="{{ post.url | prepend: site.baseurl }}">
<h3 class="ctitle">{{ post.title }}</h3>
</a>
<div class="post-meta"> {{post.author}}, {{ post.date | date: "%Y-%-m-%-d" }} </div>
</div>
<div class="{%if post.thumb%}col-lg-9{%else%}col-log-12{%endif%}">
{{ post.excerpt }}
<p><a href="{{ post.url | prepend: site.baseurl }}">[详情]</a></p>
</div>
{% if post.thumb %}
<div class="col-lg-3">
<img class="img-responsive"
src="{%if post.thumb contains 'http:' or post.thumb contains 'https:'%}{{post.thumb}}{%else%}{{"
/assets/img/blog/"|prepend: site.url}}{{post.thumb}}{%endif%}" />
</div>
{% endif %}
</div>
<div class="hline"></div>
<div class="spacing"></div>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
<! --/col-lg-9 -->
{% include sidebar.html %}
</div>
<! --/row -->
</div>
<! --/container -->