HTMLify
2hhqjdkrq4.html
Views: 117 | Author: guest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Language Preference</title> <style> /* General body style */ body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: space-between; height: 100vh; margin: 0; background: linear-gradient(135deg, #4e7896, #006edc); /* Soft blue gradient */ color: white; } h1 { margin-bottom: 20px; font-size: 2.5em; color: #bfefff; /* Light blue text color */ } /* Miku GIF Logo */ .logo { margin-top: 20px; display: flex; justify-content: left; } .logo img { width: 150px; height: auto; border-radius: 10px; } button { padding: 12px 25px; font-size: 1.2em; cursor: pointer; border: none; border-radius: 10px; background-color: #00a2ff; /* Teal blue */ color: white; transition: all 0.3s ease; } button:hover { background-color: #00d0ff; /* Lighter teal on hover */ transform: scale(1.12); } /* Modal styles */ .modal { display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.7); /* Darker overlay */ } .modal-content { background-color: #f1faff; /* Light background */ margin: 10% auto; padding: 20px; border: 1px solid #00a2ff; border-radius: 15px; width: 80%; max-width: 900px; } span { color: #00a2ff; font-size: 1.5em; float: right; cursor: pointer; transition: color 0.3s; } span:hover { color: #ff7ebd; /* Miku pink */ } iframe { width: 100%; height: 400px; border-radius: 10px; } /* Footer styles */ footer { background-color: rgba(0, 0, 0, 0.2); width: 100%; text-align: center; padding: 10px 0; font-size: 1em; color: #00ffdd; } </style> </head> <body> <!-- Miku GIF logo --> <div class="logo"> <img src="https://media.giphy.com/media/LmNwrBhejkK9EFP504/giphy.gif" alt="Miku GIF"> </div> <h1>Which one is easier for you, English or Japanese?</h1> <table> <tr> <td><button onclick="playVideo('english')">English</button></td> <td> </td> <td> </td> <td> </td> <td><button onclick="playVideo('japanese')">Japanese</button></td> </tr> </table> <!-- Modal --> <div id="videoModal" class="modal"> <div class="modal-content"> <span onclick="closeModal()">×</span> <div id="videoContainer"></div> </div> </div> <!-- Footer --> <footer> Code by Amar with ChatGPT </footer> <script> function playVideo(language) { const videoContainer = document.getElementById('videoContainer'); videoContainer.innerHTML = ''; // Clear previous video let videoUrl; if (language === 'english') { videoUrl = 'https://www.youtube.com/embed/tohDycgc-H8?start=25&autoplay=1'; // English video starts at 25 seconds } else if (language === 'japanese') { videoUrl = 'https://www.youtube.com/embed/5qkTpJAhywg?start=26&autoplay=1'; // Japanese video starts at 26 seconds } // Create an iframe for the video const iframe = document.createElement('iframe'); iframe.src = videoUrl; iframe.frameBorder = '0'; iframe.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture'; iframe.allowFullscreen = true; videoContainer.appendChild(iframe); // Add the iframe to the container // Show the modal document.getElementById('videoModal').style.display = "block"; } function closeModal() { document.getElementById('videoModal').style.display = "none"; // Hide the modal document.getElementById('videoContainer').innerHTML = ''; // Clear the video when closing } // Close the modal when clicking outside of it window.onclick = function(event) { const modal = document.getElementById('videoModal'); if (event.target === modal) { closeModal(); } } </script> </body> </html> |