Clickable usernames and hashtags

Should work well enough. Report edge cases.
This commit is contained in:
Cadence Fish
2020-02-04 03:30:19 +13:00
parent 1fcdfce868
commit 0ea95d1943
9 changed files with 105 additions and 7 deletions

View File

@@ -1,3 +1,5 @@
include includes/display_structured
- const numberFormat = new Intl.NumberFormat().format
doctype html
@@ -20,7 +22,8 @@ html
img(src=post.ownerPfpCacheP width=150 height=150 alt="").pfp
a.name(href=`/u/${post.getBasicOwner().username}`)= `${post.data.owner.full_name} (@${post.getBasicOwner().username})`
if post.getCaption()
p.description= post.getCaption()
p.structured-text.description
+display_structured(post.getStructuredCaption())
section.images-gallery
for entry in post.children
if entry.isVideo()