From 5629b62643a9bbc15b5a2cc4644311b5feb3cc6b Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Thu, 16 Sep 2021 16:28:07 +0400 Subject: [PATCH] Let's add support for quoting with a > symbol! --- homepage/static/assets/css/guestbook.css | 2 ++ homepage/views/guestbook.pug | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/homepage/static/assets/css/guestbook.css b/homepage/static/assets/css/guestbook.css index 750b6eb..2a3c675 100644 --- a/homepage/static/assets/css/guestbook.css +++ b/homepage/static/assets/css/guestbook.css @@ -51,6 +51,8 @@ #posts article div.feedback > *, #posts article div.feedback { margin-left: .5rem; } +#posts article p.quote { font-style: italic; } + #pagination a:not(:first-child) { margin-left: .5rem; } @media screen and (max-width: 641px) { diff --git a/homepage/views/guestbook.pug b/homepage/views/guestbook.pug index 1954d9b..e56f32a 100644 --- a/homepage/views/guestbook.pug +++ b/homepage/views/guestbook.pug @@ -25,6 +25,8 @@ block content input(type='checkbox' id='hide-website' name='hide_website' checked) label(for='hide-website') Hide website* small *Only I can see if set. + br + small NO links are allowed in a message. input(type='submit' value='Send a post') section#posts if (posts) @@ -39,7 +41,10 @@ block content header | Feedback by #[span.highlighted #{owner}] on #[time(datetime=post.feedback_created)= date_(post.feedback_created, tz)] each line in post.feedback.split("\n") - p= line + if (line[0] == ">") + p.quote= line + else + p= line else if (posts === null) p.center Cannot establish database connection.