Show badges on quoted gifs
This commit is contained in:
parent
6c5f491ee0
commit
d6b8b386fa
|
@ -661,7 +661,7 @@ video {
|
||||||
}
|
}
|
||||||
|
|
||||||
.quote-badge {
|
.quote-badge {
|
||||||
left: 0px;
|
left: 6px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
align-self: flex-end;
|
align-self: flex-end;
|
||||||
|
@ -673,4 +673,6 @@ video {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
color: #fffffff0;
|
color: #fffffff0;
|
||||||
padding: 0px 2px;
|
padding: 0px 2px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,5 +136,9 @@ proc getQuoteMedia*(quote: var Quote; node: XmlNode) =
|
||||||
quote.thumb = some(media.selectAttr("img", "src"))
|
quote.thumb = some(media.selectAttr("img", "src"))
|
||||||
|
|
||||||
let badge = node.querySelector(".AdaptiveMedia-badgeText")
|
let badge = node.querySelector(".AdaptiveMedia-badgeText")
|
||||||
|
let gifBadge = node.querySelector(".Icon--gifBadge")
|
||||||
|
|
||||||
if not badge.isNil:
|
if not badge.isNil:
|
||||||
quote.badge = some(badge.innerText())
|
quote.badge = some(badge.innerText())
|
||||||
|
elif not gifBadge.isNil:
|
||||||
|
quote.badge = some("GIF")
|
||||||
|
|
Loading…
Reference in New Issue