1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-14 18:45:06 +00:00

Add badge to verified accounts

This commit is contained in:
Cadence Ember
2020-07-16 23:21:02 +12:00
parent 59d0b1d14f
commit 5fc765d8cb
5 changed files with 107 additions and 2 deletions

View File

@@ -10,6 +10,9 @@ include includes/feed_link
mixin selector-button(text, selectorType, urlSuffix)
a(href=(type !== selectorType && `/u/${user.data.username}${urlSuffix}`) class=(type === selectorType && "active")).selector= text
mixin verified-badge(classes)
img.verified-badge(class=classes src=getStaticURL("html", "/static/img/verified.svg") width=19 height=19 alt="Verified." title="Verified")
doctype html
html
head
@@ -50,9 +53,15 @@ html
The alt text is pathetic, I know. I don't have much to work with.
if user.data.full_name
h1.full-name= user.data.full_name
h2.username= `@${user.data.username}`
h2.username
= `@${user.data.username}`
if user.data.is_verified
+verified-badge("as-username")
else
h1.full-name= `@${user.data.username}`
h1.full-name
= `@${user.data.username}`
if user.data.is_verified
+verified-badge("as-fullname")
p.structured-text.bio
- const bio = user.getStructuredBio()
if bio