From 906ed2f27c9105dbd78f416930f1aa2b49497567 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 15 Nov 2022 18:50:09 -0700 Subject: [PATCH] Add CW display --- static/css/style.css | 27 ++++++++++++++++++++++++++- templates/activities/_post.html | 8 +++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 9eaec2f..a7f3ef3 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -520,8 +520,33 @@ h1.identity small { color: var(--color-text-duller); } +.post .summary { + margin: 12px 0 4px 64px; + padding: 3px 6px; + border-radius: 3px; + background: var(--color-bg-menu); + cursor: pointer; +} + +.post .summary::before { + display: block; + font-weight: bold; + float: right; + content: "SHOW"; + font-size: 80%; + padding: 2px 2px 2px 10px; +} + +.post .summary.enabled::before { + content: "HIDE"; +} + .post .content { - padding-left: 64px; + margin-left: 64px; +} + +.post .content.hidden { + display: none; } .post .content p { diff --git a/templates/activities/_post.html b/templates/activities/_post.html index ac21c42..d05f7ad 100644 --- a/templates/activities/_post.html +++ b/templates/activities/_post.html @@ -22,7 +22,13 @@ {{ post.author.name_or_handle }} @{{ post.author.handle }} -
+ {% if post.summary %} +
+ {{ post.summary }} +
+ {% endif %} + +
{{ post.safe_content }}