Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Scroll - A SvelteKit Frontend For Scratch
- Mr_rudy
-
Scratcher
100+ posts
Scroll - A SvelteKit Frontend For Scratch
Hello!
I made this little thing in about an hour that fetches the scratch API and renders stuffi was bored lol
Yes, this was inspired by Snazzle
Bellow is what it looks like:


Note: I had to use a CorsProxy so information will probably be outdated
Try it here!
I made this little thing in about an hour that fetches the scratch API and renders stuffi was bored lol
Yes, this was inspired by Snazzle
Bellow is what it looks like:


Note: I had to use a CorsProxy so information will probably be outdated
Try it here!
Last edited by Mr_rudy (March 11, 2024 00:03:35)
- cactus-cacti
-
Scratcher
100+ posts
Scroll - A SvelteKit Frontend For Scratch
wowww that…it’s so cool!
- ajskateboarder
-
Scratcher
1000+ posts
Scroll - A SvelteKit Frontend For Scratch
Looks neat but why does the entire page have padding D':
- Mr_rudy
-
Scratcher
100+ posts
Scroll - A SvelteKit Frontend For Scratch
Looks neat but why does the entire page have padding D':idk lol
- Chiroyce
-
Scratcher
1000+ posts
Scroll - A SvelteKit Frontend For Scratch
You should use +layout.svelte for the navbar don't put it in every page, also why is client side loading not there?
seriously?
just do this
Don't use a cors proxy instead use +page.server.js/ts files on Vercel to create a proxy endpoint that fetches data from the Scratch API directly and passes it to the client. Why? well because
function exploreProjects() {
window.location.href = '/projects';
}just do this
import { goto } from "$app/navigation";
function exploreProjects() {
goto('/projects');
}Don't use a cors proxy instead use +page.server.js/ts files on Vercel to create a proxy endpoint that fetches data from the Scratch API directly and passes it to the client. Why? well because
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://corsproxy.io/?https://api.scratch.mit.edu/explore/projects?q=all&mode=trending&language=en. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.
Last edited by Chiroyce (March 11, 2024 12:37:18)
- Mr_rudy
-
Scratcher
100+ posts
Scroll - A SvelteKit Frontend For Scratch
You should use +layout.svelte for the navbar don't put it in every page, also why is client side loading not there?Thanks! I'll add that later, to be honest, I don't know why I made the NavBar like that. I still am learning to be fluent with SvelteKit. So a lot of the code is just from JS or HTML knowledge.seriously?function exploreProjects() {
window.location.href = '/projects';
}
just do thisimport { goto } from "$app/navigation";
function exploreProjects() {
goto('/projects');
}
Don't use a cors proxy instead use +page.server.js/ts files on Vercel to create a proxy endpoint that fetches data from the Scratch API directly and passes it to the client. Why? well becauseCross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://corsproxy.io/?https://api.scratch.mit.edu/explore/projects?q=all&mode=trending&language=en. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.
Last edited by Mr_rudy (March 11, 2024 14:35:00)
- Mr_rudy
-
Scratcher
100+ posts
Scroll - A SvelteKit Frontend For Scratch
I made it use goto, and use +layout.svelte, but I couldn't figure out how to use +page.server.js files, so I am still using a CorsProxyYou should use +layout.svelte for the navbar don't put it in every page, also why is client side loading not there?Thanks! I'll add that later, to be honest, I don't know why I made the NavBar like that. I still am learning to be fluent with SvelteKit. So a lot of the code is just from JS or HTML knowledge.seriously?function exploreProjects() {
window.location.href = '/projects';
}
just do thisimport { goto } from "$app/navigation";
function exploreProjects() {
goto('/projects');
}
Don't use a cors proxy instead use +page.server.js/ts files on Vercel to create a proxy endpoint that fetches data from the Scratch API directly and passes it to the client. Why? well becauseCross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://corsproxy.io/?https://api.scratch.mit.edu/explore/projects?q=all&mode=trending&language=en. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403.
- Discussion Forums
- » Advanced Topics
-
» Scroll - A SvelteKit Frontend For Scratch