From 8afbb75bfd27eee760fdba22ccaf381f1fac44ff Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 17:16:02 -0700 Subject: [PATCH 01/15] readding recipes --- _includes/nav/share_and_care.html | 3 +- navigation/share_and_care/recipes/home.md | 60 ++++++++++++++++++ navigation/share_and_care/recipes/recipes.md | 64 ++++++++++++++++++++ 3 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 navigation/share_and_care/recipes/home.md create mode 100644 navigation/share_and_care/recipes/recipes.md diff --git a/_includes/nav/share_and_care.html b/_includes/nav/share_and_care.html index 74627a52..dc5c1699 100644 --- a/_includes/nav/share_and_care.html +++ b/_includes/nav/share_and_care.html @@ -3,6 +3,7 @@ Chess Forum Revvit Underground Music - DNHS Cafe + DNHS Cafe + Hungry Games diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md new file mode 100644 index 00000000..9bd8c920 --- /dev/null +++ b/navigation/share_and_care/recipes/home.md @@ -0,0 +1,60 @@ +--- +layout: post +title: The Hungry Games - home page +description: Dive into the world of scrumptious foods and get to cooking today! +permalink: share_and_care/hungry_games +comments: true +--- + + + + + Beautiful Food Layout + + + + + +
+ Pizza + Pasta + Ramen +
+ + + + diff --git a/navigation/share_and_care/recipes/recipes.md b/navigation/share_and_care/recipes/recipes.md new file mode 100644 index 00000000..a057e52c --- /dev/null +++ b/navigation/share_and_care/recipes/recipes.md @@ -0,0 +1,64 @@ +--- +layout: post +title: The Hungry Games +description: Dive into the world of scrumptious foods and get to cooking today! +hide: true +menu: nav/home.html +--- + + + + + + + + + Beautiful Food Layout + + + + + +
+ Pizza + Pasta + Ramen +
+ + + + \ No newline at end of file From 94035066ee3ae7763d5532175023e409975be449 Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 17:24:16 -0700 Subject: [PATCH 02/15] interactive fridge --- navigation/share_and_care/recipes/home.md | 74 +++++++++++++++++++++-- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md index 9bd8c920..28c2b722 100644 --- a/navigation/share_and_care/recipes/home.md +++ b/navigation/share_and_care/recipes/home.md @@ -5,18 +5,16 @@ description: Dive into the world of scrumptious foods and get to cooking today! permalink: share_and_care/hungry_games comments: true --- + - Beautiful Food Layout -
Pizza Pasta Ramen
+
+
+
+

Contents:

+
    + + +
    +
    + + + + From 0bab58d27bddccd10dbdecfe20d8eda0aadad765 Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 17:35:55 -0700 Subject: [PATCH 03/15] home page changes --- navigation/share_and_care/recipes/home.md | 49 ++++++++++++++--------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md index 28c2b722..150f9160 100644 --- a/navigation/share_and_care/recipes/home.md +++ b/navigation/share_and_care/recipes/home.md @@ -1,7 +1,7 @@ --- layout: post title: The Hungry Games - home page -description: Dive into the world of scrumptious foods and get to cooking today! +description: Welcome to the Hungry Games! Explore our interactive "fridge," chat with others about food, and more! permalink: share_and_care/hungry_games comments: true --- @@ -13,6 +13,8 @@ comments: true +
    +
    +
    +
    +

    Contents:

    +
      + + +
      +
      + +
      +
      Pizza Pasta Ramen
      -
      -
      -
      -

      Contents:

      -
        - - -
        -
        - - - From 2981e7fe09e250c92087fc86560828a93c9fdc2a Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 17:46:11 -0700 Subject: [PATCH 05/15] more changes --- navigation/share_and_care/recipes/home.md | 36 ++++++++++++++++---- navigation/share_and_care/recipes/recipes.md | 3 -- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md index 5504c5bc..c4cf8fb1 100644 --- a/navigation/share_and_care/recipes/home.md +++ b/navigation/share_and_care/recipes/home.md @@ -97,7 +97,7 @@ comments: true border-radius: 5px; } - button { + .add-button { padding: 10px 15px; background-color: #00796B; color: white; @@ -108,10 +108,25 @@ comments: true margin-top: 10px; } - button:hover { + .add-button:hover { background-color: #005b4f; } + .finish-button { + padding: 10px 15px; + background-color: #007BFF; /* Blue color */ + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s; + margin-top: 10px; + } + + .finish-button:hover { + background-color: #0056b3; + } + ul { list-style-type: none; padding: 0; @@ -133,22 +148,31 @@ comments: true margin-top: 20px; text-align: center; } + + /* Darker background for added items */ + .fridge-items { + background-color: rgba(0, 0, 0, 0.1); /* Slightly darker */ + padding: 10px; + border-radius: 5px; + text-align: center; /* Center text */ + margin-top: 10px; + }
        +

        Add ingredients here!

        -
          +
            - - + +
            -
            diff --git a/navigation/share_and_care/recipes/recipes.md b/navigation/share_and_care/recipes/recipes.md index a057e52c..622d0bbd 100644 --- a/navigation/share_and_care/recipes/recipes.md +++ b/navigation/share_and_care/recipes/recipes.md @@ -6,9 +6,6 @@ hide: true menu: nav/home.html --- - - - From 9a1dc924f1b525e98f9f495a91ad99ac0d962d1e Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 17:49:23 -0700 Subject: [PATCH 06/15] fixing button --- navigation/share_and_care/recipes/home.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md index c4cf8fb1..a6d88a0d 100644 --- a/navigation/share_and_care/recipes/home.md +++ b/navigation/share_and_care/recipes/home.md @@ -99,7 +99,7 @@ comments: true .add-button { padding: 10px 15px; - background-color: #00796B; + background-color: #4CAF50; /* Green */ color: white; border: none; border-radius: 5px; @@ -109,12 +109,12 @@ comments: true } .add-button:hover { - background-color: #005b4f; + background-color: #45a049; } .finish-button { padding: 10px 15px; - background-color: #007BFF; /* Blue color */ + background-color: #007BFF; /* Light Blue */ color: white; border: none; border-radius: 5px; From 7caf24ebf8eb6ae87ab2b54e378c7465185b77b2 Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 17:56:10 -0700 Subject: [PATCH 07/15] moving fridge away and chat --- navigation/share_and_care/recipes/home.md | 198 +++++++--------------- 1 file changed, 58 insertions(+), 140 deletions(-) diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md index a6d88a0d..5fc4bed8 100644 --- a/navigation/share_and_care/recipes/home.md +++ b/navigation/share_and_care/recipes/home.md @@ -15,115 +15,70 @@ comments: true font-family: Arial, sans-serif; background-color: #f8f9fa; display: flex; - flex-direction: column; - align-items: center; - justify-content: center; min-height: 100vh; + margin: 0; } - .image-row { - display: flex; - justify-content: center; - align-items: center; - gap: 20px; + .sidebar { + width: 200px; + background-color: #007BFF; /* Blue background for sidebar */ + color: white; padding: 20px; - border: 10px solid #1F456E; - border-radius: 25px; - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); - background-color: #fff7e6; - max-width: 90%; - margin: 20px 0; - } - - .image-row img { - width: 300px; - height: 300px; - border-radius: 20px; - transition: transform 0.3s ease-in-out; - box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); - object-fit: cover; + box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); } - .image-row img:hover { - transform: scale(1.1); + .sidebar h2 { + margin: 0 0 20px; + text-align: center; } - .fridge { - position: relative; - width: 250px; - height: 400px; - margin: 20px; - background-color: #1F456E; - border: 5px solid #00796B; - border-radius: 10px; - overflow: hidden; - transition: transform 0.5s ease; + .chat-area { + flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; + padding: 20px; } - .fridge-door { - position: absolute; + .chat-box { width: 100%; - height: 100%; - background-color: #B2DFDB; - transform-origin: left; - transition: transform 0.5s ease; + max-width: 600px; + height: 400px; + border: 1px solid #ccc; border-radius: 10px; - } - - .fridge-door.open { - transform: rotateY(-150deg); - } - - .fridge-content { - display: none; padding: 10px; - color: #333; - text-align: center; - } - - .fridge.open .fridge-content { - display: block; + overflow-y: auto; + background-color: #fff; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } - #itemInput { - width: 80%; - padding: 8px; + .message-input { + width: 100%; + max-width: 600px; + display: flex; margin-top: 10px; - border: 1px solid #ddd; - border-radius: 5px; } - .add-button { - padding: 10px 15px; - background-color: #4CAF50; /* Green */ - color: white; - border: none; + .message-input input { + flex: 1; + padding: 10px; + border: 1px solid #ccc; border-radius: 5px; - cursor: pointer; - transition: background-color 0.3s; - margin-top: 10px; - } - - .add-button:hover { - background-color: #45a049; + margin-right: 10px; } - .finish-button { + .message-input button { padding: 10px 15px; - background-color: #007BFF; /* Light Blue */ + background-color: #007BFF; /* Button color */ color: white; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s; - margin-top: 10px; } - .finish-button:hover { + .message-input button:hover { background-color: #0056b3; } @@ -149,81 +104,44 @@ comments: true text-align: center; } - /* Darker background for added items */ - .fridge-items { - background-color: rgba(0, 0, 0, 0.1); /* Slightly darker */ - padding: 10px; - border-radius: 5px; - text-align: center; /* Center text */ - margin-top: 10px; + .recipe-list h3 { + margin-bottom: 10px; } -
            -
            - -
            -
            -

            Add ingredients here!

            -
              - - - -
              + + +
              +
              +
              + +
              -
              - Pizza - Pasta - Ramen -
              - From ca6de8adec5abd6770f9e48ffcffbb5edcd031b8 Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 18:06:51 -0700 Subject: [PATCH 08/15] chat box --- navigation/share_and_care/recipes/home.md | 176 +++++++++++----------- 1 file changed, 86 insertions(+), 90 deletions(-) diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md index 5fc4bed8..d2e1703b 100644 --- a/navigation/share_and_care/recipes/home.md +++ b/navigation/share_and_care/recipes/home.md @@ -1,147 +1,143 @@ --- layout: post -title: The Hungry Games (Home) -description: Welcome to the Hungry Games! Explore our interactive "fridge," chat with others about food, and more! +title: The Hungry Games (Home and Chat) +description: Have fun talking about food, resturants, and more! Favorite people's chat messages to store them! permalink: share_and_care/hungry_games -comments: true +comments: true --- + Beautiful Food Layout - - + + From 90c3821312c4c3198b2fe6c6aec514cc20495ff7 Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 19:22:32 -0700 Subject: [PATCH 14/15] trying to fix --- navigation/share_and_care/recipes/home.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md index ac645653..7a7dfa21 100644 --- a/navigation/share_and_care/recipes/home.md +++ b/navigation/share_and_care/recipes/home.md @@ -6,7 +6,7 @@ permalink: share_and_care/hungry_games comments: true --- - + From f97919e682f3e3c0992350b998cdcf3bf2e337c4 Mon Sep 17 00:00:00 2001 From: 179046258 Date: Thu, 31 Oct 2024 19:25:32 -0700 Subject: [PATCH 15/15] removing hearts too much --- navigation/share_and_care/recipes/home.md | 39 +---------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/navigation/share_and_care/recipes/home.md b/navigation/share_and_care/recipes/home.md index 7a7dfa21..3996e2d7 100644 --- a/navigation/share_and_care/recipes/home.md +++ b/navigation/share_and_care/recipes/home.md @@ -7,6 +7,7 @@ comments: true --- + @@ -105,11 +106,6 @@ comments: true .input-box button:hover { background-color: #e67e22; } - .heart { - cursor: pointer; - margin-left: 5px; - display: inline; /* Ensure hearts are displayed inline */ - } @@ -161,39 +157,6 @@ comments: true messageDiv.classList.add("chat-message"); messageDiv.textContent = message.text; - const heart = document.createElement("span"); - heart.textContent = "❤️"; - heart.classList.add("heart"); - heart.style.display = "none"; // Initially hidden - - // Toggle heart visibility on click - messageDiv.onclick = function(event) { - const clickX = event.clientX - messageDiv.getBoundingClientRect().left; - const messageWidth = messageDiv.offsetWidth; - if (clickX > messageWidth) { // Clicked to the right of the message - heart.style.display = heart.style.display === "none" ? "inline" : "none"; - } - }; - - heart.onclick = async function(event) { - event.stopPropagation(); // Prevent triggering messageDiv click - const userId = "currentUserId"; // Replace with actual user ID - const hearted = heart.style.display === "inline"; - - heart.style.display = hearted ? 'none' : 'inline'; // Toggle visibility of heart - - const heartResponse = await fetch(`http://localhost:5000/messages/${message.id}/heart`, { - method: 'PUT', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify({ user_id: userId }), // Send user_id to server - }); - const updatedMessage = await heartResponse.json(); - console.log(updatedMessage.hearts); // Log the updated heart count - }; - - messageDiv.appendChild(heart); document.getElementById("chatBox").appendChild(messageDiv); document.getElementById("chatBox").scrollTop = document.getElementById("chatBox").scrollHeight; // Scroll to the bottom }