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

Article preview component

Konrad 370

@konradbaczyk

Desktop design screenshot for the Article preview component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


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

Work with svg files was difficult, but now I understand so much more when it comes to working with them.

Community feedback

P
Micha Huhn 220

@MichaHuhn

Posted

That looks really good, well done! Awesome that you learned much about SVGs. The tooltip/popover is also well made.

Here are two points that can be improved:

  1. Semantic HTML:
    • As your class name article-box indicates, we created an article in this exercise. That's why we can use the semantic <article> element here instead of a <div>.
    • The main heading should always be the <h1> element, even if there is only one heading on the page. The different headings h1, h2, h3, ... are purely semantical. That means we shouldn't choose heading elements based on a desired style. The style can be adjusted with CSS. So in this exercise we should use the <h1> element, because it's the only heading on the page. Then we can style it accordingly like defined in the mockup.
  2. Naming:
    • Just a small point: Currently, the function to toggle the "icons box" is called showIconsBox(). Because its task is to toggle stuff, we could also name it toggleIconsBox().

I hope that's a bit useful. Very good project.

Marked as helpful

0

Konrad 370

@konradbaczyk

Posted

@MichaHuhn Thank you so for check my project :)

  • I forgot about <article> element, but now I will use this in my next projects.
  • about headings: I know rules which you described, but I've used <h3> because I treated this article component as a fragment of a bigger project like landing page etc.
  • about naming: my mistake, you are right this function should be named as toogleIconBox()
0
P
Micha Huhn 220

@MichaHuhn

Posted

@konradbaczyk Your assumption about the headings is generally correct. Because there are no other headings on the page, the <h3> automatically becomes the <h1>, even though it's part of a smaller fragment.

1

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