Files
Pawer/refrence_html/messages.html
2026-06-18 14:33:50 +08:00

392 lines
21 KiB
HTML

<!doctype html>
<html lang="zh-CN"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>消息 · 汪圈</title>
<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=Inter:wght@400;450;510;600;700&amp;family=Space+Grotesk:wght@500;600;700&amp;display=swap" rel="stylesheet">
<style>
:root {
--bg: #14102b;
--bg-warm: #1c1442;
--surface: #1f1742;
--surface-2: #251c4a;
--fg: #f0e9ff;
--fg-2: #c7b9e0;
--muted: #8a7aab;
--border: #2e234a;
--accent: #d8b4ff;
--accent-2: #ffb3c8;
--primary: #ffd9a8;
--primary-on: #2a1d10;
--success: #8fe5b5;
--warn: #ffd166;
--font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
--font-body: 'Inter', system-ui, -apple-system, 'PingFang SC', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
background: radial-gradient(ellipse 70% 50% at 25% 0%, rgba(216, 180, 255, 0.10), transparent 60%), radial-gradient(ellipse 60% 50% at 75% 100%, rgba(255, 179, 200, 0.08), transparent 60%), #0a0719;
color: var(--fg);
font-family: var(--font-body);
-webkit-font-smoothing: antialiased;
display: grid; place-items: center;
overflow: auto;
}
.stage-wrap { padding: 24px; }
.phone { width: 390px; height: 844px; background: #0a0719; border-radius: 50px; position: relative; overflow: hidden; box-shadow: 0 60px 120px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 0 0 2px rgba(255, 255, 255, 0.04); }
.phone::before { content: ''; position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 110px; height: 32px; background: #000; border-radius: 9999px; z-index: 100; }
.screen { position: absolute; inset: 0; background: linear-gradient(180deg, #1c1442 0%, #14102b 100%); display: flex; flex-direction: column; overflow: hidden; }
.status-bar { height: 54px; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 32px 8px; font: 600 15px/1 var(--font-body); }
.status-bar .right { display: flex; align-items: center; gap: 6px; }
.status-bar .ic-sig { display: flex; align-items: flex-end; gap: 2px; }
.status-bar .ic-sig span { width: 3px; background: var(--fg); border-radius: 1px; }
.status-bar .ic-sig span:nth-child(1) { height: 4px; } .status-bar .ic-sig span:nth-child(2) { height: 6px; } .status-bar .ic-sig span:nth-child(3) { height: 8px; } .status-bar .ic-sig span:nth-child(4) { height: 10px; }
.status-bar .ic-batt { width: 26px; height: 12px; border: 1.2px solid rgba(240, 233, 255, 0.6); border-radius: 3px; padding: 1.5px; }
.status-bar .ic-batt .fill { display: block; height: 100%; background: var(--fg); border-radius: 1px; width: 78%; }
/* WeChat mini program capsule */
.mp-capsule {
display: flex; align-items: center;
height: 28px; border-radius: 14px;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.14);
overflow: hidden;
backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.mp-capsule .capsule-btn {
display: grid; place-items: center;
width: 32px; height: 28px;
background: transparent; border: 0; padding: 0; cursor: pointer; color: var(--fg);
}
.mp-capsule .capsule-btn + .capsule-btn { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.mp-capsule svg { width: 14px; height: 14px; }
.content { flex: 1; overflow-y: auto; padding-bottom: 100px; -webkit-overflow-scrolling: touch; }
.content::-webkit-scrollbar { display: none; }
.top-nav { padding: 8px 20px 12px; display: flex; align-items: center; gap: 10px; }
.top-nav h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(45, 34, 85, 0.4); display: grid; place-items: center; cursor: pointer; border: 1px solid rgba(216, 180, 255, 0.08); }
.icon-btn svg { width: 18px; height: 18px; color: var(--fg); }
.search { margin: 0 20px 12px; background: rgba(45, 34, 85, 0.4); border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(216, 180, 255, 0.06); }
.search svg { width: 14px; height: 14px; color: var(--muted); }
.search input { background: none; border: 0; outline: 0; flex: 1; color: var(--fg); font: 400 13px/1 var(--font-body); }
.search input::placeholder { color: var(--muted); }
.tabs { display: flex; gap: 22px; padding: 0 20px 8px; }
.tab { padding: 6px 0; cursor: pointer; position: relative; font: 500 14px/1 var(--font-body); color: var(--muted); background: none; border: 0; transition: color 200ms; }
.tab.act { color: var(--fg); font-weight: 600; }
.tab.act::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -8px; width: 18px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%); }
.tab .badge { display: inline-block; margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-2); color: var(--primary-on); font: 700 10px/18px var(--font-body); text-align: center; vertical-align: middle; }
/* active now */
.active-row { padding: 12px 20px 8px; display: flex; gap: 12px; overflow-x: auto; }
.active-row::-webkit-scrollbar { display: none; }
.active { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.active .av-wrap { position: relative; }
.active .av { width: 50px; height: 50px; border-radius: 50%; }
.active .av.a1 { background: linear-gradient(135deg, #ffb3c8, #ffd9a8); }
.active .av.a2 { background: linear-gradient(135deg, #d8b4ff, #a4d4ff); }
.active .av.a3 { background: linear-gradient(135deg, #8fe5b5, #d8b4ff); }
.active .av.a4 { background: linear-gradient(135deg, #ffd9a8, #ffb3c8); }
.active .av.a5 { background: linear-gradient(135deg, #a4d4ff, #d8b4ff); }
.active .nm { font: 500 11px/1.2 var(--font-body); color: var(--fg-2); max-width: 60px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.active .live { position: absolute; right: -2px; bottom: -2px; padding: 2px 6px; background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%); border-radius: 6px; color: var(--primary-on); font: 700 9px/1.2 var(--font-body); border: 1.5px solid var(--bg); }
.divider { display: flex; align-items: center; gap: 12px; padding: 12px 20px 4px; }
.divider .line { flex: 1; height: 1px; background: rgba(216, 180, 255, 0.08); }
.divider .label { font: 500 10px/1 var(--font-display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
/* conversation list */
.conv-list { padding: 0 12px; }
.conv {
display: flex; align-items: center; gap: 12px;
padding: 12px 8px; border-radius: 14px;
cursor: pointer; transition: background 200ms;
}
.conv:hover, .conv:active { background: rgba(45, 34, 85, 0.3); }
.conv .av { width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; position: relative; }
.conv .av.a1 { background: linear-gradient(135deg, #ffb3c8, #ffd9a8); }
.conv .av.a2 { background: linear-gradient(135deg, #d8b4ff, #a4d4ff); }
.conv .av.a3 { background: linear-gradient(135deg, #8fe5b5, #d8b4ff); }
.conv .av.a4 { background: linear-gradient(135deg, #ffd9a8, #ffb3c8); }
.conv .av.a5 { background: linear-gradient(135deg, #a4d4ff, #ffd9a8); }
.conv .av.a6 { background: linear-gradient(135deg, #ffb3c8, #d8b4ff); }
.conv .av .online { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--success); border: 2.5px solid var(--bg); }
.conv .av .pet-tag { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 12px; border: 2px solid var(--bg); }
.conv .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.conv .row1 { display: flex; align-items: center; justify-content: space-between; }
.conv .nm { font: 600 14px/1.2 var(--font-body); display: flex; align-items: center; gap: 4px; }
.conv .nm .pet-name { color: var(--accent); font-size: 11px; font-weight: 500; }
.conv .tm { font: 400 11px/1 var(--font-body); color: var(--muted); }
.conv .prv { font: 400 12px/1.3 var(--font-body); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .prv .tag { color: var(--accent); font-weight: 500; }
.conv .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.conv .badge { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent-2); color: var(--primary-on); font: 700 10px/18px var(--font-body); text-align: center; }
.conv .muted-badge { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: 0.4; }
.conv .pin { color: var(--muted); }
.conv .pin svg { width: 12px; height: 12px; }
/* group chat */
.conv .av.group { background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: var(--primary-on); }
.conv .av.group svg { width: 22px; height: 22px; }
.section-label { padding: 12px 20px 6px; font: 600 11px/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
/* tab bar */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 88px; padding-bottom: 22px; background: rgba(20, 16, 43, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid rgba(216, 180, 255, 0.06); display: flex; align-items: center; justify-content: space-around; z-index: 60; }
.tab-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; cursor: pointer; flex: 1; color: var(--muted); transition: color 200ms; text-decoration: none; position: relative; }
.tab-item.act { color: var(--accent); }
.tab-item svg { width: 24px; height: 24px; }
.tab-item .label { font: 500 10px/1 var(--font-body); }
.tab-item .dot { position: absolute; top: 4px; right: 26%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); border: 1.5px solid var(--bg); }
.tab-fab .b { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); display: grid; place-items: center; box-shadow: 0 10px 24px rgba(216, 180, 255, 0.3); margin-top: -16px; transition: transform 200ms; }
.tab-fab:hover .b { transform: scale(1.05); }
.tab-fab svg { width: 24px; height: 24px; color: var(--primary-on); }
.home-indicator { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 134px; height: 5px; background: var(--fg); border-radius: 3px; opacity: 0.7; z-index: 70; }
</style>
</head>
<body>
<div class="stage-wrap">
<div class="phone">
<div class="screen">
<div class="status-bar">
<span>9:41</span>
<div class="mp-capsule" aria-label="小程序菜单">
<button class="capsule-btn" aria-label="更多">
<svg viewBox="0 0 24 24" fill="currentColor">
<circle cx="6" cy="12" r="1.6"></circle>
<circle cx="12" cy="12" r="1.6"></circle>
<circle cx="18" cy="12" r="1.6"></circle>
</svg>
</button>
<button class="capsule-btn" aria-label="关闭">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
</div>
<div class="content">
<div class="top-nav">
<h1>消息</h1>
<button class="icon-btn" aria-label="发起群聊">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line></svg>
</button>
</div>
<div class="search">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
<input placeholder="搜索联系人、群聊…">
</div>
<div class="active-row">
<div class="active">
<div class="av-wrap"><div class="av a1"></div><div class="live">LIVE</div></div>
<div class="nm">麻薯</div>
</div>
<div class="active">
<div class="av-wrap"><div class="av a2"></div><div class="live">LIVE</div></div>
<div class="nm">乐乐</div>
</div>
<div class="active">
<div class="av-wrap"><div class="av a3"></div></div>
<div class="nm">豆豆</div>
</div>
<div class="active">
<div class="av-wrap"><div class="av a4"></div></div>
<div class="nm">Lucky</div>
</div>
<div class="active">
<div class="av-wrap"><div class="av a5"></div></div>
<div class="nm">多多</div>
</div>
</div>
<div class="section-label">全部消息</div>
<div class="conv-list">
<div class="conv" data-id="c1">
<div class="av a1">
<div class="online"></div>
<div class="pet-tag">🐕</div>
</div>
<div class="col">
<div class="row1">
<div class="nm">麻薯妈妈 <span class="pet-name">· 麻薯 ♀</span></div>
<div class="tm">刚刚</div>
</div>
<div class="prv">好的!明天 4 点滨江公园见 🐾 我带飞盘来</div>
</div>
<div class="right">
<div class="badge">2</div>
</div>
</div>
<div class="conv" data-id="c2">
<div class="av group">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>
</div>
<div class="col">
<div class="row1">
<div class="nm">周末宠物派对 · 滨江 <span class="badge" style="background: var(--accent); color: var(--primary-on); padding: 0 6px; font-size: 9px; margin-left: 4px;">14人</span></div>
<div class="tm">10 分</div>
</div>
<div class="prv">Lucky 之家: <span class="tag">@阿布的家长</span> 还差 3 个名额,帮转发一下!</div>
</div>
<div class="right">
<div class="badge">8</div>
</div>
</div>
<div class="conv" data-id="c3">
<div class="av a2">
<div class="online"></div>
</div>
<div class="col">
<div class="row1">
<div class="nm">乐乐家 <span class="pet-name">· 年糕 ♂</span></div>
<div class="tm">14:22</div>
</div>
<div class="prv">[图片] 年糕今天新剪的造型,是不是很精神</div>
</div>
<div class="right">
<div class="muted-badge"></div>
</div>
</div>
<div class="conv" data-id="c4">
<div class="av a3"></div>
<div class="col">
<div class="row1">
<div class="nm">豆豆</div>
<div class="tm">今天 11:08</div>
</div>
<div class="prv">感谢你分享的遛狗路线!我们下周去试试</div>
</div>
<div class="right">
<div class="pin"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l2 6h6l-5 4 2 7-5-4-5 4 2-7-5-4h6z"></path></svg></div>
</div>
</div>
<div class="conv" data-id="c5">
<div class="av a4">
<div class="online"></div>
</div>
<div class="col">
<div class="row1">
<div class="nm">Lucky 之家 <span class="pet-name">· Lucky ♂</span></div>
<div class="tm">昨天</div>
</div>
<div class="prv">我家 Lucky 周六可以参加 🎾 你家毛孩子呢?</div>
</div>
<div class="right">
<div class="muted-badge"></div>
</div>
</div>
<div class="conv" data-id="c6">
<div class="av a5"></div>
<div class="col">
<div class="row1">
<div class="nm">多多爸爸</div>
<div class="tm">昨天</div>
</div>
<div class="prv">收到!期待周末见面 🐶</div>
</div>
<div class="right">
<div class="muted-badge"></div>
</div>
</div>
<div class="conv" data-id="c7">
<div class="av a6"></div>
<div class="col">
<div class="row1">
<div class="nm">奶油</div>
<div class="tm">周一</div>
</div>
<div class="prv">欢迎来到汪圈!这里有很多可爱的小动物</div>
</div>
<div class="right">
<div class="muted-badge"></div>
</div>
</div>
<div class="conv" data-id="c8">
<div class="av a1" style="background: linear-gradient(135deg, #ffd166, #ffb3c8);"></div>
<div class="col">
<div class="row1">
<div class="nm">🐾 汪圈客服</div>
<div class="tm">上周</div>
</div>
<div class="prv">您的宠物认证申请已通过,感谢支持</div>
</div>
<div class="right">
<div class="muted-badge"></div>
</div>
</div>
</div>
</div>
<nav class="tabbar">
<a class="tab-item" href="plaza.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon></svg>
<span class="label">广场</span>
</a>
<a class="tab-item" href="nearby.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>
<span class="label">附近</span>
</a>
<a class="tab-fab" href="publish.html">
<div class="b">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
</div>
</a>
<a class="tab-item act" href="messages.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
<span class="label">消息</span>
<span class="dot"></span>
</a>
<a class="tab-item" href="profile.html">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
<span class="label">我的</span>
</a>
</nav>
<div class="home-indicator"></div>
</div>
</div>
</div>
<script>
const tabs = document.getElementById('tabs');
tabs.addEventListener('click', (e) => {
const t = e.target.closest('.tab');
if (!t) return;
tabs.querySelectorAll('.tab').forEach(x => x.classList.remove('act'));
t.classList.add('act');
});
// Click on conversation (visual feedback)
document.querySelectorAll('.conv').forEach(conv => {
conv.addEventListener('click', () => {
const badge = conv.querySelector('.badge');
if (badge && badge.textContent && badge.textContent !== '14人') {
badge.style.display = 'none';
}
});
});
</script>
</body></html>