Skip to content

Commit

Permalink
Add description and verified to video cards
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Dec 30, 2021
1 parent aed31b2 commit b8a3ffb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/parser.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
2 changes: 1 addition & 1 deletion src/sass/tweet/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@include ellipsis;
white-space: unset;
font-weight: bold;
font-size: 1.15em;
font-size: 1.1em;
}

.card-description {
Expand Down
2 changes: 1 addition & 1 deletion src/views/general.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions src/views/tweet.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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")):
Expand Down

0 comments on commit b8a3ffb

Please sign in to comment.