mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-22 08:07:30 +00:00
Private profile notice
This commit is contained in:
parent
9f5fa84f9a
commit
f5cf4b19f7
@ -390,22 +390,35 @@
|
||||
/**
|
||||
* @typedef GraphUser
|
||||
* @property {string} biography
|
||||
* @property {string} external_url
|
||||
* @property {GraphEdgeCount} edge_followed_by
|
||||
* @property {boolean} blocked_by_viewer
|
||||
* @property {any} business_category_name todo: discover
|
||||
* @property {any} connected_fb_page todo: discover
|
||||
* @property {boolean} country_block
|
||||
* @property {any} edge_felix_video_timeline todo: doc
|
||||
* @property {GraphEdgeCount} edge_follow
|
||||
* @property {GraphEdgeCount} edge_followed_by
|
||||
* @property {any} edge_media_collections todo: doc
|
||||
* @property {GraphEdgeCount} edge_mutual_followed_by
|
||||
* @property {PagedEdges<GraphImage>} edge_owner_to_timeline_media
|
||||
* @property {any} edge_saved_media todo: doc
|
||||
* @property {string | null} external_url
|
||||
* @property {string | null} external_url_linkshimmed
|
||||
* @property {boolean} followed_by_viewer
|
||||
* @property {boolean} follows_viewer
|
||||
* @property {string} full_name
|
||||
* @property {boolean} has_blocked_viewer
|
||||
* @property {boolean} has_channel
|
||||
* @property {boolean} has_requested_viewer
|
||||
* @property {number} highlight_reel_count
|
||||
* @property {string} id
|
||||
* @property {boolean} is_business_account
|
||||
* @property {boolean} is_joined_recently
|
||||
* @property {boolean} is_private
|
||||
* @property {boolean} is_verified
|
||||
* @property {string} profile_pic_url
|
||||
* @property {string} profile_pic_url_hd
|
||||
* @property {boolean} requested_by_viewer
|
||||
* @property {string} username
|
||||
*
|
||||
* @property {any} edge_felix_video_timeline
|
||||
* @property {PagedEdges<GraphImage>} edge_owner_to_timeline_media
|
||||
* @property {any} edge_saved_media
|
||||
* @property {any} edge_media_collections
|
||||
*/
|
||||
|
||||
module.exports = {}
|
||||
|
@ -39,8 +39,20 @@ html
|
||||
a(rel="alternate" type="application/rss+xml" href=`/u/${user.data.username}/rss.xml`) RSS
|
||||
a(rel="noreferrer noopener" href=`https://www.instagram.com/${user.data.username}`) instagram.com
|
||||
|
||||
main#timeline.timeline
|
||||
- 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)
|
||||
|
||||
else
|
||||
div
|
||||
div.page-number
|
||||
span.number No posts.
|
||||
|
||||
else
|
||||
div
|
||||
div.page-number
|
||||
span.number Profile is private.
|
||||
|
@ -7,12 +7,13 @@ body
|
||||
font-size: 18px
|
||||
|
||||
.main-divider
|
||||
display: block
|
||||
display: flex
|
||||
flex-direction: column
|
||||
min-height: 100vh
|
||||
|
||||
@media screen and (min-width: $layout-b-min)
|
||||
display: grid
|
||||
grid-template-columns: 235px 1fr
|
||||
min-height: 100vh
|
||||
|
||||
.pfp
|
||||
border-radius: 50%
|
||||
@ -93,10 +94,16 @@ body
|
||||
|
||||
@media screen and (max-width: $layout-a-max)
|
||||
--image-size: 120px
|
||||
flex: 1
|
||||
|
||||
background-color: $background
|
||||
padding: 15px 15px 40px
|
||||
|
||||
&.no-posts
|
||||
display: flex
|
||||
flex-direction: column
|
||||
justify-content: center
|
||||
|
||||
.page-number
|
||||
color: #444
|
||||
line-height: 1
|
||||
@ -106,12 +113,6 @@ body
|
||||
text-align: center
|
||||
position: relative
|
||||
|
||||
.number
|
||||
position: relative
|
||||
z-index: 1
|
||||
padding: 10px
|
||||
background-color: $background
|
||||
|
||||
&::before
|
||||
position: absolute
|
||||
display: block
|
||||
@ -121,6 +122,15 @@ body
|
||||
top: 50%
|
||||
border-top: 1px solid
|
||||
|
||||
|
||||
&:no-posts
|
||||
|
||||
.number
|
||||
position: relative
|
||||
z-index: 1
|
||||
padding: 10px
|
||||
background-color: $background
|
||||
|
||||
.next-page-container
|
||||
margin: 20px 0px
|
||||
display: flex
|
||||
@ -172,7 +182,6 @@ body
|
||||
display: flex
|
||||
flex-direction: column
|
||||
|
||||
|
||||
.description-section
|
||||
display: grid
|
||||
align-items: start
|
||||
|
Loading…
Reference in New Issue
Block a user