Chat Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register.
April 21, 2026 - @843.14
Activity rating: Four Stars Posts & Arts: 50/1k.beats Random | Recent Posts | Guild Recents
News: It's the silly things you'll remember :trash: Guild Events: There are no events!

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


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


⛺︎ My Room
Itch.io: My Games

« on: April 19, 2026 @885.41 »

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

bennizone
Casual Poster ⚓︎
*
View Profile WWWArt


⛺︎ My Room
Itch.io: My Games

« Reply #1 on: Today at @546.05 »

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

Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


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

Guild Memberships:
« Reply #2 on: Today at @687.55 »

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


Artifact Swap: I met Dan Q on Melonland!PolyamorousBouncy Egg!Joined 2025!Lurby
Pages: [1] Print 
« previous next »
 

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

MelonLand Nav

@000

Want to Login or Join ?

Minecraft: Online
Join: craft.melonking.net