From 40bff957ac8760be9006bc4a3a131ced5902c59a Mon Sep 17 00:00:00 2001 From: Robert <152218269+PenguinRobert1@users.noreply.github.com> Date: Thu, 3 Apr 2025 19:24:18 +0000 Subject: [PATCH 1/2] monkey hussin --- WebGames-master/WebGames-master/index.html | 127 ++-------- cal.html | 243 +++++++++++++++++++ chat.css | 262 --------------------- chat.html | 128 ---------- index.css | 74 +++++- index.html | 78 +----- setting.html | 26 +- 7 files changed, 342 insertions(+), 596 deletions(-) create mode 100644 cal.html delete mode 100644 chat.css delete mode 100644 chat.html diff --git a/WebGames-master/WebGames-master/index.html b/WebGames-master/WebGames-master/index.html index c44c67a2..ad93d87d 100644 --- a/WebGames-master/WebGames-master/index.html +++ b/WebGames-master/WebGames-master/index.html @@ -55,7 +55,7 @@ text-shadow: 0 0 10px var(--text-color), 0 0 20px var(--text-color), 0 0 30px var(--text-color), 0 0 40px var(--text-color); } to { - text-shadow: 0 0 20px var(--text-color), 0 0 30px var(--text-color), 0 0 40px var(--text-color), 0 0 50px var(--text-color); + text-shadow: 0 0 20px var(--text-color), 0 0 30px var(--text-color), 0 0 40px var(--text-color), 0 0 50px var (--text-color); } } @@ -90,12 +90,20 @@ max-width: 1200px; } + .game-container.single-result { + display: flex; + justify-content: center; + align-items: center; + } + .game { background-color: var(--card-bg); border-radius: 10px; overflow: hidden; text-align: center; transition: transform 0.3s, background-color 0.3s; + max-width: 500px; /* Limit the maximum width */ + max-height: 600px; /* Limit the maximum height */ } .game:hover { @@ -106,6 +114,8 @@ .game img { width: 100%; height: auto; + max-width: 500px; /* Limit the maximum width */ + max-height: 500px; /* Limit the maximum height */ transition: transform 0.3s; } @@ -756,125 +766,28 @@ function filterGames() { const searchInput = document.getElementById('searchBar').value.toLowerCase(); const games = document.querySelectorAll('.game'); - let hasResults = false; + let visibleGames = 0; games.forEach(game => { const title = game.querySelector('.game-title').textContent.toLowerCase(); if (title.includes(searchInput)) { game.style.display = ''; - hasResults = true; + visibleGames++; } else { game.style.display = 'none'; } }); + const gameContainer = document.querySelector('.game-container'); + if (visibleGames === 1) { + gameContainer.classList.add('single-result'); + } else { + gameContainer.classList.remove('single-result'); + } + const noResultsElement = document.getElementById('noResults'); noResultsElement.style.display = hasResults ? 'none' : 'flex'; } - - // Utility function to set a cookie - function setCookie(name, value, days) { - const date = new Date(); - date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); - document.cookie = `${name}=${value};expires=${date.toUTCString()};path=/`; - } - - // Utility function to get a cookie - function getCookie(name) { - const cookies = document.cookie.split(';'); - for (let i = 0; i < cookies.length; i++) { - const cookie = cookies[i].trim(); - if (cookie.startsWith(name + '=')) { - return cookie.substring(name.length + 1); - } - } - return null; - } - - // Apply dark or light mode based on cookie - function applyMode(isDarkMode) { - const pageTitle = document.getElementById('pageTitle'); - if (isDarkMode) { - document.body.style.setProperty('--background-color', 'var(--background-color-dark)'); - document.body.style.setProperty('--text-color', 'var(--text-color-dark)'); - document.body.style.setProperty('--card-bg', 'var(--card-bg-dark)'); - document.body.style.setProperty('--card-hover-bg', 'var(--card-hover-bg-dark)'); - document.body.style.setProperty('--card-hover-text', 'var(--card-hover-text-dark)'); - pageTitle.style.textShadow = 'var(--title-shadow-dark)'; - document.getElementById('toggleMode').textContent = 'Switch to Light Mode'; - } else { - document.body.style.setProperty('--background-color', 'var(--background-color-light)'); - document.body.style.setProperty('--text-color', 'var(--text-color-light)'); - document.body.style.setProperty('--card-bg', 'var(--card-bg-light)'); - document.body.style.setProperty('--card-hover-bg', 'var(--card-hover-bg-light)'); - document.body.style.setProperty('--card-hover-text', 'var(--card-hover-text-light)'); - pageTitle.style.textShadow = 'none'; // Remove glow in light mode - document.getElementById('toggleMode').textContent = 'Switch to Dark Mode'; - } - } - - // Toggle mode - const toggleModeButton = document.getElementById('toggleMode'); - toggleModeButton.addEventListener('click', () => { - const isDarkMode = getCookie('darkMode') === 'true'; - setCookie('darkMode', !isDarkMode, 30); // Save preference for 30 days - applyMode(!isDarkMode); - }); - - // Apply saved mode on load - const darkModeEnabled = getCookie('darkMode') === 'true'; - applyMode(darkModeEnabled); - - // Check if CloakJS is enabled - const cloakJSEnabled = getCookie('cloakJS') === 'true'; - - if (cloakJSEnabled) { - // Initialize CloakJS - Cloak.init({ - obfuscate: true, // Enable obfuscation - hideElements: ['.game a'], // Obfuscate game links - debug: false, // Enable debug mode for testing - }); - - // Modify all game links to open in a new tab - const gameLinks = document.querySelectorAll('.game a'); - gameLinks.forEach(link => { - link.setAttribute('target', '_blank'); // Open in a new tab - }); - } - - // Check if Maturity Filter is enabled - const maturityFilterEnabled = getCookie('maturityFilter') === 'true'; - - if (maturityFilterEnabled) { - // Initialize CloakJS to hide mature games - Cloak.init({ - hideElements: ['.game.mature'], // Hide elements with the "mature" class - debug: false, // Disable debug mode in production - }); - } - - // Check if Text-to-Speech is enabled - const textToSpeechEnabled = getCookie('textToSpeech') === 'true'; - - if (textToSpeechEnabled) { - // Function to read text aloud - function speakText(text) { - const speech = new SpeechSynthesisUtterance(text); - speech.lang = 'en-US'; // Set language - speech.rate = 1; // Set speed (1 is normal) - speech.pitch = 1; // Set pitch (1 is normal) - window.speechSynthesis.speak(speech); - } - - // Example: Add TTS to game titles - const gameTitles = document.querySelectorAll('.game-title'); - gameTitles.forEach(title => { - title.addEventListener('click', () => { - speakText(title.textContent); - }); - }); - } \ No newline at end of file diff --git a/cal.html b/cal.html new file mode 100644 index 00000000..aadddfb0 --- /dev/null +++ b/cal.html @@ -0,0 +1,243 @@ + + + + + + Calendar + + + +
+
+ +
+ +
+ +
+
+
Sun
+
Mon
+
Tue
+
Wed
+
Thu
+
Fri
+
Sat
+
+
+ +
+
+
+

Event Details

+

Date: Not selected

+

No event selected.

+ +
+ + + + diff --git a/chat.css b/chat.css deleted file mode 100644 index c244599c..00000000 --- a/chat.css +++ /dev/null @@ -1,262 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap'); -* { - box-sizing: border-box; - font-family: 'Roboto', sans-serif; -} - -/* Styling the main container */ -.container { - width: 80%; - margin: auto; - margin-top: 2rem; - letter-spacing: 0.5px; - height: 80%; -} - -img { - width: 50px; - vertical-align: middle; - border-style: none; - border-radius: 100%; -} -/* Styling the msg-header container */ -.msg-header { - border: 1px solid #ccc; - width: 100%; - height: 10%; - border-bottom: none; - display: inline-block; - background-color: #efefef; - margin: 0; - border-top-left-radius: 20px; - border-top-right-radius: 20px; -} -/* Styling the profile picture */ -.msgimg { - margin-left: 2%; - float: left; -} - -.container1 { - width: 270px; - height: auto; - float: left; - margin: 0; -} - -/* styling user-name */ -.active { - width: 150px; - float: left; - color: black; - font-weight: bold; - margin: 0 0 0 5px; - height: 10%; - -} -/* Styling the inbox */ -.chat-page { - padding: 0 0 50px 0; -} - -.msg-inbox { - border: 1px solid #ccc; - overflow: hidden; - border-bottom-left-radius: 20px; - border-bottom-right-radius: 20px; -} - - -.chats { - padding: 30px 15px 0 25px; -} - -.msg-page { - max-height: 500px; - overflow-y: auto; -} - -/* Styling the msg-bottom container */ - .msg-bottom { - border-top: 1px solid #ccc; - position: relative; - height: 11%; - background-color: rgb(239 239 239); - } -/* Styling the input field */ - .input-group { - float: right; - margin-top: 13px; - margin-right: 20px; - outline: none !important; - border-radius: 20px; - width: 61% !important; - background-color: #fff; - position: relative; - display: flex; - flex-wrap: wrap; - align-items: stretch; - } - - .input-group>.form-control { - position: relative; - flex: 1 1 auto; - width: 1%; - margin-bottom: 0; - } - - .form-control { - border: none !important; - border-radius: 20px !important; - display: block; - height: calc(2.25rem + 2px); - padding: 0.375rem 0.75rem; - font-size: 1rem; - line-height: 1.5; - color: #495057; - background-color: #fff; - background-clip: padding-box; - transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; - } - - .input-group-text { - background: transparent !important; - border: none !important; - display: flex; - align-items: center; - padding: 0.375rem 0.75rem; - margin-bottom: 0; - font-size: 1.5rem; - font-weight: b; - line-height: 1.5; - color: #495057; - text-align: center; - white-space: nowrap; - background-color: #e9ecef; - border: 1px solid #ced4da; - border-radius: 0.25rem; - font-weight: bold !important; - cursor: pointer; - } - - input:focus { - outline: none; - border: none !important; - box-shadow: none !important; - } - - .send-icon { - font-weight: bold !important; - } - -/* Styling the avatar */ -received-chats-img { - display: inline-block; - width: 50px; - float: left; -} - -.received-msg { - display: inline-block; - padding: 0 0 0 10px; - vertical-align: top; - width: 92%; -} -.received-msg-inbox { - width: 57%; -} - -.received-msg-inbox p { - background: #efefef none repeat scroll 0 0; - border-radius: 10px; - color: #646464; - font-size: 14px; - margin-left: 1rem; - padding: 1rem; - width: 100%; - box-shadow: rgb(0 0 0 / 25%) 0px 5px 5px 2px; -} - p { - overflow-wrap: break-word; -} - -/* Styling the msg-sent time */ -.time { - color: #777; - display: block; - font-size: 12px; - margin: 8px 0 0; -} -.outgoing-chats { - overflow: hidden; - margin: 26px 20px; -} - -.outgoing-chats-msg p { - background-color: #3a12ff; - background-image: linear-gradient(45deg, #ee087f 0%, #DD2A7B 25%, #9858ac 50%, #8134AF 75%, #515BD4 100%); - color: #fff; - border-radius: 10px; - font-size: 14px; - color: #fff; - padding: 5px 10px 5px 12px; - width: 100%; - padding: 1rem; - box-shadow: rgb(0 0 0 / 25%) 0px 2px 5px 2px; -} -.outgoing-chats-msg { - float: right; - width: 46%; - } - -/* Styling the avatar */ -.outgoing-chats-img { - display: inline-block; - width: 50px; - float: right; - margin-right: 1rem; -} -@media only screen and (max-device-width: 850px) { - *, - .time { - font-size: 28px; - } - img { - width: 65px; - } - .msg-header { - height: 5%; - } - .msg-page { - max-height: none; - } - .received-msg-inbox p { - font-size: 28px; - } - .outgoing-chats-msg p { - font-size: 28px; - } -} - -@media only screen and (max-device-width: 450px) { - *, - .time { - font-size: 28px; - } - img { - width: 65px; - } - .msg-header { - height: 5%; - } - .msg-page { - max-height: none; - } - .received-msg-inbox p { - font-size: 28px; - } - .outgoing-chats-msg p { - font-size: 28px; - } -} - diff --git a/chat.html b/chat.html deleted file mode 100644 index 115bc5d3..00000000 --- a/chat.html +++ /dev/null @@ -1,128 +0,0 @@ - - - Chat Box UI Design - - - - - - - - -
- -
-
- -
-

User name

-
-
-
- - - -
-
-
- -
- - -
-
- -
-
-
-

- Hi !! This is message from Riya . Lorem ipsum, dolor sit - amet consectetur adipisicing elit. Non quas nemo eum, - earum sunt, nobis similique quisquam eveniet pariatur - commodi modi voluptatibus iusto omnis harum illum iste - distinctio expedita illo! -

- 18:06 PM | July 24 -
-
-
- -
-
- -
-
-
-

- Hi riya , Lorem ipsum dolor sit amet consectetur - adipisicing elit. Illo nobis deleniti earum magni - recusandae assumenda. -

-

- Lorem ipsum dolor sit amet consectetur. -

- - 18:30 PM | July 24 -
-
-
-
-
- -
-
-
-

- Hi !! This is message from John Lewis. Lorem ipsum, dolor - sit amet consectetur adipisicing elit. iste distinctio - expedita illo! -

- 18:31 PM | July 24 -
-
-
-
-
- -
-
-
-

- Lorem ipsum dolor sit amet consectetur adipisicing elit. - Velit, sequi. -

- - 18:34 PM | July 24 -
-
-
-
-
- - - -
-
- - - - - -
-
-
-
-
- - - - - - diff --git a/index.css b/index.css index 3aaf2006..16790e74 100644 --- a/index.css +++ b/index.css @@ -172,4 +172,76 @@ body { .parallax { background-attachment: scroll; } - } \ No newline at end of file + } + :root { + --background-color-dark: #0d0d0d; + --text-color-dark: #00ffcc; + --button-bg-dark: #1a1a1a; + --button-hover-bg-dark: #00ffcc; + --button-hover-text-dark: #0d0d0d; + + --background-color-light: #ffffff; + --text-color-light: #333333; + --button-bg-light: #f0f0f0; + --button-hover-bg-light: #333333; + --button-hover-text-light: #ffffff; +} + +body { + background-color: var(--background-color); + color: var(--text-color); + font-family: 'Orbitron', sans-serif; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100vh; + overflow: hidden; + transition: background-color 0.3s, color 0.3s; +} + +h1 { + font-size: 3rem; + text-transform: uppercase; + animation: glow 1.5s infinite alternate; +} + +@keyframes glow { + from { + text-shadow: 0 0 10px var(--text-color), 0 0 20px var(--text-color), 0 0 30px var(--text-color), 0 0 40px var(--text-color); + } + to { + text-shadow: 0 0 20px var(--text-color), 0 0 30px var(--text-color), 0 0 40px var(--text-color), 0 0 50px var(--text-color); + } +} + +.button-container { + display: flex; + gap: 20px; + margin-top: 20px; +} + +.button { + padding: 15px 30px; + font-size: 1.2rem; + font-family: 'Press Start 2P', cursive; + color: var(--text-color); + background-color: var(--button-bg); + border: 2px solid var(--text-color); + border-radius: 5px; + cursor: pointer; + text-transform: uppercase; + transition: background-color 0.3s, color 0.3s, transform 0.2s; +} + +.button:hover { + background-color: var(--button-hover-bg); + color: var(--button-hover-text); + transform: scale(1.1); +} + +.button:active { + transform: scale(0.95); +} \ No newline at end of file diff --git a/index.html b/index.html index 63658108..cbcb81e4 100644 --- a/index.html +++ b/index.html @@ -4,88 +4,14 @@ Moon Gaming + - -

Moon Gaming

- +
diff --git a/setting.html b/setting.html index d64f6182..b9300912 100644 --- a/setting.html +++ b/setting.html @@ -99,6 +99,10 @@ Clear Cookies +
+ Save Search Input + +
@@ -273,27 +277,6 @@ // Apply saved Text-to-Speech preference on load applyTextToSpeechSetting(textToSpeechEnabled); - // Date and Time Toggle - const toggleDateTimeButton = document.getElementById('toggleDateTime'); - const dateTimeEnabled = getCookie('dateTime') === 'true'; - - function applyDateTimeSetting(enabled) { - if (enabled) { - toggleDateTimeButton.textContent = 'Disable'; - } else { - toggleDateTimeButton.textContent = 'Enable'; - } - } - - toggleDateTimeButton.addEventListener('click', () => { - const isDateTimeEnabled = getCookie('dateTime') === 'true'; - setCookie('dateTime', !isDateTimeEnabled, 30); // Save preference for 30 days - applyDateTimeSetting(!isDateTimeEnabled); - }); - - // Apply saved Date and Time preference on load - applyDateTimeSetting(dateTimeEnabled); - // Regional Settings const regionSelect = document.getElementById('regionSelect'); const savedRegion = getCookie('region') || 'us'; // Default to 'us' @@ -336,7 +319,6 @@ applyFPSCounterSetting(false); // Default: FPS Counter disabled applyMaturityFilterSetting(false); // Default: Maturity Filter disabled applyTextToSpeechSetting(false); // Default: Text-to-Speech disabled - applyDateTimeSetting(false); // Default: Date and Time disabled alert('Settings have been reset to default!'); }); From bcef6dcf6914981a49dc0423ff6c8fda379749c9 Mon Sep 17 00:00:00 2001 From: Robert <152218269+PenguinRobert1@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:38:13 +0000 Subject: [PATCH 2/2] part 1 rps --- .../WebGames-master/games2/rps/app.js | 0 .../WebGames-master/games2/rps/rps.html | 39 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 WebGames-master/WebGames-master/games2/rps/app.js create mode 100644 WebGames-master/WebGames-master/games2/rps/rps.html diff --git a/WebGames-master/WebGames-master/games2/rps/app.js b/WebGames-master/WebGames-master/games2/rps/app.js new file mode 100644 index 00000000..e69de29b diff --git a/WebGames-master/WebGames-master/games2/rps/rps.html b/WebGames-master/WebGames-master/games2/rps/rps.html new file mode 100644 index 00000000..6acd37f9 --- /dev/null +++ b/WebGames-master/WebGames-master/games2/rps/rps.html @@ -0,0 +1,39 @@ + + + + + + Rock Paper Scissors Game + + + +

Rock Paper Scissors

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+

0

+

Wins

+
+
+

0

+

Losses

+
+
+ +
+

Play your move

+
+ + + \ No newline at end of file