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

Card component using Next.js 13 with TailwindCSS

ChrisEski 110

@ChrisEski

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Community feedback

@0xabdulkhaliq

Posted

Hello there 👋. Congratulations on successfully completing the challenge! 🎉

  • I have other recommendations regarding your code that I believe will be of great interest to you.

BODY MEASUREMENTS 📐:

  • The h-screen utility class is used to define height: 100vh, But we want to use min-height: 100vh for body instead of height: 100vh. Setting the height: 100vh may result in the component being cut off on smaller screens, such as mobile devices in landscape orientation.
  • For example; if we set height: 100vh then the body will have 100vh height no matter what. Even if the content spans more than 100vh.
  • But if we set min-height: 100vh then the body will start at 100vh, if the content pushes the body beyond 100vh it will continue growing. However if you have content that takes less than 100vh it will still take 100vh in space.
  • So we want to use min-h-screen utility class to define min-height: 100vh

.

I hope you find this helpful 😄 Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

1

ChrisEski 110

@ChrisEski

Posted

@0xAbdulKhalid Thank you for your advice! I will have that in mind for my future projects! 💪

0

@Kamlesh0007

Posted

Hey there! I noticed that your React app can take some time to load, and it might be a good idea to add a loader to improve the user experience.

To add a loader, you can create a new component loader and use it to display a loading animation until your content has loaded. You can then conditionally render your Loader component based on the state of your app Bro do use loading text use some icons for loading screen it will be best for ur design and more effective than a message

1

ChrisEski 110

@ChrisEski

Posted

@Kamlesh0007 Thank you very much, I try to implenent this feature in my next project. I try to learn Next.js 13 step by step :)

0

@Kamlesh0007

Posted

@ChrisEski yes bro and if possible u can increase the height of container and should i send u how to add loader in next js

0

@johnphillipsdev

Posted

Great job on your solution! To enhance the accuracy of your design, consider utilizing the dynamic values from Tailwind CSS JIT (Just-in-Time) mode.

By leveraging the JIT mode's arbitrary value support, you can achieve precise measurements and better align your solution with the design specifications. You can learn more about this feature in the Tailwind CSS documentation.

For example, to adjust the letter-spacing and make it more accurate to the design, you can use dynamic values. Here's a code snippet that demonstrates this:

<h1 class="text-accent font-normal... tracking-[4px]">ADVICE #218</h1>

Happy coding @ChrisEski!

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