-
Notifications
You must be signed in to change notification settings - Fork 60
Pull 1 #56
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?
Pull 1 #56
Conversation
emilfloren96
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.
I noticed it do not really fit in the mobile version
Maybe put some recipes on the start page so you don´t have to search and kind of guess what recipes to find.
But over all really good job man, locks clean, good recipes and a site i would use!!
Have a nice weekend man!
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <link rel="stylesheet" href="styles.css" /> | ||
| <script src="script.js" defer></script> |
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.
I've heard that you should have this in the in the end of the code just above .
I don´t know why but so u know! 👍
| const apiKey = "a229b49155dd40a782013d0a5e906f70"; | ||
|
|
||
| // Cached DOM references | ||
| const inputEl = document.getElementById("ingredient-input"); |
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.
Not something to comment really but what does E1 or is it El but why u have that?
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.
You went your own way with the styling, but you met all requirements and several stretch goals too.
Your code is really well structured and easy to follow.
You could clean up som comments (ai generated ones) that you don't need anymore such as
height: auto; /* was fixed before */
Keep up the good work! 💪
| :root { | ||
| --primary-color: #fafdff; | ||
| --secondary-color: #d4b126; | ||
| --header-height: 70px; | ||
| --search-height: 50px; | ||
| --border-color: #d0cccc; | ||
| } |
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 using css variables
| const qs = new URLSearchParams({ number: "1", apiKey }); | ||
| if (tags.length) qs.set("tags", tags.join(",")); |
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 use of URLSearchParams! we haven't talked about this concept yet but it is a very lcean way of structuring the code. also to set the query string with the tags like that. ⭐
| resultsEl.innerHTML = recipes.length | ||
| ? "" | ||
| : "<p>No random recipe found. Try different filters.</p>"; | ||
|
|
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.
⭐
| function setLoading(loading, message = "Searching…") { | ||
| if (loading) { | ||
| resultsEl.innerHTML = `<p>${message}</p>`; | ||
| searchBtn.disabled = true; | ||
| randomBtn.disabled = true; | ||
| searchBtn.style.opacity = 0.7; | ||
| randomBtn.style.opacity = 0.7; | ||
| } else { | ||
| searchBtn.disabled = false; | ||
| randomBtn.disabled = false; | ||
| searchBtn.style.opacity = ""; | ||
| randomBtn.style.opacity = ""; | ||
| } |
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.
smart!
No description provided.