From 91676f3e98eb676a9eafbd7181e37c2a0d8db6d5 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 29 Nov 2024 17:28:53 +0200 Subject: [PATCH] web/timeline: add special style for spoiler reasons --- pkg/hicli/html.go | 2 +- web/src/ui/timeline/content/index.css | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/hicli/html.go b/pkg/hicli/html.go index f154a62..31425b5 100644 --- a/pkg/hicli/html.go +++ b/pkg/hicli/html.go @@ -441,7 +441,7 @@ func writeSpan(w *strings.Builder, attr []html.Attribute) { if isSpoiler && spoiler != "" { w.WriteString(``) w.WriteString(spoiler) - w.WriteString(" ") + w.WriteString("") } w.WriteByte('<') w.WriteString("span") diff --git a/web/src/ui/timeline/content/index.css b/web/src/ui/timeline/content/index.css index ac4506e..75df96e 100644 --- a/web/src/ui/timeline/content/index.css +++ b/web/src/ui/timeline/content/index.css @@ -105,6 +105,18 @@ div.html-body { max-width: 5rem; } + span.spoiler-reason { + font-size: .8em; + color: var(--secondary-text-color); + + &::before { + content: "("; + } + &::after { + content: ") "; + } + } + span.hicli-spoiler { filter: blur(4px); transition: filter .5s;