Skip to content
The Chat Archive
gpt-4o-2024-08-06· OpenAI WildChat-4.8M (AI2)

Пожалуйста, сформируй полный HTML-код (ничего не пропускай), выделив его обратными…

  1. User

    Пожалуйста, сформируй полный HTML-код (ничего не пропускай), выделив его обратными тройными кавычками, для следующего запроса: "Установи максимальную высоту поля ввода в 200 px". В прошлой итерации код выглядел следующим образом: "

            document.querySelector('h1').innerText = textElements.title[language];
            document.querySelector('button').innerText = textElements.button[language];
        }
    </script>
    
  2. Assistant
    <!DOCTYPE html>
    <html lang="ru">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>AI Stories</title>
        <style>
            body, html {
                margin: 0;
                padding: 0;
                width: 100%;
                height: 100%;
                overflow: hidden;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                font-family: Arial, sans-serif;
                background: #f3f4f6;
            }
            #container {
                width: 90%;
                max-width: 600px;
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 15px;
                height: 90%;
                box-sizing: border-box;
            }
            h1 {
                margin: 0;
                font-size: 2.5em;
                color: #333;
            }
            #language-switch {
                position: absolute;
                top: 10px;
                right: 10px;
            }
            #language-switch select {
                padding: 5px;
                font-size: 1em;
            }
            textarea {
                width: 100%;
                flex-grow: 1;
                resize: none;
                padding: 10px;
                font-size: 1em;
                border-radius: 8px;
                border: 1px solid #ccc;
                box-sizing: border-box;
                min-height: 100px;
                max-height: 200px; /* Максимальная высота поля ввода изменена на 200 пикселей */
            }
            button {
                padding: 10px 20px;
                font-size: 1.2em;
                border-radius: 8px;
                border: none;
                background-color: #4CAF50;
                color: white;
                cursor: pointer;
                transition: background-color 0.3s ease;
            }
            button:hover {
                background-color: #45a049;
            }
        </style>
        <script>
            function switchLanguage() {
                const language = document.getElementById("language").value;
                const textElements = {
                    title: { ru: "AI Stories", en: "AI Stories" },
                    button: { ru: "Придумать историю", en: "Generate Story" }
                };
    
                document.querySelector('h1').innerText = textElements.title[language];
                document.querySelector('button').innerText = textElements.button[language];
            }
        </script>
    </head>
    <body>
        <div id="language-switch">
            <select id="language" onchange="switchLanguage()">
                <option value="ru" selected>RU</option>
                <option value="en">EN</option>
            </select>
        </div>
        <div id="container">
            <h1>AI Stories</h1>
            <textarea placeholder="Введите текст здесь..."></textarea>
            <button onclick="alert('История создана!')">Придумать историю</button>
        </div>
    </body>
    </html>