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.
1045 lines
33 KiB
1045 lines
33 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>我的好友 - 青核 Youthome</title>
|
|
<link rel="stylesheet" href="../css/design-system.css">
|
|
<style>
|
|
/* ===== App容器 ===== */
|
|
.app {
|
|
width: 1920px
|
|
max-width: 100%;;
|
|
height: 1080px;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
position: relative;
|
|
overflow: hidden;
|
|
background: var(--bg-page);
|
|
}
|
|
|
|
/* ===== 左侧固定侧边栏 ===== */
|
|
.sidebar {
|
|
width: var(--sidebar-width);
|
|
height: 100%;
|
|
background: var(--bg-sidebar);
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
z-index: 20;
|
|
}
|
|
|
|
.sidebar-logo {
|
|
padding: 24px 20px 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
border-bottom: 1px solid var(--border-light);
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sidebar-logo-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 10px;
|
|
background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #fff;
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
flex-shrink: 0;
|
|
box-shadow: 0 4px 12px rgba(23, 176, 207, 0.25);
|
|
}
|
|
|
|
.sidebar-logo-text { display: flex; flex-direction: column; gap: 1px; }
|
|
.sidebar-logo-text .main { font-size: 16px; font-weight: 700; color: var(--text-primary); }
|
|
.sidebar-logo-text .sub { font-size: 11px; color: var(--text-tertiary); font-weight: 500; }
|
|
|
|
.sidebar-nav {
|
|
flex: 1;
|
|
padding: 16px 12px 24px 12px;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.sidebar-nav::-webkit-scrollbar { width: 4px; }
|
|
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
|
|
|
.nav-section-title {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--text-tertiary);
|
|
padding: 12px 12px 8px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
user-select: none;
|
|
}
|
|
|
|
.nav-item:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.nav-item.active {
|
|
background: var(--primary);
|
|
color: #fff;
|
|
font-weight: 600;
|
|
box-shadow: 0 2px 8px rgba(23, 176, 207, 0.25);
|
|
}
|
|
|
|
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
|
|
|
|
.sidebar-footer {
|
|
padding: 16px;
|
|
border-top: 1px solid var(--border-light);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sidebar-user {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 10px;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.sidebar-user:hover { background: var(--bg-hover); }
|
|
|
|
.sidebar-avatar {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, var(--primary-light), var(--primary));
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #fff;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sidebar-avatar img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.sidebar-user-info { flex: 1; min-width: 0; }
|
|
.sidebar-user-name {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.sidebar-user-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
|
|
|
|
/* ===== 右侧主区域 ===== */
|
|
.main-area {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
position: relative;
|
|
}
|
|
|
|
/* ===== 顶部操作栏 ===== */
|
|
.top-bar {
|
|
height: var(--topbar-height);
|
|
background: var(--bg-card);
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 32px;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
z-index: 15;
|
|
}
|
|
|
|
.top-bar-left {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.page-title-bar {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
.top-bar-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.search-wrapper {
|
|
width: 280px;
|
|
position: relative;
|
|
}
|
|
|
|
.search-input {
|
|
width: 100%;
|
|
height: 40px;
|
|
padding: 0 16px 0 42px;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 14px;
|
|
color: var(--text-primary);
|
|
background: var(--bg-page);
|
|
transition: all var(--transition-fast);
|
|
outline: none;
|
|
font-family: inherit;
|
|
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
|
|
}
|
|
|
|
.search-input:focus {
|
|
border-color: var(--primary);
|
|
background: var(--bg-card);
|
|
box-shadow: 0 0 0 3px rgba(23, 176, 207, 0.12);
|
|
}
|
|
|
|
.search-input::placeholder { color: var(--text-placeholder); }
|
|
|
|
.search-icon {
|
|
position: absolute;
|
|
left: 14px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 18px;
|
|
height: 18px;
|
|
color: var(--text-tertiary);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.add-friend-btn {
|
|
height: 40px;
|
|
padding: 0 18px;
|
|
background: var(--primary);
|
|
color: #fff;
|
|
border: none;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
transition: all var(--transition-fast);
|
|
box-shadow: 0 2px 8px rgba(23, 176, 207, 0.25);
|
|
font-family: inherit;
|
|
}
|
|
|
|
.add-friend-btn:hover {
|
|
background: var(--primary-hover);
|
|
box-shadow: 0 4px 12px rgba(23, 176, 207, 0.3);
|
|
}
|
|
|
|
.add-friend-btn svg { width: 18px; height: 18px; }
|
|
|
|
/* ===== 主内容区 ===== */
|
|
.content-area {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 28px 32px 40px;
|
|
position: relative;
|
|
}
|
|
|
|
.content-area::-webkit-scrollbar { width: 8px; }
|
|
.content-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
|
|
.content-area::-webkit-scrollbar-track { background: transparent; }
|
|
|
|
/* ===== 分类Tab ===== */
|
|
.follow-tabs {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
margin-bottom: 24px;
|
|
border-bottom: 1px solid var(--border-light);
|
|
}
|
|
|
|
.follow-tab {
|
|
padding: 12px 20px;
|
|
font-size: 15px;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
user-select: none;
|
|
position: relative;
|
|
margin-bottom: -1px;
|
|
}
|
|
|
|
.follow-tab:hover { color: var(--text-primary); }
|
|
|
|
.follow-tab.active {
|
|
color: var(--primary);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.follow-tab.active::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -1px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 32px;
|
|
height: 3px;
|
|
border-radius: 2px;
|
|
background: var(--primary);
|
|
}
|
|
|
|
.follow-tab .count {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--text-tertiary);
|
|
margin-left: 4px;
|
|
}
|
|
|
|
.follow-tab.active .count { color: var(--primary); }
|
|
|
|
/* ===== 用户卡片网格 ===== */
|
|
.user-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 20px;
|
|
}
|
|
|
|
/* ===== 用户卡片 ===== */
|
|
.user-card {
|
|
background: var(--bg-card);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-card);
|
|
border: 1px solid var(--border-light);
|
|
padding: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
transition: all var(--transition-base);
|
|
}
|
|
|
|
.user-card:hover {
|
|
box-shadow: var(--shadow-md);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
overflow: hidden;
|
|
background: linear-gradient(135deg, var(--primary-light), var(--primary));
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #fff;
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.user-avatar img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.user-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.user-name {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: var(--text-primary);
|
|
margin-bottom: 4px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.user-desc {
|
|
font-size: 13px;
|
|
color: var(--text-tertiary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* ===== 关注按钮 ===== */
|
|
.follow-btn {
|
|
height: 36px;
|
|
padding: 0 18px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
border: 1px solid transparent;
|
|
user-select: none;
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.follow-btn.followed {
|
|
background: var(--bg-card);
|
|
color: var(--text-secondary);
|
|
border-color: var(--border);
|
|
}
|
|
|
|
.follow-btn.followed:hover {
|
|
color: var(--error);
|
|
border-color: var(--error);
|
|
background: var(--error-bg);
|
|
}
|
|
|
|
.follow-btn.followed:hover .btn-text-default { display: none; }
|
|
.follow-btn.followed:hover .btn-text-hover { display: inline; }
|
|
.follow-btn.followed .btn-text-hover { display: none; }
|
|
|
|
.follow-btn.mutual {
|
|
background: var(--bg-card);
|
|
color: var(--primary);
|
|
border-color: var(--primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.follow-btn.mutual:hover {
|
|
background: var(--primary-bg);
|
|
}
|
|
|
|
.follow-btn.follow {
|
|
background: var(--primary);
|
|
color: #fff;
|
|
border-color: var(--primary);
|
|
font-weight: 600;
|
|
box-shadow: 0 2px 8px rgba(23, 176, 207, 0.25);
|
|
}
|
|
|
|
.follow-btn.follow:hover {
|
|
background: var(--primary-hover);
|
|
border-color: var(--primary-hover);
|
|
box-shadow: 0 4px 12px rgba(23, 176, 207, 0.3);
|
|
}
|
|
|
|
/* SVG stroke统一 */
|
|
svg { stroke-linecap: round; stroke-linejoin: round; }
|
|
|
|
/* ===== 发布按钮 ===== */
|
|
.sidebar-publish {
|
|
padding: 12px 12px 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
.publish-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
height: 44px;
|
|
background: var(--primary);
|
|
color: #fff;
|
|
border-radius: 12px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all .2s ease;
|
|
box-shadow: 0 4px 12px rgba(23, 176, 207, 0.25);
|
|
}
|
|
.publish-btn:hover {
|
|
opacity: 0.92;
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 6px 16px rgba(23, 176, 207, 0.35);
|
|
}
|
|
.publish-btn svg { width: 20px; height: 20px; }
|
|
.publish-btn .publish-arrow { width: 16px; height: 16px; opacity: 0.8; transition: transform .2s; }
|
|
.publish-btn:hover .publish-arrow { transform: translateY(1px); }
|
|
|
|
.publish-dropdown {
|
|
display: none;
|
|
margin-top: 6px;
|
|
background: var(--bg-card, #fff);
|
|
border: 1px solid var(--border-light, #eee);
|
|
border-radius: 12px;
|
|
padding: 6px;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,0.08);
|
|
}
|
|
.sidebar-publish:hover .publish-dropdown { display: block; }
|
|
.publish-option {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: background .15s;
|
|
}
|
|
.publish-option:hover { background: var(--bg-hover, #f5f5f5); }
|
|
.publish-option svg { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
|
|
.publish-option-title { font-size: 14px; font-weight: 600; color: var(--text-primary, #1a1a1a); }
|
|
.publish-option-desc { font-size: 11px; color: var(--text-tertiary, #999); margin-top: 2px; }
|
|
|
|
/* ===== 导航项角标 ===== */
|
|
.nav-item-label {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex: 1;
|
|
}
|
|
.nav-badge {
|
|
min-width: 18px;
|
|
height: 18px;
|
|
padding: 0 5px;
|
|
background: #FF4D4F;
|
|
color: #fff;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
border-radius: 9px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* ===== 底部用户卡片箭头 ===== */
|
|
.sidebar-user-arrow {
|
|
width: 16px;
|
|
height: 16px;
|
|
color: var(--text-tertiary, #999);
|
|
flex-shrink: 0;
|
|
margin-left: auto;
|
|
}
|
|
|
|
/* 粉丝关注双栏布局 */
|
|
.follow-layout {
|
|
display: grid;
|
|
grid-template-columns: 220px 1fr;
|
|
gap: 24px;
|
|
}
|
|
.follow-filter { position: sticky; top: 24px; align-self: flex-start; }
|
|
.follow-main { min-width: 0; }
|
|
|
|
.filter-card {
|
|
background: var(--bg-card);
|
|
border-radius: 14px;
|
|
border: 1px solid var(--border-light);
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
|
|
padding: 18px;
|
|
}
|
|
.filter-search {
|
|
position: relative;
|
|
margin-bottom: 16px;
|
|
}
|
|
.filter-search input {
|
|
width: 100%;
|
|
height: 38px;
|
|
padding: 0 14px 0 38px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
font-size: 13px;
|
|
background: var(--bg-page);
|
|
outline: none;
|
|
transition: all .2s;
|
|
font-family: inherit;
|
|
}
|
|
.filter-search input:focus { border-color: var(--primary); background: var(--bg-card); }
|
|
.filter-search svg {
|
|
position: absolute;
|
|
left: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 16px; height: 16px;
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.filter-group-title {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--text-tertiary);
|
|
margin-bottom: 10px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
.filter-group { margin-bottom: 18px; }
|
|
.filter-group:last-child { margin-bottom: 0; }
|
|
.filter-option {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 10px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
transition: all .15s;
|
|
margin-bottom: 2px;
|
|
}
|
|
.filter-option:hover { background: var(--bg-hover); color: var(--text-primary); }
|
|
.filter-option.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
|
|
.filter-option-count { font-size: 11px; color: var(--text-tertiary); }
|
|
.filter-option.active .filter-option-count { color: var(--primary); }
|
|
|
|
.follow-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 16px;
|
|
}
|
|
.follow-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
|
|
.follow-count { font-size: 13px; color: var(--text-tertiary); }
|
|
.follow-count b { color: var(--primary); font-weight: 600; }
|
|
|
|
.sort-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.sort-label { font-size: 12px; color: var(--text-tertiary); }
|
|
.sort-options { display: flex; gap: 4px; }
|
|
.sort-option {
|
|
padding: 6px 12px;
|
|
border-radius: 8px;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
transition: all .15s;
|
|
}
|
|
.sort-option:hover { color: var(--text-primary); }
|
|
.sort-option.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
|
|
|
|
svg { stroke-linecap: round; stroke-linejoin: round; }
|
|
|
|
</style>
|
|
<link rel="stylesheet" href="../css/web-refresh.css?v=20261020-brand-color">
|
|
</head>
|
|
<body>
|
|
<div class="app">
|
|
<!-- ===== 左侧固定侧边栏 ===== -->
|
|
<aside class="sidebar">
|
|
<div class="sidebar-logo" onclick="location.href='feed.html'">
|
|
<div class="sidebar-logo-icon">青</div>
|
|
<div class="sidebar-logo-text">
|
|
<span class="main">青核 Youthome</span>
|
|
<span class="sub">校园实名社交</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 发布按钮 -->
|
|
<div class="sidebar-publish">
|
|
<div class="publish-btn">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<line x1="12" y1="5" x2="12" y2="19"></line>
|
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
</svg>
|
|
<span>发布</span>
|
|
<svg class="publish-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polyline points="6 9 12 15 18 9"></polyline>
|
|
</svg>
|
|
</div>
|
|
<div class="publish-dropdown">
|
|
<div class="publish-option" onclick="location.href='publish-post.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
|
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
<polyline points="21 15 16 10 5 21"></polyline>
|
|
</svg>
|
|
<div class="publish-option-text">
|
|
<div class="publish-option-title">发布动态</div>
|
|
<div class="publish-option-desc">分享图文、心情</div>
|
|
</div>
|
|
</div>
|
|
<div class="publish-option" onclick="location.href='publish-video.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polygon points="23 7 16 12 23 17 23 7"></polygon>
|
|
<rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>
|
|
</svg>
|
|
<div class="publish-option-text">
|
|
<div class="publish-option-title">发布视频</div>
|
|
<div class="publish-option-desc">上传短视频</div>
|
|
</div>
|
|
</div>
|
|
<div class="publish-option" onclick="location.href='activity-create.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></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>
|
|
<line x1="12" y1="14" x2="12" y2="18"></line>
|
|
<line x1="10" y1="16" x2="14" y2="16"></line>
|
|
</svg>
|
|
<div class="publish-option-text">
|
|
<div class="publish-option-title">发起活动</div>
|
|
<div class="publish-option-desc">组织线下聚会</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<nav class="sidebar-nav">
|
|
<div class="nav-section-title">探索</div>
|
|
|
|
<div class="nav-item" onclick="location.href='feed.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M19 20H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1m2 13a2 2 0 0 1-2-2V7m2 13a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"></path>
|
|
</svg>
|
|
动态广场
|
|
</div>
|
|
|
|
<div class="nav-item" onclick="location.href='video.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polygon points="23 7 16 12 23 17 23 7"></polygon>
|
|
<rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>
|
|
</svg>
|
|
视频广场
|
|
</div>
|
|
|
|
<div class="nav-item" onclick="location.href='activities.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></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="nav-section-title">我的</div>
|
|
|
|
<div class="nav-item active" onclick="location.href='me.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<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>
|
|
个人中心
|
|
</div>
|
|
|
|
<div class="nav-item" onclick="location.href='notification.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<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>
|
|
<div class="nav-item-label">
|
|
消息通知
|
|
<span class="nav-badge">3</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="nav-item" onclick="location.href='settings.html'">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="12" cy="12" r="3"></circle>
|
|
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
|
|
</svg>
|
|
设置
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="sidebar-footer">
|
|
<div class="sidebar-user" onclick="location.href='me.html'">
|
|
<div class="sidebar-avatar">
|
|
<img src="../assets/avatar-01-female-short-light.jpg" alt="林小夏">
|
|
</div>
|
|
<div class="sidebar-user-info">
|
|
<div class="sidebar-user-name">林小夏</div>
|
|
<div class="sidebar-user-desc">复旦大学</div>
|
|
</div>
|
|
<svg class="sidebar-user-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- ===== 右侧主区域 ===== -->
|
|
<div class="main-area">
|
|
<!-- ===== 顶部操作栏 ===== -->
|
|
<header class="top-bar">
|
|
<div class="top-bar-left">
|
|
<div class="page-title-bar">我的好友</div>
|
|
</div>
|
|
|
|
<div class="top-bar-right">
|
|
<div class="search-wrapper">
|
|
<svg class="search-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="11" cy="11" r="8"></circle>
|
|
<path d="m21 21-4.3-4.3"></path>
|
|
</svg>
|
|
<input type="text" class="search-input" placeholder="搜索用户">
|
|
</div>
|
|
<button class="add-friend-btn" onclick="addFriend()">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
|
|
<path d="M12 5v14"></path>
|
|
<path d="M5 12h14"></path>
|
|
</svg>
|
|
添加好友
|
|
</button>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- ===== 主内容区 ===== -->
|
|
<main class="content-area">
|
|
<div class="follow-layout">
|
|
<!-- 左侧筛选 -->
|
|
<aside class="follow-filter">
|
|
<div class="filter-card">
|
|
<div class="filter-search">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
|
|
<input type="text" placeholder="搜索用户...">
|
|
</div>
|
|
<div class="filter-group">
|
|
<div class="filter-group-title">分组</div>
|
|
<div class="filter-option active">
|
|
<span>全部关注</span>
|
|
<span class="filter-option-count">128</span>
|
|
</div>
|
|
<div class="filter-option">
|
|
<span>特别关注</span>
|
|
<span class="filter-option-count">12</span>
|
|
</div>
|
|
<div class="filter-option">
|
|
<span>同学</span>
|
|
<span class="filter-option-count">56</span>
|
|
</div>
|
|
<div class="filter-option">
|
|
<span>社团好友</span>
|
|
<span class="filter-option-count">28</span>
|
|
</div>
|
|
<div class="filter-option">
|
|
<span>其他学校</span>
|
|
<span class="filter-option-count">32</span>
|
|
</div>
|
|
</div>
|
|
<div class="filter-group">
|
|
<div class="filter-group-title">排序</div>
|
|
<div class="filter-option active">
|
|
<span>最近关注</span>
|
|
</div>
|
|
<div class="filter-option">
|
|
<span>粉丝最多</span>
|
|
</div>
|
|
<div class="filter-option">
|
|
<span>最活跃</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- 右侧主内容 -->
|
|
<div class="follow-main">
|
|
<div class="follow-header">
|
|
<div class="follow-title">我的好友</div>
|
|
<div class="follow-count">共 <b>128</b> 位关注</div>
|
|
</div>
|
|
|
|
<!-- Tab切换栏 -->
|
|
<div class="follow-tabs">
|
|
<div class="follow-tab" onclick="switchTab(this)">全部</div>
|
|
<div class="follow-tab active" onclick="switchTab(this)">关注<span class="count">128</span></div>
|
|
<div class="follow-tab" onclick="switchTab(this)">粉丝<span class="count">256</span></div>
|
|
<div class="follow-tab" onclick="switchTab(this)">互相关注<span class="count">42</span></div>
|
|
</div>
|
|
|
|
<!-- 用户卡片网格 -->
|
|
<div class="user-grid">
|
|
<!-- 卡片1:张子轩 - 已关注 -->
|
|
<div class="user-card">
|
|
<div class="user-avatar">
|
|
<img src="../assets/avatar-01-female-short-light.jpg" alt="张子轩">
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name">张子轩</div>
|
|
<div class="user-desc">上海交通大学</div>
|
|
</div>
|
|
<button class="follow-btn followed" onclick="toggleFollow(this)">
|
|
<span class="btn-text-default">已关注</span>
|
|
<span class="btn-text-hover">取消关注</span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- 卡片2:李梦琪 - 互相关注 -->
|
|
<div class="user-card">
|
|
<div class="user-avatar">
|
|
<img src="../assets/avatar-02-male-short-medium.jpg" alt="李梦琪">
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name">李梦琪</div>
|
|
<div class="user-desc">同济大学 设计学硕士</div>
|
|
</div>
|
|
<button class="follow-btn mutual" onclick="toggleFollow(this)">互相关注</button>
|
|
</div>
|
|
|
|
<!-- 卡片3:王浩然 - 关注(未关注) -->
|
|
<div class="user-card">
|
|
<div class="user-avatar">
|
|
<img src="../assets/avatar-03-female-long-dark.jpg" alt="王浩然">
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name">王浩然</div>
|
|
<div class="user-desc">复旦大学 计算机学院</div>
|
|
</div>
|
|
<button class="follow-btn follow" onclick="toggleFollow(this)">关注</button>
|
|
</div>
|
|
|
|
<!-- 卡片4:陈诗雨 - 已关注 -->
|
|
<div class="user-card">
|
|
<div class="user-avatar">
|
|
<img src="../assets/avatar-05-female-ponytail-medium.jpg" alt="陈诗雨">
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name">陈诗雨</div>
|
|
<div class="user-desc">华东师范大学</div>
|
|
</div>
|
|
<button class="follow-btn mutual" onclick="toggleFollow(this)">互相关注</button>
|
|
</div>
|
|
|
|
<!-- 卡片5:刘一鸣 - 关注(未关注) -->
|
|
<div class="user-card">
|
|
<div class="user-avatar">
|
|
<img src="../assets/avatar-05-female-ponytail-medium.jpg" alt="刘一鸣">
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name">刘一鸣</div>
|
|
<div class="user-desc">上海大学</div>
|
|
</div>
|
|
<button class="follow-btn follow" onclick="toggleFollow(this)">关注</button>
|
|
</div>
|
|
|
|
<!-- 卡片6:赵小妍 - 互相关注 -->
|
|
<div class="user-card">
|
|
<div class="user-avatar">
|
|
<img src="../assets/avatar-06-male-buzz-dark.jpg" alt="赵小妍">
|
|
</div>
|
|
<div class="user-info">
|
|
<div class="user-name">赵小妍</div>
|
|
<div class="user-desc">东华大学 服装设计</div>
|
|
</div>
|
|
<button class="follow-btn mutual" onclick="toggleFollow(this)">互相关注</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function goHome() { location.href = 'feed.html'; }
|
|
|
|
// Tab切换
|
|
function switchTab(el) {
|
|
document.querySelectorAll('.follow-tab').forEach(t => t.classList.remove('active'));
|
|
el.classList.add('active');
|
|
}
|
|
|
|
// 添加好友
|
|
function addFriend() {
|
|
showToast('info', '添加好友功能开发中');
|
|
}
|
|
|
|
// 关注切换
|
|
function toggleFollow(btn) {
|
|
if (btn.classList.contains('follow')) {
|
|
btn.classList.remove('follow');
|
|
btn.classList.add('followed');
|
|
btn.innerHTML = '<span class="btn-text-default">已关注</span><span class="btn-text-hover">取消关注</span>';
|
|
showToast('success', '关注成功');
|
|
} else if (btn.classList.contains('followed')) {
|
|
btn.classList.remove('followed');
|
|
btn.classList.add('follow');
|
|
btn.textContent = '关注';
|
|
showToast('info', '已取消关注');
|
|
} else if (btn.classList.contains('mutual')) {
|
|
btn.classList.remove('mutual');
|
|
btn.classList.add('follow');
|
|
btn.textContent = '关注';
|
|
showToast('info', '已取消关注');
|
|
}
|
|
}
|
|
|
|
// Toast
|
|
function showToast(type, message) {
|
|
const container = document.querySelector('.app');
|
|
const toast = document.createElement('div');
|
|
toast.style.cssText = `
|
|
position: absolute;
|
|
top: 80px;
|
|
right: 32px;
|
|
z-index: 300;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 12px 18px;
|
|
background: #fff;
|
|
border-radius: 10px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
|
|
border: 1px solid #F0F0F0;
|
|
border-left: 3px solid ${type === 'success' ? '#52C41A' : type === 'error' ? '#F5222D' : type === 'warning' ? '#FAAD14' : '#17B0CF'};
|
|
font-size: 14px;
|
|
color: #1F1F1F;
|
|
animation: toastIn 0.3s ease;
|
|
pointer-events: auto;
|
|
min-width: 200px;
|
|
`;
|
|
const icons = {
|
|
success: '<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',
|
|
error: '<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',
|
|
warning: '<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line>',
|
|
info: '<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>'
|
|
};
|
|
const iconColor = type === 'success' ? '#52C41A' : type === 'error' ? '#F5222D' : type === 'warning' ? '#FAAD14' : '#17B0CF';
|
|
toast.innerHTML = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="${iconColor}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${icons[type] || icons.info}</svg><span>${message}</span>`;
|
|
container.appendChild(toast);
|
|
setTimeout(() => {
|
|
toast.style.opacity = '0';
|
|
toast.style.transform = 'translateX(20px)';
|
|
toast.style.transition = 'all 0.3s ease';
|
|
setTimeout(() => toast.remove(), 300);
|
|
}, 2000);
|
|
}
|
|
|
|
// 添加toast动画
|
|
const style = document.createElement('style');
|
|
style.textContent = `
|
|
@keyframes toastIn {
|
|
from { opacity: 0; transform: translateX(20px); }
|
|
to { opacity: 1; transform: translateX(0); }
|
|
}
|
|
`;
|
|
document.head.appendChild(style);
|
|
</script>
|
|
<script src="../js/web-local-data.js?v=20261016-local" defer></script>
|
|
<script src="../js/web-api.js?v=20261020-api" defer></script>
|
|
<script src="../js/web-shell.js?v=20261013-message-links" defer></script>
|
|
</body>
|
|
</html>
|
|
|
|
|