Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Planet SvelteKit!

Robert 170

@waffleflopper

Desktop design screenshot for the Planets fact site coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


edit: fixed live link (renamed the netlify url)

Well this was quite the project! Before I elaborate on anything just a few todos I have left for this living repository:

  • improve accessibility (this is currently a weak point for me and now that I have the site essentially functionally complete I can go through and work on making the components and interactions perfect)
  • disable invalid routes (I'll probably fix this tonight but I forgot to use sveltekit hooks to ensure that people can only visit planet/[planet] routes since currently navigating to the base will just show a blank page and some undefined footers.
  • make planet size a little better. I want to base it on the radius of the actual planet but being an active duty soldier and dad has me pressed for time so I wanted to get a solution up to get feedback that was functionally complete and work on those little wants as I have the time.

##More For some reason I originally thought the way to go was going to be making the entire thing in html/css first (design that is). When I had almost everything done a friend pointed out that I wasn't componentizing things like I should, which caused me to go back and (still without sveltekit) use sass partials. After an hour or so my brain finally started working and I came to realize if I'm componentizing them anyways I may as well do it within the framework I planned on using. Wasting my own time is about the best learning experience I can get so just in this stumbling process alone I feel like I learned a lot I can take on to the next project.

I've also come to the realization that I'm so excited to jump in to the code that I rush (or skip) a good planning phase to figure out what elements of html/css I'm going to need, how I should approach components, and ways to prevent overcomplicating the overall code flow of the project. On the next project I hope to slow way down and go with a functional first approach and do the styling after in an effort to keep styling away from components so they are more universal and reusable in the future. I may stick with SvelteKit but I'm leaning towards using React (likely with NextJS/13) and switching between the two in order to maintain different development skills as I attempt to move into the industry.

I'm new to the world of web development. I've done the tutorials for Svelte and SvelteKit and following a tutorial for a todo app using Svelte a little while back. I've completed some free coding bootcamp stuff for typescript and javascript so I went that route.

I definitely want to know if I'm doing things I shouldn't be doing - in any regard be it CSS, HTML, JS, Svelte, SvelteKit, etc.

Community feedback

@ribeiroAllison

Posted

Really liked your hover effect on planet names in nav bar!

The transitions between pictures of the planets are really smooth too. Mine got kinda of clunky, how did you do that? :)

1

Robert 170

@waffleflopper

Posted

@ribeiroAllison Hey, thanks for the comment! I've become a big fan of the before and after pseudoelements for hover effects. They're really powerful - I just wish every element had one (especially input types). Unfortunately they're only limited to elements that have inner-content :(

I'm not sure what you mean about yours being clunky? The smoothness on mine is largely contributed to pre-loading. When you hover any of the links the target content starts preloading in preparation for being clicked on. And with the planet images and such being incredibly small there isn't much to load so it's done by the time you click the link. It eliminates the small amount of lag the user can experience when the content isn't hydrated until the link has already been clicked

0

@ribeiroAllison

Posted

@waffleflopper How did you do this pre-loading of the pictures? Is it built in the lib you used or is there a technique to do it?

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord