Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 4 years ago

Next.js, Tailwind CSS , Typescript - Minimal Portfolio Site

Joey Desjardin•150
@jwdesjardin
A solution to the Minimalist portfolio website challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I have listed the areas of the project where I have been learning and could use some feedback. You should be able to find excerpts of these sections outlined in the README.md file of my project directory to save you time if you want to check it out.

  1. I used the Tailwind CSS @apply directive to create utility classes that i used through out the tailwind project so i could avoid writing the same styles over and over. I know this is not the best method but it was pretty simple to get up and running in my first project with tailwind. i read this article and plan to use a combination of method 2 which uses react components to extract reused tailwind styles and the custom utility class method to style my next project. If you have any thoughts on the best practice for extracting tailwind classes i am interested in your view.

  2. I have been reading about the Next.js Image optimization component and see that it does a lot to optimize photos in your application. In this project we are given optimized images. If I use the Image component from Next.js I have difficulties in finding a way to set the display to none and switch to the tablet sized image for example. Has anyone found a way to make use of the Next.js Image component while building project with pre-optimized images or should I continue to use the <img> tag in these cases?

Thanks for reading!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • ApplePieGiraffe•30,525
    @ApplePieGiraffe
    Posted almost 4 years ago

    Hey there, Joey Desjardin! 👋

    Good work on this challenge! 👍 The pages in your solution look good and respond well! 😀

    The only thing I'd like to suggest is adding some alt text to the images in your solution to improve the accessibility of your solution and clear up a few of the errors on your solution report. 😉

    I've never used Tailwind CSS, but I do use Next.js and I must admit I've had a little trouble with styling the Next.js Image component before, as well. Next.js actually adds a bunch of wrapper <div>s around the optimized image, so I've heard that one way to control the size and position (and display) for now is to wrap the image in your own wrapper <div>. And I haven't tried this, but perhaps you could combine the Image component with the <picture> element for responsive images (IDK how necessary that is, though, since Next.js optimizes images depending on the size of the screen they will be displayed on, too). Anyway, maybe that'll give you a small idea, perhaps, and good luck with that! 😅

    Keep coding (and happy coding, too)! 😁

  • Joey Desjardin•150
    @jwdesjardin
    Posted almost 4 years ago

    This is the article I was mentioning in regards to methods to extract reused tailwind classes. The Tailwind docs also have a page about this topic as well.

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

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

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