Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Привет! - Greeting App</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary-color: #6c5ce7; | |
| --secondary-color: #a29bfe; | |
| --accent-color: #fd79a8; | |
| --dark-color: #2d3436; | |
| --light-color: #f5f6fa; | |
| --shadow: 0 10px 20px rgba(0, 0, 0, 0.1); | |
| --transition: all 0.3s ease; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| } | |
| body { | |
| background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| color: var(--dark-color); | |
| line-height: 1.6; | |
| } | |
| header { | |
| width: 100%; | |
| padding: 1.5rem; | |
| background-color: white; | |
| box-shadow: var(--shadow); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| } | |
| .logo { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| color: var(--primary-color); | |
| text-decoration: none; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| .logo i { | |
| color: var(--accent-color); | |
| } | |
| .header-right { | |
| display: flex; | |
| align-items: center; | |
| gap: 1.5rem; | |
| } | |
| .anycoder-link { | |
| color: var(--dark-color); | |
| text-decoration: none; | |
| font-size: 0.9rem; | |
| transition: var(--transition); | |
| } | |
| .anycoder-link:hover { | |
| color: var(--primary-color); | |
| } | |
| .theme-toggle { | |
| background: none; | |
| border: none; | |
| cursor: pointer; | |
| font-size: 1.2rem; | |
| color: var(--dark-color); | |
| transition: var(--transition); | |
| } | |
| .theme-toggle:hover { | |
| color: var(--primary-color); | |
| } | |
| main { | |
| flex: 1; | |
| width: 90%; | |
| max-width: 1200px; | |
| padding: 2rem 0; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| text-align: center; | |
| } | |
| .greeting-container { | |
| background-color: white; | |
| border-radius: 20px; | |
| padding: 3rem; | |
| box-shadow: var(--shadow); | |
| margin-bottom: 2rem; | |
| width: 100%; | |
| max-width: 600px; | |
| transition: var(--transition); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .greeting-container::before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 10px; | |
| background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); | |
| } | |
| .greeting-text { | |
| font-size: 3.5rem; | |
| font-weight: 800; | |
| margin-bottom: 1rem; | |
| background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| } | |
| .subtext { | |
| font-size: 1.2rem; | |
| color: var(--dark-color); | |
| margin-bottom: 2rem; | |
| opacity: 0.8; | |
| } | |
| .language-info { | |
| background-color: rgba(108, 92, 231, 0.1); | |
| border-left: 4px solid var(--primary-color); | |
| padding: 1rem; | |
| border-radius: 8px; | |
| margin: 1.5rem 0; | |
| text-align: left; | |
| width: 100%; | |
| } | |
| .language-info h3 { | |
| color: var(--primary-color); | |
| margin-bottom: 0.5rem; | |
| } | |
| .btn { | |
| display: inline-block; | |
| background-color: var(--primary-color); | |
| color: white; | |
| padding: 0.8rem 1.5rem; | |
| border: none; | |
| border-radius: 50px; | |
| font-size: 1rem; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| text-decoration: none; | |
| margin: 0.5rem; | |
| } | |
| .btn:hover { | |
| transform: translateY(-3px); | |
| box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3); | |
| } | |
| .btn-secondary { | |
| background-color: transparent; | |
| color: var(--primary-color); | |
| border: 2px solid var(--primary-color); | |
| } | |
| .btn-secondary:hover { | |
| background-color: var(--primary-color); | |
| color: white; | |
| } | |
| .features { | |
| display: flex; | |
| justify-content: center; | |
| flex-wrap: wrap; | |
| gap: 1.5rem; | |
| margin: 2rem 0; | |
| width: 100%; | |
| } | |
| .feature-card { | |
| background-color: white; | |
| border-radius: 15px; | |
| padding: 1.5rem; | |
| width: 200px; | |
| box-shadow: var(--shadow); | |
| transition: var(--transition); | |
| text-align: center; | |
| } | |
| .feature-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); | |
| } | |
| .feature-card i { | |
| font-size: 2.5rem; | |
| color: var(--accent-color); | |
| margin-bottom: 1rem; | |
| } | |
| .feature-card h3 { | |
| margin-bottom: 0.5rem; | |
| color: var(--primary-color); | |
| } | |
| .interactive-section { | |
| width: 100%; | |
| max-width: 600px; | |
| margin-top: 2rem; | |
| } | |
| .input-group { | |
| display: flex; | |
| margin-bottom: 1rem; | |
| } | |
| .input-group input { | |
| flex: 1; | |
| padding: 0.8rem; | |
| border: 2px solid #ddd; | |
| border-radius: 8px 0 0 8px; | |
| font-size: 1rem; | |
| outline: none; | |
| transition: var(--transition); | |
| } | |
| .input-group input:focus { | |
| border-color: var(--primary-color); | |
| } | |
| .input-group button { | |
| padding: 0.8rem 1.2rem; | |
| background-color: var(--primary-color); | |
| color: white; | |
| border: none; | |
| border-radius: 0 8px 8px 0; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .input-group button:hover { | |
| background-color: #5649c0; | |
| } | |
| .response { | |
| margin-top: 1rem; | |
| padding: 1rem; | |
| border-radius: 8px; | |
| background-color: rgba(108, 92, 231, 0.05); | |
| border-left: 4px solid var(--primary-color); | |
| text-align: left; | |
| min-height: 50px; | |
| display: none; | |
| } | |
| footer { | |
| width: 100%; | |
| padding: 1.5rem; | |
| background-color: white; | |
| text-align: center; | |
| box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.05); | |
| margin-top: auto; | |
| } | |
| .social-links { | |
| display: flex; | |
| justify-content: center; | |
| gap: 1.5rem; | |
| margin-bottom: 1rem; | |
| } | |
| .social-links a { | |
| color: var(--dark-color); | |
| font-size: 1.5rem; | |
| transition: var(--transition); | |
| } | |
| .social-links a:hover { | |
| color: var(--primary-color); | |
| } | |
| .copyright { | |
| color: #7f8c8d; | |
| font-size: 0.9rem; | |
| } | |
| @media (max-width: 768px) { | |
| .header-right { | |
| gap: 1rem; | |
| } | |
| .greeting-text { | |
| font-size: 2.5rem; | |
| } | |
| .features { | |
| flex-direction: column; | |
| align-items: center; | |
| } | |
| .feature-card { | |
| width: 100%; | |
| max-width: 300px; | |
| } | |
| } | |
| @media (max-width: 480px) { | |
| header { | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| .header-right { | |
| width: 100%; | |
| justify-content: space-between; | |
| } | |
| .greeting-text { | |
| font-size: 2rem; | |
| } | |
| .greeting-container { | |
| padding: 2rem 1.5rem; | |
| } | |
| } | |
| .hidden { | |
| display: none; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <header> | |
| <a href="#" class="logo"> | |
| <i class="fas fa-globe"></i> | |
| <span>Привет App</span> | |
| </a> | |
| <div class="header-right"> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link" target="_blank">Built with anycoder</a> | |
| <button class="theme-toggle" id="themeToggle"> | |
| <i class="fas fa-moon"></i> | |
| </button> | |
| </div> | |
| </header> | |
| <main> | |
| <div class="greeting-container"> | |
| <h1 class="greeting-text">Привет!</h1> | |
| <p class="subtext">Welcome to our greeting application. Let's explore the Russian language together!</p> | |
| <div class="language-info"> | |
| <h3>About Russian</h3> | |
| <p>"Привет" means "Hello" in Russian. Russian is the most widely spoken Slavic language and is one of the most spoken native languages in Europe.</p> | |
| </div> | |
| <div class="btn-group"> | |
| <button class="btn" id="learnMoreBtn">Learn More</button> | |
| <button class="btn btn-secondary" id="tryBtn">Try It Out</button> | |
| </div> | |
| </div> | |
| <div class="features"> | |
| <div class="feature-card"> | |
| <i class="fas fa-language"></i> | |
| <h3>Language Learning</h3> | |
| <p>Discover basic Russian phrases and greetings with our interactive tools.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <i class="fas fa-volume-up"></i> | |
| <h3>Pronunciation</h3> | |
| <p>Listen to native speakers and practice your Russian pronunciation.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <i class="fas fa-book"></i> | |
| <h3>Cultural Insights</h3> | |
| <p>Learn about Russian culture and traditions through language.</p> | |
| </div> | |
| </div> | |
| <div class="interactive-section hidden" id="interactiveSection"> | |
| <h2>Try Russian Greetings</h2> | |
| <p>Type an English greeting and we'll translate it to Russian for you!</p> | |
| <div class="input-group"> | |
| <input type="text" id="greetingInput" placeholder="Type a greeting in English..."> | |
| <button id="translateBtn"><i class="fas fa-exchange-alt"></i></button> | |
| </div> | |
| <div class="response" id="translationResponse"> | |
| <!-- Translation will appear here --> | |
| </div> | |
| <div class="common-greetings"> | |
| <h3>Common Russian Greetings:</h3> | |
| <div class="btn-group"> | |
| <button class="btn btn-secondary" onclick="showGreeting('Здравствуйте')">Formal Hello</button> | |
| <button class="btn btn-secondary" onclick="showGreeting('Привет')">Casual Hello</button> | |
| <button class="btn btn-secondary" onclick="showGreeting('Доброе утро')">Good Morning</button> | |
| <button class="btn btn-secondary" onclick="showGreeting('Добрый вечер')">Good Evening</button> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <footer> | |
| <div class="social-links"> | |
| <a href="#" title="Facebook"><i class="fab fa-facebook"></i></a> | |
| <a href="#" title="Twitter"><i class="fab fa-twitter"></i></a> | |
| <a href="#" title="Instagram"><i class="fab fa-instagram"></i></a> | |
| <a href="#" title="GitHub"><i class="fab fa-github"></i></a> | |
| </div> | |
| <p class="copyright">© 2023 Привет App. All rights reserved.</p> | |
| </footer> | |
| <script> | |
| // Theme toggle functionality | |
| const themeToggle = document.getElementById('themeToggle'); | |
| const body = document.body; | |
| themeToggle.addEventListener('click', () => { | |
| body.classList.toggle('dark-mode'); | |
| if (body.classList.contains('dark-mode')) { | |
| themeToggle.innerHTML = '<i class="fas fa-sun"></i>'; | |
| document.documentElement.style.setProperty('--primary-color', '#a29bfe'); | |
| document.documentElement.style.setProperty('--dark-color', '#f5f6fa'); | |
| document.documentElement.style.setProperty('--light-color', '#2d3436'); | |
| body.style.background = 'linear-gradient(135deg, #2d3436 0%, #1a1a1a 100%)'; | |
| } else { | |
| themeToggle.innerHTML = '<i class="fas fa-moon"></i>'; | |
| document.documentElement.style.setProperty('--primary-color', '#6c5ce7'); | |
| document.documentElement.style.setProperty('--dark-color', '#2d3436'); | |
| document.documentElement.style.setProperty('--light-color', '#f5f6fa'); | |
| body.style.background = 'linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%)'; | |
| } | |
| }); | |
| // Button interactions | |
| const learnMoreBtn = document.getElementById('learnMoreBtn'); | |
| const tryBtn = document.getElementById('tryBtn'); | |
| const interactiveSection = document.getElementById('interactiveSection'); | |
| tryBtn.addEventListener('click', () => { | |
| interactiveSection.classList.remove('hidden'); | |
| interactiveSection.scrollIntoView({ behavior: 'smooth' }); | |
| }); | |
| learnMoreBtn.addEventListener('click', () => { | |
| alert('Learn more about Russian language and culture coming soon!'); | |
| }); | |
| // Translation functionality | |
| const translateBtn = document.getElementById('translateBtn'); | |
| const greetingInput = document.getElementById('greetingInput'); | |
| const translationResponse = document.getElementById('translationResponse'); | |
| const greetingsMap = { | |
| 'hello': 'Привет', | |
| 'hi': 'Привет', | |
| 'good morning': 'Доброе утро', | |
| 'good afternoon': 'Добрый день', | |
| 'good evening': 'Добрый вечер', | |
| 'good night': 'Спокойной ночи', | |
| 'how are you': 'Как дела?', | |
| 'thank you': 'Спасибо', | |
| 'please': 'Пожалуйста', | |
| 'yes': 'Да', | |
| 'no': 'Нет', | |
| 'goodbye': 'До свидания', | |
| 'bye': 'Пока' | |
| }; | |
| translateBtn.addEventListener('click', () => { | |
| const input = greetingInput.value.trim().toLowerCase(); | |
| if (input) { | |
| const translation = greetingsMap[input] || "Translation not available (try common greetings)"; | |
| translationResponse.textContent = `${input} → ${translation}`; | |
| translationResponse.style.display = 'block'; | |
| } else { | |
| translationResponse.textContent = 'Please enter a greeting to translate'; | |
| translationResponse.style.display = 'block'; | |
| } | |
| }); | |
| // Common greetings buttons | |
| function showGreeting(greeting) { | |
| translationResponse.textContent = `Russian: ${greeting}`; | |
| translationResponse.style.display = 'block'; | |
| } | |
| // Add some animation on load | |
| window.addEventListener('load', () => { | |
| const greetingText = document.querySelector('.greeting-text'); | |
| greetingText.style.transform = 'scale(0.5)'; | |
| greetingText.style.opacity = '0'; | |
| setTimeout(() => { | |
| greetingText.style.transition = 'transform 0.5s ease, opacity 0.5s ease'; | |
| greetingText.style.transform = 'scale(1)'; | |
| greetingText.style.opacity = '1'; | |
| }, 100); | |
| }); | |
| </script> | |
| </body> | |
| </html> |