-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
105 lines (104 loc) · 3.92 KB
/
Copy pathindex.html
File metadata and controls
105 lines (104 loc) · 3.92 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
---
layout: default
---
<section class="latest-article">
<div class="section-title">
<div class="home-portfolio-title section-group-titles">
<h2>Latest Article</h2>
</div>
</div>
<article>
{% for post in site.posts offset: 0 limit: 1 %}
<p class="post-time"><span class="icon-pie-graph"></span>
<time>{{ post.date | date: "%Y-%m-%d" }}</time>
</p>
<a href="{{ post.url | prepend: site.baseurl }}">
<div class="img-box">
<div class="article-img">
{% if post.titleimg %}
<img src="{{ post.titleimg | prepend: site.imgurl }}" alt="">
{% else %}
<img src="/public/img/default.jpg" alt="">
{% endif %}
</div>
<div class="title">
<h2>{{ post.title }}</h2>
<h3>{{ post.subtitle }}</h3>
</div>
</div>
</a>
<p>
{{ post.content | strip_html | truncate:100 }}
</p>
<a href="{{ post.url | prepend: site.baseurl }}" class="btn read-more">Read More</a> {% endfor %}
</article>
</section>
<section class="previous-articles">
<div class="section-title">
<div class="home-portfolio-title section-group-titles">
<h2>Previous Articles</h2>
</div>
</div>
<div class="article-list">
{% for post in paginator.posts offset: 0 %}
<article class="clearfix">
<p class="post-time"><span class="icon-pie-graph"></span>
<time>{{ post.date | date: "%Y-%m-%d" }}</time>
</p>
{% if post.titleimg %}
<div class="article-img">
<a href="{{ post.url | prepend: site.baseurl }}">
<img src="{{ post.titleimg | prepend: site.imgurl }}" alt="">
</a>
</div>
{% else %}
<div class="article-img no-img">
<a href="{{ post.url | prepend: site.baseurl }}">
<img src="/public/img/default.jpg" alt="">
</a>
</div>
{% endif %}
<div class="article-preview">
<h2><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
{% if post.subtitle %}
<h3>{{ post.subtitle }}</h3>
{% endif %}
<p>
{{ post.content | strip_html | truncate:100 }}
</p>
<a href="{{ post.url | prepend: site.baseurl }}" class="read-more bold-link">Read More</a>
</div>
</article>
{% endfor %}
</div>
</section>
<div class="pagination">
<!-- {% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}" class="previous">Previous</a>
{% else %}
<span class="previous">Previous</span>
{% endif %}
<span class="page_number ">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span> -->
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" class="btn next-page">
<span class="load-text">加载更多</span>
<div class="load-more">
<div class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
</div>
</a>
{% else %}
<span class="btn">后边没了</span> {% endif %}
</div>
<div class="home">
<p class="rss-subscribe">subscribe <a href="{{ " /feed.xml " | prepend: site.baseurl }}">via RSS</a></p>
</div>
<script>
if(window.location.pathname == '/'){
var previousArticle = document.querySelector('.previous-articles').querySelector('article')
previousArticle && previousArticle.remove()
}
</script>