HTMLify

2hhqjdkrq4.html
Views: 15 | Author: Unknown
<!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()">&times;</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>

Comments