Add description and verified to video cards

This commit is contained in:
Zed 2021-12-30 23:24:10 +01:00
parent aed31b2269
commit b8a3ffb0c4
4 changed files with 7 additions and 2 deletions

View File

@ -135,6 +135,9 @@ proc parseVideo(js: JsonNode): Video =
with title, js{"additional_media_info", "title"}:
result.title = title.getStr
with description, js{"additional_media_info", "description"}:
result.description = description.getStr
for v in js{"video_info", "variants"}:
result.variants.add VideoVariant(
videoType: parseEnum[VideoType](v{"content_type"}.getStr("summary")),

View File

@ -37,7 +37,7 @@
@include ellipsis;
white-space: unset;
font-weight: bold;
font-size: 1.15em;
font-size: 1.1em;
}
.card-description {

View File

@ -43,7 +43,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; titleText=""; desc=""; video="";
let opensearchUrl = getUrlPrefix(cfg) & "/opensearch"
buildHtml(head):
link(rel="stylesheet", type="text/css", href="/css/style.css?v=6")
link(rel="stylesheet", type="text/css", href="/css/style.css?v=7")
link(rel="stylesheet", type="text/css", href="/css/fontello.css?v=2")
if theme.len > 0:

View File

@ -202,6 +202,8 @@ proc renderAttribution(profile: Profile): VNode =
buildHtml(a(class="attribution", href=("/" & profile.username))):
renderMiniAvatar(profile)
strong: text profile.fullname
if profile.verified:
icon "ok", class="verified-icon", title="Verified account"
proc renderMediaTags(tags: seq[Profile]): VNode =
buildHtml(tdiv(class="media-tag-block")):