From 1a7eb0868ee7455865dc28bf40af92d8ff5b3874 Mon Sep 17 00:00:00 2001 From: Akshit Bansal <155195875+akshitbansal2005@users.noreply.github.com> Date: Tue, 29 Oct 2024 21:26:56 +0530 Subject: [PATCH 1/3] Update emojiland.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Strengths - **Clear Structure**: The HTML and CSS are well-organized, making the code readable and maintainable. - **Interactive Features**: Emojis are generated at random positions, and audio plays on hover, enhancing user engagement. - **Dynamic Animation**: The welcome message animates character-by-character, creating an appealing introduction. - **Memory Management**: The use of timeouts helps prevent memory leaks by clearing out emojis after a set duration. ### Areas for Improvement 1. **Audio Preloading**: Currently, audio files aren’t preloaded, which could cause delays in playback. 2. **Accessibility**: The implementation lacks ARIA roles and labels, which would improve accessibility for screen readers. 3. **Mobile Responsiveness**: The hover effects may not work well on touch devices; adapting interactions for mobile users could enhance usability. 4. **Configuration Management**: Hardcoding emojis and audio could be improved by using a configuration object or JSON for easier updates. --- emojiland.html | 68 +++++++++++++------------------------------------- 1 file changed, 17 insertions(+), 51 deletions(-) diff --git a/emojiland.html b/emojiland.html index aec5a3d..d5731a9 100644 --- a/emojiland.html +++ b/emojiland.html @@ -18,12 +18,6 @@ position: relative; } - canvas { - display: block; - width: 100%; - height: 100%; - } - .emoji { position: absolute; font-size: 30px; @@ -35,12 +29,6 @@ transform: scale(5) !important; } - @keyframes randomChangeSize { - 0% { font-size: 20px; } - 50% { font-size: 70px; } - 100% { font-size: 20px; } - } - @keyframes glitchBackground { 0% { background-color: black; } 33% { background-color: lightgrey; } @@ -82,11 +70,6 @@ 100% { transform: rotate(0deg) scale(1); opacity: 1; } } - @keyframes alignText { - 0% { transform: translateY(50px); opacity: 0; } - 100% { transform: translateY(0); opacity: 1; } - } - .char { opacity: 0; animation: charEnter 2s ease forwards; @@ -94,7 +77,7 @@ } .char.show { - animation: charEnter 2s ease forwards, alignText 1s ease-in-out 1.5s forwards; + animation: charEnter 2s ease forwards; } @@ -125,9 +108,7 @@ -
- -
+
@@ -138,14 +119,9 @@ - \ No newline at end of file + From 307d0519051ead6cae58d3a6cccbc3ca7437ce22 Mon Sep 17 00:00:00 2001 From: Akshit Bansal <155195875+akshitbansal2005@users.noreply.github.com> Date: Sun, 3 Nov 2024 01:47:09 +0530 Subject: [PATCH 2/3] Update maze.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. **Purpose**: This HTML and JavaScript code creates a fun, interactive maze game with a twist. As you scroll down the page, a hidden maze game section appears. In this game, players navigate a maze with reversed controls (up is down, left is right, etc.). 2. **HTML Layout**: - The structure has a welcoming message at the top, a hidden section for the maze game, and a hint below that explains the reversed controls. - The actual maze is drawn on a canvas element, making it easy to render the grid and update visuals for player movement. 3. **CSS Styling**: - Basic styling for a clean, centered layout with responsive font sizes and a blinking effect for the hint. The canvas has a solid border to frame the maze. - There’s a β€œRestart” button that appears only after the player completes the maze, making it easy to play again. 4. **JavaScript Functionality**: - **Scroll Event**: The maze section stays hidden until it’s scrolled into view. When this happens, the game initializes and becomes playable. - **Maze Creation**: A 10x10 grid is randomly generated, with each cell either being a wall or an open path. The start and end points are always open. - **Drawing the Maze**: The grid is rendered on the canvas, with different colors for walls, open paths, and the player. - **Reverse Controls**: Movement is intentionally reversed to add a challenge: - Arrow up makes the player move down, arrow left moves them right, etc. - **Winning**: When the player reaches the bottom-right corner, a congratulatory alert pops up, and the β€œRestart” button becomes visible for another round. 5. **Overall Flow**: - Scroll to reveal β†’ Initialize maze β†’ Move with reversed keys β†’ Reach the end to win β†’ Option to restart --- maze.html | 182 +++++++++++++++++++++--------------------------------- 1 file changed, 69 insertions(+), 113 deletions(-) diff --git a/maze.html b/maze.html index 15e0eab..b482d83 100644 --- a/maze.html +++ b/maze.html @@ -1,96 +1,59 @@ - Reverse Scrolling Maze Game @@ -101,45 +64,37 @@

Scroll down to discover something fun...

-







- -
-

- -