Svelte routes +page/+layout and src/lib/components
I'm messing around with portfolio ideas and am trying to figure out how to get the damn navbar links to work, so far it's driven me mad for about an hour after googling, chatgpting, svelte docs etc..
https://www.sveltelab.dev/5lyuqf6riwp4az3
What am I after:
When you load the site, PageLoad is what appears.
Click on about -> routes/about appears. Same thing for contact, and projects.
I feel like I need to put the navbar into +layout.svelte, but then the styling in PageLoad.svelte is pointless as it's targetting anything, so I'd need to move that into global.css, then I'd need to add classes/ids because it's basic targeting.. aaaaaand yeah... fml.
https://www.sveltelab.dev/5lyuqf6riwp4az3
What am I after:
When you load the site, PageLoad is what appears.
Click on about -> routes/about appears. Same thing for contact, and projects.
I feel like I need to put the navbar into +layout.svelte, but then the styling in PageLoad.svelte is pointless as it's targetting anything, so I'd need to move that into global.css, then I'd need to add classes/ids because it's basic targeting.. aaaaaand yeah... fml.
SvelteLab
A REPL for SvelteKit projects: quickly spin up a SvelteKit project and share it with the world.
