-
Notifications
You must be signed in to change notification settings - Fork 60
Recipe Library project by Evip88 #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
JennieDalgren
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job with this project! Your meeting the requirements and some stretch goals.
Your code is well structured and easy to follow, you use enough amount of comments and you are working really good with functions!
I would like to see more commits for upcoming projects. It's a great way to follow your process and learning curve. Both for you, us, fellow students and future recruiters.
Keep up the good work 💪
|
|
||
| .controls__container > button { | ||
| color: #0018a4; | ||
| border: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid the "jumping" of the buttons when you hover over them you could change the border: none; to border: 2px solid transparent;
|
|
||
| function setActiveSort(direction) { | ||
| // Validate: asc | desc | ||
| const dir = direction === "asc" ? "asc" : "desc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice to use ternary operators here.
| const dir = direction === "asc" ? "asc" : "desc"; | ||
| sortQueryParam = `&sort=time&sortDirection=${dir}`; | ||
|
|
||
| const btn = document.getElementById(`sort__${dir}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clever to use the variable to get the correct element from the DOM
| function formatTime(totalMinutes) { | ||
| const h = Math.floor(totalMinutes / 60); | ||
| const m = totalMinutes % 60; | ||
| if (h && m) return `${h}h ${m}m`; | ||
| if (h) return `${h}h`; | ||
| return `${m}m`; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
https://recipe-project3-10a8dc.netlify.app/