diff --git a/articles/context_processors.py b/articles/context_processors.py
index 410ccf8..ed55370 100644
--- a/articles/context_processors.py
+++ b/articles/context_processors.py
@@ -3,3 +3,7 @@ from articles.models import Article, Page
def pages(request):
return {"pages": Page.objects.filter(status=Article.PUBLISHED)}
+
+
+def drafts_count(request):
+ return {"drafts_count": Article.with_pages.filter(status=Article.DRAFT).count()}
diff --git a/articles/static/style.css b/articles/static/style.css
index 7a692ac..2514b89 100644
--- a/articles/static/style.css
+++ b/articles/static/style.css
@@ -127,6 +127,15 @@ tr:hover {
background-color: var(--background2);
}
+.pill {
+ font-size: 60%;
+ background-color: var(--main2);
+ color: var(--background2);
+ padding: .5ex 1ex;
+ border-radius: 1ex;
+ vertical-align: 15%;
+}
+
@media (prefers-color-scheme: dark) {
:root {
--accent: #226997;
diff --git a/articles/templates/articles/base.html b/articles/templates/articles/base.html
index 6b93c68..2fa4b41 100644
--- a/articles/templates/articles/base.html
+++ b/articles/templates/articles/base.html
@@ -16,7 +16,7 @@
Gab's Notes
|
{% if user.is_authenticated %}
- View drafts
+ View drafts {{ drafts_count }}
Admin
{% else %}
Log in
diff --git a/blog/settings.py b/blog/settings.py
index 53ad612..06725ba 100644
--- a/blog/settings.py
+++ b/blog/settings.py
@@ -73,6 +73,7 @@ TEMPLATES = [
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
"articles.context_processors.pages",
+ "articles.context_processors.drafts_count",
],
},
},