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.
1438 lines
51 KiB
1438 lines
51 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>
|
|
<link rel="stylesheet" href="../colors_and_type.css">
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
:root {
|
|
/* Traework 设计令牌 - 圆角/间距/阴影/高度 */
|
|
--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: hidden;
|
|
overflow-x: hidden;}
|
|
|
|
.app-container {
|
|
width: 375px;
|
|
height: 812px;
|
|
margin: 0 auto;
|
|
background: var(--youth-bg-page);
|
|
position: relative;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* ===== 状态栏 ===== */
|
|
.status-bar {
|
|
height: 36px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 20px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
position: relative;
|
|
z-index: 10;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.status-bar .right-icons {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
/* ===== 顶部搜索栏 ===== */
|
|
.search-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 4px 12px 8px;
|
|
flex-shrink: 0;
|
|
background: var(--youth-bg-page);
|
|
position: relative;
|
|
z-index: 5;
|
|
}
|
|
|
|
.btn-back {
|
|
width: 34px;
|
|
height: 34px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--youth-radius-lg);
|
|
background: var(--youth-gradient-matte-card);
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow:
|
|
0 2px 8px rgba(0, 0, 0, 0.06),
|
|
inset 0 1px 0 rgba(255, 255, 255, 0.8);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
color: var(--youth-text-primary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.btn-back:active {
|
|
transform: scale(0.94);
|
|
}
|
|
|
|
.btn-back svg {
|
|
width: 18px;
|
|
height: 18px;
|
|
}
|
|
|
|
.search-input-wrapper {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 0 12px;
|
|
height: 44px;
|
|
background: var(--youth-bg-input);
|
|
border-radius: var(--youth-radius-full);
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.search-input-wrapper svg.search-icon {
|
|
width: 16px;
|
|
height: 44px;
|
|
color: var(--youth-text-tertiary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.search-input-wrapper input {
|
|
flex: 1;
|
|
border: none;
|
|
outline: none;
|
|
background: transparent;
|
|
font-size: 14px;
|
|
color: var(--youth-text-primary);
|
|
font-weight: 500;
|
|
min-width: 0;
|
|
}
|
|
|
|
.search-input-wrapper input::placeholder {
|
|
color: var(--youth-text-placeholder);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.btn-clear {
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
background: var(--youth-gray-300);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.btn-clear:active {
|
|
transform: scale(0.9);
|
|
}
|
|
|
|
.btn-clear svg {
|
|
width: 10px;
|
|
height: 10px;
|
|
color: var(--youth-white);
|
|
}
|
|
|
|
.btn-search-text {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--youth-primary);
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
padding: 6px 4px;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.btn-search-text:active {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* ===== 搜索分类Tab ===== */
|
|
.category-tabs {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0;
|
|
padding: 0 8px;
|
|
overflow-x: auto;
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
height: 38px;
|
|
background: var(--youth-bg-page);
|
|
border-bottom: 1px solid var(--youth-border-light);
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
}
|
|
|
|
.category-tabs::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.tab-item {
|
|
position: relative;
|
|
padding: 8px 12px 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: var(--youth-text-tertiary);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tab-item.active {
|
|
color: var(--youth-primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tab-item.active::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 20px;
|
|
height: 3px;
|
|
border-radius: 16px;
|
|
background: var(--youth-gradient-primary);
|
|
}
|
|
|
|
/* ===== 搜索结果内容区 ===== */
|
|
.search-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 10px 12px 70px;
|
|
}
|
|
|
|
.search-content::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
/* 模块标题 */
|
|
.section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 8px;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.section-title .title-icon {
|
|
width: 3px;
|
|
height: 14px;
|
|
border-radius: 2px;
|
|
background: var(--youth-gradient-primary);
|
|
}
|
|
|
|
.section-more {
|
|
font-size: 12px;
|
|
color: var(--youth-text-tertiary);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.section-more:active {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.section-more svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
}
|
|
|
|
/* ===== 相关用户模块 ===== */
|
|
.users-scroll {
|
|
display: flex;
|
|
gap: 8px;
|
|
overflow-x: auto;
|
|
padding-bottom: 4px;
|
|
margin-bottom: 14px;
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
}
|
|
|
|
.users-scroll::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.user-card {
|
|
flex-shrink: 0;
|
|
width: 96px;
|
|
background: var(--youth-gradient-matte-card);
|
|
border-radius: var(--youth-radius-lg);
|
|
padding: 10px 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.user-card:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 6px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 6px rgba(38, 194, 187, 0.25);
|
|
}
|
|
|
|
.user-avatar.avatar-1 {
|
|
background: linear-gradient(135deg, #6BDBD7 0%, #26C2BB 100%);
|
|
}
|
|
|
|
.user-avatar.avatar-2 {
|
|
background: linear-gradient(135deg, #FFB96B 0%, #FF9F45 100%);
|
|
}
|
|
|
|
.user-avatar.avatar-3 {
|
|
background: linear-gradient(135deg, #9B8DFF 0%, #7B61FF 100%);
|
|
}
|
|
|
|
.user-avatar::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 50%;
|
|
background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.user-avatar span {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: white;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.user-name {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
margin-bottom: 2px;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.user-school {
|
|
font-size: 10px;
|
|
color: var(--youth-text-tertiary);
|
|
margin-bottom: 8px;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn-follow {
|
|
width: 100%;
|
|
height: 24px;
|
|
border-radius: var(--youth-radius-full);
|
|
background: var(--youth-gradient-primary);
|
|
color: white;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
border: none;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 2px 6px rgba(38, 194, 187, 0.3);
|
|
}
|
|
|
|
.btn-follow:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.btn-follow.followed {
|
|
background: var(--youth-bg-input);
|
|
color: var(--youth-text-tertiary);
|
|
box-shadow: none;
|
|
border: 1px solid var(--youth-border-light);
|
|
}
|
|
|
|
/* ===== 相关动态模块 ===== */
|
|
.posts-section {
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
.post-result-card {
|
|
background: var(--youth-gradient-matte-card);
|
|
border-radius: var(--youth-radius-md);
|
|
padding: 10px;
|
|
margin-bottom: 8px;
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.post-result-card:active {
|
|
transform: scale(0.99);
|
|
}
|
|
|
|
.post-result-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.post-avatar {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.post-avatar.avatar-1 {
|
|
background: linear-gradient(135deg, #FF8AAE 0%, #FF6B9D 100%);
|
|
}
|
|
|
|
.post-avatar.avatar-2 {
|
|
background: linear-gradient(135deg, #67E188 0%, #34C759 100%);
|
|
}
|
|
|
|
.post-avatar span {
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
color: white;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.post-user-meta {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.post-user-name {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.post-user-school {
|
|
font-size: 9px;
|
|
color: var(--youth-text-tertiary);
|
|
}
|
|
|
|
.post-result-body {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.post-result-text {
|
|
flex: 1;
|
|
font-size: 12px;
|
|
color: var(--youth-text-secondary);
|
|
line-height: 1.4;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.post-result-text .highlight {
|
|
color: var(--youth-primary);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.post-result-thumb {
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: var(--youth-radius-sm);
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
.post-result-thumb.thumb-1 {
|
|
background: linear-gradient(135deg, #A5E3E0 0%, #26C2BB 100%);
|
|
}
|
|
|
|
.post-result-thumb.thumb-2 {
|
|
background: linear-gradient(135deg, #FFD4A5 0%, #FFB980 100%);
|
|
}
|
|
|
|
.post-result-thumb .emoji {
|
|
font-size: 24px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.post-result-stats {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.stat-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
font-size: 10px;
|
|
color: var(--youth-text-tertiary);
|
|
}
|
|
|
|
.stat-item svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
}
|
|
|
|
/* ===== 相关话题模块 ===== */
|
|
.topics-scroll {
|
|
display: flex;
|
|
gap: 8px;
|
|
overflow-x: auto;
|
|
padding-bottom: 4px;
|
|
margin-bottom: 14px;
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
}
|
|
|
|
.topics-scroll::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.topic-card {
|
|
flex-shrink: 0;
|
|
width: 140px;
|
|
background: var(--youth-gradient-matte-card);
|
|
border-radius: var(--youth-radius-md);
|
|
padding: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.topic-card:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.topic-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: var(--youth-radius-sm);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: white;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 6px rgba(38, 194, 187, 0.3);
|
|
}
|
|
|
|
.topic-icon.icon-1 {
|
|
background: linear-gradient(135deg, #6BDBD7 0%, #26C2BB 100%);
|
|
}
|
|
|
|
.topic-icon.icon-2 {
|
|
background: linear-gradient(135deg, #FFB96B 0%, #FF9F45 100%);
|
|
}
|
|
|
|
.topic-icon.icon-3 {
|
|
background: linear-gradient(135deg, #9B8DFF 0%, #7B61FF 100%);
|
|
}
|
|
|
|
.topic-icon::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 50%;
|
|
background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.topic-icon span {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.topic-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.topic-name {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.topic-count {
|
|
font-size: 10px;
|
|
color: var(--youth-text-tertiary);
|
|
}
|
|
|
|
/* ===== 相关活动模块 ===== */
|
|
.activities-section {
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
.activity-result-card {
|
|
background: var(--youth-gradient-matte-card);
|
|
border-radius: var(--youth-radius-md);
|
|
padding: 8px;
|
|
margin-bottom: 8px;
|
|
display: flex;
|
|
gap: 10px;
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.activity-result-card:active {
|
|
transform: scale(0.99);
|
|
}
|
|
|
|
.activity-thumb {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: var(--youth-radius-sm);
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.activity-thumb.thumb-1 {
|
|
background: linear-gradient(135deg, #FFD4D4 0%, #FF6B9D 100%);
|
|
}
|
|
|
|
.activity-thumb.thumb-2 {
|
|
background: linear-gradient(135deg, #D4C8F0 0%, #7B61FF 100%);
|
|
}
|
|
|
|
.activity-thumb .emoji {
|
|
font-size: 26px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.activity-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.activity-title {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.activity-meta {
|
|
font-size: 10px;
|
|
color: var(--youth-text-tertiary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
}
|
|
|
|
.activity-meta svg {
|
|
width: 10px;
|
|
height: 10px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.activity-bottom {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.btn-join {
|
|
height: 22px;
|
|
padding: 0 10px;
|
|
border-radius: var(--youth-radius-full);
|
|
background: var(--youth-gradient-primary);
|
|
color: white;
|
|
font-size: 10px;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
border: none;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 2px 6px rgba(38, 194, 187, 0.25);
|
|
}
|
|
|
|
.btn-join:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.activity-participants {
|
|
font-size: 10px;
|
|
color: var(--youth-text-tertiary);
|
|
}
|
|
|
|
/* ===== 猜你想搜 ===== */
|
|
.suggest-section {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.suggest-title {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
margin-bottom: 8px;
|
|
padding: 0 2px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.suggest-title .title-icon {
|
|
width: 3px;
|
|
height: 13px;
|
|
border-radius: 2px;
|
|
background: var(--youth-gradient-orange);
|
|
}
|
|
|
|
.suggest-tags {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
.suggest-tag {
|
|
padding: 5px 12px;
|
|
border-radius: var(--youth-radius-full);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.suggest-tag:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.suggest-tag.tag-1 {
|
|
background: rgba(38, 194, 187, 0.1);
|
|
color: var(--youth-teal-700);
|
|
border-color: rgba(38, 194, 187, 0.2);
|
|
}
|
|
|
|
.suggest-tag.tag-2 {
|
|
background: rgba(255, 159, 69, 0.1);
|
|
color: var(--youth-orange-700);
|
|
border-color: rgba(255, 159, 69, 0.2);
|
|
}
|
|
|
|
.suggest-tag.tag-3 {
|
|
background: rgba(123, 97, 255, 0.1);
|
|
color: var(--youth-purple-700);
|
|
border-color: rgba(123, 97, 255, 0.2);
|
|
}
|
|
|
|
.suggest-tag.tag-4 {
|
|
background: rgba(255, 107, 157, 0.1);
|
|
color: var(--youth-pink-700);
|
|
border-color: rgba(255, 107, 157, 0.2);
|
|
}
|
|
|
|
.suggest-tag.tag-5 {
|
|
background: rgba(52, 199, 89, 0.1);
|
|
color: var(--youth-success-700);
|
|
border-color: rgba(52, 199, 89, 0.2);
|
|
}
|
|
|
|
/* ===== 底部Tab导航 ===== */
|
|
.bottom-nav {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 64px;
|
|
background: var(--youth-bg-glass);
|
|
backdrop-filter: var(--youth-glass-blur) var(--youth-glass-saturate);
|
|
-webkit-backdrop-filter: var(--youth-glass-blur) var(--youth-glass-saturate);
|
|
border-top: 1px solid var(--youth-glass-border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
padding-bottom: 4px;
|
|
z-index: 40;
|
|
}
|
|
|
|
.bottom-tab {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 2px;
|
|
padding: 4px 10px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
}
|
|
|
|
.bottom-tab:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.bottom-tab svg {
|
|
width: 22px;
|
|
height: 22px;
|
|
stroke-width: 1.8;
|
|
fill: none;
|
|
stroke: var(--youth-gray-400);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.bottom-tab.active svg {
|
|
stroke: var(--youth-primary);
|
|
}
|
|
|
|
.bottom-tab.active svg.home-icon {
|
|
fill: rgba(38, 194, 187, 0.15);
|
|
}
|
|
|
|
.bottom-tab span {
|
|
font-size: 10px;
|
|
color: var(--youth-gray-400);
|
|
font-weight: 500;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.bottom-tab.active span {
|
|
color: var(--youth-primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.icon-svg svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
stroke: currentColor;
|
|
}
|
|
/* 侧栏图标 */
|
|
.sidebar-icon .icon-svg { width: 22px; height: 22px; font-size: 22px; }
|
|
/* 社团logo图标 */
|
|
.club-logo .icon-svg { width: 28px; height: 28px; font-size: 28px; color: #fff; }
|
|
/* 头图大图标 */
|
|
.hero-icon .icon-svg { width: 56px; height: 56px; font-size: 56px; opacity: 0.3; }
|
|
/* meta 小图标 */
|
|
.club-meta .icon-svg { width: 12px; height: 12px; font-size: 12px; }
|
|
/* 分类选择网格图标 */
|
|
.cat-option .icon-svg { width: 26px; height: 26px; font-size: 26px; }
|
|
/* logo预览图标 */
|
|
.logo-preview .icon-svg { width: 40px; height: 40px; font-size: 40px; color: #fff; }
|
|
/* 提示图标 */
|
|
.notice-icon .icon-svg { width: 18px; height: 18px; font-size: 18px; }
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="app-container" style="height: 874px;">
|
|
<!-- 状态栏 -->
|
|
<div class="status-bar">
|
|
<span>9:41</span>
|
|
<div class="right-icons">
|
|
<!-- 信号图标 -->
|
|
<svg width="15" height="10" viewBox="0 0 17 11" fill="currentColor">
|
|
<rect x="0" y="7" width="3" height="4" rx="0.5"></rect>
|
|
<rect x="4.5" y="5" width="3" height="6" rx="0.5"></rect>
|
|
<rect x="9" y="2.5" width="3" height="8.5" rx="0.5"></rect>
|
|
<rect x="13.5" y="0" width="3" height="11" rx="0.5"></rect>
|
|
</svg>
|
|
<!-- WiFi图标 -->
|
|
<svg width="13" height="10" viewBox="0 0 15 11" fill="currentColor">
|
|
<path d="M7.5 11C6.9 11 6.4 10.8 6 10.4C5.2 9.6 5 8.6 5.4 7.6C5.8 6.6 6.8 6 7.8 6C9 6 10 6.8 10.2 8C10.4 8.8 10 9.6 9.4 10.2C8.9 10.7 8.2 11 7.5 11ZM7.5 4.5C6 4.5 4.5 5 3.4 6.2C2.3 7.4 2 9 2.4 10.4C2.5 10.8 2.8 11 3.2 11C3.5 11 3.8 10.8 3.9 10.5C4.2 9.5 4.8 8.6 5.7 8C6.6 7.4 7.6 7.1 8.6 7.2C9.8 7.3 10.9 7.8 11.6 8.7C12.3 9.6 12.6 10.7 12.4 11.8L12.4 12C12.3 12.4 12.6 12.7 13 12.8C13.4 12.9 13.7 12.6 13.8 12.2C14.1 10.5 13.5 8.8 12.4 7.5C11.3 6.2 9.6 5.3 7.8 4.9L7.5 4.5Z"></path>
|
|
<path d="M7.5 1C5.3 1 3.2 1.7 1.5 3C-0.5 4.7 -0.5 7.5 1.5 9.2C1.9 9.6 2.5 9.6 2.9 9.2C3.3 8.8 3.3 8.2 2.9 7.8C1.6 6.5 1.6 4.4 2.9 3.1C4.2 1.8 6.3 1.4 8 2C10.1 2.7 11.7 4.4 12.2 6.5C12.5 7.3 12.4 8.1 11.8 8.7C11.4 9.1 11.4 9.7 11.8 10.1C12.2 10.5 12.8 10.5 13.2 10.1C14.2 9.1 14.5 7.7 14.2 6.3C13.6 4 12.1 2.3 10.2 1.3C9.3 1 8.4 0.9 7.5 1Z"></path>
|
|
</svg>
|
|
<!-- 电池图标 -->
|
|
<svg width="22" height="10" viewBox="0 0 25 12" fill="none">
|
|
<rect x="0.5" y="0.5" width="21" height="11" rx="2.5" stroke="currentColor" opacity="0.5"></rect>
|
|
<rect x="2" y="2" width="18" height="8" rx="1.5" fill="currentColor"></rect>
|
|
<rect x="22.5" y="4" width="1.5" height="4" rx="0.5" fill="currentColor" opacity="0.5"></rect>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 顶部搜索栏 -->
|
|
<div class="search-header">
|
|
<button class="btn-back" data-dom-id="btn-back" aria-label="返回">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="m15 18-6-6 6-6"></path>
|
|
</svg>
|
|
</button>
|
|
<div class="search-input-wrapper">
|
|
<svg class="search-icon" 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>
|
|
<path d="m21 21-4.3-4.3"></path>
|
|
</svg>
|
|
<input type="text" data-dom-id="search-input" value="摄影" placeholder="搜索用户、动态、话题...">
|
|
<button class="btn-clear" data-dom-id="btn-clear" aria-label="清除">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M18 6 6 18"></path>
|
|
<path d="m6 6 12 12"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<span class="btn-search-text" data-dom-id="btn-search">搜索</span>
|
|
</div>
|
|
|
|
<!-- 搜索分类Tab -->
|
|
<div class="category-tabs">
|
|
<div class="tab-item active" data-dom-id="tab-comprehensive" data-tab="comprehensive">综合</div>
|
|
<div class="tab-item" data-dom-id="tab-users" data-tab="users">用户</div>
|
|
<div class="tab-item" data-dom-id="tab-posts" data-tab="posts">动态</div>
|
|
<div class="tab-item" data-dom-id="tab-activities" data-tab="activities">活动</div>
|
|
<div class="tab-item" data-dom-id="tab-topics" data-tab="topics">话题</div>
|
|
<div class="tab-item" data-dom-id="tab-groups" data-tab="groups">群组</div>
|
|
</div>
|
|
|
|
<!-- 搜索结果内容区 -->
|
|
<div class="search-content">
|
|
<!-- 相关用户模块 -->
|
|
<div class="section-header">
|
|
<div class="section-title">
|
|
<div class="title-icon"></div>
|
|
相关用户
|
|
</div>
|
|
<div class="section-more">
|
|
更多
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="m9 18 6-6-6-6"></path>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="users-scroll">
|
|
<div class="user-card" data-dom-id="user-result-1">
|
|
<div class="user-avatar avatar-1">
|
|
<span>陈</span>
|
|
</div>
|
|
<div class="user-name">陈摄影师</div>
|
|
<div class="user-school">清大·美术学院</div>
|
|
<button class="btn-follow" data-dom-id="btn-follow-1">+ 关注</button>
|
|
</div>
|
|
<div class="user-card" data-dom-id="user-result-2">
|
|
<div class="user-avatar avatar-2">
|
|
<span>林</span>
|
|
</div>
|
|
<div class="user-name">林小影</div>
|
|
<div class="user-school">北影·摄影系</div>
|
|
<button class="btn-follow">+ 关注</button>
|
|
</div>
|
|
<div class="user-card" data-dom-id="user-result-3">
|
|
<div class="user-avatar avatar-3">
|
|
<span>苏</span>
|
|
</div>
|
|
<div class="user-name">苏相机</div>
|
|
<div class="user-school">复大·新闻学院</div>
|
|
<button class="btn-follow">+ 关注</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 相关动态模块 -->
|
|
<div class="posts-section">
|
|
<div class="section-header">
|
|
<div class="section-title">
|
|
<div class="title-icon"></div>
|
|
相关动态
|
|
</div>
|
|
<div class="section-more">
|
|
更多
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="m9 18 6-6-6-6"></path>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="post-result-card" data-dom-id="post-result-1">
|
|
<div class="post-result-header">
|
|
<div class="post-avatar avatar-1">
|
|
<span>小</span>
|
|
</div>
|
|
<div class="post-user-meta">
|
|
<div class="post-user-name">小鹿同学</div>
|
|
<div class="post-user-school">清大·经管学院</div>
|
|
</div>
|
|
</div>
|
|
<div class="post-result-body">
|
|
<div class="post-result-text">
|
|
今天参加了校园<span class="highlight">摄影</span>大赛,拍了一组校园秋景的照片,大家觉得怎么样?求指点!#<span class="highlight">摄影</span>大赛# #校园秋景#
|
|
</div>
|
|
<div class="post-result-thumb thumb-1">
|
|
<span class="emoji"><span class="icon-svg icon-camera"></span></span>
|
|
</div>
|
|
</div>
|
|
<div class="post-result-stats">
|
|
<div class="stat-item">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"></path>
|
|
</svg>
|
|
328
|
|
</div>
|
|
<div class="stat-item">
|
|
<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>
|
|
56
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="post-result-card" data-dom-id="post-result-2">
|
|
<div class="post-result-header">
|
|
<div class="post-avatar avatar-2">
|
|
<span>青</span>
|
|
</div>
|
|
<div class="post-user-meta">
|
|
<div class="post-user-name">青柠时光</div>
|
|
<div class="post-user-school">北师·文学院</div>
|
|
</div>
|
|
</div>
|
|
<div class="post-result-body">
|
|
<div class="post-result-text">
|
|
分享一组胶片风格的校园人像<span class="highlight">摄影</span>作品,用的是佳能AE-1,真的太喜欢胶片的质感了!有喜欢胶片<span class="highlight">摄影</span>的同学吗?
|
|
</div>
|
|
<div class="post-result-thumb thumb-2">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="post-result-stats">
|
|
<div class="stat-item">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"></path>
|
|
</svg>
|
|
512
|
|
</div>
|
|
<div class="stat-item">
|
|
<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>
|
|
89
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 相关话题模块 -->
|
|
<div class="section-header">
|
|
<div class="section-title">
|
|
<div class="title-icon"></div>
|
|
相关话题
|
|
</div>
|
|
<div class="section-more">
|
|
更多
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="m9 18 6-6-6-6"></path>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="topics-scroll">
|
|
<div class="topic-card" data-dom-id="topic-result-1">
|
|
<div class="topic-icon icon-1">
|
|
<span>#</span>
|
|
</div>
|
|
<div class="topic-info">
|
|
<div class="topic-name">摄影大赛</div>
|
|
<div class="topic-count">1.2万人参与</div>
|
|
</div>
|
|
</div>
|
|
<div class="topic-card" data-dom-id="topic-result-2">
|
|
<div class="topic-icon icon-2">
|
|
<span>#</span>
|
|
</div>
|
|
<div class="topic-info">
|
|
<div class="topic-name">校园摄影</div>
|
|
<div class="topic-count">8,642人参与</div>
|
|
</div>
|
|
</div>
|
|
<div class="topic-card">
|
|
<div class="topic-icon icon-3">
|
|
<span>#</span>
|
|
</div>
|
|
<div class="topic-info">
|
|
<div class="topic-name">胶片摄影</div>
|
|
<div class="topic-count">3,256人参与</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 相关活动模块 -->
|
|
<div class="activities-section">
|
|
<div class="section-header">
|
|
<div class="section-title">
|
|
<div class="title-icon"></div>
|
|
相关活动
|
|
</div>
|
|
<div class="section-more">
|
|
更多
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="m9 18 6-6-6-6"></path>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="activity-result-card" data-dom-id="activity-result-1">
|
|
<div class="activity-thumb thumb-1">
|
|
<span class="emoji"><span class="icon-svg icon-camera"></span></span>
|
|
</div>
|
|
<div class="activity-info">
|
|
<div class="activity-title">秋季校园摄影大赛</div>
|
|
<div class="activity-meta">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<rect x="3" y="4" width="18" height="18" rx="2" ry="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>
|
|
10月25日 · 清大艺术馆
|
|
</div>
|
|
<div class="activity-bottom">
|
|
<span class="activity-participants">已报名 256人</span>
|
|
<button class="btn-join">立即报名</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="activity-result-card">
|
|
<div class="activity-thumb thumb-2">
|
|
<span class="emoji"><span class="icon-svg icon-clapperboard"></span></span>
|
|
</div>
|
|
<div class="activity-info">
|
|
<div class="activity-title">手机摄影工作坊</div>
|
|
<div class="activity-meta">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<rect x="3" y="4" width="18" height="18" rx="2" ry="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>
|
|
11月1日 · 北影教学楼
|
|
</div>
|
|
<div class="activity-bottom">
|
|
<span class="activity-participants">已报名 128人</span>
|
|
<button class="btn-join">立即报名</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 猜你想搜 -->
|
|
<div class="suggest-section">
|
|
<div class="suggest-title">
|
|
<div class="title-icon"></div>
|
|
猜你想搜
|
|
</div>
|
|
<div class="suggest-tags">
|
|
<span class="suggest-tag tag-1" data-keyword="校园摄影">校园摄影</span>
|
|
<span class="suggest-tag tag-2" data-keyword="羽毛球">羽毛球</span>
|
|
<span class="suggest-tag tag-3" data-keyword="期末自习">期末自习</span>
|
|
<span class="suggest-tag tag-4" data-keyword="美食探店">美食探店</span>
|
|
<span class="suggest-tag tag-5" data-keyword="音乐节">音乐节</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 底部Tab导航 -->
|
|
|
|
</div>
|
|
|
|
<script>// ===== 初始化主题 =====
|
|
}
|
|
})();
|
|
|
|
(function() {
|
|
})();
|
|
|
|
// ===== 返回按钮 =====
|
|
(function() {
|
|
const btnBack = document.querySelector('[data-dom-id="btn-back"]');
|
|
btnBack.addEventListener('click', function() {
|
|
if (window.history.length > 1) {
|
|
window.history.back();
|
|
} else {
|
|
console.log('返回上一页');
|
|
}
|
|
});
|
|
})();
|
|
|
|
// ===== 搜索框清除 =====
|
|
(function() {
|
|
const btnClear = document.querySelector('[data-dom-id="btn-clear"]');
|
|
const searchInput = document.querySelector('[data-dom-id="search-input"]');
|
|
btnClear.addEventListener('click', function(e) {
|
|
e.stopPropagation();
|
|
searchInput.value = '';
|
|
searchInput.focus();
|
|
});
|
|
})();
|
|
|
|
// ===== 搜索按钮 =====
|
|
(function() {
|
|
const btnSearch = document.querySelector('[data-dom-id="btn-search"]');
|
|
const searchInput = document.querySelector('[data-dom-id="search-input"]');
|
|
btnSearch.addEventListener('click', function() {
|
|
const keyword = searchInput.value.trim();
|
|
if (keyword) {
|
|
console.log('搜索:' + keyword);
|
|
}
|
|
});
|
|
// 回车搜索
|
|
searchInput.addEventListener('keydown', function(e) {
|
|
if (e.key === 'Enter') {
|
|
const keyword = this.value.trim();
|
|
if (keyword) {
|
|
console.log('搜索:' + keyword);
|
|
}
|
|
}
|
|
});
|
|
})();
|
|
|
|
// ===== 分类Tab切换 =====
|
|
(function() {
|
|
const tabItems = document.querySelectorAll('.category-tabs .tab-item');
|
|
tabItems.forEach(function(tab) {
|
|
tab.addEventListener('click', function(e) {
|
|
e.stopPropagation();
|
|
tabItems.forEach(function(t) {
|
|
t.classList.remove('active');
|
|
});
|
|
this.classList.add('active');
|
|
this.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' });
|
|
const tabName = this.getAttribute('data-tab');
|
|
console.log('切换分类:' + tabName);
|
|
});
|
|
});
|
|
})();
|
|
|
|
// ===== 用户卡片跳转 =====
|
|
(function() {
|
|
const userCards = document.querySelectorAll('[data-dom-id^="user-result-"]');
|
|
userCards.forEach(function(card) {
|
|
card.addEventListener('click', function(e) {
|
|
// 如果点击的是关注按钮,不跳转
|
|
if (e.target.closest('.btn-follow')) {
|
|
return;
|
|
}
|
|
const userId = this.getAttribute('data-dom-id');
|
|
console.log('跳转到用户主页:' + userId);
|
|
window.location.href = 'user-profile.html';
|
|
});
|
|
});
|
|
})();
|
|
|
|
// ===== 关注按钮 =====
|
|
(function() {
|
|
const followBtns = document.querySelectorAll('.btn-follow');
|
|
followBtns.forEach(function(btn) {
|
|
btn.addEventListener('click', function(e) {
|
|
e.stopPropagation();
|
|
const isFollowed = this.classList.toggle('followed');
|
|
if (isFollowed) {
|
|
this.textContent = '已关注';
|
|
} else {
|
|
this.textContent = '+ 关注';
|
|
}
|
|
});
|
|
});
|
|
})();
|
|
|
|
// ===== 动态卡片跳转 =====
|
|
(function() {
|
|
const postCards = document.querySelectorAll('[data-dom-id^="post-result-"]');
|
|
postCards.forEach(function(card) {
|
|
card.addEventListener('click', function() {
|
|
const postId = this.getAttribute('data-dom-id');
|
|
console.log('跳转到动态详情:' + postId);
|
|
window.location.href = 'post-detail.html';
|
|
});
|
|
});
|
|
})();
|
|
|
|
// ===== 话题卡片跳转 =====
|
|
(function() {
|
|
const topicCards = document.querySelectorAll('.topic-card');
|
|
topicCards.forEach(function(card) {
|
|
card.addEventListener('click', function() {
|
|
const topicName = this.querySelector('.topic-name').textContent;
|
|
console.log('跳转到话题页:' + topicName);
|
|
});
|
|
});
|
|
})();
|
|
|
|
// ===== 活动卡片跳转 =====
|
|
(function() {
|
|
const activityCards = document.querySelectorAll('.activity-result-card');
|
|
activityCards.forEach(function(card) {
|
|
card.addEventListener('click', function(e) {
|
|
// 如果点击的是报名按钮,不跳转
|
|
if (e.target.closest('.btn-join')) {
|
|
return;
|
|
}
|
|
const activityId = this.getAttribute('data-dom-id') || 'activity';
|
|
console.log('跳转到活动详情:' + activityId);
|
|
});
|
|
});
|
|
|
|
// 报名按钮
|
|
const joinBtns = document.querySelectorAll('.btn-join');
|
|
joinBtns.forEach(function(btn) {
|
|
btn.addEventListener('click', function(e) {
|
|
e.stopPropagation();
|
|
if (this.textContent === '立即报名') {
|
|
this.textContent = '已报名';
|
|
this.style.opacity = '0.7';
|
|
}
|
|
});
|
|
});
|
|
})();
|
|
|
|
// ===== 猜你想搜标签点击 =====
|
|
(function() {
|
|
const suggestTags = document.querySelectorAll('.suggest-tag');
|
|
const searchInput = document.querySelector('[data-dom-id="search-input"]');
|
|
suggestTags.forEach(function(tag) {
|
|
tag.addEventListener('click', function() {
|
|
const keyword = this.getAttribute('data-keyword');
|
|
searchInput.value = keyword;
|
|
console.log('搜索推荐词:' + keyword);
|
|
});
|
|
});
|
|
})();
|
|
|
|
// ===== 底部Tab切换 =====
|
|
(function() {
|
|
const bottomTabs = document.querySelectorAll('.bottom-tab');
|
|
bottomTabs.forEach(function(tab) {
|
|
tab.addEventListener('click', function(e) {
|
|
e.stopPropagation();
|
|
bottomTabs.forEach(function(t) {
|
|
t.classList.remove('active');
|
|
});
|
|
this.classList.add('active');
|
|
const tabName = this.getAttribute('data-bottom-tab');
|
|
console.log('切换到底部Tab:' + tabName);
|
|
});
|
|
});
|
|
})();
|
|
|
|
// ===== "更多"按钮 =====
|
|
(function() {
|
|
const moreBtns = document.querySelectorAll('.section-more');
|
|
moreBtns.forEach(function(btn) {
|
|
btn.addEventListener('click', function(e) {
|
|
e.stopPropagation();
|
|
console.log('查看更多');
|
|
});
|
|
});
|
|
})();</script>
|
|
</body>
|
|
</html>
|
|
|