Latest comments
- @MolinaEfSubmitted about 2 months ago
- @goyma-mittalSubmitted 2 months ago
- @NelsonGC7Submitted 5 months ago@Kenpachi-bitPosted 2 months ago
well attempted however the height and placement of the cards' content needs some work
0 - @enochmwangaSubmitted 2 months agoWhat challenges did you encounter, and how did you overcome them?
Updating the states in case of invalid email input. This was solve by modifying the class names using JavaScript.
What specific areas of your project would you like help with?Any suggestion for further improvement is welcome.
@Kenpachi-bitPosted 2 months agoThe main card was done ok(needs some minor alterations on the email input to look closer the original), however the design on mobile may need a bit more work to look closer to the one presented in the documents
0 - @Ghozy165Submitted 2 months agoWhat specific areas of your project would you like help with?
need help for using JS to change CSS style and change icon color correctly?
@Kenpachi-bitPosted 2 months agowhile the desktop version is alright, the mobile version is lacking specifically with the share section. I would suggest using event listeners within Javascript to add and remove classes and allow for CSS editing, below is a snippet of my JS code
let shareButton = document.querySelector(".share-icon-container"); let footer = document.querySelector(".profile"); let container = document.querySelector("main"); let deskTooltip = document.querySelector(".desktop-share"); const head = document.querySelector("h1"); let containerLength = container.offsetWidth; deskTooltip.classList.add("invisible"); window.addEventListener("resize", () => { containerLength = container.offsetWidth; if (containerLength > 340) { footer.classList.remove("dark"); } if (containerLength <= 340) { deskTooltip.classList.add("invisible"); } }); shareButton.addEventListener("click", () => { if (containerLength <= 340) { if (footer.classList.contains("dark")) { footer.classList.remove("dark"); console.log("removed"); } else { footer.classList.add("dark"); console.log("added"); } } else if (containerLength > 340) { footer.classList.remove("dark"); deskTooltip.classList.toggle("invisible"); } });
the CSS styles can be added within CSS and be toggled in Javascript, I suggest using display:none for elements you want removed within your html. With regards to the share icon, I was also unable to change its color. Apologies if this explanation is a bit confusing I also had some difficulty with this exercise until I figured it out
Marked as helpful0 - @MahmoodHashemSubmitted 5 months agoWhat specific areas of your project would you like help with?
Any feedback is appreciated
@Kenpachi-bitPosted 2 months agoWell attempted however the site lacks responsive elements especially for mobile screens
0