grubflip/chat.html
Sarah 05dd55e0b6 Add GrubFlip consumer app — feed, trades, chat, post, landing, admin login
Full vanilla HTML/CSS/JS consumer app with mobile-first responsive design.
Pages: feed (index), post meal, trades, messages inbox, chat, landing page,
and admin login skeleton. Uses Ava's design tokens throughout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 05:44:30 +00:00

173 lines
7.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>GrubFlip — Chat</title>
<meta name="theme-color" content="#FF6B35">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/chat.css">
</head>
<body class="chat-view">
<!-- Chat Header -->
<header class="chat-header">
<a href="messages.html" class="chat-header__back" aria-label="Back to messages">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>
</a>
<div class="chat-header__user">
<div class="chat-header__avatar">
<img src="img/avatar-placeholder.svg" alt="" width="36" height="36">
<span class="chat-header__online" aria-label="Online"></span>
</div>
<div class="chat-header__info">
<h1 class="chat-header__name">Marcus J.</h1>
<span class="chat-header__status">Online · ⭐ 4.8 · 23 trades</span>
</div>
</div>
<button class="btn-icon" aria-label="More options">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="5" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="12" cy="19" r="1"/></svg>
</button>
</header>
<!-- Trade Context Card (pinned at top) -->
<div class="trade-context-card">
<div class="trade-context-card__meals">
<div class="trade-context-card__meal">
<span class="trade-context-card__emoji">🍕</span>
<span class="trade-context-card__label">Margherita Pizza</span>
<span class="trade-context-card__owner">You</span>
</div>
<div class="trade-context-card__arrow">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M7 16l-4-4m0 0l4-4m-4 4h18M17 8l4 4m0 0l-4 4m4-4H3"/></svg>
</div>
<div class="trade-context-card__meal">
<span class="trade-context-card__emoji">🍜</span>
<span class="trade-context-card__label">Pad Thai</span>
<span class="trade-context-card__owner">Marcus</span>
</div>
</div>
<div class="trade-context-card__status">
<span class="trade-status trade-status--accepted">Accepted</span>
<span class="trade-context-card__expires">Expires in 2h 15m</span>
</div>
<div class="trade-context-card__actions">
<button class="btn btn--sm btn--secondary-outline">Set Meetup</button>
<button class="btn btn--sm btn--primary">Confirm Trade</button>
</div>
</div>
<!-- Messages Area -->
<main class="chat-messages" id="chatMessages" role="log" aria-label="Chat messages" aria-live="polite">
<!-- Date Separator -->
<div class="chat-date-separator" role="separator">
<span>Today</span>
</div>
<!-- System message -->
<div class="chat-system-msg">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M7 16l-4-4m0 0l4-4m-4 4h18M17 8l4 4m0 0l-4 4m4-4H3"/></svg>
Trade request sent for Margherita Pizza ↔ Pad Thai
</div>
<!-- Incoming message -->
<div class="chat-msg chat-msg--in">
<img src="img/avatar-placeholder.svg" alt="" class="chat-msg__avatar" width="32" height="32">
<div class="chat-msg__bubble">
<p>Hey! Your margherita looks amazing 🤤 I just made a fresh batch of pad thai — extra peanuts and lime. Interested in a swap?</p>
<time class="chat-msg__time">4:32 PM</time>
</div>
</div>
<!-- Outgoing message -->
<div class="chat-msg chat-msg--out">
<div class="chat-msg__bubble">
<p>Absolutely! I just pulled it out of the wood-fired oven. Still warm 🔥</p>
<time class="chat-msg__time">4:34 PM</time>
</div>
</div>
<!-- System message -->
<div class="chat-system-msg chat-system-msg--success">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
Marcus accepted the trade!
</div>
<!-- Incoming message -->
<div class="chat-msg chat-msg--in">
<img src="img/avatar-placeholder.svg" alt="" class="chat-msg__avatar" width="32" height="32">
<div class="chat-msg__bubble">
<p>Awesome! Where do you want to meet? I'm near the downtown area</p>
<time class="chat-msg__time">4:36 PM</time>
</div>
</div>
<!-- Outgoing message -->
<div class="chat-msg chat-msg--out">
<div class="chat-msg__bubble">
<p>I'm at Rosario's on 5th. Can you swing by around 6?</p>
<time class="chat-msg__time">4:37 PM</time>
</div>
</div>
<!-- Incoming message with location -->
<div class="chat-msg chat-msg--in">
<img src="img/avatar-placeholder.svg" alt="" class="chat-msg__avatar" width="32" height="32">
<div class="chat-msg__bubble">
<p>Sounds good! I can meet at the corner of 5th and Main around 6pm 👍</p>
<time class="chat-msg__time">4:38 PM</time>
</div>
</div>
<!-- Typing indicator -->
<div class="chat-msg chat-msg--in chat-msg--typing" aria-label="Marcus is typing">
<img src="img/avatar-placeholder.svg" alt="" class="chat-msg__avatar" width="32" height="32">
<div class="chat-msg__bubble">
<div class="typing-dots">
<span></span><span></span><span></span>
</div>
</div>
</div>
</main>
<!-- Chat Input -->
<footer class="chat-input-bar">
<button class="chat-input-bar__attach" aria-label="Attach photo">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>
</button>
<div class="chat-input-bar__field">
<textarea
class="chat-input-bar__textarea"
placeholder="Type a message..."
aria-label="Message input"
rows="1"
></textarea>
</div>
<button class="chat-input-bar__send" aria-label="Send message" disabled>
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="22" y1="2" x2="11" y2="13"/><polygon points="22 2 15 22 11 13 2 9 22 2"/></svg>
</button>
</footer>
<!-- Quick Actions (slide up from input) -->
<div class="chat-quick-actions" id="quickActions" hidden>
<button class="chat-quick-action">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"/><circle cx="12" cy="10" r="3"/></svg>
Share Location
</button>
<button class="chat-quick-action">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
Suggest Meetup Time
</button>
<button class="chat-quick-action">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
Complete Trade
</button>
</div>
</body>
</html>