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 @@
The page is a place where people can explore themselves creatively and compete to see who has the best doodle. This allows for players to collaborate over their artistic abilities. Our room includes a chat room where players can converse about their creations, a doodle compete area, a place where people can post their art, and winners get crowned every week. This will help add to our classes page by making a fun artistic environment where everyone can collaborate.
- \ No newline at end of file + + + + Chat Room + + + + Competition Room + + + + Competition + diff --git a/navigation/create_and_compete/scripted.js b/navigation/create_and_compete/scripted.js new file mode 100644 index 00000000..195c6fc9 --- /dev/null +++ b/navigation/create_and_compete/scripted.js @@ -0,0 +1,91 @@ +// Array of zoomed-in image URLs +const imageList = [ + "zoomed-image1.jpg", + "zoomed-image2.jpg", + "zoomed-image3.jpg" + + + // Add more image URLs as needed + ]; + + + // Wait for the DOM to load before accessing elements + document.addEventListener("DOMContentLoaded", function() { + // Elements + const zoomedImage = document.getElementById("zoomed-image"); + const generateImageButton = document.getElementById("generate-image"); + const submitGuessButton = document.getElementById("submit-guess"); + const guessInput = document.getElementById("guess-input"); + const reasoningInput = document.getElementById("reasoning-input"); + const feedbackDisplay = document.getElementById("feedback-display"); + const feedbackModal = document.getElementById("feedback-modal"); + const closeButton = document.querySelector(".close-button"); + + + // Generate Random Image + generateImageButton.addEventListener("click", function() { + const randomIndex = Math.floor(Math.random() * imageList.length); + const selectedImage = imageList[randomIndex]; + zoomedImage.src = selectedImage; + zoomedImage.alt = "Zoomed in image for guessing"; + feedbackDisplay.innerHTML = ""; // Clear previous feedback on new image generation + }); + + + // Submit Guess and Reasoning + submitGuessButton.addEventListener("click", function() { + const guess = guessInput.value.trim(); + const reasoning = reasoningInput.value.trim(); + + + if (guess === "" || reasoning === "") { + alert("Please enter both your guess and reasoning."); + return; + } + + + // Display the guess and reasoning + feedbackDisplay.innerHTML = ` +Guess: ${guess}
+Reasoning: ${reasoning}
+ `; + + + // Show modal confirmation + feedbackModal.style.display = "block"; + + + // Reset input fields + guessInput.value = ""; + reasoningInput.value = ""; + }); + + + // Close Modal + closeButton.addEventListener("click", function() { + feedbackModal.style.display = "none"; + }); + + + // Close Modal when clicking outside of it + window.addEventListener("click", function(event) { + if (event.target == feedbackModal) { + feedbackModal.style.display = "none"; + } + }); + + + // Placeholder function to update the leaderboard + const leaderboard = document.getElementById("leaderboard"); + function updateLeaderboard(name) { + const listItem = document.createElement("li"); + listItem.textContent = name; + leaderboard.appendChild(listItem); + } + + + // Example of adding a name to leaderboard (testing purpose) + // updateLeaderboard("Top Guesser #1"); + }); + \ No newline at end of file diff --git a/navigation/create_and_compete/zoom-n-guess.md b/navigation/create_and_compete/zoom-n-guess.md index 8da1903a..7049a0b4 100644 --- a/navigation/create_and_compete/zoom-n-guess.md +++ b/navigation/create_and_compete/zoom-n-guess.md @@ -1,5 +1,5 @@ --- -layout: post +layout: post title: Create and Compete - Zoom n guess search_exclude: true permalink: /create_and_compete/zoominguess @@ -8,35 +8,46 @@ author: Arhaan, Mihir, Keerthan, and Akshaj --- +Zoominguess UI + +The main purpose of our Zoom-In Guess room is to have people think critically and collaborate with other members of the channel to identify the image as fast as possible.
+Room will consist of:
This interactive setup makes the game fun, challenging, and a great way to start conversations about perception and recognition!
+ +This interactive setup makes the game fun, challenging, and a great way to start conversations about perception and recognition!
Look at the closely zoomed-in image below and guess who it is. Explain why you think it's that person!
+ + + +