Download index.html from el3erben/origin: direct link, hf CLI and curl.
- Browser
- Download file 39.5 kB
-
https://huggingface.co/spaces/el3erben/origin/resolve/main/index.html
- Command line
-
hf download hf://spaces/el3erben/origin/index.html
-
curl -L -o index.html https://huggingface.co/spaces/el3erben/origin/resolve/main/index.html
39.5 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ORIGIN | Match With Your Perfect Digital Solution</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| @keyframes swipeRight { | |
| 0% { transform: translateX(0) rotate(0deg); opacity: 1; } | |
| 100% { transform: translateX(200px) rotate(20deg); opacity: 0; } | |
| } | |
| @keyframes swipeLeft { | |
| 0% { transform: translateX(0) rotate(0deg); opacity: 1; } | |
| 100% { transform: translateX(-200px) rotate(-20deg); opacity: 0; } | |
| } | |
| .swipe-right { | |
| animation: swipeRight 0.5s forwards; | |
| } | |
| .swipe-left { | |
| animation: swipeLeft 0.5s forwards; | |
| } | |
| .card { | |
| transition: transform 0.2s; | |
| } | |
| .card:hover { | |
| transform: scale(1.02); | |
| } | |
| .service-card { | |
| height: 500px; | |
| background-size: cover; | |
| background-position: center; | |
| position: relative; | |
| } | |
| .gradient-overlay { | |
| background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%); | |
| } | |
| .like-badge { | |
| position: absolute; | |
| top: 50px; | |
| left: 20px; | |
| transform: rotate(-30deg); | |
| opacity: 0; | |
| transition: opacity 0.3s; | |
| } | |
| .nope-badge { | |
| position: absolute; | |
| top: 50px; | |
| right: 20px; | |
| transform: rotate(30deg); | |
| opacity: 0; | |
| transition: opacity 0.3s; | |
| } | |
| .show-badge { | |
| opacity: 1; | |
| } | |
| .chat-container { | |
| height: 400px; | |
| overflow-y: auto; | |
| scroll-behavior: smooth; | |
| } | |
| .typing-indicator::after { | |
| content: '...'; | |
| animation: typing 1.5s infinite; | |
| } | |
| @keyframes typing { | |
| 0% { content: '.'; } | |
| 33% { content: '..'; } | |
| 66% { content: '...'; } | |
| } | |
| .message { | |
| max-width: 70%; | |
| word-wrap: break-word; | |
| } | |
| .user-message { | |
| background-color: #6366f1; | |
| color: white; | |
| border-radius: 18px 18px 0 18px; | |
| } | |
| .bot-message { | |
| background-color: #f3f4f6; | |
| color: #111827; | |
| border-radius: 18px 18px 18px 0; | |
| } | |
| .fade-in { | |
| animation: fadeIn 0.3s ease-in; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(10px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 font-sans"> | |
| <!-- Header --> | |
| <header class="bg-black text-white shadow-lg"> | |
| <div class="container mx-auto px-4 py-6"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-8 h-8 text-orange-500"> | |
| <path fill-rule="evenodd" d="M9.315 7.584C12.195 3.883 16.695 1.5 21.75 1.5a.75.75 0 01.75.75c0 5.056-2.383 9.555-6.084 12.436A6.75 6.75 0 019.75 22.5a.75.75 0 01-.75-.75 6.75 6.75 0 016.186-6.688.75.75 0 01.14 1.493c-3.728.373-6.813 3.44-7.438 7.162a.75.75 0 01-1.465-.316 8.25 8.25 0 017.974-8.99C15.898 9.027 12.312 5.557 8.378 5.072a.75.75 0 01-.062-1.488z" clip-rule="evenodd" /> | |
| </svg> | |
| <h1 class="text-2xl font-bold">ORIGIN</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <a href="https://www.origin.global" class="text-sm hover:underline">www.origin.global</a> | |
| <button class="p-2 rounded-full hover:bg-white hover:bg-opacity-20 transition"> | |
| <i class="fas fa-cog text-xl"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="container mx-auto px-4 py-8"> | |
| <!-- Match Counter --> | |
| <div class="bg-white rounded-xl shadow-md p-4 mb-6 flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <i class="fas fa-heart text-orange-500 text-xl"></i> | |
| <span class="font-semibold">Matches:</span> | |
| <span id="matchCount" class="font-bold text-orange-500">0</span> | |
| </div> | |
| <button id="viewMatchesBtn" class="bg-black hover:bg-gray-800 text-white px-4 py-2 rounded-full transition"> | |
| View Matches | |
| </button> | |
| </div> | |
| <!-- Card Stack --> | |
| <div class="relative max-w-md mx-auto"> | |
| <div id="cardStack" class="relative"> | |
| <!-- Cards will be inserted here by JavaScript --> | |
| </div> | |
| <!-- Badges --> | |
| <div id="likeBadge" class="like-badge"> | |
| <div class="bg-green-500 text-white px-4 py-2 rounded-lg shadow-lg font-bold text-xl"> | |
| LIKE | |
| </div> | |
| </div> | |
| <div id="nopeBadge" class="nope-badge"> | |
| <div class="bg-red-500 text-white px-4 py-2 rounded-lg shadow-lg font-bold text-xl"> | |
| PASS | |
| </div> | |
| </div> | |
| <!-- Empty State --> | |
| <div id="emptyState" class="bg-white rounded-xl shadow-lg p-8 text-center hidden"> | |
| <i class="fas fa-heart-broken text-5xl text-gray-400 mb-4"></i> | |
| <h3 class="text-2xl font-bold text-gray-700 mb-2">No more services to show</h3> | |
| <p class="text-gray-500 mb-6">You've gone through all our offerings. Check your matches or reset to see them again!</p> | |
| <button id="resetBtn" class="bg-black hover:bg-gray-800 text-white px-6 py-3 rounded-full font-semibold transition"> | |
| Reset Swipes | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Action Buttons --> | |
| <div class="flex justify-center space-x-8 mt-8"> | |
| <button id="nopeBtn" class="bg-white p-4 rounded-full shadow-lg hover:shadow-xl transition hover:bg-red-50"> | |
| <i class="fas fa-times text-red-500 text-3xl"></i> | |
| </button> | |
| <button id="superLikeBtn" class="bg-white p-4 rounded-full shadow-lg hover:shadow-xl transition hover:bg-blue-50"> | |
| <i class="fas fa-star text-orange-500 text-3xl"></i> | |
| </button> | |
| <button id="likeBtn" class="bg-white p-4 rounded-full shadow-lg hover:shadow-xl transition hover:bg-green-50"> | |
| <i class="fas fa-heart text-green-500 text-3xl"></i> | |
| </button> | |
| </div> | |
| </main> | |
| <!-- Matches Modal --> | |
| <div id="matchesModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"> | |
| <div class="bg-white rounded-xl w-full max-w-md mx-4 max-h-[80vh] overflow-y-auto"> | |
| <div class="p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h3 class="text-2xl font-bold text-gray-800">Your Matches</h3> | |
| <button id="closeModalBtn" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div id="matchesList" class="space-y-4"> | |
| <!-- Matches will be inserted here --> | |
| </div> | |
| <div id="noMatches" class="text-center py-8"> | |
| <i class="fas fa-heart-broken text-4xl text-gray-400 mb-4"></i> | |
| <p class="text-gray-500">You don't have any matches yet. Start swiping!</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Chat Modal --> | |
| <div id="chatModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"> | |
| <div class="bg-white rounded-xl w-full max-w-md mx-4 max-h-[80vh] flex flex-col"> | |
| <div class="p-4 border-b flex justify-between items-center"> | |
| <div class="flex items-center space-x-2"> | |
| <div id="chatServiceIcon" class="w-10 h-10 rounded-full bg-orange-500 flex items-center justify-center text-white"> | |
| <i class="fas fa-globe"></i> | |
| </div> | |
| <div> | |
| <h3 id="chatServiceTitle" class="font-bold">Service Chat</h3> | |
| <p class="text-xs text-gray-500">ORIGIN AI Assistant</p> | |
| </div> | |
| </div> | |
| <button id="closeChatBtn" class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div id="chatContainer" class="chat-container p-4 space-y-3 flex-1 overflow-y-auto"> | |
| <!-- Chat messages will appear here --> | |
| </div> | |
| <div class="p-4 border-t"> | |
| <div class="relative"> | |
| <input | |
| id="chatInput" | |
| type="text" | |
| placeholder="Message ORIGIN assistant..." | |
| class="w-full border rounded-full py-3 px-4 pr-12 focus:outline-none focus:ring-2 focus:ring-orange-500" | |
| > | |
| <button id="sendChatBtn" class="absolute right-3 top-1/2 transform -translate-y-1/2 text-orange-500 hover:text-orange-600"> | |
| <i class="fas fa-paper-plane"></i> | |
| </button> | |
| </div> | |
| <p class="text-xs text-gray-500 mt-2">ORIGIN AI will help you explore this service</p> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Service data | |
| const services = [ | |
| { | |
| id: 1, | |
| title: "Website Solutions", | |
| description: "Custom websites tailored to your business needs with modern design and functionality.", | |
| features: ["Responsive Design", "CMS Integration", "Custom Features", "Ongoing Support"], | |
| image: "https://images.unsplash.com/photo-1547658719-da2b51169166?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80", | |
| icon: "fas fa-globe" | |
| }, | |
| { | |
| id: 2, | |
| title: "Mobile Apps", | |
| description: "Native and cross-platform mobile applications for iOS and Android platforms.", | |
| features: ["User-Centric Design", "High Performance", "Secure Backend", "Regular Updates"], | |
| image: "https://images.unsplash.com/photo-1555774698-0f77e70ac3f1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80", | |
| icon: "fas fa-mobile-alt" | |
| }, | |
| { | |
| id: 3, | |
| title: "Ecommerce Solutions", | |
| description: "Complete online store solutions to sell your products worldwide.", | |
| features: ["Payment Integration", "Inventory Management", "Marketing Tools", "Analytics"], | |
| image: "https://images.unsplash.com/photo-1556740738-b6a63e27c4df?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80", | |
| icon: "fas fa-shopping-cart" | |
| }, | |
| { | |
| id: 4, | |
| title: "Marketplace Platforms", | |
| description: "Multi-vendor platforms connecting buyers and sellers in your niche.", | |
| features: ["Vendor Management", "Escrow Payments", "Review System", "Advanced Search"], | |
| image: "https://images.unsplash.com/photo-1526948128573-703ee1aeb6fa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80", | |
| icon: "fas fa-store" | |
| }, | |
| { | |
| id: 5, | |
| title: "Award-Winning Websites", | |
| description: "Premium websites designed to impress and convert, recognized by industry experts.", | |
| features: ["Unique Design", "Premium Animations", "Performance Optimized", "Brand Storytelling"], | |
| image: "https://images.unsplash.com/photo-1467232004584-a241de8b9a40?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80", | |
| icon: "fas fa-trophy" | |
| }, | |
| { | |
| id: 6, | |
| title: "SEO Services", | |
| description: "Comprehensive search engine optimization to increase your online visibility.", | |
| features: ["Keyword Research", "On-Page SEO", "Technical SEO", "Content Strategy"], | |
| image: "https://images.unsplash.com/photo-1499951360447-b19be8fe80f5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1000&q=80", | |
| icon: "fas fa-search" | |
| } | |
| ]; | |
| // State management | |
| let currentIndex = 0; | |
| let matches = []; | |
| let swipedServices = []; | |
| let currentChatService = null; | |
| let chatHistory = {}; | |
| // DOM elements | |
| const cardStack = document.getElementById('cardStack'); | |
| const likeBtn = document.getElementById('likeBtn'); | |
| const nopeBtn = document.getElementById('nopeBtn'); | |
| const superLikeBtn = document.getElementById('superLikeBtn'); | |
| const likeBadge = document.getElementById('likeBadge'); | |
| const nopeBadge = document.getElementById('nopeBadge'); | |
| const matchCount = document.getElementById('matchCount'); | |
| const viewMatchesBtn = document.getElementById('viewMatchesBtn'); | |
| const matchesModal = document.getElementById('matchesModal'); | |
| const closeModalBtn = document.getElementById('closeModalBtn'); | |
| const matchesList = document.getElementById('matchesList'); | |
| const noMatches = document.getElementById('noMatches'); | |
| const emptyState = document.getElementById('emptyState'); | |
| const resetBtn = document.getElementById('resetBtn'); | |
| const chatModal = document.getElementById('chatModal'); | |
| const closeChatBtn = document.getElementById('closeChatBtn'); | |
| const chatContainer = document.getElementById('chatContainer'); | |
| const chatInput = document.getElementById('chatInput'); | |
| const sendChatBtn = document.getElementById('sendChatBtn'); | |
| const chatServiceTitle = document.getElementById('chatServiceTitle'); | |
| const chatServiceIcon = document.getElementById('chatServiceIcon'); | |
| // Initialize the app | |
| function init() { | |
| renderCards(); | |
| updateMatchCount(); | |
| checkEmptyState(); | |
| } | |
| // Render all service cards | |
| function renderCards() { | |
| cardStack.innerHTML = ''; | |
| // Only show the next 3 cards in the stack | |
| const cardsToShow = services.slice(currentIndex, currentIndex + 3).reverse(); | |
| cardsToShow.forEach((service, index) => { | |
| const zIndex = 10 - index; // Higher z-index for cards on top | |
| const offset = index * 4; // Small offset for stacked effect | |
| const card = document.createElement('div'); | |
| card.className = `card absolute w-full rounded-xl overflow-hidden shadow-xl transition-all duration-300 ${index === 0 ? 'cursor-grab active:cursor-grabbing' : ''}`; | |
| card.style.zIndex = zIndex; | |
| card.style.transform = `translateY(${offset}px)`; | |
| card.dataset.id = service.id; | |
| card.innerHTML = ` | |
| <div class="service-card" style="background-image: url('${service.image}')"> | |
| <div class="gradient-overlay absolute inset-0 flex flex-col justify-end p-6 text-white"> | |
| <h2 class="text-3xl font-bold mb-2">${service.title}</h2> | |
| <p class="text-lg mb-4">${service.description}</p> | |
| <div class="mb-4"> | |
| <h4 class="font-semibold mb-2">Key Features:</h4> | |
| <ul class="grid grid-cols-2 gap-2"> | |
| ${service.features.map(feature => `<li class="flex items-center"><i class="fas fa-check-circle mr-2 text-green-300"></i> ${feature}</li>`).join('')} | |
| </ul> | |
| </div> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-sm opacity-75"><i class="fas fa-clock mr-1"></i> 4-8 weeks delivery</span> | |
| <span class="text-sm opacity-75"><i class="fas fa-dollar-sign mr-1"></i> Starting from $2,000</span> | |
| </div> | |
| </div> | |
| </div> | |
| `; | |
| if (index === 0) { | |
| // Add drag events only to the top card | |
| setupDragEvents(card); | |
| } | |
| cardStack.appendChild(card); | |
| }); | |
| } | |
| // Setup drag/swipe events for a card | |
| function setupDragEvents(card) { | |
| let startX, startY, moveX, moveY; | |
| let isDragging = false; | |
| card.addEventListener('mousedown', startDrag); | |
| card.addEventListener('touchstart', startDrag); | |
| function startDrag(e) { | |
| isDragging = true; | |
| const clientX = e.clientX || e.touches[0].clientX; | |
| const clientY = e.clientY || e.touches[0].clientY; | |
| startX = clientX; | |
| startY = clientY; | |
| document.addEventListener('mousemove', drag); | |
| document.addEventListener('touchmove', drag); | |
| document.addEventListener('mouseup', endDrag); | |
| document.addEventListener('touchend', endDrag); | |
| } | |
| function drag(e) { | |
| if (!isDragging) return; | |
| e.preventDefault(); | |
| const clientX = e.clientX || e.touches[0].clientX; | |
| const clientY = e.clientY || e.touches[0].clientY; | |
| moveX = clientX - startX; | |
| moveY = clientY - startY; | |
| // Calculate rotation based on horizontal movement | |
| const rotate = moveX * 0.1; | |
| // Apply transform | |
| card.style.transform = `translate(${moveX}px, ${moveY}px) rotate(${rotate}deg)`; | |
| // Show like/nope badges based on direction | |
| if (moveX > 20) { | |
| likeBadge.classList.add('show-badge'); | |
| nopeBadge.classList.remove('show-badge'); | |
| } else if (moveX < -20) { | |
| nopeBadge.classList.add('show-badge'); | |
| likeBadge.classList.remove('show-badge'); | |
| } else { | |
| likeBadge.classList.remove('show-badge'); | |
| nopeBadge.classList.remove('show-badge'); | |
| } | |
| } | |
| function endDrag() { | |
| if (!isDragging) return; | |
| isDragging = false; | |
| document.removeEventListener('mousemove', drag); | |
| document.removeEventListener('touchmove', drag); | |
| document.removeEventListener('mouseup', endDrag); | |
| document.removeEventListener('touchend', endDrag); | |
| likeBadge.classList.remove('show-badge'); | |
| nopeBadge.classList.remove('show-badge'); | |
| // Check if swipe was significant enough | |
| if (Math.abs(moveX) > 100) { | |
| if (moveX > 0) { | |
| swipeRight(); | |
| } else { | |
| swipeLeft(); | |
| } | |
| } else { | |
| // Return to original position | |
| card.style.transition = 'transform 0.3s'; | |
| card.style.transform = 'translate(0, 0) rotate(0deg)'; | |
| setTimeout(() => { | |
| card.style.transition = ''; | |
| }, 300); | |
| } | |
| } | |
| } | |
| // Swipe right (like) | |
| function swipeRight() { | |
| const currentCard = cardStack.firstChild; | |
| currentCard.classList.add('swipe-right'); | |
| const serviceId = parseInt(currentCard.dataset.id); | |
| const service = services.find(s => s.id === serviceId); | |
| matches.push(service); | |
| swipedServices.push(serviceId); | |
| setTimeout(() => { | |
| currentIndex++; | |
| updateMatchCount(); | |
| checkEmptyState(); | |
| renderCards(); | |
| // Open chat for this match | |
| openChat(service); | |
| }, 500); | |
| } | |
| // Swipe left (nope) | |
| function swipeLeft() { | |
| const currentCard = cardStack.firstChild; | |
| currentCard.classList.add('swipe-left'); | |
| const serviceId = parseInt(currentCard.dataset.id); | |
| swipedServices.push(serviceId); | |
| setTimeout(() => { | |
| currentIndex++; | |
| checkEmptyState(); | |
| renderCards(); | |
| }, 500); | |
| } | |
| // Super like | |
| function superLike() { | |
| const currentCard = cardStack.firstChild; | |
| currentCard.classList.add('swipe-right'); | |
| const serviceId = parseInt(currentCard.dataset.id); | |
| const service = services.find(s => s.id === serviceId); | |
| // Add to matches with super like flag | |
| matches.push({...service, superLike: true}); | |
| swipedServices.push(serviceId); | |
| setTimeout(() => { | |
| currentIndex++; | |
| updateMatchCount(); | |
| checkEmptyState(); | |
| renderCards(); | |
| // Open chat for this match | |
| openChat(service); | |
| }, 500); | |
| } | |
| // Open chat with a service | |
| function openChat(service) { | |
| currentChatService = service; | |
| chatServiceTitle.textContent = service.title; | |
| chatServiceIcon.innerHTML = `<i class="${service.icon}"></i>`; | |
| // Initialize chat history if it doesn't exist | |
| if (!chatHistory[service.id]) { | |
| chatHistory[service.id] = [ | |
| { | |
| sender: 'bot', | |
| text: getBotGreeting(service), | |
| time: new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}) | |
| } | |
| ]; | |
| } | |
| // Render chat history | |
| renderChat(service.id); | |
| // Open modal | |
| chatModal.classList.remove('hidden'); | |
| chatInput.focus(); | |
| } | |
| // Get appropriate bot greeting based on service | |
| function getBotGreeting(service) { | |
| const greetings = { | |
| "Website Solutions": [ | |
| "Hey there! π I'm ORIGIN's AI assistant for website solutions. What kind of website are you looking to build?", | |
| "Nice match! π I see you're interested in our website solutions. Tell me about your project!", | |
| "Website solutions, great choice! π What industry is your business in?" | |
| ], | |
| "Mobile Apps": [ | |
| "Hello! π I'm here to help with your mobile app dreams. iOS, Android, or both?", | |
| "Awesome! π± Let's talk about your app idea. What's the main purpose?", | |
| "Mobile apps are my specialty! π‘ Do you have a specific design in mind?" | |
| ], | |
| "Ecommerce Solutions": [ | |
| "Hi there! π Ready to build your online store? What products will you be selling?", | |
| "Ecommerce, excellent choice! π How many products do you plan to list initially?", | |
| "Let's get your online shop running! π³ Do you need payment processing integration?" | |
| ], | |
| "Marketplace Platforms": [ | |
| "Hey! π Excited to help with your marketplace platform. Will you have multiple vendors?", | |
| "Marketplace platforms are complex but rewarding! π What's your niche?", | |
| "Great match! πͺ Let's discuss your marketplace vision. Buyer and seller accounts needed?" | |
| ], | |
| "Award-Winning Websites": [ | |
| "Hello! π You're looking for an award-winning site? Tell me about your brand!", | |
| "Premium websites are our specialty! β¨ What makes your brand unique?", | |
| "Going for the gold! π₯ What emotions should visitors feel on your site?" | |
| ], | |
| "SEO Services": [ | |
| "Hi there! π Ready to boost your search rankings? What's your current traffic like?", | |
| "SEO match! π What keywords are you targeting?", | |
| "Let's get you to the top of search results! π Who are your main competitors?" | |
| ] | |
| }; | |
| const serviceGreetings = greetings[service.title] || [ | |
| "Thanks for matching with our service! π How can I help you today?", | |
| "Great to connect! π Tell me more about what you're looking for.", | |
| "Hello! π I'm here to answer any questions about this service." | |
| ]; | |
| return serviceGreetings[Math.floor(Math.random() * serviceGreetings.length)]; | |
| } | |
| // Generate bot response based on user message and service | |
| function generateBotResponse(service, userMessage) { | |
| const responses = { | |
| "Website Solutions": [ | |
| `I understand you're interested in a website. Our team at ORIGIN specializes in creating ${userMessage.toLowerCase().includes('ecommerce') ? 'ecommerce' : ''} websites that are fast, beautiful, and user-friendly.`, | |
| `For ${userMessage.toLowerCase().includes('small business') ? 'small businesses' : 'your project'}, we recommend starting with a discovery session to map out all your needs.`, | |
| `Based on what you've said, I think our ${userMessage.toLowerCase().includes('premium') ? 'award-winning' : 'standard'} website package would be perfect for you.` | |
| ], | |
| "Mobile Apps": [ | |
| `Got it! ${userMessage.toLowerCase().includes('ios') ? 'iOS' : ''}${userMessage.toLowerCase().includes('android') ? ' and Android' : ''} apps are what we excel at.`, | |
| `The timeline for an app like this is typically ${userMessage.toLowerCase().includes('simple') ? '8-12 weeks' : '3-6 months'}.`, | |
| `For ${userMessage.toLowerCase().includes('social') ? 'social features' : 'your requirements'}, we'd use ${userMessage.toLowerCase().includes('real-time') ? 'WebSockets' : 'REST APIs'}.` | |
| ], | |
| "Ecommerce Solutions": [ | |
| `Ecommerce is booming! We can set you up with ${userMessage.toLowerCase().includes('shopify') ? 'Shopify' : 'a custom'} solution.`, | |
| `For ${userMessage.toLowerCase().includes('international') ? 'international sales' : 'your store'}, we'll need to consider ${userMessage.toLowerCase().includes('tax') ? 'tax calculations' : 'payment methods'}.`, | |
| `Our team will make sure your ${userMessage.toLowerCase().includes('unique') ? 'unique products' : 'inventory'} gets the spotlight it deserves.` | |
| ], | |
| "Marketplace Platforms": [ | |
| `Marketplaces are complex but rewarding! We'll handle the ${userMessage.toLowerCase().includes('payment') ? 'payment processing' : 'vendor management'} for you.`, | |
| `For ${userMessage.toLowerCase().includes('multiple') ? 'multiple vendors' : 'your platform'}, we recommend ${userMessage.toLowerCase().includes('subscription') ? 'subscription models' : 'commission-based'}.`, | |
| `The ${userMessage.toLowerCase().includes('review') ? 'review system' : 'search functionality'} will be customized to your exact needs.` | |
| ], | |
| "Award-Winning Websites": [ | |
| `Our design team will create something truly ${userMessage.toLowerCase().includes('unique') ? 'unique' : 'memorable'} for your brand.`, | |
| `For an ${userMessage.toLowerCase().includes('award') ? 'award-worthy' : 'high-end'} site, we focus on ${userMessage.toLowerCase().includes('animation') ? 'micro-interactions' : 'storytelling'}.`, | |
| `The ${userMessage.toLowerCase().includes('premium') ? 'premium experience' : 'visual journey'} will be tailored to your ${userMessage.toLowerCase().includes('luxury') ? 'luxury brand' : 'business'}.` | |
| ], | |
| "SEO Services": [ | |
| `SEO is all about ${userMessage.toLowerCase().includes('content') ? 'content strategy' : 'technical optimization'}. We've got you covered!`, | |
| `For ${userMessage.toLowerCase().includes('competitive') ? 'competitive keywords' : 'your niche'}, we'll need ${userMessage.toLowerCase().includes('3 months') ? '3-6 months' : 'a detailed plan'}.`, | |
| `Our ${userMessage.toLowerCase().includes('local') ? 'local SEO' : 'international SEO'} services will help you ${userMessage.toLowerCase().includes('rank') ? 'rank higher' : 'get more traffic'}.` | |
| ] | |
| }; | |
| const serviceResponses = responses[service.title] || [ | |
| "That's a great question! Our team at ORIGIN can definitely help with that.", | |
| "I've made a note of your requirements. Would you like me to connect you with a specialist?", | |
| "Based on what you're saying, I think we should schedule a consultation. What's your availability like?" | |
| ]; | |
| return serviceResponses[Math.floor(Math.random() * serviceResponses.length)]; | |
| } | |
| // Render chat messages | |
| function renderChat(serviceId) { | |
| chatContainer.innerHTML = ''; | |
| if (!chatHistory[serviceId]) return; | |
| chatHistory[serviceId].forEach(msg => { | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = `message p-3 fade-in ${msg.sender === 'user' ? 'user-message ml-auto' : 'bot-message mr-auto'}`; | |
| messageDiv.innerHTML = ` | |
| <div>${msg.text}</div> | |
| <div class="text-xs opacity-70 mt-1 text-right">${msg.time}</div> | |
| `; | |
| chatContainer.appendChild(messageDiv); | |
| }); | |
| // Scroll to bottom | |
| chatContainer.scrollTop = chatContainer.scrollHeight; | |
| } | |
| // Send chat message | |
| function sendMessage() { | |
| const message = chatInput.value.trim(); | |
| if (!message || !currentChatService) return; | |
| // Add user message to history | |
| chatHistory[currentChatService.id].push({ | |
| sender: 'user', | |
| text: message, | |
| time: new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}) | |
| }); | |
| // Clear input | |
| chatInput.value = ''; | |
| // Render updated chat | |
| renderChat(currentChatService.id); | |
| // Show typing indicator | |
| const typingDiv = document.createElement('div'); | |
| typingDiv.className = 'message p-3 bot-message mr-auto'; | |
| typingDiv.innerHTML = ` | |
| <div class="typing-indicator">ORIGIN AI is typing</div> | |
| `; | |
| chatContainer.appendChild(typingDiv); | |
| chatContainer.scrollTop = chatContainer.scrollHeight; | |
| // Simulate bot response after delay | |
| setTimeout(() => { | |
| // Remove typing indicator | |
| chatContainer.removeChild(typingDiv); | |
| // Generate and add bot response | |
| const botResponse = generateBotResponse(currentChatService, message); | |
| chatHistory[currentChatService.id].push({ | |
| sender: 'bot', | |
| text: botResponse, | |
| time: new Date().toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}) | |
| }); | |
| renderChat(currentChatService.id); | |
| }, 1500 + Math.random() * 2000); | |
| } | |
| // Update match counter | |
| function updateMatchCount() { | |
| matchCount.textContent = matches.length; | |
| } | |
| // Check if we've run out of cards | |
| function checkEmptyState() { | |
| if (currentIndex >= services.length) { | |
| emptyState.classList.remove('hidden'); | |
| } else { | |
| emptyState.classList.add('hidden'); | |
| } | |
| } | |
| // Show matches modal | |
| function showMatches() { | |
| matchesModal.classList.remove('hidden'); | |
| if (matches.length === 0) { | |
| noMatches.classList.remove('hidden'); | |
| matchesList.classList.add('hidden'); | |
| } else { | |
| noMatches.classList.add('hidden'); | |
| matchesList.classList.remove('hidden'); | |
| matchesList.innerHTML = matches.map(service => ` | |
| <div class="bg-gray-50 rounded-lg p-4 flex items-center cursor-pointer hover:bg-gray-100 transition" data-id="${service.id}"> | |
| <div class="w-16 h-16 rounded-lg overflow-hidden mr-4 bg-black flex items-center justify-center"> | |
| <i class="${service.icon} text-orange-500 text-xl"></i> | |
| </div> | |
| <div class="flex-1"> | |
| <h4 class="font-bold">${service.title}</h4> | |
| <p class="text-sm text-gray-600">${service.description}</p> | |
| </div> | |
| ${service.superLike ? | |
| '<i class="fas fa-star text-orange-500 ml-2" title="Super Liked"></i>' : | |
| '<i class="fas fa-heart text-orange-500 ml-2"></i>'} | |
| </div> | |
| `).join(''); | |
| // Add click event to open chat when clicking a match | |
| document.querySelectorAll('#matchesList [data-id]').forEach(el => { | |
| el.addEventListener('click', () => { | |
| const serviceId = parseInt(el.dataset.id); | |
| const service = services.find(s => s.id === serviceId); | |
| openChat(service); | |
| matchesModal.classList.add('hidden'); | |
| }); | |
| }); | |
| } | |
| } | |
| // Reset all swipes | |
| function resetSwipes() { | |
| currentIndex = 0; | |
| matches = []; | |
| swipedServices = []; | |
| updateMatchCount(); | |
| renderCards(); | |
| } | |
| // Event listeners | |
| likeBtn.addEventListener('click', swipeRight); | |
| nopeBtn.addEventListener('click', swipeLeft); | |
| superLikeBtn.addEventListener('click', superLike); | |
| viewMatchesBtn.addEventListener('click', showMatches); | |
| closeModalBtn.addEventListener('click', () => matchesModal.classList.add('hidden')); | |
| resetBtn.addEventListener('click', resetSwipes); | |
| closeChatBtn.addEventListener('click', () => chatModal.classList.add('hidden')); | |
| sendChatBtn.addEventListener('click', sendMessage); | |
| // Send message on Enter key | |
| chatInput.addEventListener('keypress', (e) => { | |
| if (e.key === 'Enter') { | |
| sendMessage(); | |
| } | |
| }); | |
| // Close modal when clicking outside | |
| matchesModal.addEventListener('click', (e) => { | |
| if (e.target === matchesModal) { | |
| matchesModal.classList.add('hidden'); | |
| } | |
| }); | |
| SEO Services | |
| Comprehensive search engine optimization to increase your online visibility. | |
| Key Features: | |
| Keyword Research | |
| On-Page SEO | |
| Technical SEO | |
| Content Strategy | |
| 4-8 weeks delivery | |
| Starting from \$2,000 | |
| Award-Winning Websites | |
| Premium websites designed to impress and convert, recognized by industry experts. | |
| Key Features: | |
| Unique Design | |
| Premium Animations | |
| Performance Optimized | |
| Brand Storytelling | |
| 4-8 weeks delivery | |
| Starting from \$2,000 | |
| Marketplace Platforms | |
| Multi-vendor platforms connecting buyers and sellers in your niche. | |
| Key Features: | |
| Vendor Management | |
| Escrow Payments | |
| Review System | |
| Advanced Search | |
| 4-8 weeks delivery | |
| Starting from \$2,000 | |
| LIKE | |
| PASS | |
| $0 | |
| // Close chat when clicking outside | |
| chatModal.addEventListener('click', (e) => { | |
| if (e.target === chatModal) { | |
| chatModal.classList.add('hidden'); | |
| } | |
| }); | |
| // Initialize the app | |
| init(); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 𧬠<a href="https://enzostvs-deepsite.hf.space?remix=el3erben/origin" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |