bibliogram/src/site/pug/user.pug

56 lines
2.1 KiB
Plaintext
Raw Normal View History

//- Needs user, url, constants
2020-01-12 12:50:21 +00:00
include includes/timeline_page.pug
2020-01-12 15:39:50 +00:00
include includes/next_page_button.pug
2020-01-12 12:50:21 +00:00
- const numberFormat = new Intl.NumberFormat().format
doctype html
html
head
meta(charset="utf-8")
meta(name="viewport" content="width=device-width, initial-scale=1")
title
= `${user.data.full_name} (@${user.data.username}) | Bibliogram`
link(rel="stylesheet" type="text/css" href="/static/css/main.css")
2020-01-12 15:39:50 +00:00
script(src="/static/js/pagination.js" type="module")
2020-01-12 12:50:21 +00:00
body
.main-divider
header.profile-overview
.profile-sticky
2020-01-14 14:38:33 +00:00
img(src=user.proxyProfilePicture width="150px" height="150px" alt=`${user.data.full_name}'s profile picture.`).pfp
2020-01-12 12:50:21 +00:00
//-
2020-01-14 14:38:33 +00:00
Instagram only uses the above URL, but an HD version is also available.
The alt text is pathetic, I know. I don't have much to work with.
2020-01-12 12:50:21 +00:00
h1.full-name= user.data.full_name
h2.username= `@${user.data.username}`
p.bio= user.data.biography
2020-01-28 12:35:37 +00:00
if user.data.external_url
p.website
a(href=user.data.external_url)= user.data.external_url
2020-01-28 12:18:14 +00:00
div.profile-counter #[span(data-numberformat=user.posts).count #{numberFormat(user.posts)}] posts
div.profile-counter #[span(data-numberformat=user.following).count #{numberFormat(user.following)}] following
div.profile-counter #[span(data-numberformat=user.followedBy).count #{numberFormat(user.followedBy)}] followed by
2020-01-14 14:38:33 +00:00
div.links
if constants.settings.rss_enabled
a(rel="alternate" type="application/rss+xml" href=`/u/${user.data.username}/rss.xml`) RSS
2020-01-18 15:38:14 +00:00
a(rel="noreferrer noopener" href=`https://www.instagram.com/${user.data.username}`) instagram.com
2020-01-12 12:50:21 +00:00
2020-01-27 12:06:44 +00:00
- const hasPosts = !user.data.is_private && user.timeline.pages.length && user.timeline.pages[0].length
main(class=hasPosts ? "" : "no-posts")#timeline.timeline
if !user.data.is_private
if hasPosts
each page, pageIndex in user.timeline.pages
+timeline_page(page, pageIndex)
+next_page_button(user, url)
2020-01-12 12:50:21 +00:00
2020-01-27 12:06:44 +00:00
else
div
div.page-number
span.number No posts.
else
div
div.page-number
span.number Profile is private.