feat: added warning banners to drafts
This commit is contained in:
parent
9b91255904
commit
46c631ba65
3 changed files with 22 additions and 0 deletions
|
|
@ -3,6 +3,11 @@ layout: base.njk
|
||||||
---
|
---
|
||||||
|
|
||||||
<article class="blog-post">
|
<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">
|
<header class="post-header">
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
<time datetime="{{ createdAt | dateTimeFormat }}">{{ createdAt | dateTimeFormat }}</time>
|
<time datetime="{{ createdAt | dateTimeFormat }}">{{ createdAt | dateTimeFormat }}</time>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,11 @@
|
||||||
layout: base.njk
|
layout: base.njk
|
||||||
---
|
---
|
||||||
<article class="recipe">
|
<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">
|
<header class="recipe-header">
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
{% if isDraft %}
|
{% if isDraft %}
|
||||||
|
|
|
||||||
|
|
@ -319,6 +319,18 @@ a {
|
||||||
text-decoration: none;
|
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 */
|
||||||
footer {
|
footer {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue