Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Planet SvelteKit!

node, sass/scss, svelte, typescript
Robert•170
@waffleflopper
A solution to the Planets fact site challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

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.

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Allison Alencar Ribeiro•80
    @ribeiroAllison
    Posted over 2 years ago

    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? :)

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub