Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Article Preview Component

P
yinnie•320
@wcyin9
A solution to the Article preview component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

It's my first time writing JS for a project, so I'm proud of successfully executing it after studying JS for a bit. I think there's more ways to make my code concise, so next time I'll definitely apply that.

What challenges did you encounter, and how did you overcome them?

The most difficulty I had was with the JS itself. Since I'm fairly new to JS, I had little knowledge of what code to use, and how to successfully link it to the html. After a bit of struggle, I finally successfully executed what I wanted it to do by using classList

What specific areas of your project would you like help with?

As it's my first time writing JS, I'm unaware of the best practices, or how to condense my code in a better way. Please give me any heads up, pointers, or tips, and let me know if there's anything I could have done better.

In addition, in the figma design the image is cropped differently in desktop view, and I am unsure as to how to crop the image exactly as it's portrayed in the design.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on yinnie'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
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