503 lines
27 KiB
HTML
503 lines
27 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&family=Space+Grotesk:wght@500;600;700&display=swap" rel="stylesheet">
|
|
<style>
|
|
:root {
|
|
--bg: #14102b;
|
|
--bg-warm: #1c1442;
|
|
--surface: #1f1742;
|
|
--surface-2: #251c4a;
|
|
--surface-hi: #2d2255;
|
|
--fg: #f0e9ff;
|
|
--fg-2: #c7b9e0;
|
|
--muted: #8a7aab;
|
|
--border: #2e234a;
|
|
--border-soft: #251c40;
|
|
--accent: #d8b4ff;
|
|
--accent-2: #ffb3c8;
|
|
--primary: #ffd9a8;
|
|
--primary-on: #2a1d10;
|
|
--success: #8fe5b5;
|
|
--warn: #ffd166;
|
|
--danger: #ff8a9b;
|
|
--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 60%, #0f0a23 100%);
|
|
display: flex; flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* status bar */
|
|
.status-bar {
|
|
height: 54px; flex-shrink: 0; position: relative; z-index: 50;
|
|
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-wifi {
|
|
width: 16px; height: 12px; position: relative;
|
|
}
|
|
.status-bar .ic-wifi::before, .status-bar .ic-wifi::after {
|
|
content: ''; position: absolute; left: 50%; transform: translateX(-50%);
|
|
}
|
|
.status-bar .ic-wifi::before {
|
|
bottom: 0; width: 14px; height: 7px;
|
|
background: var(--fg);
|
|
-webkit-mask: radial-gradient(ellipse at bottom, transparent 49%, black 50%) bottom/100% 100% no-repeat;
|
|
mask: radial-gradient(ellipse at bottom, transparent 49%, black 50%) bottom/100% 100% no-repeat;
|
|
}
|
|
.status-bar .ic-batt {
|
|
width: 26px; height: 12px; border: 1.2px solid rgba(240, 233, 255, 0.6); border-radius: 3px;
|
|
position: relative; padding: 1.5px;
|
|
}
|
|
.status-bar .ic-batt::after {
|
|
content: ''; position: absolute; right: -3px; top: 50%; transform: translateY(-50%);
|
|
width: 2px; height: 4px; background: rgba(240, 233, 255, 0.6); border-radius: 0 1px 1px 0;
|
|
}
|
|
.status-bar .ic-batt .fill { display: block; height: 100%; background: var(--fg); border-radius: 1px; width: 78%; }
|
|
|
|
/* WeChat mini program capsule - occupies top-right of status bar */
|
|
.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 area */
|
|
.content { flex: 1; overflow-y: auto; padding-bottom: 100px; -webkit-overflow-scrolling: touch; }
|
|
.content::-webkit-scrollbar { display: none; }
|
|
|
|
/* top nav */
|
|
.top-nav {
|
|
padding: 8px 20px 12px;
|
|
display: flex; align-items: center; gap: 12px;
|
|
}
|
|
.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);
|
|
transition: background 150ms;
|
|
}
|
|
.icon-btn:hover { background: rgba(45, 34, 85, 0.6); }
|
|
.icon-btn svg { width: 18px; height: 18px; color: var(--fg); }
|
|
|
|
.search {
|
|
margin: 0 20px 14px;
|
|
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); flex-shrink: 0; }
|
|
.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; margin-bottom: 12px;
|
|
border-bottom: 1px solid var(--border-soft);
|
|
}
|
|
.tab {
|
|
padding: 8px 0; cursor: pointer; position: relative;
|
|
font: 500 14px/1 var(--font-body); color: var(--muted);
|
|
transition: color 200ms;
|
|
background: none; border: 0;
|
|
}
|
|
.tab.act { color: var(--fg); font-weight: 600; }
|
|
.tab.act::after {
|
|
content: ''; position: absolute; left: 50%; transform: translateX(-50%);
|
|
bottom: -1px; width: 22px; height: 3px; border-radius: 2px;
|
|
background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
|
|
}
|
|
|
|
.chips { display: flex; gap: 8px; padding: 12px 20px 4px; overflow-x: auto; }
|
|
.chips::-webkit-scrollbar { display: none; }
|
|
.chip {
|
|
flex-shrink: 0; padding: 6px 12px; border-radius: 999px;
|
|
background: rgba(45, 34, 85, 0.4);
|
|
border: 1px solid rgba(216, 180, 255, 0.08);
|
|
color: var(--fg-2); font: 500 12px/1 var(--font-body);
|
|
cursor: pointer; transition: all 200ms;
|
|
}
|
|
.chip.act { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%); color: var(--primary-on); border-color: transparent; }
|
|
|
|
.feed { padding: 14px 20px 0; display: flex; flex-direction: column; gap: 14px; }
|
|
|
|
.post {
|
|
background: rgba(45, 34, 85, 0.4);
|
|
border-radius: 18px; padding: 16px;
|
|
border: 1px solid rgba(216, 180, 255, 0.08);
|
|
}
|
|
.post .head { display: flex; align-items: center; gap: 10px; }
|
|
.avatar {
|
|
width: 40px; height: 40px; border-radius: 50%;
|
|
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
|
flex-shrink: 0; position: relative;
|
|
}
|
|
.avatar.sm { width: 32px; height: 32px; }
|
|
.avatar.lg { width: 48px; height: 48px; }
|
|
.avatar .badge {
|
|
position: absolute; right: -2px; bottom: -2px;
|
|
width: 16px; height: 16px; border-radius: 50%;
|
|
background: var(--success);
|
|
border: 2px solid var(--surface);
|
|
}
|
|
.meta { flex: 1; min-width: 0; }
|
|
.meta .nm { font: 600 14px/1.2 var(--font-body); display: flex; align-items: center; gap: 6px; }
|
|
.meta .nm .pet-tag { font: 500 10px/1 var(--font-body); color: var(--accent); background: rgba(216, 180, 255, 0.12); padding: 2px 6px; border-radius: 6px; }
|
|
.meta .sub { font: 400 11px/1.3 var(--font-body); color: var(--muted); margin-top: 3px; }
|
|
.more-btn { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); }
|
|
.more-btn svg { width: 16px; height: 16px; }
|
|
|
|
.post .body { font: 400 14px/1.55 var(--font-body); color: var(--fg); margin-top: 12px; }
|
|
.post .body .tag { color: var(--accent); font-weight: 500; }
|
|
.post .body .tag-2 { color: var(--accent-2); font-weight: 500; }
|
|
|
|
.post .media {
|
|
margin-top: 12px; border-radius: 12px; overflow: hidden;
|
|
aspect-ratio: 4 / 3; position: relative;
|
|
}
|
|
.media-pet-1 { background: radial-gradient(circle at 30% 40%, rgba(255, 217, 168, 0.6), transparent 50%), linear-gradient(135deg, #6b4f9a 0%, #3a2a6a 100%); }
|
|
.media-pet-2 { background: radial-gradient(circle at 70% 50%, rgba(255, 179, 200, 0.5), transparent 60%), linear-gradient(135deg, #4a3a7a 0%, #251c4a 100%); }
|
|
.media-pet-3 { background: radial-gradient(circle at 50% 30%, rgba(143, 229, 181, 0.4), transparent 60%), linear-gradient(135deg, #5a4a8a 0%, #2a1f4a 100%); }
|
|
.media .silhouette {
|
|
position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%);
|
|
width: 60%; height: 70%;
|
|
background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
|
|
}
|
|
.media .sticker {
|
|
position: absolute; right: 12px; top: 12px;
|
|
padding: 4px 10px; border-radius: 999px;
|
|
background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px);
|
|
color: var(--fg); font: 500 10px/1 var(--font-body);
|
|
}
|
|
|
|
.post .actions { display: flex; gap: 20px; margin-top: 12px; }
|
|
.action { display: flex; align-items: center; gap: 5px; color: var(--muted); font: 500 12px/1 var(--font-body); cursor: pointer; transition: color 200ms; background: none; border: 0; padding: 0; }
|
|
.action:hover, .action.liked { color: var(--accent-2); }
|
|
.action svg { width: 18px; height: 18px; }
|
|
.action .num { font-variant-numeric: tabular-nums; }
|
|
|
|
/* sticky ad card */
|
|
.ad-card {
|
|
margin: 6px 0;
|
|
background: linear-gradient(135deg, rgba(255, 179, 200, 0.12) 0%, rgba(255, 217, 168, 0.08) 100%);
|
|
border-radius: 16px; padding: 14px;
|
|
display: flex; align-items: center; gap: 12px;
|
|
border: 1px solid rgba(255, 179, 200, 0.15);
|
|
}
|
|
.ad-card .left { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-2), var(--primary)); flex-shrink: 0; display: grid; place-items: center; color: var(--primary-on); font: 700 18px/1 var(--font-display); }
|
|
.ad-card .text { flex: 1; }
|
|
.ad-card .title { font: 600 13px/1.3 var(--font-body); }
|
|
.ad-card .sub { font: 400 11px/1.4 var(--font-body); color: var(--fg-2); margin-top: 4px; }
|
|
.ad-card .cta { padding: 6px 12px; border-radius: 999px; background: var(--primary); color: var(--primary-on); font: 600 11px/1 var(--font-body); }
|
|
|
|
/* 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;
|
|
}
|
|
.tab-item.act { color: var(--accent); }
|
|
.tab-item svg { width: 24px; height: 24px; }
|
|
.tab-item .label { font: 500 10px/1 var(--font-body); letter-spacing: 0.02em; }
|
|
.tab-fab {
|
|
position: relative; flex: 0 0 auto;
|
|
margin: 0 4px;
|
|
}
|
|
.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; }
|
|
|
|
.nav-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font: 400 11px/1 var(--font-body); color: var(--muted); }
|
|
.nav-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
|
|
|
|
/* small toast / interaction */
|
|
.like-toast {
|
|
position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0);
|
|
width: 80px; height: 80px; pointer-events: none;
|
|
display: grid; place-items: center;
|
|
transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
}
|
|
.like-toast.show { transform: translate(-50%, -50%) scale(1); }
|
|
.like-toast svg { width: 80px; height: 80px; color: var(--accent-2); filter: drop-shadow(0 4px 20px rgba(255, 138, 171, 0.6)); }
|
|
</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="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></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="tabs" id="tabs">
|
|
<button class="tab act" data-tab="feed">推荐</button>
|
|
<button class="tab" data-tab="nearby">附近</button>
|
|
|
|
<button class="tab" data-tab="follow">关注</button>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="feed">
|
|
|
|
<article class="post" data-post-id="p1">
|
|
<div class="head">
|
|
<div class="avatar"><span class="badge"></span></div>
|
|
<div class="meta">
|
|
<div class="nm">奶油 <span class="pet-tag">奶昔 · 金毛</span></div>
|
|
<div class="nav-meta"><span>上海 · 滨江公园</span><span class="dot"></span><span>2 分钟前</span></div>
|
|
</div>
|
|
<button class="more-btn" aria-label="更多"><svg viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="1.6"></circle><circle cx="12" cy="12" r="1.6"></circle><circle cx="12" cy="19" r="1.6"></circle></svg></button>
|
|
</div>
|
|
<div class="body">今天带 <span class="tag">#奶昔</span> 去了滨江公园,她第一次见到江面上的轮船,整个狗都愣住了 🌊🐕 路上还遇到一只超凶的柴犬妹妹,两个小家伙打闹了半小时才肯回家。</div>
|
|
<div class="media media-pet-1">
|
|
<div class="silhouette"></div>
|
|
<span class="sticker">📍 滨江公园</span>
|
|
</div>
|
|
<div class="actions">
|
|
<button class="action" data-action="like" data-liked="false"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg><span class="num">128</span></button>
|
|
<button class="action"><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="num">24</span></button>
|
|
<button class="action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg><span>分享</span></button>
|
|
<button class="action" style="margin-left:auto"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg></button>
|
|
</div>
|
|
</article>
|
|
|
|
<div class="ad-card">
|
|
<div class="left">汪</div>
|
|
<div class="text">
|
|
<div class="title">周末宠物派对 · 滨江绿地</div>
|
|
<div class="sub">本周六 14:00 · 名额剩 12 个</div>
|
|
</div>
|
|
<div class="cta">报名</div>
|
|
</div>
|
|
|
|
<article class="post">
|
|
<div class="head">
|
|
<div class="avatar" style="background: linear-gradient(135deg, #d8b4ff, #a4d4ff);"></div>
|
|
<div class="meta">
|
|
<div class="nm">乐乐家 <span class="pet-tag" style="background: rgba(143,229,181,0.12); color: var(--success);">年糕 · 布偶</span></div>
|
|
<div class="nav-meta"><span>上海 · 静安区</span><span class="dot"></span><span>15 分钟前</span></div>
|
|
</div>
|
|
<button class="more-btn"><svg viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="1.6"></circle><circle cx="12" cy="12" r="1.6"></circle><circle cx="12" cy="19" r="1.6"></circle></svg></button>
|
|
</div>
|
|
<div class="body">年糕最近学会了一个新技能 —— <span class="tag-2">#开抽屉</span>。我们家所有抽屉现在都得加儿童锁 😹 求问各位铲屎官,猫咪成精了怎么办?</div>
|
|
<div class="media media-pet-2">
|
|
<div class="silhouette"></div>
|
|
</div>
|
|
<div class="actions">
|
|
<button class="action" data-action="like" data-liked="false"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg><span class="num">87</span></button>
|
|
<button class="action"><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="num">12</span></button>
|
|
<button class="action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg><span>分享</span></button>
|
|
<button class="action" style="margin-left:auto"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg></button>
|
|
</div>
|
|
</article>
|
|
|
|
<article class="post">
|
|
<div class="head">
|
|
<div class="avatar" style="background: linear-gradient(135deg, #8fe5b5, #d8b4ff);"></div>
|
|
<div class="meta">
|
|
<div class="nm">Lucky 之家 <span class="pet-tag" style="background: rgba(255,217,168,0.15); color: var(--primary);">Lucky · 柯基</span></div>
|
|
<div class="nav-meta"><span>上海 · 徐汇区</span><span class="dot"></span><span>1 小时前</span></div>
|
|
</div>
|
|
<button class="more-btn"><svg viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="1.6"></circle><circle cx="12" cy="12" r="1.6"></circle><circle cx="12" cy="19" r="1.6"></circle></svg></button>
|
|
</div>
|
|
<div class="body">第一次带 Lucky 参加宠物生日会 🎂 认识了 4 个新朋友,回家累瘫了 <span class="tag">#社交牛逼证</span></div>
|
|
<div class="media media-pet-3">
|
|
<div class="silhouette"></div>
|
|
<span class="sticker">🎂 3 岁生日会</span>
|
|
</div>
|
|
<div class="actions">
|
|
<button class="action" data-action="like" data-liked="true"><svg viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: var(--accent-2);"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg><span class="num" style="color: var(--accent-2);">256</span></button>
|
|
<button class="action"><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="num">42</span></button>
|
|
<button class="action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg><span>分享</span></button>
|
|
<button class="action" style="margin-left:auto"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path></svg></button>
|
|
</div>
|
|
</article>
|
|
|
|
<div style="text-align: center; color: var(--muted); font: 400 12px/1 var(--font-body); padding: 8px 0 20px;">— 暂时没有更多了,稍后再来看看吧 🐾 —</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="like-toast" id="likeToast"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg></div>
|
|
|
|
<nav class="tabbar" aria-label="底部导航">
|
|
<a class="tab-item act" 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" aria-label="发布">
|
|
<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" 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>
|
|
</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>
|
|
// Tabs
|
|
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');
|
|
});
|
|
// Chips
|
|
const chips = document.getElementById('chips');
|
|
chips.addEventListener('click', (e) => {
|
|
const c = e.target.closest('.chip');
|
|
if (!c) return;
|
|
chips.querySelectorAll('.chip').forEach(x => x.classList.remove('act'));
|
|
c.classList.add('act');
|
|
});
|
|
// Like
|
|
const toast = document.getElementById('likeToast');
|
|
document.querySelectorAll('[data-action="like"]').forEach(btn => {
|
|
btn.addEventListener('click', (e) => {
|
|
e.preventDefault();
|
|
const liked = btn.dataset.liked === 'true';
|
|
const num = btn.querySelector('.num');
|
|
const svg = btn.querySelector('svg');
|
|
if (liked) {
|
|
btn.dataset.liked = 'false';
|
|
btn.style.color = '';
|
|
svg.style.color = '';
|
|
svg.setAttribute('fill', 'none');
|
|
num.textContent = String(parseInt(num.textContent, 10) - 1);
|
|
} else {
|
|
btn.dataset.liked = 'true';
|
|
svg.setAttribute('fill', 'currentColor');
|
|
btn.style.color = 'var(--accent-2)';
|
|
num.style.color = 'var(--accent-2)';
|
|
num.textContent = String(parseInt(num.textContent, 10) + 1);
|
|
toast.classList.add('show');
|
|
setTimeout(() => toast.classList.remove('show'), 480);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
|
|
</body></html> |