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

Responsive page using flexbox and grid

Timic Ivey• 300

@Lwmeek

Desktop design screenshot for the Social media dashboard with theme switcher coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I had fun making this challenge, I was able to get through all difficulties in this challenge using google and stackflow. My biggest struggle was the instagram gradient border only on the top, if you guys have any other solution for that please let me know. Also how did you guys use javascript to change the theme? I know there are multiple ways to solve that, so I want to see other ways I could have accomplished the same goal.

Community feedback

P
Kent O'Sullivan• 1,870

@12Kentos

Posted

Hey @Lwmeek,

Nicely done! It looks great. I was going to make the same comment as @nelsonleone regarding the Instagram card. His suggestion is also how I solved the problem. As for the color theme, I would suggest taking a look at prefers-color-scheme as this will allow you to have the color scheme automatically be light/dark based on what the users has set as their preference.

Here are some videos showing how this can be accomplished, as well as a way to use your css color variables. Going this route I was able to get the color toggle working with very few lines of code.


const colorButton = document.querySelector(".header__color-toggle");

colorButton.addEventListener("click", () => {
  document.body.classList.toggle("darkmode");
});

Anyways here's the links. Hope this was helpful!

Kevin Powell

Atila

Keep up the great work!

Marked as helpful

1

Timic Ivey• 300

@Lwmeek

Posted

@12Kentos thanks for the feedback! I will definitely go back to my solution and implement this method to learn how it works and update. I honestly appreciate this a lot.

1
Nelson• 2,390

@nelsonleone

Posted

**HELLO....congrats on completing this challenge 🎉 🎉 🎉 **

I have some tips for you on your question ,hope it was helpful. The lines on the cards(e.g instgarm gradient color). You can use the ::after or ::before class to achieve them . And for the instagram , it's a linear-gradient. setbackground: linear-gradient(to right,....gradient colors)**

cards::after{
  content:"";
  width:100%;
 height:.3em(or any hat its best);
 position:absolute;
 top:0;
 left:0;
background: --facebook-color / instagram -> linear-gradient(to right,--instagram-color)
}

Marked as helpful

1

Timic Ivey• 300

@Lwmeek

Posted

@nelsonleone I appreciate this feedback it was a real struggle trying to figure out that part so I plan on trying this method out for sure and make sure its something I remember.

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