feat(list_posts.html): display draft status in post list (#203)

Co-authored-by: welpo <welpo@users.noreply.github.com>
main
Xavier Vello 1 year ago committed by GitHub
parent 60af91f422
commit 40df48fd87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,11 +9,21 @@
background-color: var(--navbar-color);
padding: 2.5rem 0;
.date {
.bloglist-meta {
padding: 0;
width: 13.5rem;
color: var(--meta-color);
font-weight: 300;
font-size: 0.9rem;
li {
list-style-type: none;
}
li.draft-label {
width: fit-content;
line-height: 1.2rem;
}
}
.bloglist-tags {
@ -66,14 +76,19 @@
flex-direction: column;
align-items: flex-start;
padding: 2rem 0;
}
.date {
margin-bottom: 0;
width: 100%;
}
.bloglist-meta {
margin-bottom: 0;
width: 100%;
.bloglist-content {
width: 100%;
li {
display: inline;
margin-right: 0.3rem;
}
}
.bloglist-content {
width: 100%;
}
}
}

@ -11,12 +11,14 @@
<section class="bloglist-row bottom-divider">
{% endif %}
{% if post.date %}
<div class="date">
{{ macros_format_date::format_date(date=post.date, short=false, language_strings=language_strings) }}
</div>
{% endif %}
<ul class="bloglist-meta">
{% if post.date %}
<li class="date">{{ macros_format_date::format_date(date=post.date, short=false, language_strings=language_strings) }}</li>
{% endif %}
{% if post.draft %}
<li class="draft-label">{{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}</li>
{% endif %}
</ul>
<div class="bloglist-content">
<h2 class="bloglist-title">
<a href="{{ post.permalink }}">{{ post.title }}</a>

Loading…
Cancel
Save