Neumorphism Buddy Finder - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Neumorphism Buddy Finder</title> <style> body { font-family: 'Arial', sans-serif; background: #e0e0e0; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .search-container { background: #e0e0e0; border-radius: 15px; box-shadow: 9px 9px 16px #bebebe, -9px -9px 16px #ffffff; padding: 30px; width: 350px; text-align: center; } .search-container h2 { margin: 0; font-size: 22px; color: #333; margin-bottom: 20px; } .search-container input[type="text"] { width: 90%; padding: 10px 15px; margin: 10px 0; border: none; border-radius: 25px; font-size: 16px; outline: none; box-shadow: inset 5px 5px 10px #bebebe, inset -5px -5px 10px #ffffff; background: #e0e0e0; color: #333; } .search-container button { padding: 10px 20px; border: none; background: #e0e0e0; color: #333; border-radius: 25px; cursor: pointer; font-size: 16px; box-shadow: 4px 4px 8px #bebebe, -4px -4px 8px #ffffff; } .search-container button:hover { box-shadow: inset 4px 4px 8px #bebebe, inset -4px -4px 8px #ffffff; } .results { margin-top: 20px; text-align: left; } .results .friend { display: flex; align-items: center; background: #e0e0e0; border-radius: 10px; padding: 10px; margin-bottom: 10px; box-shadow: 5px 5px 10px #bebebe, -5px -5px 10px #ffffff; transition: transform 0.3s; } .results .friend:hover { transform: translateY(-5px); } .results img { border-radius: 50%; width: 50px; height: 50px; margin-right: 15px; } .results .friend-info { flex: 1; } .results .friend-info h3 { margin: 0; font-size: 18px; color: #333; } .results .friend-info p { margin: 5px 0 0; color: #666; } .emoji { display: inline-block; margin-left: 10px; animation: emoji-bounce 1.5s infinite; } @keyframes emoji-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } .no-results { font-size: 16px; color: #999; margin-top: 20px; } .suggestions { background: #e0e0e0; border: 1px solid #bebebe; border-radius: 5px; box-shadow: 2px 2px 5px #bebebe, -2px -2px 5px #ffffff; position: absolute; width: calc(100% - 60px); z-index: 10; max-height: 150px; overflow-y: auto; display: none; left: 50%; width: 350px; transform: translateX(-50%); } .suggestions div { padding: 10px; cursor: pointer; transition: background 0.3s; color: #333; } .suggestions div:hover { background: #f1f1f1; } </style> </head> <body> <div class="search-container"> <h2>Neumorphism Buddy Finder <span class="emoji">🔍</span></h2> <input type="text" id="neumorphismSearch" placeholder="Type a name..." oninput="showSuggestions()"> <div class="suggestions" id="suggestions"></div> <button onclick="searchNeumorphism()">Search</button> <div class="results" id="results"></div> <div class="no-results" id="noResults" style="display: none;">No pals found <span class="emoji">😔</span></div> </div> <script> const pals = [ { name: 'Alice Johnson', avatar: 'https://via.placeholder.com/50' }, { name: 'Bob Smith', avatar: 'https://via.placeholder.com/50' }, { name: 'Charlie Brown', avatar: 'https://via.placeholder.com/50' }, { name: 'David Wilson', avatar: 'https://via.placeholder.com/50' }, { name: 'Emma Davis', avatar: 'https://via.placeholder.com/50' }, // Add more pals here ]; function showSuggestions() { const query = document.getElementById('neumorphismSearch').value.toLowerCase(); const suggestions = document.getElementById('suggestions'); suggestions.innerHTML = ''; if (query) { const filteredPals = pals.filter(pal => pal.name.toLowerCase().includes(query)); filteredPals.forEach(pal => { const suggestion = document.createElement('div'); suggestion.innerText = pal.name; suggestion.onclick = () => { document.getElementById('neumorphismSearch').value = pal.name; suggestions.style.display = 'none'; }; suggestions.appendChild(suggestion); }); suggestions.style.display = 'block'; } else { suggestions.style.display = 'none'; } } function searchNeumorphism() { const query = document.getElementById('neumorphismSearch').value.toLowerCase(); const results = document.getElementById('results'); const noResults = document.getElementById('noResults'); const suggestions = document.getElementById('suggestions'); results.innerHTML = ''; noResults.style.display = 'none'; suggestions.style.display = 'none'; const filteredPals = pals.filter(pal => pal.name.toLowerCase().includes(query)); if (filteredPals.length > 0) { filteredPals.forEach(pal => { const palElement = document.createElement('div'); palElement.classList.add('friend'); palElement.innerHTML = ` <img src="${pal.avatar}" alt="${pal.name}"> <div class="friend-info"> <h3>${pal.name}</h3> <p>Online now <span class="emoji">💬</span></p> </div> `; results.appendChild(palElement); }); } else { noResults.style.display = 'block'; } } </script> </body> </html>