3
5
User Avatar
Foto
Vídeo ao vivo
Sentimento
Localização
User Avatar
Acabei de lançar um novo vídeo! Confira as novidades sobre games! 🎮 #INfoYGames
Vídeo Thumbnail
User Avatar
Acabei de encontrar minha alma gêmea pelo INfoY Dating! 💕 Obrigada pela plataforma maravilhosa que une pessoas com os mesmos interesses.
Post Image
User Avatar
Galera, alguém quer jogar um game no INfoY Games hoje à noite? Estou procurando parceiros para formar um time competitivo! 🎮 #GamersUnite
User Avatar
Qual plataforma de relacionamento do INfoY vocês preferem? Vote e deixe sua opinião nos comentários! ❤️ #INfoYDating #Relacionamentos
INfoY Dating (busca de parceiros) - 75% 125 votos
INfoY Groups (grupos de interesses) - 15% 25 votos
INfoY Events (eventos presenciais) - 10% 17 votos
User Avatar
Acabei de voltar do meu fim de semana na praia! Aqui estão algumas fotos incríveis que tirei. A integração com a câmera do INfoY deixou as cores ainda mais vivas! 📸 #INfoYFilters #FimDeSemana
Praia Mar Pôr do sol Areia
User Avatar
🚀 Evento INfoY Developers Summit 2023! 🚀

Venha participar do maior evento de tecnologia na plataforma INfoY. Palestras, workshops e networking com os melhores desenvolvedores do país.
Evento
INfoY Developers Summit 2023
15 de Dezembro, 2023 • 09:00 - 18:00
Centro de Convenções INfoY, São Paulo
357 pessoas confirmadas
Friend Avatar

Ana Beatriz

Oi! Tudo bem com você?
14:30
Tudo ótimo! E com você?
14:31
Estou bem também! Vamos jogar um game mais tarde?
14:32
Claro! Qual jogo você quer jogar?
14:33
Que tal Space Adventure? Está muito popular!
14:35

Space Adventure

document.addEventListener('DOMContentLoaded', function() { // Login functionality const loginModal = document.querySelector('.login-modal'); const loginBtn = document.getElementById('login-btn'); const passwordInput = document.getElementById('password'); const passwordToggle = document.getElementById('password-toggle'); // Toggle password visibility passwordToggle.addEventListener('click', function() { if (passwordInput.type === 'password') { passwordInput.type = 'text'; passwordToggle.classList.remove('fa-eye'); passwordToggle.classList.add('fa-eye-slash'); } else { passwordInput.type = 'password'; passwordToggle.classList.remove('fa-eye-slash'); passwordToggle.classList.add('fa-eye'); } }); // Add feedback when user clicks buttons const allButtons = document.querySelectorAll('button, .post-action, .menu-item, .social-btn, .friend-item, .game-card'); allButtons.forEach(button => { button.addEventListener('click', function() { this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = ''; }, 100); }); }); // Simulate login loginBtn.addEventListener('click', function() { const emailInput = document.getElementById('email'); const passwordInput = document.getElementById('password'); if (!emailInput.value) { emailInput.style.borderColor = 'var(--danger-color)'; return; } if (!passwordInput.value) { passwordInput.style.borderColor = 'var(--danger-color)'; return; } // Simular o carregamento loginBtn.innerHTML = ''; loginBtn.disabled = true; setTimeout(() => { loginModal.style.display = 'none'; loginBtn.innerHTML = 'Entrar'; loginBtn.disabled = false; }, 1000); }); // Chat functionality const chatBox = document.getElementById('chat-box'); const chatOpenButtons = document.querySelectorAll('.chat-open'); const chatCloseBtn = document.getElementById('chat-close'); const chatUserName = document.getElementById('chat-user-name'); chatOpenButtons.forEach(button => { button.addEventListener('click', function() { const userName = this.getAttribute('data-name'); chatUserName.textContent = userName; chatBox.style.display = 'block'; }); }); chatCloseBtn.addEventListener('click', function() { chatBox.style.display = 'none'; }); // Game functionality const gameModal = document.getElementById('game-modal'); const gameOpenButtons = document.querySelectorAll('.game-open'); const gameModalClose = document.querySelector('.game-modal-close'); const gameTitle = document.getElementById('game-title'); gameOpenButtons.forEach(button => { button.addEventListener('click', function() { const title = this.querySelector('.game-title').textContent; gameTitle.textContent = title; gameModal.style.display = 'flex'; }); }); gameModalClose.addEventListener('click', function() { gameModal.style.display = 'none'; }); // Video modal functionality const videoModal = document.getElementById('video-modal'); const videoPlayButtons = document.querySelectorAll('.video-play-btn'); const videoClose = document.querySelector('.video-close'); const videoPlayer = document.getElementById('video-player'); videoPlayButtons.forEach(button => { button.addEventListener('click', function() { videoModal.style.display = 'flex'; // Try to start playing the video automatically try { videoPlayer.play().catch(e => console.log('Auto-play prevented:', e)); } catch (e) { console.log('Video play error:', e); } }); }); videoClose.addEventListener('click', function() { videoModal.style.display = 'none'; // Pause the video when closing the modal try { videoPlayer.pause(); videoPlayer.currentTime = 0; } catch (e) { console.log('Video pause error:', e); } }); // Implementação do modo escuro const darkModeToggle = document.getElementById('dark-mode-toggle'); const themeIcon = document.querySelector('#theme-toggle i'); // Verificar preferência salva if (localStorage.getItem('darkMode') === 'enabled') { document.body.classList.add('dark-theme'); darkModeToggle.checked = true; themeIcon.classList.remove('fa-moon'); themeIcon.classList.add('fa-sun'); } darkModeToggle.addEventListener('change', function() { if (this.checked) { document.body.classList.add('dark-theme'); localStorage.setItem('darkMode', 'enabled'); themeIcon.classList.remove('fa-moon'); themeIcon.classList.add('fa-sun'); } else { document.body.classList.remove('dark-theme'); localStorage.setItem('darkMode', 'disabled'); themeIcon.classList.remove('fa-sun'); themeIcon.classList.add('fa-moon'); } }); // Detecção de preferência do sistema const prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)'); if (prefersDarkScheme.matches && !localStorage.getItem('darkMode')) { document.body.classList.add('dark-theme'); darkModeToggle.checked = true; themeIcon.classList.remove('fa-moon'); themeIcon.classList.add('fa-sun'); } // Simple Space Game const canvas = document.getElementById('game-canvas'); const ctx = canvas.getContext('2d'); const gameStartBtn = document.getElementById('game-start'); const gamePauseBtn = document.getElementById('game-pause'); let gameRunning = false; let gameScore = 0; let enemies = []; let lastEnemySpawn = 0; let enemySpawnInterval = 2000; // ms let ship = { x: canvas.width / 2, y: canvas.height - 50, width: 40, height: 40, speed: 5 }; let stars = []; for (let i = 0; i < 100; i++) { stars.push({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, size: Math.random() * 3, speed: Math.random() * 3 + 1 }); } // Create enemy function function spawnEnemy() { if (!gameRunning) return; const now = Date.now(); if (now - lastEnemySpawn > enemySpawnInterval) { enemies.push({ x: Math.random() * (canvas.width - 30) + 15, y: -20, width: 30, height: 30, speed: 2 + Math.random() * 2 }); lastEnemySpawn = now; } } function drawGame() { // Clear canvas ctx.fillStyle = '#111'; ctx.fillRect(0, 0, canvas.width, canvas.height); // Draw stars ctx.fillStyle = 'white'; stars.forEach(star => { ctx.beginPath(); ctx.arc(star.x, star.y, star.size, 0, Math.PI * 2); ctx.fill(); if (gameRunning) { star.y += star.speed; if (star.y > canvas.height) { star.y = 0; star.x = Math.random() * canvas.width; } } }); // Draw ship ctx.fillStyle = '#4e54c8'; ctx.fillRect(ship.x - ship.width/2, ship.y - ship.height/2, ship.width, ship.height); // Ship details ctx.fillStyle = '#ff6b6b'; ctx.fillRect(ship.x - 5, ship.y - ship.height/2 - 10, 10, 10); // Draw enemies ctx.fillStyle = '#e74c3c'; enemies.forEach((enemy, index) => { if (gameRunning) { enemy.y += enemy.speed; // Remove enemies that are off screen if (enemy.y > canvas.height + 20) { enemies.splice(index, 1); } // Check collision with player if ( ship.x - ship.width/2 < enemy.x + enemy.width/2 && ship.x + ship.width/2 > enemy.x - enemy.width/2 && ship.y - ship.height/2 < enemy.y + enemy.height/2 && ship.y + ship.height/2 > enemy.y - enemy.height/2 ) { // Collision detected gameRunning = false; alert('Game Over! Score: ' + gameScore); } } // Draw enemy ctx.fillRect(enemy.x - enemy.width/2, enemy.y - enemy.height/2, enemy.width, enemy.height); }); // Draw score ctx.fillStyle = 'white'; ctx.font = '16px Arial'; ctx.fillText('Score: ' + gameScore, 10, 30); // Spawn enemies spawnEnemy(); // Increase score if (gameRunning) { gameScore += 1; } requestAnimationFrame(drawGame); } drawGame(); // Game controls gameStartBtn.addEventListener('click', function() { gameRunning = true; }); gamePauseBtn.addEventListener('click', function() { gameRunning = false; }); document.addEventListener('keydown', function(event) { if (!gameRunning) return; switch(event.key) { case 'ArrowLeft': if (ship.x > ship.width/2) ship.x -= ship.speed; break; case 'ArrowRight': if (ship.x < canvas.width - ship.width/2) ship.x += ship.speed; break; } }); // Adicionar interatividade aos botões de like, comentário e compartilhamento const likeBtns = document.querySelectorAll('.post-action:nth-child(1)'); const commentBtns = document.querySelectorAll('.post-action:nth-child(2)'); const shareBtns = document.querySelectorAll('.post-action:nth-child(3)'); // Implementar funcionalidade de like likeBtns.forEach(btn => { btn.addEventListener('click', function() { const icon = this.querySelector('i'); if (icon.classList.contains('far')) { icon.classList.remove('far'); icon.classList.add('fas'); icon.style.color = 'var(--accent-color)'; // Atualizar contador de likes (encontrar o elemento stats mais próximo) const postElement = this.closest('.post'); const statsElement = postElement.querySelector('.post-stats div:first-child'); if (statsElement) { let statsText = statsElement.textContent; let likesCount = parseInt(statsText.split(' ')[0]) + 1; statsElement.textContent = statsText.replace(/^\d+/, likesCount); } } else { icon.classList.remove('fas'); icon.classList.add('far'); icon.style.color = ''; // Atualizar contador de likes (reduzir) const postElement = this.closest('.post'); const statsElement = postElement.querySelector('.post-stats div:first-child'); if (statsElement) { let statsText = statsElement.textContent; let likesCount = parseInt(statsText.split(' ')[0]) - 1; statsElement.textContent = statsText.replace(/^\d+/, likesCount); } } }); }); // Implementar funcionalidade de comentário commentBtns.forEach(btn => { btn.addEventListener('click', function() { const post = this.closest('.post'); // Verificar se já existe um campo de comentário let commentField = post.querySelector('.comment-field'); if (!commentField) { // Criar campo de comentário commentField = document.createElement('div'); commentField.className = 'comment-field'; commentField.innerHTML = `
User
`; // Inserir após o footer do post post.appendChild(commentField); // Focar no campo de texto commentField.querySelector('input').focus(); } else { // Se já existe, apenas foca nele commentField.querySelector('input').focus(); } }); }); // Implementar funcionalidade de compartilhamento shareBtns.forEach(btn => { btn.addEventListener('click', function() { // Criar uma tooltip de compartilhamento let tooltip = document.createElement('div'); tooltip.className = 'share-tooltip'; tooltip.style.cssText = ` position: absolute; background-color: white; box-shadow: 0 2px 10px rgba(0,0,0,0.2); border-radius: 8px; padding: 10px; z-index: 100; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 10px; display: flex; gap: 15px; `; tooltip.innerHTML = ` `; // Verificar se já existe um tooltip const existingTooltip = document.querySelector('.share-tooltip'); if (existingTooltip) { existingTooltip.remove(); } // Posicionar e mostrar o tooltip this.style.position = 'relative'; this.appendChild(tooltip); // Remover o tooltip após alguns segundos setTimeout(() => { tooltip.remove(); }, 5000); // Atualizar contador de compartilhamentos const postElement = this.closest('.post'); const statsElement = postElement.querySelector('.post-stats div:last-child'); if (statsElement) { let statsText = statsElement.textContent; let shareCount = parseInt(statsText.split(' ')[0]) + 1; statsElement.textContent = statsText.replace(/^\d+/, shareCount); } }); }); // Implementar modal de cadastro const signupLink = document.getElementById('signup-link'); const signupModal = document.getElementById('signup-modal'); const modalCloseBtns = document.querySelectorAll('.modal-close, .modal-close-btn'); signupLink.addEventListener('click', function(e) { e.preventDefault(); signupModal.style.display = 'flex'; }); modalCloseBtns.forEach(btn => { btn.addEventListener('click', function() { const modal = this.closest('.modal'); if (modal) { modal.style.display = 'none'; } }); }); // Implementar funcionalidade de toggle de password no cadastro const signupPasswordInput = document.getElementById('signup-password'); const signupPasswordToggle = document.getElementById('signup-password-toggle'); signupPasswordToggle.addEventListener('click', function() { if (signupPasswordInput.type === 'password') { signupPasswordInput.type = 'text'; signupPasswordToggle.classList.remove('fa-eye'); signupPasswordToggle.classList.add('fa-eye-slash'); } else { signupPasswordInput.type = 'password'; signupPasswordToggle.classList.remove('fa-eye-slash'); signupPasswordToggle.classList.add('fa-eye'); } }); // Implementar seleção de tags de interesse const interestTags = document.querySelectorAll('.interest-tag'); interestTags.forEach(tag => { tag.addEventListener('click', function() { const isSelected = this.classList.contains('selected'); if (isSelected) { this.classList.remove('selected'); this.style.backgroundColor = '#f0f2f5'; this.style.color = '#333'; } else { this.classList.add('selected'); this.style.backgroundColor = 'var(--primary-color)'; this.style.color = 'white'; } }); }); // Implementar funcionalidade de cadastro const signupForm = document.getElementById('signup-form'); signupForm.addEventListener('submit', function(e) { e.preventDefault(); // Obter os campos do formulário const nameInput = document.getElementById('signup-name'); const emailInput = document.getElementById('signup-email'); const passwordInput = document.getElementById('signup-password'); const dateInput = document.getElementById('signup-date'); const genderInputs = document.querySelectorAll('input[name="gender"]'); const termsCheckbox = document.getElementById('terms'); // Validar os campos let isValid = true; let selectedGender = false; // Validar nome if (!nameInput.value.trim()) { nameInput.style.borderColor = 'var(--danger-color)'; isValid = false; } else { nameInput.style.borderColor = ''; } // Validar email const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailInput.value.trim() || !emailRegex.test(emailInput.value)) { emailInput.style.borderColor = 'var(--danger-color)'; isValid = false; } else { emailInput.style.borderColor = ''; } // Validar senha if (!passwordInput.value || passwordInput.value.length < 6) { passwordInput.style.borderColor = 'var(--danger-color)'; isValid = false; } else { passwordInput.style.borderColor = ''; } // Validar data de nascimento if (!dateInput.value) { dateInput.style.borderColor = 'var(--danger-color)'; isValid = false; } else { dateInput.style.borderColor = ''; } // Validar gênero genderInputs.forEach(input => { if (input.checked) { selectedGender = true; } }); if (!selectedGender) { // Destacar as opções de gênero se nenhuma foi selecionada document.querySelector('.form-group:nth-of-type(5)').style.color = 'var(--danger-color)'; isValid = false; } else { document.querySelector('.form-group:nth-of-type(5)').style.color = ''; } // Validar interesses const selectedInterests = document.querySelectorAll('.interest-tag.selected'); if (selectedInterests.length < 3) { document.querySelector('.form-group:nth-of-type(6)').style.color = 'var(--danger-color)'; isValid = false; } else { document.querySelector('.form-group:nth-of-type(6)').style.color = ''; } // Validar termos if (!termsCheckbox.checked) { termsCheckbox.parentElement.style.color = 'var(--danger-color)'; isValid = false; } else { termsCheckbox.parentElement.style.color = ''; } // Se o formulário for válido, simular o cadastro if (isValid) { const submitBtn = signupForm.querySelector('.btn-primary'); const originalText = submitBtn.textContent; // Mostrar indicador de carregamento submitBtn.innerHTML = ' Processando...'; submitBtn.disabled = true; // Simular processamento de cadastro setTimeout(() => { // Resetar o formulário signupForm.reset(); // Resetar as tags de interesse selectedInterests.forEach(tag => { tag.classList.remove('selected'); tag.style.backgroundColor = '#f0f2f5'; tag.style.color = '#333'; }); // Fechar o modal de cadastro signupModal.style.display = 'none'; // Fechar o modal de login loginModal.style.display = 'none'; // Mostrar notificação de sucesso alert('Cadastro realizado com sucesso! Bem-vindo ao INfoY!'); // Restaurar o botão submitBtn.innerHTML = originalText; submitBtn.disabled = false; }, 1500); } }); // Implementar modal de relacionamentos const datingMenu = document.getElementById('dating-menu'); const datingModal = document.getElementById('dating-modal'); datingMenu.addEventListener('click', function() { datingModal.style.display = 'flex'; }); // Implementar modal de vídeos const videosMenu = document.getElementById('videos-menu'); const videosModal = document.getElementById('videos-modal'); videosMenu.addEventListener('click', function() { videosModal.style.display = 'flex'; }); // Implementar navegação por tabs no modal de vídeos const videoTabs = document.querySelectorAll('.video-tab'); const videoContents = document.querySelectorAll('.tab-content'); videoTabs.forEach(tab => { tab.addEventListener('click', function() { const tabId = this.getAttribute('data-tab'); // Remover classe active de todas as tabs videoTabs.forEach(t => t.classList.remove('active')); videoTabs.forEach(t => t.style.backgroundColor = '#f0f2f5'); videoTabs.forEach(t => t.style.color = '#333'); // Adicionar classe active na tab clicada this.classList.add('active'); this.style.backgroundColor = 'var(--primary-color)'; this.style.color = 'white'; // Esconder todos os conteúdos videoContents.forEach(c => c.style.display = 'none'); // Mostrar o conteúdo relacionado à tab document.getElementById(`${tabId}-content`).style.display = 'block'; }); }); // Implementar modal de podcasts const podcastMenu = document.getElementById('podcast-menu'); const podcastModal = document.getElementById('podcast-modal'); const createPodcastBtn = document.getElementById('create-podcast-btn'); const createPodcastRoomBtn = document.getElementById('create-podcast-room-btn'); const createPodcastRoomModal = document.getElementById('create-podcast-room-modal'); const livePodcastRoomModal = document.getElementById('live-podcast-room-modal'); podcastMenu.addEventListener('click', function() { podcastModal.style.display = 'flex'; }); createPodcastBtn?.addEventListener('click', function() { podcastModal.style.display = 'none'; createPodcastRoomModal.style.display = 'flex'; }); createPodcastRoomBtn?.addEventListener('click', function() { podcastModal.style.display = 'none'; createPodcastRoomModal.style.display = 'flex'; }); // Controle da exibição de opções de agendamento const scheduleTypeRadios = document.querySelectorAll('input[name="schedule-type"]'); const scheduleOptions = document.getElementById('schedule-options'); scheduleTypeRadios.forEach(radio => { radio.addEventListener('change', function() { if (this.value === 'later') { scheduleOptions.style.display = 'block'; } else { scheduleOptions.style.display = 'none'; } }); }); // Simular entrada em sala de podcast ao vivo const enterRoomBtns = document.querySelectorAll('.btn-primary:not(#create-podcast-btn):not(#create-podcast-room-btn)'); enterRoomBtns.forEach(btn => { if (btn.textContent.includes('Entrar na Sala')) { btn.addEventListener('click', function() { podcastModal.style.display = 'none'; livePodcastRoomModal.style.display = 'flex'; }); } }); });