mirror of
https://github.com/System-End/self-learning-ai-website.git
synced 2026-04-19 15:28:20 +00:00
o
This commit is contained in:
parent
816182530e
commit
6833f2ab78
3 changed files with 113 additions and 0 deletions
33
index.html
Normal file
33
index.html
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Self-Learning AI Website</title>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Welcome to the Self-Learning AI Website</h1>
|
||||
</header>
|
||||
<main>
|
||||
<section id="scraped-content">
|
||||
<h2>Content from teamparadise1165.com</h2>
|
||||
<div id="content-container">Loading content...</div>
|
||||
</section>
|
||||
<section id="chat">
|
||||
<h2>Chat with AI</h2>
|
||||
<div id="chat-container">
|
||||
<div id="chat-output"></div>
|
||||
<input
|
||||
type="text"
|
||||
id="chat-input"
|
||||
placeholder="Type your message..."
|
||||
/>
|
||||
<button id="send-button">Send</button>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script src="scripts.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
35
scripts.js
Normal file
35
scripts.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
document.addEventListener("DOMContentLoaded", function () {
|
||||
// Fetch and display content from teamparadise1165.com
|
||||
fetch("https://teamparadise1165.com")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("content-container").innerHTML = data;
|
||||
})
|
||||
.catch((error) => {
|
||||
document.getElementById("content-container").innerHTML =
|
||||
"Failed to load content.";
|
||||
console.error("Error fetching content:", error);
|
||||
});
|
||||
|
||||
// Chat functionality
|
||||
const chatInput = document.getElementById("chat-input");
|
||||
const sendButton = document.getElementById("send-button");
|
||||
const chatOutput = document.getElementById("chat-output");
|
||||
|
||||
sendButton.addEventListener("click", function () {
|
||||
const message = chatInput.value;
|
||||
if (message.trim()) {
|
||||
const userMessage = document.createElement("div");
|
||||
userMessage.textContent = "You: " + message;
|
||||
chatOutput.appendChild(userMessage);
|
||||
chatInput.value = "";
|
||||
|
||||
// Simulate AI response
|
||||
setTimeout(() => {
|
||||
const aiMessage = document.createElement("div");
|
||||
aiMessage.textContent = "AI: This is a simulated response.";
|
||||
chatOutput.appendChild(aiMessage);
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
});
|
||||
45
style.css
Normal file
45
style.css
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
header {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
}
|
||||
main {
|
||||
padding: 20px;
|
||||
}
|
||||
#scraped-content,
|
||||
#chat {
|
||||
margin-bottom: 20px;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
#chat-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
#chat-output {
|
||||
flex: 1;
|
||||
min-height: 200px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#chat-input {
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#send-button {
|
||||
padding: 10px;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue