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 with Javascript and Font Awesome

@xXOsielXx

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 are you most proud of, and what would you do differently next time?

I'm very happy to have used CSS nesting. I was using it with SASS in a past project because I didn't know that it exist in CSS, but recently I found out and now I'm working faster.

I was using Font Awesome too. I like this icon library. Is too easy to set icons with it.

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

It was difficult to work with the image. I spent a lot of time on it.

The social networks container was difficult to work with, especially their styles in desktop. But hey, I learn how to make arrows with css...

.share-container::before {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -14px;
        margin-left: -16px;
        border-left: 16px solid transparent;
        border-right: 16px solid transparent;
        border-top: 16px solid var(--very-dark-grayish-blue);
}

and a nice transition...

.share-container {
        transition: top .4s, opacity .4s;
}

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

I need help with the image. Can you tell me how I can position the image so that it looks exactly like the design? I'll really appreciate it.

Any other thing would be nice :D

Community feedback

haquanq ®️ 1,585

@haquanq

Posted

Hellooooo @xXOsielXx 👋👋👋

About your feedback request, have you tried object-position ?

Here is some other things that can be improved:

  • Each page should have one main landmark which means wrap you most important content of the page inside it (there are other landmarks).
  • Using more semantic HTML markups and keep your HTML simple (avoid unnecessary wrapping elements - using too many div). For example, repetitive piece of content can be grouped by ul li to indicate the relation between each of them (same role depend to the context, maybe a list of links, a list of todo items).
  • figure is being misused here, figure is often used along with figcaption and wraps around contents to give it extra details/explanations (SEO and accessibility improvement ) - could think of it simply as a label/caption (not only for images, can be a list, a long paragraph,... ). Here you are using figure for an image with zero context and it is redundant, leave only the img alone is fine.

Hope this help 🙀🙀

Marked as helpful

1

@xXOsielXx

Posted

@haquanq Hellooo! Thank you very much for take your time to give me that helpful feedback.

I now used object-position. It solved my problem. I didn't know that property.

I added the tags you told me, main, ul li, and I added a footer too; I think it's a good idea. I removed the figure tag.

I need to ask you something... How I can set emojis in my messages? How do you do it? (I'm in Linux)

Again, thanks for your answer. Happy coding!

0
haquanq ®️ 1,585

@haquanq

Posted

@xXOsielXx You can just find an online page that offers many emojis and copy paste it.

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