mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2025-12-14 18:45:06 +00:00
Add IGTV
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
//- Needs user, selectedTimeline, url, type
|
||||
|
||||
include ../includes/timeline_page.pug
|
||||
include ../includes/next_page_button.pug
|
||||
|
||||
+timeline_page(page, pageIndex)
|
||||
|
||||
+next_page_button(user, url)
|
||||
+next_page_button(user, selectedTimeline, url, type)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
mixin next_page_button(user, url)
|
||||
if user.timeline.hasNextPage()
|
||||
mixin next_page_button(user, selectedTimeline, url, type)
|
||||
if selectedTimeline.hasNextPage()
|
||||
div.next-page-container#next-page-container
|
||||
-
|
||||
const nu = new URL(url)
|
||||
nu.searchParams.set("page", user.timeline.pages.length+1)
|
||||
a(href=`${nu.search}#page-${user.timeline.pages.length+1}` data-page=(user.timeline.pages.length+1) data-username=(user.data.username))#next-page.next-page Next page
|
||||
nu.searchParams.set("page", selectedTimeline.pages.length+1)
|
||||
a(href=`${nu.search}#page-${selectedTimeline.pages.length+1}` data-page=(selectedTimeline.pages.length+1) data-username=(user.data.username) data-type=type)#next-page.next-page Next page
|
||||
else
|
||||
div.page-number.no-more-pages
|
||||
span.number No more posts.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//- Needs user, followerCountsAvailable, url, constants, settings
|
||||
//- Needs user, selectedTimeline, type, followerCountsAvailable, url, constants, settings
|
||||
|
||||
include includes/timeline_page.pug
|
||||
include includes/next_page_button.pug
|
||||
@@ -7,6 +7,9 @@ include includes/feed_link
|
||||
|
||||
- const numberFormat = new Intl.NumberFormat().format
|
||||
|
||||
mixin selector-button(text, selectorType, urlSuffix)
|
||||
a(href=(type !== selectorType && `/u/${user.data.username}${urlSuffix}`) class=(type === selectorType && "active")).selector= text
|
||||
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
@@ -77,17 +80,23 @@ html
|
||||
a(href="/") Home
|
||||
a(href=settingsReferrer) Settings
|
||||
|
||||
- const hasPosts = !user.data.is_private && user.timeline.pages.length && user.timeline.pages[0].length
|
||||
main(class=hasPosts ? "" : "no-posts")#timeline.timeline
|
||||
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
|
||||
if user.data.is_private
|
||||
| Profile is private.
|
||||
else
|
||||
| No posts.
|
||||
- const hasPosts = !user.data.is_private && selectedTimeline.pages.length && selectedTimeline.pages[0].length
|
||||
.timeline-section
|
||||
.selector-container
|
||||
+selector-button("Timeline", "timeline", "")
|
||||
if user.data.has_channel !== false
|
||||
+selector-button("IGTV", "igtv", "/channel")
|
||||
|
||||
main(class=hasPosts ? "" : "no-posts")#timeline.timeline
|
||||
if hasPosts
|
||||
each page, pageIndex in selectedTimeline.pages
|
||||
+timeline_page(page, pageIndex)
|
||||
+next_page_button(user, selectedTimeline, url, type)
|
||||
else
|
||||
div
|
||||
div.page-number
|
||||
span.number
|
||||
if user.data.is_private
|
||||
| Profile is private.
|
||||
else
|
||||
| No posts.
|
||||
|
||||
Reference in New Issue
Block a user