Martinsgundi
@MartinsgundiAll comments
- @TomrocheDevSubmitted 5 months ago@MartinsgundiPosted 5 months ago
Nice and clean solution Tom.
Quick one, I noticed that when you click on "Mark all as read" the number of notifications still remain at 3, you could probably look into it.
Nice work again.
Marked as helpful1 - @MelvinAguilarSubmitted about 1 year ago
Hi there 👋, I’m Melvin, and this is my solution for this challenge. 🚀
🎁 Features:
- Progressive Web App (PWA) support. 📱🌐
- Achieved 100% in Lighthouse score for performance, accessibility, best practices, and SEO. 📊
- Utilized TailwindCSS for responsive styling. 🎨
- Codebase is well-maintained and formatted using Prettier. 💻
- Resemblance with the original design. 🎨
🛠️ Built With:
- TailwindCSS. 🎨
- npm - Prettier. 💻
Any suggestions on how I can enhance this solution or achieve even better performance are welcome!
Thank you. 😊✌️
@MartinsgundiPosted 12 months agoHey Melvin, nice work as usual.
Check out your LinkedIn, sent you a connect request about 3 weeks ago. Cheers✌🏾
0 - @andaluciacurtisSubmitted about 1 year ago
I don't have any specific questions, but if you have any resources that were helpful to you to learn more about using APIs (especially related to Fetch, Await, etc), please let me know!! I'm finding them a little hard to grasp as a concept.
@MartinsgundiPosted about 1 year agoNice work Curtis! Here are some resources that helped me kick off:
-
Net ninja: Asynchronous JavaScript - This helped me understand asynchronous JavaScript and how it works under the hood. It provided me with a solid foundation, and I recommend this tutorial to anyone who is new to asynchronous JavaScript.
-
Net ninja: JSON-server Tutorial - This is also an amazing tutorial. It walks you through all the processes of consuming an API and using the data obtained to manipulate the DOM. It was indeed a plus for me.
I hope this helps, happy coding!
Marked as helpful1 -
- @ymanziSubmitted about 1 year ago
I struggle quite a bit with the linear-gradient on the pictures, mostly with the pseudo ::after selector but in the end I think I did well.
I didn't succeed to apply a border bottom on the social logos on hover. If anyone knows how to do it using the ::after pseudo-selector, please share with me.
Feedback is always welcome! 😁
@MartinsgundiPosted about 1 year agoBrilliant solution Yves Manzi!
I just finished this project, and I confirm that it was a bit tricky with the overlays and background images. Took me sometime before I remembered to use background gradient. 😂
Concerning the social logos, I personally didn’t use the before or after pseudo selector. I just gave it a border-bottom: 2px solid; on :hover, and I also added transition effect which made it look nice.
I know this might not be your desired feedback but I just felt I should share.
Happy coding!
0 - @ShukhratKholmamatovSubmitted about 1 year ago
Got trouble on js code-->couldn't use one class for three unread notification to change in js, so I made 3 id.
Feel free to give feedback!!!
@MartinsgundiPosted about 1 year agoHello Shukhrat, nice work!
Regarding your issue with JavaScript, using the same class name to select multiple elements is very common in web development.
There is a method in JavaScript that allows you to get multiple elements with the same class name or tag name. It’s done by simply typing
document.querySelectorAll(‘.classname’)
.querySelectorAll
stores all the elements that contains the specified class name into a NodeList, which is very similar to an array.- An array in programming is like a container that allows you to store multiple pieces of data, such as numbers, words, or other information, in a structured way. The difference is that NodeLists are specifically designed for representing collections of nodes in the DOM.
By using this method, it becomes easier to target multiple elements for styling. This can be achieved by simply iterating or looping through the NodeList.
Check out MDN for more detailed information on JavaScript DOM.
Also, check out this article on freeCodeCamp on various ways to iterate or loop through an array.
Now, regarding your issue, you should give the three unread notifications the same class name that's different from the unique class name given to each individual element. In your case, all three elements share the same CSS style, but to prevent unwanted and unforeseen problems, it's preferable to give them a classname different from their individual unique class names. For example:
<div class="user_notification unread" id="unread"> <img src="assets/images/avatar-mark-webber.webp" alt=""> <!—Your remaining code goes here—> </div> <div class="user_notification unread" id="unread1"> <img src="assets/images/avatar-angela-gray.webp" alt=""> <!—Your remaining code goes here—> </div> <div class="user_notification unread" id="unread2"> <img src="assets/images/avatar-jacob-thompson.webp" alt=""> <!—Your remaining code goes here—> </div>
If you notice, I gave the three unread notifications the same class name of “unread.”
Now, in your JavaScript, you will use the
querySelectorAll
method to target or select all elements with the classname of “unread,” which in your case are the three unread notifications. Example:let unreadNotifications = document.querySelectorAll('.unread');
To add the CSS style, which is
background: #fff
to the three elements, you will need to iterate or loop through the NodeList that contains the three elements to give them the background style. There are several ways to loop through the NodeList or array, but for this explanation, I will use theforEach
method.It goes like this:
unreadNotifications.forEach(function (unreadNotification) { unreadNotification.style.background = "#fff"; });
Basically, the
forEach
method in JavaScript is used to iterate over elements in an array (or NodeList) and perform a specified action or function on each element. It takes a callback function as its argument, which is executed for each item in the array (or NodeList).After all this, your code should look something like this:
// Select all the unread notifications let unreadNotifications = document.querySelectorAll('.unread'); function readAll() { // Iterate through the NodeList and apply the background style to each of the elements in the NodeList unreadNotifications.forEach(function (unreadNotification) { unreadNotification.style.background = "#fff"; }); // Your remaining code goes here };
You should also use the same approach to remove the dots from the unread notifications. I should have written the code snippet for that, but I feel this reply is getting too long. Fortunately, they both share the same concept.
I hope this helps. Happy coding!
Marked as helpful1 - @trevisandanielSubmitted over 1 year ago
I dont know how to fix the paragraph to be short like the original image it looks like my width is bigger, how can I fix it?
@MartinsgundiPosted over 1 year agoHey Daniel, nice work!.
Concerning the length of the paragragh, you should consider giving a max-width value to the .sedan, .suv and .luxury classes. By doing this you would be able to control how wide the cards will be or how long the paragraph will be.
For example (Gotten from your code):
.sedan, .suv, .luxury { display: flex; flex-direction: column; padding: 50px; max-width: 11rem; /* I added a max-width of 11rem */ justify-content: flex-start; }
I hope this helps, happy coding!
Marked as helpful0