455 lines
14 KiB
HTML
455 lines
14 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Discord Clone - Group Chat</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
|
background: #000;
|
|
color: #fff;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.chat-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
max-width: 400px;
|
|
margin: 0 auto;
|
|
position: relative;
|
|
}
|
|
|
|
.glass-effect {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(20px);
|
|
-webkit-backdrop-filter: blur(20px);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.purple-gradient {
|
|
background: linear-gradient(
|
|
135deg,
|
|
rgba(138, 43, 226, 0.3) 0%,
|
|
rgba(75, 0, 130, 0.2) 50%,
|
|
rgba(148, 0, 211, 0.1) 100%
|
|
);
|
|
}
|
|
|
|
.chat-header {
|
|
padding: 20px;
|
|
border-radius: 20px 20px 0 0;
|
|
margin-bottom: 2px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.chat-header::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(
|
|
135deg,
|
|
rgba(138, 43, 226, 0.4) 0%,
|
|
rgba(75, 0, 130, 0.3) 100%
|
|
);
|
|
z-index: -1;
|
|
}
|
|
|
|
.chat-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 12px;
|
|
height: 12px;
|
|
background: #ff4444;
|
|
border-radius: 50%;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
transform: scale(1.2);
|
|
opacity: 0.7;
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.chat-title h1 {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.live-location {
|
|
margin: 2px 0;
|
|
padding: 15px 20px;
|
|
border-radius: 15px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.live-location::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(
|
|
135deg,
|
|
rgba(106, 90, 205, 0.4) 0%,
|
|
rgba(72, 61, 139, 0.3) 50%,
|
|
rgba(123, 104, 238, 0.2) 100%
|
|
);
|
|
z-index: -1;
|
|
}
|
|
|
|
.live-location:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
|
|
}
|
|
|
|
.location-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.location-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
background: #fff;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 12px;
|
|
color: #6a5acd;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.location-text {
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.location-toggle {
|
|
margin-left: auto;
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.toggle-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.toggle-dot.blue {
|
|
background: #4169e1;
|
|
}
|
|
|
|
.toggle-dot.red {
|
|
background: #ff4444;
|
|
}
|
|
|
|
.messages-container {
|
|
flex: 1;
|
|
padding: 10px 0;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.message {
|
|
margin: 2px 20px;
|
|
padding: 12px 16px;
|
|
border-radius: 15px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
animation: slideIn 0.3s ease-out;
|
|
}
|
|
|
|
@keyframes slideIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.message::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(
|
|
135deg,
|
|
rgba(255, 255, 255, 0.1) 0%,
|
|
rgba(138, 43, 226, 0.1) 50%,
|
|
rgba(75, 0, 130, 0.05) 100%
|
|
);
|
|
z-index: -1;
|
|
}
|
|
|
|
.message-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, #ff4444, #ff6b6b);
|
|
}
|
|
|
|
.user-avatar.blue {
|
|
background: linear-gradient(135deg, #4169e1, #6495ed);
|
|
}
|
|
|
|
.username {
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
color: #fff;
|
|
}
|
|
|
|
.message-text {
|
|
font-size: 14px;
|
|
color: #ccc;
|
|
margin-left: 44px;
|
|
}
|
|
|
|
.input-container {
|
|
padding: 20px;
|
|
border-radius: 0 0 20px 20px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.input-container::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(
|
|
135deg,
|
|
rgba(138, 43, 226, 0.2) 0%,
|
|
rgba(75, 0, 130, 0.15) 100%
|
|
);
|
|
z-index: -1;
|
|
}
|
|
|
|
.input-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 25px;
|
|
padding: 12px 20px;
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.input-wrapper input {
|
|
flex: 1;
|
|
background: none;
|
|
border: none;
|
|
color: #fff;
|
|
font-size: 14px;
|
|
outline: none;
|
|
}
|
|
|
|
.input-wrapper input::placeholder {
|
|
color: #888;
|
|
}
|
|
|
|
.send-button {
|
|
width: 24px;
|
|
height: 24px;
|
|
background: linear-gradient(135deg, #6a5acd, #9370db);
|
|
border-radius: 6px;
|
|
border: none;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
font-size: 12px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.send-button:hover {
|
|
transform: scale(1.1);
|
|
box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
|
|
}
|
|
|
|
/* Scrollbar styling */
|
|
.messages-container::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.messages-container::-webkit-scrollbar-track {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.messages-container::-webkit-scrollbar-thumb {
|
|
background: rgba(138, 43, 226, 0.5);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.messages-container::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(138, 43, 226, 0.7);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="chat-container glass-effect">
|
|
<!-- Chat Header -->
|
|
<div class="chat-header glass-effect">
|
|
<div class="chat-title">
|
|
<div class="status-dot"></div>
|
|
<h1>Chat title</h1>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Live Location Channel -->
|
|
<div class="live-location glass-effect">
|
|
<div class="location-content">
|
|
<div class="location-icon">📍</div>
|
|
<div class="location-text">Live Location</div>
|
|
<div class="location-toggle">
|
|
<div class="toggle-dot blue"></div>
|
|
<div class="toggle-dot red"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Messages Container -->
|
|
<div class="messages-container">
|
|
<div class="message glass-effect">
|
|
<div class="message-header">
|
|
<div class="user-avatar"></div>
|
|
<div class="username">Username</div>
|
|
</div>
|
|
<div class="message-text">example message fr</div>
|
|
</div>
|
|
|
|
<div class="message glass-effect">
|
|
<div class="message-header">
|
|
<div class="user-avatar blue"></div>
|
|
<div class="username">Username2</div>
|
|
</div>
|
|
<div class="message-text">example message fr</div>
|
|
</div>
|
|
|
|
<div class="message glass-effect">
|
|
<div class="message-header">
|
|
<div class="user-avatar blue"></div>
|
|
<div class="username">Username2</div>
|
|
</div>
|
|
<div class="message-text">example message fr</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Input Container -->
|
|
<div class="input-container glass-effect">
|
|
<div class="input-wrapper">
|
|
<input type="text" placeholder="typing this message" />
|
|
<button class="send-button">💬</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Add some interactive behavior
|
|
document
|
|
.querySelector(".live-location")
|
|
.addEventListener("click", function () {
|
|
this.style.transform = "scale(0.98)";
|
|
setTimeout(() => {
|
|
this.style.transform = "";
|
|
}, 150);
|
|
});
|
|
|
|
// Handle message sending
|
|
const input = document.querySelector("input");
|
|
const sendButton = document.querySelector(".send-button");
|
|
const messagesContainer = document.querySelector(
|
|
".messages-container",
|
|
);
|
|
|
|
function sendMessage() {
|
|
const message = input.value.trim();
|
|
if (message) {
|
|
const messageEl = document.createElement("div");
|
|
messageEl.className = "message glass-effect";
|
|
messageEl.innerHTML = `
|
|
<div class="message-header">
|
|
<div class="user-avatar" style="background: linear-gradient(135deg, #32cd32, #90ee90);"></div>
|
|
<div class="username">You</div>
|
|
</div>
|
|
<div class="message-text">${message}</div>
|
|
`;
|
|
messagesContainer.appendChild(messageEl);
|
|
messagesContainer.scrollTop =
|
|
messagesContainer.scrollHeight;
|
|
input.value = "";
|
|
}
|
|
}
|
|
|
|
sendButton.addEventListener("click", sendMessage);
|
|
input.addEventListener("keypress", function (e) {
|
|
if (e.key === "Enter") {
|
|
sendMessage();
|
|
}
|
|
});
|
|
|
|
// Add floating animation to status dot
|
|
const statusDot = document.querySelector(".status-dot");
|
|
let isFloating = false;
|
|
|
|
statusDot.addEventListener("click", function () {
|
|
if (!isFloating) {
|
|
this.style.animation =
|
|
"pulse 0.5s ease-in-out infinite alternate";
|
|
isFloating = true;
|
|
} else {
|
|
this.style.animation = "pulse 2s infinite";
|
|
isFloating = false;
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|