Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
June 02, 2026 - @942.44 (what is this?)
Activity rating: Four Stars Posts & Arts: 59/1k.beats Random | Recent Posts | Guild Recents
News: :happy: Open the all windows! Your mind needs storms and air! :happy: Guild Events: Happy Pride Month Fibre Artists!

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Navigation in Rarebit


« previous next »
Pages: [1] Print Embed
Author Topic: Navigation in Rarebit  (Read 549 times)
bennizone
Casual Poster ⚓︎
*
View Profile WWWArt


⛺︎ My Room
Itch.io: My Games

Artifacts:
MaggieJoined 2025!
« on: April 19, 2026 @885.41 » Embed

Hey!!! :pc:
Does anyone know how to make the navigation-buttons show all the time when using Rarebit? When on the first page, only the "next" and "latest" buttons show. When on the last page, only "first" and "back". I'd like all of them to be there, permanently.

I've tried looking through the code, but haven't been able to figure it out haha. Here's my WIP comic site for reference, if needed. Thanks in advance!
Logged


Artifact Swap: Human ConnectionPride PCMagic rainbowSmile on, rainbow flower!
bennizone
Casual Poster ⚓︎
*
View Profile WWWArt


⛺︎ My Room
Itch.io: My Games

Artifacts:
MaggieJoined 2025!
« Reply #1 on: April 21, 2026 @546.05 » Embed

I'm gonna bump this, since I posted it right before the forum closed oops.. :drat: any help greatly appreciated  :transport:
Logged


Artifact Swap: Human ConnectionPride PCMagic rainbowSmile on, rainbow flower!
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« Reply #2 on: April 21, 2026 @687.55 » Embed

Don't know anything about Rarebit, but I assume the buttons disappear where they wouldn't go anywhere. So you don't get "next" or "last" buttons when you're on the most-recent comic, because they'd be pointless or confusing, and similarly you don't get "prev" or "first" buttons when you're on the oldest comic.

But glancing at the source code, I see these bits, which provides functions like this one:


Code
function firstButton() {
    //FIRST BUTTON
    if (pg > 1) {
        //wait until page 2 to make button active
        return `<a href="?pg=` + 1 + navScrollTo + `"/>` + imgOrText(imageToggle, 0) + `</a>`;
    } else {
        if (!imageToggle) {
            return imgOrText(imageToggle, 0);
        } else {
            return ``;
        }
    }
}

This is the code that chooses whether or not to render the "first" button. It checks if the current page is greater than 1 (i.e. not the first page!) and then, if so, renders the link. It renders TEXT versions even if you're on the first page... but not in other cases. Strange.

Anyway, I suspect you could "fix" that one by changing it to this:


Code
function firstButton() {
    //FIRST BUTTON
    if (pg > 1) {
        //wait until page 2 to make button active
        return `<a href="?pg=` + 1 + navScrollTo + `"/>` + imgOrText(imageToggle, 0) + `</a>`;
    } else {
        return imgOrText(imageToggle, 0);
    }
}

Give that a go. If it works, the fix for the other three functions would be similar. Or shout if you still need help (I've got to go do things now and won't be free probably until tomorrow, but I can look then if you're still stuck!)
Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif

Artifact Swap: I met Dan Q on Melonland!Polyamorousradio polyRainbow ConnectionJoined 2025!
bennizone
Casual Poster ⚓︎
*
View Profile WWWArt


⛺︎ My Room
Itch.io: My Games

Artifacts:
MaggieJoined 2025!
« Reply #3 on: April 21, 2026 @890.62 » Embed

Give that a go. If it works, the fix for the other three functions would be similar. Or shout if you still need help (I've got to go do things now and won't be free probably until tomorrow, but I can look then if you're still stuck!)

Thank you so much!!! I figured out a way to fix it from your explanation!! (I realize the buttons may seem 'pointless' if they aren't clickable, but I prefer them visible for layout/aesthetic-reasons, haha) I really appreciate you taking a look despite not knowing anything about Rarebit beforehand, very kind of you! :-DD
Logged


Artifact Swap: Human ConnectionPride PCMagic rainbowSmile on, rainbow flower!
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« Reply #4 on: April 22, 2026 @399.83 » Embed

Nice! It's looking good!
Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif

Artifact Swap: I met Dan Q on Melonland!Polyamorousradio polyRainbow ConnectionJoined 2025!
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
MelonLand @000

Want to Login or Join ?

Minecraft: Online
Join: craft.melonking.net