Responsive Landing pages using CSS Grid and Flex Box.
Design comparison
Solution retrospective
This challenge Exposed me to use more of React Usestate, However I still don't know how to effectively add active class using react
Community feedback
- @HaroonabdulrazaqPosted about 2 years ago
@chiichriss, I checked through your project and your implementation is pixel detailed, Kudus to you and a Job well-done. I am sure you have put a lot of hard work into it.
To answer your question
You can always add an active class in the CSS and programmatically use React to make the class usable or not. An example is adding a Dark mode.
const [darkMode, setDarkMode] = useState(true) // use some function to setDarkMode to either true or false example handleChange function ....// for breivity
<section classNames={darkMode? 'dark-mode': 'light-mode'}> </section> This is one way to do it, there are several other ways. I hope the above answers your question.However, there are a few changes you should make.
-
The accessibility issues and HTML Errors. The Html errors can be fixed if you change the href value from ### to #
-
You can fix the accessibility Issue For example, you can wrap your sidebar in a <aside> tag and the navigation in a <nav> tag
-
If you have the time, you can improve your README.md file. This will allow the recruiter to see your beautiful, awesome project. Feel free to use my template. https://github.com/Haroonabdulrazaq/social-dashboard/blob/main/README.md
-
You can get a screenshot like that from https://ui.dev/amiresponsive
Lastly, I would like to know if there is a reason I can't find package.json in your root project.
If you find this post helpful, Kindly mark it as helpful. Thanks
Marked as helpful0@ChiichriisPosted about 2 years ago@Haroonabdulrazaq
Thank you so much this is very helpful. am grateful
1 -
Please log in to post a comment
Log in with GitHubJoin 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