From 10aae2372653cb9ba23d51d27fa486ea77fee5af Mon Sep 17 00:00:00 2001 From: SouthFox Date: Thu, 22 Sep 2022 23:57:43 +0800 Subject: [PATCH] feat/show replies --- BDSM/static/css/style.css | 7 ++++++ BDSM/templates/view.html | 7 ++++-- BDSM/views.py | 50 +++++++++++++++++++++++++++++---------- 3 files changed, 50 insertions(+), 14 deletions(-) diff --git a/BDSM/static/css/style.css b/BDSM/static/css/style.css index f447c5c..a8394eb 100644 --- a/BDSM/static/css/style.css +++ b/BDSM/static/css/style.css @@ -11,6 +11,13 @@ body { border-top: 1px solid #393f4f; } +.reply { + padding-left: 30px; + border-left: 3px solid; + border-radius: 3px 0 0 3px; + background: #f2f0ea; +} + .meta .time { float: right; text-decoration: underline; diff --git a/BDSM/templates/view.html b/BDSM/templates/view.html index 99cff11..c34846c 100644 --- a/BDSM/templates/view.html +++ b/BDSM/templates/view.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% block content %} - {% for toot in toots %} + {% for toot in toots recursive%}
@@ -73,7 +73,10 @@
- {% endfor %} + {%- if toot.reply -%} +
{{ loop(toot.reply) }}
+ {%- endif %} + {% endfor %}