From 01c186edc7905e841385ef6f16ce1746ed0fb9a9 Mon Sep 17 00:00:00 2001 From: m Date: Fri, 13 Mar 2026 20:52:24 +0100 Subject: [PATCH] inline->css --- static/css/blog.css | 15 +++++++++++++++ templates/base.html | 6 +++++- templates/index.html | 25 +++++++------------------ 3 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 static/css/blog.css diff --git a/static/css/blog.css b/static/css/blog.css new file mode 100644 index 0000000..053e3a5 --- /dev/null +++ b/static/css/blog.css @@ -0,0 +1,15 @@ +.post-divider { + width: 100%; + border: 1px solid #000; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); +} + +.post-divider-expanded { + margin-top: 25px; + margin-bottom: 60px; +} + +.post-divider-preview { + margin-top: 75px; + margin-bottom: 60px; +} diff --git a/templates/base.html b/templates/base.html index 2dbbd27..27a5e69 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,4 +1,4 @@ - + @@ -17,6 +17,10 @@ href="{{ url_for('static', filename='css/simple-blog-template.css') }}" rel="stylesheet" /> + diff --git a/templates/index.html b/templates/index.html index 9048da7..dbacf51 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,9 @@ {% extends "base.html" %} {% block title %}{{blog_title.title}}{% endblock %} {% block content %} + +
{% for post in posts %} @@ -17,15 +21,7 @@ block content %} {% if post.displayall %}
{{ post.content | safe }}
-
+
{% else %}
{{ post.content | striptags | truncate(200) }}
@@ -35,15 +31,8 @@ block content %} href="{{ url_for('post_detail', post_id=post.id) }}" >Read More -
+
+ {% endif %} {% endfor %}
    {% if prev_url %}