Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookmarkable hash page issues #360

Open
joshy158 opened this issue Mar 15, 2025 · 1 comment
Open

Bookmarkable hash page issues #360

joshy158 opened this issue Mar 15, 2025 · 1 comment
Labels
question Further information is requested

Comments

@joshy158
Copy link

<style type="text/acss">
    @pages {
        "#corridor": event="#corridor:click";
        "#house": event="#house:click";
    }
    
    div:click{
        add-hash: "#{@id}" "{@id} - clicked" remove-last-hash;
        body{
            background: {@data-color};
        }
    }
</style>

<div data-color="red" id="corridor">Corridor</div>
<div data-color="blue" id="house">House</div>

Expected things that are happening:

Expected things that are not happening:

Can you please tell me what I'm missing here, Sir?
Thank you so much.

@bob2517
Copy link
Member

bob2517 commented Mar 20, 2025

Not sure if you got my email - apologies if not - I've been having email issues that I thought I'd sorted out (spf, things like that).
Here is my original response:

When you are using hash references, there needs to be an underlying page in the @pages section.

What happens is that the underlying page is found, and that is handled, then the "hash" references events are handled. You have to "draw" the underlying page first.

The main page needs to be in the main config for your site - ie. not embedded, such as in a config.acss file, something like that.

Try this in your main config (not embedded):

@pages {

"/test.php": class="something";

}

Let me know if that doesn't work and I'll set up an example from here to replicate it.

PS. Apologies for the edits.

@bob2517 bob2517 added the question Further information is requested label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants