Planet Info Site - NextJS / TailwindCSS / Framer / Typescript
Design comparison
Solution retrospective
Completing the project as close to possible to design, solving issues that i encountered.
What challenges did you encounter, and how did you overcome them?Applying dynamic colors with tailwind. Due to the way tailwind works it does not recognise class names created dynamically ie bg-%{color}. I solved this by creating object with 'planet name' : ['style1', 'style2]. then i would check if this object contains planetName and apply styles from the object.
Creating multipage website. This has website has 8 pages using html starter files, rather than creating 8 separate routes for website i desided to use nextjs dynamic routes to create pages. To do that i had to create planetData.json file with all relevant planet data. Dynamic routes checks if there is a planet and then returns planet. As there is no homepage
i used next navigation redirect to 'earth' in main page.
I was unable to come up with a way to to hide structure from internal structure and surface from geology section based on viewed device.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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