Skip to content

Commit e8e87b0

Browse files
authored
Update archive formatting
1 parent a45f70f commit e8e87b0

1 file changed

Lines changed: 21 additions & 17 deletions

File tree

index.html

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,28 @@ <h2 class="home__post-title"><a href="{{ post.url }}">{{ post.title }}</a></h2>
7171
<!--<li>
7272
</li>-->
7373
</ul>
74-
<button type="button" class="btn btn-info btn-ras btn-lg btn-block" data-toggle="collapse" data-target="#archive">Archive</button>
75-
<div id="archive" class="collapse">
76-
{% include sectiontitle.html title="Archive" %}
77-
<ul>
78-
{% for post in site.posts %}
79-
{% unless post.next %}
80-
<h5>{{ post.date | date: '%Y %b' }}</h5>
81-
{% else %}
82-
{% capture year %}{{ post.date | date: '%Y %b' }}{% endcapture %}
83-
{% capture nyear %}{{ post.next.date | date: '%Y %b' }}{% endcapture %}
84-
{% if year != nyear %}
85-
<h5>{{ post.date | date: '%Y %b' }}</h5>
86-
{% endif %}
87-
{% endunless %}
74+
<div id="archive">
75+
{% include sectiontitle.html title="Archive" %}
8876

89-
<li style="margin: 0"><a href="{{ post.url }}">{{ post.title }}</a></li>
90-
{% endfor %}
91-
</ul>
77+
<ul>
78+
{% for post in site.posts limit:8 %}
79+
{% unless post.next %}
80+
<h5>{{ post.date | date: '%Y %b' }}</h5>
81+
{% else %}
82+
{% capture year %}{{ post.date | date: '%Y %b' }}{% endcapture %}
83+
{% capture nyear %}{{ post.next.date | date: '%Y %b' }}{% endcapture %}
84+
{% if year != nyear %}
85+
<h5>{{ post.date | date: '%Y %b' }}</h5>
86+
{% endif %}
87+
{% endunless %}
88+
89+
<li style="margin: 0"><a href="{{ post.url }}">{{ post.title }}</a></li>
90+
{% endfor %}
91+
</ul>
92+
93+
{% if site.posts.length > 8 %}
94+
<a href="{{ site.baseurl }}/archive" class="btn btn-info btn-ras btn-lg btn-block" role="button">See More...</a>
95+
{% endfor %}
9296
</div>
9397
</aside>
9498
</div>

0 commit comments

Comments
 (0)