Space tourism website using NextJS, Typescript and SASS
Design comparison
Solution retrospective
What a project! Learnt a lot on this one. Code went through a series of refactors as I rethought things and learnt things. Party.
Did end up with a few odd solutions to things. Please let me know if there were better ways:
- Made a separate fixed
div
for the backgrounds. I just liked how it separated form from function. - I feel like my BEM was a bit all over the place. I love how it works with SASS but it gets mighty messy with a few round of nesting. Anyone have better solutions?
- Dynamic routing in NextJS tripped me up a little. I ended up having the
index.tsx
of each category just display the first subpage (/destination
shows the same as/destination/moon
etc) but this effectively doubles up the html for the moon page. I tried removing theindex.tsx
and addinghref='/destination/moon' as='/destination'
but it added a bit too much reload. Is there a better way? - Sizing up into extra large displays was a bit of a new thing for me, too. Ended up multiplying the
rem
value in breakpoints abovemin-width: 2200px
. How much more detail are people going into here? Are we including height breakpoints as well? Ratios?
Anyway, good time. Thanks for the challenge.
Community feedback
- @JohndiddlesPosted over 2 years ago
wow, really nice!
For the technology page, I think there are landscape images available for tablet and mobile screens. You could consider using them. I also love the hover effect on your 'explore' button.
Great Job
1@arun-robertsPosted over 2 years agoThanks @Johndiddles !
I think if you refresh whilst on those views the landscape images should appear. I wanted to use
<img>
tags for the technology images for better accessibility so I set up a break point listener withuseEffect
. If you switch between views in the inspector thesrc
won't update unless you refresh. Thanks for pointing it out, though. I'm going to check out what others did to get around this now.And thanks! Most of my
::before
and::after
tricks come straight from a trio of Kevin Powell YouTube videos. Check them out if you haven't already.Cheers!
0
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