co-created html and css for the chat page
This commit is contained in:
@@ -190,6 +190,80 @@ body {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Chat layout */
|
||||
|
||||
#chat-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.chat-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.chat-session {
|
||||
font-size: 0.85rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.chat-log {
|
||||
flex: 1;
|
||||
min-height: 180px;
|
||||
max-height: 320px;
|
||||
margin-bottom: 8px;
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background: rgba(3, 16, 32, 0.65);
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.chat-input-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.chat-input-row .input {
|
||||
flex: 1;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.chat-message {
|
||||
padding: 8px 10px;
|
||||
border-radius: 14px;
|
||||
font-size: 0.9rem;
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
.chat-message.me {
|
||||
align-self: flex-end;
|
||||
background: var(--primary);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.chat-message.them {
|
||||
align-self: flex-start;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
.chat-message.system {
|
||||
align-self: center;
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* Responsive tweaks */
|
||||
|
||||
@media (max-width: 480px) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</header>
|
||||
|
||||
<main class="app-main">
|
||||
<section class="card">
|
||||
<section class="card" id="landing-card">
|
||||
<div class="actions">
|
||||
<button class="btn btn-primary" id="create-session-btn">
|
||||
Create a session
|
||||
@@ -34,10 +34,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card hidden" id="chat-card">
|
||||
<div class="chat-header">
|
||||
<div class="chat-session" id="chat-session-info"></div>
|
||||
<button class="btn btn-secondary" id="leave-session-btn">
|
||||
Leave session
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="chat-log" id="chat-log"></div>
|
||||
|
||||
<form class="chat-input-row" id="chat-form">
|
||||
<input type="text" id="chat-input" class="input" placeholder="Type a message..." autocomplete="off" />
|
||||
<button class="btn btn-primary" id="chat-send-btn">
|
||||
Send
|
||||
</button>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user