mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Display sensitive quotes properly
This commit is contained in:
parent
a098d3ea84
commit
94b2187453
4 changed files with 34 additions and 2 deletions
|
|
@ -30,19 +30,25 @@
|
|||
#end proc
|
||||
#
|
||||
#proc renderQuote(quote: Quote): string =
|
||||
#let hasMedia = quote.thumb.isSome()
|
||||
#let hasMedia = quote.thumb.isSome() or quote.sensitive
|
||||
<div class="quote">
|
||||
<div class="quote-container" href="${quote.link}">
|
||||
<a class="quote-link" href="${quote.link}"></a>
|
||||
#if hasMedia:
|
||||
<div class="quote-media-container">
|
||||
<div class="quote-media">
|
||||
#if quote.thumb.isSome():
|
||||
<img src=${quote.thumb.get().getSigUrl("pic")}>
|
||||
#if quote.badge.isSome:
|
||||
#if quote.badge.isSome():
|
||||
<div class="quote-badge">
|
||||
<div class="quote-badge-text">${quote.badge.get()}</div>
|
||||
</div>
|
||||
#end if
|
||||
#elif quote.sensitive:
|
||||
<div class="quote-sensitive">
|
||||
<span class="icon quote-sensitive-icon">❗</span>
|
||||
</div>
|
||||
#end if
|
||||
</div>
|
||||
</div>
|
||||
#end if
|
||||
|
|
|
|||
Loading…
Reference in a new issue