feat: added warning banners to drafts

This commit is contained in:
Leyla Becker 2026-02-19 11:04:02 -06:00
parent 9b91255904
commit 46c631ba65
3 changed files with 22 additions and 0 deletions

View file

@ -3,6 +3,11 @@ layout: base.njk
---
<article class="blog-post">
{% if not released %}
<div class="draft-warning-banner">
⚠️ This post is still a draft and may be incomplete or subject to changes.
</div>
{% endif %}
<header class="post-header">
<h1>{{ title }}</h1>
<time datetime="{{ createdAt | dateTimeFormat }}">{{ createdAt | dateTimeFormat }}</time>

View file

@ -2,6 +2,11 @@
layout: base.njk
---
<article class="recipe">
{% if isDraft %}
<div class="draft-warning-banner">
⚠️ This recipe is still a draft and may be incomplete or subject to changes.
</div>
{% endif %}
<header class="recipe-header">
<h1>{{ title }}</h1>
{% if isDraft %}

View file

@ -319,6 +319,18 @@ a {
text-decoration: none;
}
/* Draft Warning Banner */
.draft-warning-banner {
background-color: #fff3cd;
border: 1px solid #ffc107;
border-radius: 5px;
padding: 1rem;
margin-bottom: 1.5rem;
color: #856404;
font-weight: 500;
text-align: center;
}
/* Footer */
footer {
margin-top: 2rem;