mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-22 16:17:29 +00:00
Fix post navigation button functionality
This commit is contained in:
parent
74f731ceea
commit
a861df2662
@ -150,9 +150,9 @@ function loadPostOverlay(shortcode, stateChangeType) {
|
||||
/** @type {HTMLButtonElement} */
|
||||
// @ts-ignore
|
||||
const button = event.currentTarget
|
||||
if (button.classList.contains("next")) {
|
||||
if (button.hasAttribute("data-next")) {
|
||||
navigate("next")
|
||||
} else {
|
||||
} else if (button.hasAttribute("data-previous")) {
|
||||
navigate("previous")
|
||||
}
|
||||
})
|
||||
|
@ -12,9 +12,9 @@ mixin post(post, headerWithNavigation)
|
||||
else
|
||||
= `@${post.getBasicOwner().username}`
|
||||
if headerWithNavigation
|
||||
button.navigate-posts
|
||||
button(data-previous).navigate-posts
|
||||
img(src="/static/img/arrow-circled.svg" alt="Previous post.").icon.previous
|
||||
button.navigate-posts
|
||||
button(data-next).navigate-posts
|
||||
img(src="/static/img/arrow-circled.svg" alt="Next post.").icon
|
||||
div.relative-box
|
||||
div.scrolling-box
|
||||
|
Loading…
Reference in New Issue
Block a user