Submitted 5 months agoA solution to the Space tourism multi-page website challenge
Space Tour with NextJs and TailwindCSS
next, react, tailwind-css, gsap
@J33rry

Solution retrospective
What are you most proud of, and what would you do differently next time?
<div
className={` ${
current === "HOME" &&
"bg-[url(/assets/home/background-home-mobile.jpg)] md:bg-[url(/assets/home/background-home-tablet.jpg)] xl:bg-[url(/assets/home/background-home-desktop.jpg)]"
} ${
current === "DESTINATION" &&
"bg-[url(/assets/destination/background-destination-mobile.jpg)] md:bg-[url(/assets/destination/background-destination-tablet.jpg)] xl:bg-[url(/assets/destination/background-destination-desktop.jpg)]"
}
${
current === "CREW" &&
"bg-[url(/assets/crew/background-crew-mobile.jpg)] md:bg-[url(/assets/crew/background-crew-tablet.jpg)] xl:bg-[url(/assets/crew/background-crew-desktop.jpg)]"
} ${
current === "TECHNOLOGY" &&
"bg-[url(/assets/technology/background-technology-mobile.jpg)] md:bg-[url(/assets/technology/background-technology-tablet.jpg)] xl:bg-[url(/assets/technology/background-technology-desktop.jpg)]"
} bg-no-repeat bg-cover flex flex-col min-h-screen xl:h-screen w-screen`}
>
<Navbar nav={nav} current={current} setCurrent={setCurrent} />
{current === "HOME" && <HomePage setCurrent={setCurrent} />}
{current === "DESTINATION" && (
<Destination destinations={data.destinations} />
)}
{current === "CREW" && <Crew crew={data.crew} />}
{current === "TECHNOLOGY" && (
<Technology technology={data.technology} />
)}
</div>
What challenges did you encounter, and how did you overcome them?
Making the Navbar, specially the line going between the logo and navbar links in desktop layout
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Anil Kumar Meena's solution.
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