From b11161bce3209af70118186110071e92132e46d6 Mon Sep 17 00:00:00 2001
From: root
Date: Mon, 6 Oct 2025 21:32:59 +0300
Subject: [PATCH] feat: article page
---
articles/static/index.css | 19 +++++++++++++++++++
articles/templates/archive.html | 16 +++++++++-------
articles/templates/article.html | 29 +++++++++++++++++++++++++++++
articles/views.py | 8 ++++++++
blog/urls.py | 3 ++-
5 files changed, 67 insertions(+), 8 deletions(-)
create mode 100644 articles/templates/article.html
diff --git a/articles/static/index.css b/articles/static/index.css
index c7a06a0..d670d2a 100644
--- a/articles/static/index.css
+++ b/articles/static/index.css
@@ -29,6 +29,11 @@ a {
padding-right: 15px;
}
+.one-post:hover {
+ background: #334661;
+ transition: .3s ease-in;
+}
+
.article-created-date {
font-size: 12px;
}
@@ -37,4 +42,18 @@ a {
display: grid;
gap: 20px;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+}
+
+.post-link {
+ text-decoration: none;
+ color: unset;
+}
+
+.article-meta {
+ display: flex;
+ justify-content: space-between;
+}
+
+.article-header {
+ margin: 0;
}
\ No newline at end of file
diff --git a/articles/templates/archive.html b/articles/templates/archive.html
index 8ccd559..a0f0a02 100644
--- a/articles/templates/archive.html
+++ b/articles/templates/archive.html
@@ -15,14 +15,16 @@
{% for post in posts %}
-
-
{{ post.title }}
-
+
{% endfor %}
+
+ {{ post.title }}
+
+
+
{{ post.author.first_name }}
+
{{ post.created_date }}
+
+
+
+ {{ post.text|linebreaks }}
+
+
+ ← Назад к списку статей
+
diff --git a/articles/templates/article.html b/articles/templates/article.html
new file mode 100644
index 0000000..504d8ea
--- /dev/null
+++ b/articles/templates/article.html
@@ -0,0 +1,29 @@
+
+
+