hello-world / index.html
Ronkey's picture
没有根据我的消息回复对应的内容,没有思考,只是在重复一样的答复 - Follow Up Deployment
9ead93e verified
Raw History Blame Contribute Delete
18.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Greeting</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>
.gradient-bg {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
.card-hover {
transition: all 0.3s ease;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.wave {
animation: wave 2.5s infinite;
transform-origin: 70% 70%;
display: inline-block;
}
@keyframes wave {
0% { transform: rotate(0deg); }
10% { transform: rotate(14deg); }
20% { transform: rotate(-8deg); }
30% { transform: rotate(14deg); }
40% { transform: rotate(-4deg); }
50% { transform: rotate(10deg); }
60% { transform: rotate(0deg); }
100% { transform: rotate(0deg); }
}
</style>
</head>
<body class="gradient-bg min-h-screen flex flex-col">
<!-- Navigation -->
<nav class="bg-white shadow-lg">
<div class="max-w-6xl mx-auto px-4">
<div class="flex justify-between">
<div class="flex space-x-7">
<div>
<a href="#" class="flex items-center py-4 px-2">
<i class="fas fa-smile-beam text-purple-600 text-2xl mr-2"></i>
<span class="font-semibold text-gray-500 text-lg">HelloApp</span>
</a>
</div>
</div>
<div class="hidden md:flex items-center space-x-3">
<a href="#" class="py-2 px-2 font-medium text-gray-500 border-b-4 border-purple-500 transition duration-300">Home</a>
<a href="#" class="py-2 px-2 font-medium text-gray-500 hover:text-purple-500 transition duration-300">Features</a>
<a href="#" class="py-2 px-2 font-medium text-gray-500 hover:text-purple-500 transition duration-300">About</a>
</div>
<div class="md:hidden flex items-center">
<button class="outline-none mobile-menu-button">
<i class="fas fa-bars text-gray-500 text-xl"></i>
</button>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="flex-grow container mx-auto px-4 py-8 md:py-16">
<div class="text-center mb-12">
<h1 class="text-4xl md:text-6xl font-bold text-gray-800 mb-4">
Hello <span class="wave">👋</span>
</h1>
<p class="text-xl md:text-2xl text-gray-600 max-w-2xl mx-auto">
Welcome to this interactive greeting experience! How can we make your day better?
</p>
</div>
<!-- Interactive Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- Card 1 -->
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
<div class="p-6">
<div class="flex items-center mb-4">
<div class="bg-purple-100 p-3 rounded-full">
<i class="fas fa-comment-dots text-purple-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 ml-3">Chat</h3>
</div>
<p class="text-gray-600 mb-4">
Start a conversation with our friendly chatbot who's always ready to help.
</p>
<button onclick="startChat()" class="w-full bg-purple-500 hover:bg-purple-600 text-white font-medium py-2 px-4 rounded-lg transition duration-300">
Start Chat
</button>
</div>
</div>
<!-- Card 2 -->
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
<div class="p-6">
<div class="flex items-center mb-4">
<div class="bg-blue-100 p-3 rounded-full">
<i class="fas fa-music text-blue-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 ml-3">Music</h3>
</div>
<p class="text-gray-600 mb-4">
Listen to relaxing music curated to improve your mood and productivity.
</p>
<button onclick="playMusic()" class="w-full bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded-lg transition duration-300">
Play Music
</button>
</div>
</div>
<!-- Card 3 -->
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
<div class="p-6">
<div class="flex items-center mb-4">
<div class="bg-green-100 p-3 rounded-full">
<i class="fas fa-lightbulb text-green-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold text-gray-800 ml-3">Inspire</h3>
</div>
<p class="text-gray-600 mb-4">
Get daily inspirational quotes to motivate you and brighten your day.
</p>
<button onclick="showQuote()" class="w-full bg-green-500 hover:bg-green-600 text-white font-medium py-2 px-4 rounded-lg transition duration-300">
Get Inspired
</button>
</div>
</div>
</div>
<!-- Interactive Section -->
<div id="interactive-section" class="mt-16 hidden">
<div class="bg-white rounded-xl shadow-lg p-6 max-w-2xl mx-auto">
<div class="flex justify-between items-center mb-4">
<h2 id="section-title" class="text-2xl font-bold text-gray-800"></h2>
<button onclick="closeSection()" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div id="section-content" class="text-gray-600"></div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<h3 class="text-xl font-bold flex items-center">
<i class="fas fa-smile-beam mr-2"></i> HelloApp
</h3>
<p class="text-gray-400 mt-1">Making the world a friendlier place</p>
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-400 hover:text-white transition duration-300">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white transition duration-300">
<i class="fab fa-twitter"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white transition duration-300">
<i class="fab fa-instagram"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white transition duration-300">
<i class="fab fa-github"></i>
</a>
</div>
</div>
<div class="border-t border-gray-700 mt-6 pt-6 text-center text-gray-400 text-sm">
<p>© 2023 HelloApp. All rights reserved.</p>
</div>
</div>
</footer>
<script>
// Mobile menu toggle
const mobileMenuButton = document.querySelector('.mobile-menu-button');
const mobileMenu = document.querySelector('.mobile-menu');
mobileMenuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
});
// Interactive functions
function startChat() {
const section = document.getElementById('interactive-section');
const title = document.getElementById('section-title');
const content = document.getElementById('section-content');
title.textContent = 'Chat with Us';
content.innerHTML = `
<div id="chat-messages" class="mb-4 space-y-4 max-h-64 overflow-y-auto">
<div class="bg-gray-100 p-4 rounded-lg inline-block max-w-xs">
<p>Hello there! 👋 I'm HelloBot. You can ask me about anything or just chat. What's on your mind today?</p>
</div>
</div>
<form id="chat-form" class="flex" onsubmit="sendMessage(event)">
<input type="text" id="chat-input" placeholder="Type your message..." class="flex-grow border border-gray-300 rounded-l-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-purple-500" required>
<button type="submit" class="bg-purple-500 hover:bg-purple-600 text-white px-4 py-2 rounded-r-lg transition duration-300">
<i class="fas fa-paper-plane"></i>
</button>
</form>
`;
section.classList.remove('hidden');
section.scrollIntoView({ behavior: 'smooth' });
}
function playMusic() {
const section = document.getElementById('interactive-section');
const title = document.getElementById('section-title');
const content = document.getElementById('section-content');
title.textContent = 'Relaxing Music';
content.innerHTML = `
<div class="mb-6">
<div class="bg-gray-100 rounded-lg overflow-hidden">
<div class="p-4">
<div class="flex items-center mb-4">
<div class="bg-blue-100 p-3 rounded-full mr-4">
<i class="fas fa-music text-blue-600"></i>
</div>
<div>
<h4 class="font-semibold">Peaceful Piano</h4>
<p class="text-sm text-gray-500">Relaxing music for focus and meditation</p>
</div>
</div>
<div class="flex items-center justify-between">
<button class="bg-blue-500 hover:bg-blue-600 text-white p-3 rounded-full transition duration-300">
<i class="fas fa-play"></i>
</button>
<div class="w-full mx-4 bg-gray-200 rounded-full h-2">
<div class="bg-blue-500 h-2 rounded-full" style="width: 30%"></div>
</div>
<span class="text-sm text-gray-500">2:45 / 10:00</span>
</div>
</div>
</div>
</div>
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
<div class="bg-gray-100 p-3 rounded-lg cursor-pointer hover:bg-gray-200 transition duration-300">
<div class="flex items-center">
<div class="w-10 h-10 bg-blue-200 rounded mr-3"></div>
<div>
<p class="text-sm font-medium">Nature Sounds</p>
<p class="text-xs text-gray-500">45 min</p>
</div>
</div>
</div>
<div class="bg-gray-100 p-3 rounded-lg cursor-pointer hover:bg-gray-200 transition duration-300">
<div class="flex items-center">
<div class="w-10 h-10 bg-blue-200 rounded mr-3"></div>
<div>
<p class="text-sm font-medium">Jazz Lounge</p>
<p class="text-xs text-gray-500">1 hr</p>
</div>
</div>
</div>
<div class="bg-gray-100 p-3 rounded-lg cursor-pointer hover:bg-gray-200 transition duration-300">
<div class="flex items-center">
<div class="w-10 h-10 bg-blue-200 rounded mr-3"></div>
<div>
<p class="text-sm font-medium">Classical</p>
<p class="text-xs text-gray-500">2 hr</p>
</div>
</div>
</div>
</div>
`;
section.classList.remove('hidden');
section.scrollIntoView({ behavior: 'smooth' });
}
function showQuote() {
const quotes = [
{
text: "The only way to do great work is to love what you do.",
author: "Steve Jobs"
},
{
text: "Life is what happens when you're busy making other plans.",
author: "John Lennon"
},
{
text: "The future belongs to those who believe in the beauty of their dreams.",
author: "Eleanor Roosevelt"
},
{
text: "Spread love everywhere you go. Let no one ever come to you without leaving happier.",
author: "Mother Teresa"
}
];
const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
const section = document.getElementById('interactive-section');
const title = document.getElementById('section-title');
const content = document.getElementById('section-content');
title.textContent = 'Daily Inspiration';
content.innerHTML = `
<div class="bg-green-50 border-l-4 border-green-500 p-6 mb-6">
<p class="text-xl italic text-gray-800 mb-2">"${randomQuote.text}"</p>
<p class="text-right font-medium text-green-600">— ${randomQuote.author}</p>
</div>
<div class="flex justify-center">
<button onclick="showQuote()" class="bg-green-500 hover:bg-green-600 text-white font-medium py-2 px-6 rounded-lg transition duration-300">
New Quote
</button>
</div>
`;
section.classList.remove('hidden');
section.scrollIntoView({ behavior: 'smooth' });
}
function closeSection() {
document.getElementById('interactive-section').classList.add('hidden');
}
function sendMessage(e) {
e.preventDefault();
const input = document.getElementById('chat-input');
const message = input.value.trim();
if (!message) return;
const messagesContainer = document.getElementById('chat-messages');
// Add user message
messagesContainer.innerHTML += `
<div class="flex justify-end">
<div class="bg-purple-100 p-4 rounded-lg inline-block max-w-xs">
<p>${message}</p>
</div>
</div>
`;
input.value = '';
// Simulate bot response after a short delay
setTimeout(() => {
const responses = [
"I understand what you're saying.",
"That's interesting! Tell me more.",
"How does that make you feel?",
"I'm here to help with that.",
"Thanks for sharing that with me."
];
const response = responses[Math.floor(Math.random() * responses.length)];
messagesContainer.innerHTML += `
<div class="bg-gray-100 p-4 rounded-lg inline-block max-w-xs">
<p>${response}</p>
</div>
`;
// Scroll to bottom of chat
messagesContainer.scrollTop = messagesContainer.scrollHeight;
}, 800);
// Scroll to bottom of chat
messagesContainer.scrollTop = messagesContainer.scrollHeight;
}
</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=Ronkey/hello-world" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>