You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1060 lines
36 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=375, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>青核 Youthome - 话题广场</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="../colors_and_type.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
:root {
--radius-xs: 4px;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 20px;
--radius-full: 9999px;
--height-btn: 44px;
--height-input: 44px;
--height-nav: 64px;
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
--shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.06);
--shadow-btn: 0 2px 8px rgba(38, 194, 187, 0.25);
--shadow-btn-hover: 0 4px 16px rgba(38, 194, 187, 0.35);
--shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.12);
--shadow-float: 0 4px 24px rgba(0, 0, 0, 0.08);
--shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.03);
--glass-bg: rgba(255, 255, 255, 0.72);
--glass-blur: blur(20px);
--glass-border: rgba(255, 255, 255, 0.3);
}
html, body {
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
background: var(--youth-bg-page);
color: var(--youth-text-primary);
min-height: 100vh;
overflow-x: hidden;
}
.app-container {
width: 375px;
height: 812px;
margin: 0 auto;
background: var(--youth-bg-page);
position: relative;
overflow: hidden;
}
/* ===== 状态栏 ===== */
.status-bar {
height: 24px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
font-size: 12px;
font-weight: 600;
color: var(--youth-text-primary);
position: relative;
z-index: 30;
background: var(--youth-bg-page);
}
.status-bar .right-icons {
display: flex;
align-items: center;
gap: 6px;
}
.status-bar svg {
width: 16px;
height: 16px;
}
/* ===== 顶部导航栏 ===== */
.top-nav {
height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px;
background: var(--youth-bg-page);
position: relative;
z-index: 20;
}
.nav-icon-btn {
width: 34px;
height: 34px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--youth-radius-full);
cursor: pointer;
transition: all 0.15s ease;
color: var(--youth-text-primary);
}
.nav-icon-btn:active {
transform: scale(0.92);
}
.nav-icon-btn svg {
width: 22px;
height: 22px;
stroke-width: 2px;
}
.nav-title {
font-size: 17px;
font-weight: 600;
color: var(--youth-text-primary);
}
.nav-right-group {
display: flex;
align-items: center;
gap: 4px;
}
/* ===== 搜索栏 ===== */
.search-section {
padding: 0 16px 12px;
background: var(--youth-bg-page);
}
.search-bar {
height: var(--height-input);
background: var(--youth-bg-card);
border-radius: var(--youth-radius-sm);
display: flex;
align-items: center;
padding: 0 14px;
gap: 8px;
box-shadow: var(--shadow-inset);
border: 1px solid var(--youth-border-light);
transition: all 0.2s ease;
cursor: pointer;
}
.search-bar:active {
border-color: var(--youth-primary);
}
.search-icon {
width: 18px;
height: 18px;
color: var(--youth-text-tertiary);
flex-shrink: 0;
}
.search-icon svg {
width: 18px;
height: 18px;
stroke-width: 2px;
}
.search-placeholder {
flex: 1;
font-size: 14px;
color: var(--youth-text-tertiary);
}
/* ===== 分类导航 ===== */
.category-nav {
display: flex;
align-items: center;
gap: 8px;
padding: 0 16px 16px;
overflow-x: auto;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
}
.category-nav::-webkit-scrollbar {
display: none;
}
.category-chip {
flex-shrink: 0;
height: 32px;
padding: 0 14px;
border-radius: var(--youth-radius-full);
background: var(--youth-bg-card);
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
color: var(--youth-text-secondary);
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid var(--youth-border-light);
}
.category-chip.active {
background: var(--youth-primary);
color: #FFFFFF;
border-color: var(--youth-primary);
font-weight: 500;
box-shadow: var(--shadow-btn);
}
.category-chip:active {
transform: scale(0.95);
}
/* ===== 滚动内容区 ===== */
.scroll-content {
position: absolute;
top: 116px;
left: 0;
right: 0;
bottom: 64px;
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
.scroll-content::-webkit-scrollbar {
display: none;
}
/* ===== 今日热门榜单 ===== */
.hot-rank-section {
padding: 0 16px 20px;
}
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.section-title {
font-size: 16px;
font-weight: 600;
color: var(--youth-text-primary);
display: flex;
align-items: center;
gap: 6px;
}
.section-title .title-icon {
width: 18px;
height: 18px;
color: var(--youth-primary);
}
.section-title .title-icon svg {
width: 18px;
height: 18px;
stroke-width: 2px;
}
.section-more {
font-size: 12px;
color: var(--youth-text-tertiary);
display: flex;
align-items: center;
gap: 2px;
cursor: pointer;
}
.section-more svg {
width: 12px;
height: 12px;
stroke-width: 2px;
}
.hot-rank-card {
background: var(--youth-bg-card);
border-radius: var(--youth-radius-md);
padding: 4px 0;
box-shadow: var(--shadow-card);
overflow: hidden;
}
.hot-rank-item {
display: flex;
align-items: center;
padding: 12px 16px;
gap: 12px;
cursor: pointer;
transition: background 0.15s ease;
}
.hot-rank-item:active {
background: var(--youth-bg-page);
}
.hot-rank-item + .hot-rank-item {
border-top: 1px solid var(--youth-border-light);
}
.rank-number {
width: 20px;
flex-shrink: 0;
font-size: 15px;
font-weight: 700;
text-align: center;
}
.rank-number.top1 { color: #FF6B35; }
.rank-number.top2 { color: #FF9F45; }
.rank-number.top3 { color: #FFC53D; }
.rank-number.normal { color: var(--youth-text-tertiary); }
.rank-content {
flex: 1;
min-width: 0;
}
.rank-title {
font-size: 14px;
font-weight: 500;
color: var(--youth-text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 2px;
}
.rank-meta {
font-size: 11px;
color: var(--youth-text-tertiary);
display: flex;
align-items: center;
gap: 8px;
}
.rank-heat {
display: flex;
align-items: center;
gap: 3px;
}
.rank-heat svg {
width: 11px;
height: 11px;
stroke-width: 2px;
}
.rank-trend {
display: flex;
align-items: center;
gap: 2px;
}
.rank-trend.up { color: #F5222D; }
.rank-trend.down { color: #52C41A; }
.rank-trend.new { color: var(--youth-primary); }
.rank-trend svg {
width: 10px;
height: 10px;
}
/* ===== 推荐话题 ===== */
.recommend-section {
padding: 0 16px 20px;
}
.topic-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.topic-card {
background: var(--youth-bg-card);
border-radius: var(--youth-radius-md);
padding: 14px;
box-shadow: var(--shadow-card);
cursor: pointer;
transition: all 0.2s ease;
position: relative;
overflow: hidden;
}
.topic-card:active {
transform: scale(0.97);
box-shadow: var(--shadow-card-hover);
}
.topic-card-bg {
position: absolute;
top: 0;
right: 0;
width: 60px;
height: 60px;
opacity: 0.12;
border-radius: 0 var(--youth-radius-md) 0 50%;
}
.topic-card-icon {
width: 36px;
height: 36px;
border-radius: var(--youth-radius-sm);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 10px;
position: relative;
}
.topic-card-icon svg {
width: 20px;
height: 20px;
stroke-width: 2px;
color: #FFFFFF;
}
.topic-card-name {
font-size: 14px;
font-weight: 600;
color: var(--youth-text-primary);
margin-bottom: 4px;
position: relative;
}
.topic-card-desc {
font-size: 11px;
color: var(--youth-text-tertiary);
line-height: 1.4;
margin-bottom: 8px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
position: relative;
}
.topic-card-stats {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}
.topic-stat {
font-size: 10px;
color: var(--youth-text-tertiary);
display: flex;
align-items: center;
gap: 3px;
}
.topic-stat svg {
width: 10px;
height: 10px;
stroke-width: 2px;
}
.topic-follow-btn {
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--youth-primary);
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
box-shadow: var(--shadow-btn);
}
.topic-follow-btn svg {
width: 14px;
height: 14px;
stroke-width: 2.5px;
}
/* ===== 发起话题悬浮按钮 ===== */
.create-fab {
position: absolute;
right: 16px;
bottom: 84px;
width: 52px;
height: 52px;
border-radius: 50%;
background: linear-gradient(135deg, #3FD5CE 0%, #26C2BB 100%);
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
box-shadow: 0 6px 20px rgba(38, 194, 187, 0.4);
cursor: pointer;
z-index: 15;
transition: all 0.2s ease;
}
.create-fab:active {
transform: scale(0.92);
}
.create-fab svg {
width: 24px;
height: 24px;
stroke-width: 2.5px;
}
/* ===== 底部导航栏 ===== */
.bottom-nav {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: var(--height-nav);
background: var(--youth-bg-card);
display: flex;
align-items: flex-start;
justify-content: space-around;
padding-top: 8px;
border-top: 1px solid var(--youth-border-light);
z-index: 20;
}
.bottom-nav-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
cursor: pointer;
transition: all 0.15s ease;
}
.bottom-nav-item:active {
transform: scale(0.92);
}
.bottom-nav-item svg {
width: 24px;
height: 24px;
stroke-width: 2px;
color: var(--youth-text-tertiary);
}
.bottom-nav-item.active svg {
color: var(--youth-primary);
}
.bottom-nav-item span {
font-size: 10px;
color: var(--youth-text-tertiary);
}
.bottom-nav-item.active span {
color: var(--youth-primary);
font-weight: 500;
}
/* ===== 话题颜色 ===== */
.bg-daily { background: linear-gradient(135deg, #A5E3E0, #54CAC5); }
.bg-study { background: linear-gradient(135deg, #B3C7FF, #7A95E8); }
.bg-food { background: linear-gradient(135deg, #FFD4A3, #FF9F45); }
.bg-sport { background: linear-gradient(135deg, #FFB3B3, #FF8080); }
.bg-music { background: linear-gradient(135deg, #D4B8FF, #A78BFA); }
.bg-photo { background: linear-gradient(135deg, #82DDF0, #36BFFA); }
.bg-travel { background: linear-gradient(135deg, #B3E5C8, #52C41A); }
.bg-love { background: linear-gradient(135deg, #FFB3D1, #FF80B3); }
</style>
</head>
<body>
<div class="app-container">
<!-- 状态栏 -->
<div class="status-bar">
<span>9:41</span>
<div class="right-icons">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9z"></path>
<path d="M5 12.55l2 2a7 7 0 0 1 10 0l2-2C15.14 9.14 8.87 9.14 5 12.55z"></path>
<path d="M8.5 16l3.5 3.5 3.5-3.5"></path>
</svg>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<rect x="1" y="6" width="18" height="12" rx="2"></rect>
<line x1="23" y1="10" x2="23" y2="14"></line>
</svg>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="7" width="18" height="12" rx="2"></rect>
<path d="M22 11V9a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2"></path>
<path d="M6 7V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2"></path>
</svg>
</div>
</div>
<!-- 顶部导航栏 -->
<div class="top-nav">
<div class="nav-icon-btn" onclick="goBack()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
</div>
<div class="nav-title">话题广场</div>
<div class="nav-right-group">
<div class="nav-icon-btn" onclick="openSearch()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</div>
</div>
</div>
<!-- 搜索栏 -->
<div class="search-section">
<div class="search-bar" onclick="openSearch()">
<div class="search-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</div>
<span class="search-placeholder">搜索感兴趣的话题</span>
</div>
</div>
<!-- 分类导航 -->
<div class="category-nav">
<div class="category-chip active" onclick="switchCategory(this, 'all')">全部</div>
<div class="category-chip" onclick="switchCategory(this, 'daily')">校园日常</div>
<div class="category-chip" onclick="switchCategory(this, 'study')">学习成长</div>
<div class="category-chip" onclick="switchCategory(this, 'food')">美食探店</div>
<div class="category-chip" onclick="switchCategory(this, 'sport')">运动健身</div>
<div class="category-chip" onclick="switchCategory(this, 'music')">音乐艺术</div>
<div class="category-chip" onclick="switchCategory(this, 'travel')">旅行出游</div>
<div class="category-chip" onclick="switchCategory(this, 'love')">情感交友</div>
</div>
<!-- 滚动内容区 -->
<div class="scroll-content">
<!-- 今日热门 -->
<div class="hot-rank-section">
<div class="section-header">
<div class="section-title">
<div class="title-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>
</svg>
</div>
今日热门
</div>
<div class="section-more" onclick="openHotRank()">
查看全部
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</div>
</div>
<div class="hot-rank-card">
<div class="hot-rank-item" onclick="openTopic('期末加油打卡挑战')">
<span class="rank-number top1">1</span>
<div class="rank-content">
<div class="rank-title">#期末加油打卡挑战</div>
<div class="rank-meta">
<span class="rank-heat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2s4 4 4 8a4 4 0 0 1-8 0c0-2 1-3 1-3s-1 5 3 5 3-3 3-5c0-3-3-5-3-5z"></path>
</svg>
2.3万热度
</span>
<span class="rank-trend up">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<polyline points="18 15 12 9 6 15"></polyline>
</svg>
+15%
</span>
</div>
</div>
</div>
<div class="hot-rank-item" onclick="openTopic('秋日校园摄影大赛')">
<span class="rank-number top2">2</span>
<div class="rank-content">
<div class="rank-title">#秋日校园摄影大赛</div>
<div class="rank-meta">
<span class="rank-heat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2s4 4 4 8a4 4 0 0 1-8 0c0-2 1-3 1-3s-1 5 3 5 3-3 3-5c0-3-3-5-3-5z"></path>
</svg>
1.8万热度
</span>
<span class="rank-trend new">
新
</span>
</div>
</div>
</div>
<div class="hot-rank-item" onclick="openTopic('图书馆自习打卡')">
<span class="rank-number top3">3</span>
<div class="rank-content">
<div class="rank-title">#图书馆自习打卡</div>
<div class="rank-meta">
<span class="rank-heat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2s4 4 4 8a4 4 0 0 1-8 0c0-2 1-3 1-3s-1 5 3 5 3-3 3-5c0-3-3-5-3-5z"></path>
</svg>
1.5万热度
</span>
<span class="rank-trend up">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<polyline points="18 15 12 9 6 15"></polyline>
</svg>
+8%
</span>
</div>
</div>
</div>
<div class="hot-rank-item" onclick="openTopic('食堂美食测评')">
<span class="rank-number normal">4</span>
<div class="rank-content">
<div class="rank-title">#食堂美食测评</div>
<div class="rank-meta">
<span class="rank-heat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2s4 4 4 8a4 4 0 0 1-8 0c0-2 1-3 1-3s-1 5 3 5 3-3 3-5c0-3-3-5-3-5z"></path>
</svg>
1.2万热度
</span>
<span class="rank-trend down">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
-3%
</span>
</div>
</div>
</div>
<div class="hot-rank-item" onclick="openTopic('操场夜跑搭子')">
<span class="rank-number normal">5</span>
<div class="rank-content">
<div class="rank-title">#操场夜跑搭子</div>
<div class="rank-meta">
<span class="rank-heat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2s4 4 4 8a4 4 0 0 1-8 0c0-2 1-3 1-3s-1 5 3 5 3-3 3-5c0-3-3-5-3-5z"></path>
</svg>
9,842热度
</span>
<span class="rank-trend up">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<polyline points="18 15 12 9 6 15"></polyline>
</svg>
+12%
</span>
</div>
</div>
</div>
</div>
</div>
<!-- 推荐话题 -->
<div class="recommend-section">
<div class="section-header">
<div class="section-title">
<div class="title-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<polygon points="10 8 16 12 10 16 10 8"></polygon>
</svg>
</div>
推荐话题
</div>
<div class="section-more" onclick="refreshRecommend()">
换一批
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<polyline points="23 4 23 10 17 10"></polyline>
<path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path>
</svg>
</div>
</div>
<div class="topic-grid">
<div class="topic-card" onclick="openTopic('校园日常')">
<div class="topic-card-bg bg-daily"></div>
<div class="topic-card-icon bg-daily">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="4" width="18" height="18" rx="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
</div>
<div class="topic-card-name">#校园日常</div>
<div class="topic-card-desc">记录校园生活的每一天,分享青春时光</div>
<div class="topic-card-stats">
<div class="topic-stat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</svg>
5.6万人
</div>
<div class="topic-follow-btn" onclick="event.stopPropagation(); toggleFollow(this)">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</div>
</div>
<div class="topic-card" onclick="openTopic('学习成长')">
<div class="topic-card-bg bg-study"></div>
<div class="topic-card-icon bg-study">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
</svg>
</div>
<div class="topic-card-name">#学习成长</div>
<div class="topic-card-desc">考研考证、自习打卡,一起进步</div>
<div class="topic-card-stats">
<div class="topic-stat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</svg>
3.2万人
</div>
<div class="topic-follow-btn" onclick="event.stopPropagation(); toggleFollow(this)">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</div>
</div>
<div class="topic-card" onclick="openTopic('美食探店')">
<div class="topic-card-bg bg-food"></div>
<div class="topic-card-icon bg-food">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2v20"></path>
<path d="M7 8v8a5 5 0 0 0 10 0V8"></path>
<path d="M7 8h10"></path>
</svg>
</div>
<div class="topic-card-name">#美食探店</div>
<div class="topic-card-desc">校园周边美食地图,吃货聚集地</div>
<div class="topic-card-stats">
<div class="topic-stat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</svg>
2.8万人
</div>
<div class="topic-follow-btn" onclick="event.stopPropagation(); toggleFollow(this)">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</div>
</div>
<div class="topic-card" onclick="openTopic('运动健身')">
<div class="topic-card-bg bg-sport"></div>
<div class="topic-card-icon bg-sport">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M6.5 6.5l11 11"></path>
<path d="M21 21l-1-1"></path>
<path d="M3 3l1 1"></path>
<path d="M18 22l4-4"></path>
<path d="M2 6l4-4"></path>
<path d="M3 10l7-7"></path>
<path d="M14 21l7-7"></path>
</svg>
</div>
<div class="topic-card-name">#运动健身</div>
<div class="topic-card-desc">跑步健身球类,找个搭子一起动</div>
<div class="topic-card-stats">
<div class="topic-stat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</svg>
2.1万人
</div>
<div class="topic-follow-btn" onclick="event.stopPropagation(); toggleFollow(this)">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</div>
</div>
<div class="topic-card" onclick="openTopic('音乐艺术')">
<div class="topic-card-bg bg-music"></div>
<div class="topic-card-icon bg-music">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 18V5l12-2v13"></path>
<circle cx="6" cy="18" r="3"></circle>
<circle cx="18" cy="16" r="3"></circle>
</svg>
</div>
<div class="topic-card-name">#音乐艺术</div>
<div class="topic-card-desc">音乐节、演唱会、校园十佳歌手</div>
<div class="topic-card-stats">
<div class="topic-stat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</svg>
1.5万人
</div>
<div class="topic-follow-btn" onclick="event.stopPropagation(); toggleFollow(this)">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</div>
</div>
<div class="topic-card" onclick="openTopic('旅行出游')">
<div class="topic-card-bg bg-travel"></div>
<div class="topic-card-icon bg-travel">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z"></path>
</svg>
</div>
<div class="topic-card-name">#旅行出游</div>
<div class="topic-card-desc">周末出游、假期旅行搭子招募</div>
<div class="topic-card-stats">
<div class="topic-stat">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</svg>
1.2万人
</div>
<div class="topic-follow-btn" onclick="event.stopPropagation(); toggleFollow(this)">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
</div>
</div>
</div>
</div>
</div>
<!-- 发起话题悬浮按钮 -->
<div class="create-fab" onclick="openCreateTopic()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>
<!-- 底部导航栏 -->
<div class="bottom-nav">
<div class="bottom-nav-item" onclick="switchTab('home')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
<polyline points="9 22 9 12 15 12 15 22"></polyline>
</svg>
<span>首页</span>
</div>
<div class="bottom-nav-item active" onclick="switchTab('topic')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>
</svg>
<span>话题</span>
</div>
<div class="bottom-nav-item" onclick="switchTab('activity')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="4" width="18" height="18" rx="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
<span>活动</span>
</div>
<div class="bottom-nav-item" onclick="switchTab('message')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>消息</span>
</div>
<div class="bottom-nav-item" onclick="switchTab('profile')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>我的</span>
</div>
</div>
</div>
<script>
function goBack() {
window.history.back();
}
function openSearch() {
window.location.href = 'search-home.html';
}
function openHotRank() {
window.location.href = 'topic-hot-rank.html';
}
function openTopic(name) {
window.location.href = 'topic-detail.html?name=' + encodeURIComponent(name);
}
function openCreateTopic() {
window.location.href = 'topic-create.html';
}
function switchCategory(el, name) {
const chips = document.querySelectorAll('.category-chip');
chips.forEach(function(c) { c.classList.remove('active'); });
el.classList.add('active');
}
function toggleFollow(el) {
if (el.classList.contains('followed')) {
el.classList.remove('followed');
el.style.background = 'var(--youth-primary)';
el.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" 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>';
} else {
el.classList.add('followed');
el.style.background = 'var(--youth-text-tertiary)';
el.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>';
}
}
function refreshRecommend() {
console.log('换一批推荐');
}
function switchTab(name) {
if (name === 'home') {
window.location.href = 'feed-home.html';
} else if (name === 'topic') {
// current
} else if (name === 'activity') {
window.location.href = 'activity-list.html';
} else if (name === 'message') {
window.location.href = 'message-list.html';
} else if (name === 'profile') {
window.location.href = 'profile-home.html';
}
}
</script>
</body>
</html>