From c1ccb13890b8b548edc5d0bef9001c59ca7174e2 Mon Sep 17 00:00:00 2001 From: Robert <152218269+PenguinRobert1@users.noreply.github.com> Date: Tue, 8 Apr 2025 14:00:47 +0000 Subject: [PATCH 1/5] skib --- .../WebGames-master/games2/rps/app.js | 69 +++++++++++++++ hihihi.jpeg | Bin 0 -> 3089 bytes index.css | 1 + index.html | 79 ++++++++++++------ setting.html | 5 +- 5 files changed, 126 insertions(+), 28 deletions(-) create mode 100644 hihihi.jpeg diff --git a/WebGames-master/WebGames-master/games2/rps/app.js b/WebGames-master/WebGames-master/games2/rps/app.js index e69de29b..96bb971a 100644 --- a/WebGames-master/WebGames-master/games2/rps/app.js +++ b/WebGames-master/WebGames-master/games2/rps/app.js @@ -0,0 +1,69 @@ +let wins = parseInt(localStorage.getItem("wins")) || 0; +let losses = parseInt(localStorage.getItem("losses")) || 0; + +const choices = document.querySelectorAll(".choice"); +const msg = document.querySelector("#msg"); + +const winsPara = document.querySelector("#wins"); +const lossesPara = document.querySelector("#losses"); + +// Initialize the UI with saved values +winsPara.innerText = wins; +lossesPara.innerText = losses; + +const genCompChoice = () => { + const options = ["rock", "paper", "scissors"]; + const randIdx = Math.floor(Math.random() * 3); + return options[randIdx]; +}; + +const drawGame = () => { + msg.innerText = "Game was Draw. Play again."; + msg.style.backgroundColor = "#081b31"; +}; + +const showWinner = (userWin, userChoice, compChoice) => { + if (userWin) { + wins++; + localStorage.setItem("wins", wins); // Save wins to localStorage + winsPara.innerText = wins; + msg.innerText = `You win! Your ${userChoice} beats ${compChoice}`; + msg.style.backgroundColor = "green"; + } else { + losses++; + localStorage.setItem("losses", losses); // Save losses to localStorage + lossesPara.innerText = losses; + msg.innerText = `You lost. ${compChoice} beats your ${userChoice}`; + msg.style.backgroundColor = "red"; + } +}; + +const playGame = (userChoice) => { + //Generate computer choice + const compChoice = genCompChoice(); + + if (userChoice === compChoice) { + //Draw Game + drawGame(); + } else { + let userWin = true; + if (userChoice === "rock") { + //scissors, paper + userWin = compChoice === "paper" ? false : true; + } else if (userChoice === "paper") { + //rock, scissors + userWin = compChoice === "scissors" ? false : true; + } else { + //rock, paper + userWin = compChoice === "rock" ? false : true; + } + showWinner(userWin, userChoice, compChoice); + } +}; + +choices.forEach((choice) => { + choice.addEventListener("click", () => { + const userChoice = choice.getAttribute("id"); + playGame(userChoice); + }); +}); \ No newline at end of file diff --git a/hihihi.jpeg b/hihihi.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e772ce5ec54a8d5e2b1e90257a45484b647a7c01 GIT binary patch literal 3089 zcmcIlc{J4P8~=`F#xjFZVJyvLEEUR z2m}D2?G0=V0k;5NFoXvJ=H-F#@bU5T!$bsOP$*1d_Z}e;l$5kIN(zaT*?&Y)MovW@ ziB!^6Qc>5$VzFoi+;N=Nu_G9)CWw!Z4+e#a3kr&B$|7Yo|Le6?4ZwMT5}<|?Bn@!D zL7Z^V788)%CddhJ{>F7@Z4>3>;^z1*dr}AhadL2Qfd#=_kl#x{0LOL`42KBsQ{mA! zzhBU`YqyB#5e>~V1jj4hKCv(NNUM`FJJrZRg=kfa;9K!^$F^~H{~iC2KEFlbf9v{Z zbP#}YZufw5!T}smZVm^*h2Z~+x!$yVvhgThJ<_$cv=JqYK`3yJ`a3j2>r%;(@3gzO zqRy}!*9b?hl)h-Q7(;`aaD+0o)x0V&?RD5?_G^qR`RT_vQD!Ygxg2MExcv-@@jI;> z!s5In0QNXtmIduJ6^r9VpamvXs_!Kes(22*4nGBMuzWo=WN9m@I`i;V3XOg7o2%I- z%*Qe!cQn4B>{Tl?>E&dhmA2x-coVhi9}Y_D@zqJM`HrHJ(jR!dDKj;_z2?9t=3v$Q zK`i#$&y+Hc>TafLdtb>uGH3N%Fh-ZEhU73cJvbfZ4Tvd;f$w2LL3q1xZdE$%BOT*6qVX-Ps?50NFOov30vA1Vm+4)j}fq4 z==Bdz_Kg7Bo>r!M336$O!-w_zYbE(Y#@Id0GtfJg{K# zxwse8JAuVm>{rN%xS0?Yibr`W7&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C9@X%hPxBooAiBG$7x=De=UI4^+E*aP}YbME|GfKdOeXb^8z zr+E)Wk!g~{IX_v>xxq0t_~MDculeCm`hF=^%~N~mc~5#G-TW27PBv`KgsFz%k;Md- z(kePr(8zv%Lr96U1n!7)4Q&w*<(Vkg$*~vm(NVM zO7!Uaj8=#_z9U@q=^7u3d`cE?6qADqv|PXlQ9f0Ey%VLpDO}1JyEIqQ!%!1bdo3x> zi}(achR4p28NT=No`B8BUllj`_AFc3)0~?Xr7V?%s7zp!%mxmG-0}=QZ5i95Ooqhz zi6{w;L`c0)oHV+Wp{uqg<78dq@#38UaL~UjO5X2ncd}+q+B-MxH+c_hDvpZ>iJboj zcrbNa{ER=u_m$eIJ~7EJr_or_KWuGmZ*K9if7sFz9<7y(G0_9mDjVrFse=+yLq0e-u=d6+9=GlKEA$^F+1|9^NPTLb?A^6Y5g literal 0 HcmV?d00001 diff --git a/index.css b/index.css index 16790e74..18041288 100644 --- a/index.css +++ b/index.css @@ -206,6 +206,7 @@ h1 { font-size: 3rem; text-transform: uppercase; animation: glow 1.5s infinite alternate; + text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00; } @keyframes glow { diff --git a/index.html b/index.html index 5106b754..a2d98740 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,59 @@ +

Moon Gaming

@@ -38,32 +91,6 @@ return null; } - // Apply dark or light mode based on cookie - function applyDarkMode(enabled) { - if (enabled) { - document.body.style.setProperty('--background-color', 'var(--background-color-dark)'); - document.body.style.setProperty('--text-color', 'var(--text-color-dark)'); - document.body.style.setProperty('--button-bg', 'var(--button-bg-dark)'); - document.body.style.setProperty('--button-hover-bg', 'var(--button-hover-bg-dark)'); - document.body.style.setProperty('--button-hover-text', 'var(--button-hover-text-dark)'); - } 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('--button-bg', 'var(--button-bg-light)'); - document.body.style.setProperty('--button-hover-bg', 'var(--button-hover-bg-light)'); - document.body.style.setProperty('--button-hover-text', 'var(--button-hover-text-light)'); - } - } - - // Ensure dark mode is the default - if (getCookie('darkMode') === null) { - setCookie('darkMode', 'true', 30); // Default to dark mode - } - - // Apply saved mode on load - const darkModeEnabled = getCookie('darkMode') === 'true'; - applyDarkMode(darkModeEnabled); - // Clock Functionality function updateClock() { const now = new Date(); diff --git a/setting.html b/setting.html index b1724218..eb2006b5 100644 --- a/setting.html +++ b/setting.html @@ -137,10 +137,10 @@ return null; } - // Dark Mode Toggle + // Remove the toggle button from other pages const toggleDarkModeButton = document.getElementById('toggleDarkMode'); - const darkModeEnabled = getCookie('darkMode') === 'true'; + // Ensure this button is the only one controlling dark mode function applyDarkMode(enabled) { if (enabled) { document.body.style.setProperty('--background-color', '#121212'); @@ -162,6 +162,7 @@ }); // Apply saved dark mode preference on load + const darkModeEnabled = getCookie('darkMode') === 'true'; applyDarkMode(darkModeEnabled); // Clear Cookies Button From 5a14988abdc8082e63ef809cdb98bb3519ad4509 Mon Sep 17 00:00:00 2001 From: Robert <152218269+PenguinRobert1@users.noreply.github.com> Date: Tue, 8 Apr 2025 14:30:30 +0000 Subject: [PATCH 2/5] judes a monkey --- cal.html | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ index.css | 19 +++++++++++++++++- index.html | 3 ++- 3 files changed, 77 insertions(+), 2 deletions(-) diff --git a/cal.html b/cal.html index aadddfb0..9124e64f 100644 --- a/cal.html +++ b/cal.html @@ -130,6 +130,20 @@ .event-details .save-button:hover { background: #45a049; } + .event-details #close-details { + background: #f44336; + color: white; + border: none; + padding: 10px; + border-radius: 5px; + cursor: pointer; + font-size: 1em; + margin-top: 10px; + transition: background 0.3s; + } + .event-details #close-details:hover { + background: #d32f2f; + } @@ -182,6 +196,39 @@ '2025-05-04': 'Gay Day' }; + function setCookie(name, value, days) { + const date = new Date(); + date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); + const expires = `expires=${date.toUTCString()}`; + document.cookie = `${name}=${value};${expires};path=/`; + } + + function getCookie(name) { + const nameEQ = `${name}=`; + const cookies = document.cookie.split(';'); + for (let i = 0; i < cookies.length; i++) { + let cookie = cookies[i].trim(); + if (cookie.indexOf(nameEQ) === 0) { + return cookie.substring(nameEQ.length, cookie.length); + } + } + return null; + } + + function saveCurrentMonthYear(month, year) { + setCookie('calendarMonth', month, 30); + setCookie('calendarYear', year, 30); + } + + function loadSavedMonthYear() { + const savedMonth = getCookie('calendarMonth'); + const savedYear = getCookie('calendarYear'); + if (savedMonth !== null && savedYear !== null) { + currentMonth = parseInt(savedMonth, 10); + currentYear = parseInt(savedYear, 10); + } + } + function renderCalendar(month, year) { const firstDay = new Date(year, month, 1).getDay(); const daysInMonth = new Date(year, month + 1, 0).getDate(); @@ -212,6 +259,11 @@ const eventText = events[dateKey] || 'No event selected.'; eventDate.textContent = `Date: ${dateKey}`; eventDescription.textContent = eventText; + eventDescription.className = ''; // Clear previous class + if (eventText !== 'No event selected.') { + const sanitizedClassName = eventText.replace(/[^a-zA-Z0-9-]/g, '').replace(/\s+/g, '-').toLowerCase(); + eventDescription.classList.add(sanitizedClassName); // Set sanitized class name based on event name + } eventDetails.classList.add('active'); // Show sidebar } @@ -225,6 +277,7 @@ currentMonth = 11; currentYear--; } + saveCurrentMonthYear(currentMonth, currentYear); renderCalendar(currentMonth, currentYear); }); @@ -234,10 +287,14 @@ currentMonth = 0; currentYear++; } + saveCurrentMonthYear(currentMonth, currentYear); renderCalendar(currentMonth, currentYear); }); + loadSavedMonthYear(); renderCalendar(currentMonth, currentYear); +
hi mom
+

hi mom

\ No newline at end of file diff --git a/index.css b/index.css index 18041288..eb799c45 100644 --- a/index.css +++ b/index.css @@ -181,7 +181,7 @@ body { --button-hover-text-dark: #0d0d0d; --background-color-light: #ffffff; - --text-color-light: #333333; + --text-color-light: #000000; --button-bg-light: #f0f0f0; --button-hover-bg-light: #333333; --button-hover-text-light: #ffffff; @@ -245,4 +245,21 @@ h1 { .button:active { transform: scale(0.95); +} + +.button img, .cal img { + border-radius: 8px; +} + +.cal { + position: absolute; + top: 10px; + left: 10px; + width: 50px; + height: 50px; + display: block; +} + +.light-mode .cal img { + filter: invert(1); } \ No newline at end of file diff --git a/index.html b/index.html index a2d98740..1d588ef7 100644 --- a/index.html +++ b/index.html @@ -70,7 +70,7 @@ - + +Miles Is Gay \ No newline at end of file From b29bae8a0a099769fd466d18305a60a9a3a8750a Mon Sep 17 00:00:00 2001 From: mileswa1q22 Date: Tue, 8 Apr 2025 10:04:28 -0500 Subject: [PATCH 3/5] Update style.css From 1559ce97d38023a659329c0d237fbcca1c2dbcbd Mon Sep 17 00:00:00 2001 From: mileswa1q22 Date: Tue, 8 Apr 2025 10:07:35 -0500 Subject: [PATCH 4/5] Update index.css --- index.css | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/index.css b/index.css index eb799c45..e0627557 100644 --- a/index.css +++ b/index.css @@ -181,7 +181,7 @@ body { --button-hover-text-dark: #0d0d0d; --background-color-light: #ffffff; - --text-color-light: #000000; + --text-color-light: #333333; --button-bg-light: #f0f0f0; --button-hover-bg-light: #333333; --button-hover-text-light: #ffffff; @@ -206,7 +206,6 @@ h1 { font-size: 3rem; text-transform: uppercase; animation: glow 1.5s infinite alternate; - text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00; } @keyframes glow { @@ -246,20 +245,3 @@ h1 { .button:active { transform: scale(0.95); } - -.button img, .cal img { - border-radius: 8px; -} - -.cal { - position: absolute; - top: 10px; - left: 10px; - width: 50px; - height: 50px; - display: block; -} - -.light-mode .cal img { - filter: invert(1); -} \ No newline at end of file From d782d98a3f5422adb6b337738f30a37f23e38856 Mon Sep 17 00:00:00 2001 From: mileswa1q22 Date: Tue, 8 Apr 2025 10:11:33 -0500 Subject: [PATCH 5/5] Update index.html --- index.html | 56 ++---------------------------------------------------- 1 file changed, 2 insertions(+), 54 deletions(-) diff --git a/index.html b/index.html index 1d588ef7..6173f287 100644 --- a/index.html +++ b/index.html @@ -8,59 +8,7 @@ - +

Moon Gaming

@@ -152,4 +100,4 @@ -Miles Is Gay \ No newline at end of file +Miles Is Gay