#Help me. I need Router System but without reload
23 messages ยท Page 1 of 1 (latest)
You can use the ClientRouter to simulate an SPA type feel if that's what you are going for
https://docs.astro.build/en/reference/modules/astro-transitions/#clientrouter-
But when I go from one page to another on the clientrouter, the router does not change. When I refresh the page, it also appears
What do you mean the "router" doesn't change? and "it" also appears?
I am using swupjs. But I couldn't make a nasted layout with swupjs.
Is your project set to output: server?
Also looking at their demo video you could achieve most of that behavior with the ClientRouter and remove the extra dependency if you wanted
Yeah. my config output:server
Is there a repo I could look at?
Sure
Contribute to Prestgg1/AzeScript development by creating an account on GitHub.
If you fix my problem. I will very happy
And what exactly is not working for you? Seems to work fine for me locally based on my knowledge of Swup and what should be happening visually
That's where siderbar should not change.
Only content should be changed
Got it ๐
I'm not too sure how to get the behavior you want since I've never used swup, however after playing around and looking at the docs I think I have an idea
It looks like the Swup() constructor takes an options object and one of those options is containers
this takes an array of container ID's so obviously you would want #swup in there, but I think maybe you can add a second one to use for targeting that dashboard aside
So something like containers: ["#swup, "#no-animations"] and then use that second container for targeting with swup to disable the transitions
Let me know if that helps at all
Did I work for you?
I didn't try it as I've never used swup and their docs were a little sparse on how to actually use the containers to disable animations for part of a page (they specifically mention doing this under the API reference but there is no example or link to further explanation) here is the specific section if you are curious
Since you've been actively using it I was hoping you might have a better idea how to do that ๐
Will it be a problem for SEO if I use ClientRouter?