Skip to content

Conversation

@RPaemurd
Copy link

@RPaemurd RPaemurd commented Oct 3, 2025

Copy link

@marinalendt-png marinalendt-png left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verkligen ett bra jobb Rebecca. Din kod är väldigt lättläst, och du kommenterar så att man förstår vad du velat åstadkomma. Utförandet är snyggt, och enligt instruktionerna. Jag har inte något att påpeka. Suuuuuperbra jobbat!

@RPaemurd
Copy link
Author

@JennieDalgren JennieDalgren self-assigned this Oct 20, 2025
Copy link

@JennieDalgren JennieDalgren left a 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 code is clean and structured and easy to follow. It seems like you really made an effort to understand every part of the code based on your comments.

Keep up the good work

Comment on lines +7 to +16
const myHeaders = new Headers();
myHeaders.append('x-api-key', '0c625ab60e6a40a1a4b6cc2e4a5fe9b0');
// Tells the API that we want the data in JSON format
myHeaders.append('Content-Type', 'application/json')

const requestOptions = {
method: 'GET', // We want to GET (fetch) data
redirect: 'follow',
headers: myHeaders // API-key sends as a HTTP-header, more safe without the key in the URL
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great that you have investigated in this. We will learn more about storing API keys in a secret and secure way

Comment on lines +53 to +56
if (!recipesToShow || recipesToShow.length === 0) {
recipeContainer.innerHTML = '<p class="empty-state-message">Sorry, no recipes match your filter. Please try another one!</p>';
return; // terminate the function otherwise it would runt map() with an empty list
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good fallback to have an empty state

Comment on lines +162 to +165
cardOverlay.addEventListener("click", (event) => {
// Checks if the clicked element was the background itself, and not the box inside it
if (event.target === cardOverlay) {
cardOverlay.classList.remove("visible");// Hides the popup window.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<!-- ==================================================
Scripts
================================================== -->
<script src="backup-script.js"></script>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it called backup-script?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not want the first one to crash with the changes that I did in my first script.js, but when I finished the backup script I went with that instead :)

Comment on lines +8 to +11
--clr-primary: rgba(0, 24, 164, 1);
--clr-primary-1: rgba(204, 255, 226, 1);
--clr-secondary: rgba(255, 101, 137, 1);
--clr-secondary-1: rgba(255, 236, 234, 1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! css variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants