forked from Mirrors/gomuks
web/timeline: add special style for spoiler reasons
This commit is contained in:
parent
90ca56f321
commit
91676f3e98
2 changed files with 13 additions and 1 deletions
|
@ -441,7 +441,7 @@ func writeSpan(w *strings.Builder, attr []html.Attribute) {
|
||||||
if isSpoiler && spoiler != "" {
|
if isSpoiler && spoiler != "" {
|
||||||
w.WriteString(`<span class="spoiler-reason">`)
|
w.WriteString(`<span class="spoiler-reason">`)
|
||||||
w.WriteString(spoiler)
|
w.WriteString(spoiler)
|
||||||
w.WriteString(" </span>")
|
w.WriteString("</span>")
|
||||||
}
|
}
|
||||||
w.WriteByte('<')
|
w.WriteByte('<')
|
||||||
w.WriteString("span")
|
w.WriteString("span")
|
||||||
|
|
|
@ -105,6 +105,18 @@ div.html-body {
|
||||||
max-width: 5rem;
|
max-width: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.spoiler-reason {
|
||||||
|
font-size: .8em;
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: "(";
|
||||||
|
}
|
||||||
|
&::after {
|
||||||
|
content: ") ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
span.hicli-spoiler {
|
span.hicli-spoiler {
|
||||||
filter: blur(4px);
|
filter: blur(4px);
|
||||||
transition: filter .5s;
|
transition: filter .5s;
|
||||||
|
|
Loading…
Add table
Reference in a new issue