Style blog archive page

This commit is contained in:
Helen Chong 2024-04-17 20:20:20 +08:00
parent 61abcb544f
commit ca27552e5f
1 changed files with 15 additions and 16 deletions

View File

@ -12,8 +12,8 @@ blogNav: Archive
<ul class="blog__postlist">
{% for post in postList %}
<li>
<h2 class="blog__title">
<li class="blog__postlist--item">
<h2 class="blog__postlist--title">
<a href="{{ post.url }}">
{% if post.data.title %}{{ post.data.articleTitle }}
{% else %}
@ -22,21 +22,20 @@ blogNav: Archive
</a>
</h2>
<time>{{ post.date | niceDate }}</time>
<p>{{ post.data.desc }}</p>
</li>
{% endfor %}
</ul>
<p class="center-text">
{% if pagination.href.previous %}
<a href=" {{ pagination.href.previous }}">Previous</a>
{% else %}
Previous
{% endif %}
/
{% if pagination.href.next %}
<a href=" {{ pagination.href.next }}">Next</a>
{% else %}
Next
{% endif %}
</p>
<style>
.blog__postlist {
display: grid;
gap: 1em;
padding-left: 1em;
}
.blog__postlist--title {
font-size: clamp(1.55rem, 1rem + 3vw, 1.3rem);
line-height: 1.3;
margin-bottom: 0.2em;
}
</style>