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

@Gnandal

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?

Le challenge que j'ai rencontré, c'était comment écouter le redimensionnement de l'écran, je l'ai resolu grace à ce site : MDN, voici donc ma solution :

onresize = (event) => {
    if(window.innerWidth > 950) {
        shareOptionComponent.style.width = "fit-content";
        shareOptionComponent.style.backgroundColor = "#FFF";
        authorComponent.style.display = "flex"; 

        shareOptionComponent.childNodes[1].classList.replace("share-option-mobile", "share-option-desktop");
    }else {
        shareOptionComponent.childNodes[1].classList.replace("share-option-desktop", "share-option-mobile");
        authorComponent.style.display = classAdded ? "none" : "flex"; 
        
        shareOptionComponent.style.width = classAdded ? "100%" : "20%"
        shareOptionComponent.style.backgroundColor = classAdded ? "hsl(214, 17%, 51%)" : " hsl(210, 46%, 95%)";
    }
};

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

J'ai ajouter un border radiu à l'option de partage en version mobile, mais c'est pas ç'a n'a aucun éffet, si tu as une idée de mon erreur, n'hésite pas à me le souligner.

share {
     ...
     border-radius: 0 O 1rem 1rem !important;
     overflow: hidden;
 }

Community feedback

Levan 90

@Mosacd

Posted

hey there✌️😁

Css could use some work, but u were probably just focusing on Javascript, so good work in that department👌

good luck

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