1378 lines
40 KiB
HTML
1378 lines
40 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>STASH - 完整联动 dashboard</title>
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
background-color: #f5f6f8;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
color: #333;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* 版心统一宽度约束 */
|
|
.layout-container {
|
|
max-width: 1380px;
|
|
width: 100%;
|
|
margin: 0 auto;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
/* ------------------ 1. 顶部 Header 组件 ------------------ */
|
|
.header-outer {
|
|
background-color: #ffffff;
|
|
border-bottom: 1px solid #e8e8e8;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.header-inner {
|
|
height: 60px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.logo-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
background-color: #0f172a;
|
|
color: #fff;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-weight: bold;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.logo-text {
|
|
font-size: 18px;
|
|
font-weight: 800;
|
|
color: #0f172a;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.header-center-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
font-size: 13px;
|
|
color: #64748b;
|
|
}
|
|
|
|
.info-tag {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
background-color: #e6f4ff;
|
|
color: #1677ff;
|
|
font-size: 12px;
|
|
margin-right: 6px;
|
|
}
|
|
|
|
.info-item {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
color: #64748b;
|
|
}
|
|
|
|
.header-icon-btn {
|
|
cursor: pointer;
|
|
padding: 6px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.header-icon-btn:hover {
|
|
background-color: #f1f5f9;
|
|
color: #0f172a;
|
|
}
|
|
|
|
/* 搜索栏区域 */
|
|
.search-container {
|
|
padding: 16px 0 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.search-box {
|
|
width: 100%;
|
|
max-width: 520px;
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.search-input {
|
|
width: 100%;
|
|
height: 40px;
|
|
padding: 0 16px 0 40px;
|
|
border-radius: 20px;
|
|
border: 1px solid #e2e8f0;
|
|
background-color: #ffffff;
|
|
font-size: 13px;
|
|
outline: none;
|
|
transition: all 0.2s;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
|
|
}
|
|
|
|
.search-input:focus {
|
|
border-color: #1677ff;
|
|
box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
|
|
}
|
|
|
|
.search-icon {
|
|
position: absolute;
|
|
left: 14px;
|
|
color: #94a3b8;
|
|
font-size: 14px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* ------------------ 主体 Layout 布局 ------------------ */
|
|
.main-layout {
|
|
display: flex;
|
|
margin: 20px auto 40px;
|
|
gap: 20px;
|
|
}
|
|
|
|
/* ------------------ 2. 左侧侧边栏组件 ------------------ */
|
|
.sidebar {
|
|
width: 260px;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
position: sticky;
|
|
top: 76px;
|
|
align-self: flex-start;
|
|
}
|
|
|
|
.sidebar-card {
|
|
background-color: #ffffff;
|
|
border-radius: 12px;
|
|
padding: 18px;
|
|
border: 1px solid #f0f0f0;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
/* 用户卡片 */
|
|
.user-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.avatar-wrapper {
|
|
position: relative;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.avatar {
|
|
width: 64px;
|
|
height: 64px;
|
|
border-radius: 50%;
|
|
background-color: #dbeafe;
|
|
color: #1d4ed8;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 30px;
|
|
}
|
|
|
|
.verified-badge {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 2px;
|
|
width: 18px;
|
|
height: 18px;
|
|
background-color: #f59e0b;
|
|
color: #fff;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 10px;
|
|
border: 2px solid #fff;
|
|
}
|
|
|
|
.user-name {
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.user-role {
|
|
font-size: 11px;
|
|
color: #64748b;
|
|
background-color: #f1f5f9;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
margin: 6px 0 10px;
|
|
border: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.user-desc {
|
|
font-size: 12px;
|
|
color: #64748b;
|
|
line-height: 1.5;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.user-ip {
|
|
font-size: 12px;
|
|
color: #94a3b8;
|
|
}
|
|
|
|
/* 本地服务状态卡片 */
|
|
.status-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.status-title {
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.status-pill {
|
|
font-size: 11px;
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
background-color: #f1f5f9;
|
|
color: #64748b;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.status-pill::before {
|
|
content: '';
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background-color: #94a3b8;
|
|
}
|
|
|
|
.status-info-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 13px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.status-label {
|
|
color: #64748b;
|
|
}
|
|
|
|
.status-value {
|
|
font-weight: 600;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.status-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 14px;
|
|
}
|
|
|
|
.action-btn {
|
|
flex: 1;
|
|
padding: 6px 0;
|
|
border-radius: 16px;
|
|
border: 1px solid #e2e8f0;
|
|
background-color: #fff;
|
|
font-size: 12px;
|
|
color: #475569;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.action-btn:hover {
|
|
border-color: #cbd5e1;
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
/* 分类导航树结构 */
|
|
.menu-card {
|
|
padding: 12px 10px;
|
|
}
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 10px;
|
|
font-size: 13px;
|
|
color: #334155;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
user-select: none;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.nav-item:hover {
|
|
background-color: #f8fafc;
|
|
color: #1677ff;
|
|
}
|
|
|
|
.nav-item.active {
|
|
background-color: #e6f4ff;
|
|
color: #1677ff;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.arrow-icon {
|
|
font-size: 10px;
|
|
color: #94a3b8;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.arrow-icon.open {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.sub-menu {
|
|
padding-left: 12px;
|
|
display: none;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.sub-menu.show {
|
|
display: flex;
|
|
}
|
|
|
|
.sub-nav-item {
|
|
padding: 7px 12px;
|
|
font-size: 12px;
|
|
color: #64748b;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.sub-nav-item:hover {
|
|
background-color: #f1f5f9;
|
|
color: #1e293b;
|
|
}
|
|
|
|
.sub-nav-item.active {
|
|
background-color: #e6f4ff;
|
|
color: #1677ff;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ------------------ 3. 右侧主内容区域 ------------------ */
|
|
.content-area {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* 首页大框基础样式 */
|
|
.section-card {
|
|
background-color: #ffffff;
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
|
|
border: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.section-title-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.title-bar {
|
|
width: 4px;
|
|
height: 16px;
|
|
background-color: #1677ff;
|
|
border-radius: 2px;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.title-text-container {
|
|
position: relative;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #1f2329;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
/* 角标位于标题右上角 */
|
|
.badge {
|
|
position: absolute;
|
|
top: -8px;
|
|
right: -18px;
|
|
background-color: #ff4d4f;
|
|
color: #ffffff;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
height: 16px;
|
|
min-width: 16px;
|
|
padding: 0 4px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
line-height: 1;
|
|
box-shadow: 0 1px 3px rgba(255, 77, 79, 0.3);
|
|
}
|
|
|
|
.more-icon {
|
|
color: #8c8c8c;
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
letter-spacing: 2px;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.more-icon:hover {
|
|
color: #595959;
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
/* 首页常规 4 列网格布局 */
|
|
.app-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 12px;
|
|
}
|
|
|
|
@media (max-width: 1100px) {
|
|
.app-grid { grid-template-columns: repeat(2, 1fr); }
|
|
}
|
|
|
|
.app-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 12px 14px;
|
|
background-color: #f9f9fb;
|
|
border-radius: 8px;
|
|
border: 1px solid #f0f0f0;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.app-item:hover {
|
|
background-color: #ffffff;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
|
|
border-color: #e6e6e6;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.app-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 8px;
|
|
background-color: #e8f3ff;
|
|
color: #1677ff;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-weight: bold;
|
|
font-size: 16px;
|
|
margin-right: 12px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.app-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.app-name {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: #262626;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.app-desc {
|
|
font-size: 12px;
|
|
color: #8c8c8c;
|
|
margin-top: 2px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* 推荐电影 6列网格 */
|
|
.movie-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(6, 1fr);
|
|
gap: 12px;
|
|
}
|
|
|
|
@media (max-width: 1100px) {
|
|
.movie-grid { grid-template-columns: repeat(3, 1fr); }
|
|
}
|
|
|
|
.movie-item {
|
|
position: relative;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
aspect-ratio: 2 / 3;
|
|
background-color: #e0e0e0;
|
|
cursor: pointer;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.movie-item:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.movie-cover {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
.movie-info {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding: 20px 8px 8px;
|
|
background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.movie-title {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
line-height: 1.3;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* CES 现场报道网格 */
|
|
.article-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 12px;
|
|
}
|
|
|
|
@media (max-width: 1100px) {
|
|
.article-grid { grid-template-columns: repeat(2, 1fr); }
|
|
}
|
|
|
|
.article-item {
|
|
position: relative;
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
aspect-ratio: 4 / 3;
|
|
background-color: #e0e0e0;
|
|
cursor: pointer;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.article-item:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.article-cover {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
.article-info {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding: 16px 6px 6px;
|
|
background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 70%, transparent 100%);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.article-title {
|
|
font-size: 11px;
|
|
line-height: 1.3;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ------------------ 4. 右侧明细页面面板 (全屏联动视图) ------------------ */
|
|
.detail-view {
|
|
display: none;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
}
|
|
|
|
.detail-header-nav {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
background-color: #fff;
|
|
padding: 12px 20px;
|
|
border-radius: 12px;
|
|
border: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.back-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: #1677ff;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.back-btn:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.detail-page-hero {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 24px 0 12px;
|
|
text-align: center;
|
|
}
|
|
|
|
.hero-badge-icon {
|
|
width: 44px;
|
|
height: 44px;
|
|
background-color: #e6f4ff;
|
|
color: #1677ff;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 22px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.hero-title {
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
color: #1f2329;
|
|
}
|
|
|
|
.hero-count {
|
|
font-size: 13px;
|
|
color: #8c8c8c;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* 明细页大网格:一排4列 */
|
|
.detail-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 16px;
|
|
}
|
|
|
|
@media (max-width: 1100px) {
|
|
.detail-grid { grid-template-columns: repeat(2, 1fr); }
|
|
}
|
|
|
|
.sub-group-block {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.sub-group-header {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: #1f2329;
|
|
margin-bottom: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.sub-group-header::before {
|
|
content: '';
|
|
width: 3px;
|
|
height: 14px;
|
|
background-color: #1677ff;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
/* 图一:CES 明细页上图下文白色卡片布局 */
|
|
.ces-card-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 16px;
|
|
}
|
|
|
|
@media (max-width: 1100px) {
|
|
.ces-card-grid { grid-template-columns: repeat(2, 1fr); }
|
|
}
|
|
|
|
.ces-card-item {
|
|
background-color: #ffffff;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
border: 1px solid #f0f0f0;
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
|
|
display: flex;
|
|
flex-direction: column;
|
|
cursor: pointer;
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.ces-card-item:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.ces-card-cover {
|
|
width: 100%;
|
|
aspect-ratio: 16 / 10;
|
|
object-fit: cover;
|
|
display: block;
|
|
background-color: #f0f0f0;
|
|
}
|
|
|
|
.ces-card-body {
|
|
padding: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.ces-card-title {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: #1f2329;
|
|
line-height: 1.4;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.ces-card-desc {
|
|
font-size: 11px;
|
|
color: #8c8c8c;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* 图二:推荐电影明细页 6列竖版海报网格 */
|
|
.movie-detail-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(6, 1fr);
|
|
gap: 14px;
|
|
}
|
|
|
|
@media (max-width: 1100px) {
|
|
.movie-detail-grid { grid-template-columns: repeat(3, 1fr); }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- 1. 顶部 Header (支持严格宽限制对齐) -->
|
|
<header class="header-outer">
|
|
<div class="layout-container header-inner">
|
|
<div class="header-left">
|
|
<div class="logo-icon">S</div>
|
|
<span class="logo-text">STASH</span>
|
|
</div>
|
|
|
|
<div class="header-center-info">
|
|
<div class="info-item">
|
|
<span>共 1 个本地应用</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-tag">本地</span>
|
|
<span>git_helper</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-tag" style="background-color: #f0fdf4; color: #16a34a;">状态</span>
|
|
<span>等待服务连接</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header-right">
|
|
<div class="header-icon-btn" title="搜索">🔍</div>
|
|
<div class="header-icon-btn" title="个人账户">👤</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- 搜索框区域 -->
|
|
<div class="layout-container search-container">
|
|
<div class="search-box">
|
|
<span class="search-icon">🔍</span>
|
|
<input type="text" class="search-input" placeholder="搜索本地项目...">
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 主体布局 -->
|
|
<div class="layout-container main-layout">
|
|
|
|
<!-- 2. 左侧侧边栏 -->
|
|
<aside class="sidebar">
|
|
|
|
<!-- 用户信息卡片 -->
|
|
<div class="sidebar-card user-card">
|
|
<div class="avatar-wrapper">
|
|
<div class="avatar">👤</div>
|
|
<div class="verified-badge">✓</div>
|
|
</div>
|
|
<div class="user-name">本地管理员</div>
|
|
<div class="user-role">管理员</div>
|
|
<div class="user-desc">本地静态站点托管与预览,所有项目都运行在这台机器上。</div>
|
|
<div class="user-ip">IP地址: 局域网</div>
|
|
</div>
|
|
|
|
<!-- 本地服务状态卡片 -->
|
|
<div class="sidebar-card">
|
|
<div class="status-header">
|
|
<span class="status-title">本地服务</span>
|
|
<span class="status-pill">未连接</span>
|
|
</div>
|
|
<div class="status-info-row">
|
|
<span class="status-label">项目数</span>
|
|
<span class="status-value">1</span>
|
|
</div>
|
|
<div class="status-info-row">
|
|
<span class="status-label">访问地址</span>
|
|
<span class="status-value">127.0.0.1:8080</span>
|
|
</div>
|
|
<div class="status-actions">
|
|
<button class="action-btn">🔄 重新扫描</button>
|
|
<button class="action-btn">🔗 查看接口</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 左侧分类导航(不带网页数) -->
|
|
<div class="sidebar-card menu-card">
|
|
<div class="nav-item active" onclick="showHomeView()">
|
|
<span>首页</span>
|
|
</div>
|
|
|
|
<div class="nav-item" onclick="openMainDetail('local')">
|
|
<span>本地服务</span>
|
|
</div>
|
|
|
|
<!-- 常用推荐(带子菜单) -->
|
|
<div>
|
|
<div class="nav-item" onclick="toggleSubMenu('menu-recommend', this)">
|
|
<span>常用推荐</span>
|
|
<span class="arrow-icon" id="arrow-recommend">˅</span>
|
|
</div>
|
|
<div class="sub-menu" id="menu-recommend">
|
|
<div class="sub-nav-item" onclick="openSubDetail('material')">素材资源</div>
|
|
<div class="sub-nav-item" style="padding-left: 20px;" onclick="openSubDetail('ui')">UI 设计资源</div>
|
|
<div class="sub-nav-item" style="padding-left: 20px;" onclick="openSubDetail('vector')">矢量图标</div>
|
|
<div class="sub-nav-item" style="padding-left: 20px;" onclick="openSubDetail('wallpaper')">免费壁纸</div>
|
|
<div class="sub-nav-item" onclick="openSubDetail('dev')">开发工具</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 推荐电影(带子菜单) -->
|
|
<div>
|
|
<div class="nav-item" onclick="toggleSubMenu('menu-movie', this)">
|
|
<span>推荐电影</span>
|
|
<span class="arrow-icon" id="arrow-movie">˅</span>
|
|
</div>
|
|
<div class="sub-menu" id="menu-movie">
|
|
<div class="sub-nav-item" onclick="openSubDetail('classic_movie')">经典高分</div>
|
|
<div class="sub-nav-item" onclick="openSubDetail('hot_movie')">热门电影</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- CES 现场报道(带子菜单) -->
|
|
<div>
|
|
<div class="nav-item" onclick="toggleSubMenu('menu-ces', this)">
|
|
<span>CES 现场报道</span>
|
|
<span class="arrow-icon" id="arrow-ces">˅</span>
|
|
</div>
|
|
<div class="sub-menu" id="menu-ces">
|
|
<div class="sub-nav-item" onclick="openSubDetail('tech_ces')">前沿科技</div>
|
|
<div class="sub-nav-item" onclick="openSubDetail('design_ces')">工业设计</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</aside>
|
|
|
|
<!-- 3. 右侧主内容区域 -->
|
|
<main class="content-area">
|
|
|
|
<!-- A. 首页卡片视图 (默认展示) -->
|
|
<div id="home-view" style="display: flex; flex-direction: column; gap: 20px;">
|
|
|
|
<!-- 本地服务 -->
|
|
<section class="section-card">
|
|
<div class="section-header">
|
|
<div class="section-title-wrapper">
|
|
<div class="title-bar"></div>
|
|
<div class="title-text-container">
|
|
<span class="section-title">本地服务</span>
|
|
<span class="badge">1</span>
|
|
</div>
|
|
</div>
|
|
<div class="more-icon" onclick="openMainDetail('local')">•••</div>
|
|
</div>
|
|
<div class="app-grid">
|
|
<div class="app-item">
|
|
<div class="app-icon">G</div>
|
|
<div class="app-info">
|
|
<div class="app-name">git_helper</div>
|
|
<div class="app-desc">/git_helper/</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- 常用推荐(首页仅显示前4个) -->
|
|
<section class="section-card">
|
|
<div class="section-header">
|
|
<div class="section-title-wrapper">
|
|
<div class="title-bar"></div>
|
|
<div class="title-text-container">
|
|
<span class="section-title">常用推荐</span>
|
|
<span class="badge">4</span>
|
|
</div>
|
|
</div>
|
|
<div class="more-icon" onclick="openMainDetail('recommend')">•••</div>
|
|
</div>
|
|
<div class="app-grid">
|
|
<div class="app-item">
|
|
<div class="app-icon">G</div>
|
|
<div class="app-info">
|
|
<div class="app-name">GitHub</div>
|
|
<div class="app-desc">代码托管与开源社区</div>
|
|
</div>
|
|
</div>
|
|
<div class="app-item">
|
|
<div class="app-icon" style="background-color: #e6f7ff; color: #1890ff;">Z</div>
|
|
<div class="app-info">
|
|
<div class="app-name">知乎</div>
|
|
<div class="app-desc">深度内容问答社区</div>
|
|
</div>
|
|
</div>
|
|
<div class="app-item">
|
|
<div class="app-icon" style="background-color: #fff0f6; color: #eb2f96;">B</div>
|
|
<div class="app-info">
|
|
<div class="app-name">哔哩哔哩</div>
|
|
<div class="app-desc">弹幕视频分享网站</div>
|
|
</div>
|
|
</div>
|
|
<div class="app-item">
|
|
<div class="app-icon" style="background-color: #f6ffed; color: #52c41a;">V</div>
|
|
<div class="app-info">
|
|
<div class="app-name">V2EX</div>
|
|
<div class="app-desc">创意工作者讨论社区</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- 推荐电影(首页精选前6项) -->
|
|
<section class="section-card">
|
|
<div class="section-header">
|
|
<div class="section-title-wrapper">
|
|
<div class="title-bar" style="background-color: #722ed1;"></div>
|
|
<div class="title-text-container">
|
|
<span class="section-title">推荐电影</span>
|
|
<span class="badge">6</span>
|
|
</div>
|
|
</div>
|
|
<div class="more-icon" onclick="openMainDetail('movie')">•••</div>
|
|
</div>
|
|
<div class="movie-grid">
|
|
<div class="movie-item">
|
|
<img class="movie-cover" src="https://picsum.photos/seed/m1/300/450" alt="海报">
|
|
<div class="movie-info"><div class="movie-title">千与千寻 (2001)</div></div>
|
|
</div>
|
|
<div class="movie-item">
|
|
<img class="movie-cover" src="https://picsum.photos/seed/m2/300/450" alt="海报">
|
|
<div class="movie-info"><div class="movie-title">美丽人生 (1997)</div></div>
|
|
</div>
|
|
<div class="movie-item">
|
|
<img class="movie-cover" src="https://picsum.photos/seed/m3/300/450" alt="海报">
|
|
<div class="movie-info"><div class="movie-title">这个杀手不太冷 (1994)</div></div>
|
|
</div>
|
|
<div class="movie-item">
|
|
<img class="movie-cover" src="https://picsum.photos/seed/m4/300/450" alt="海报">
|
|
<div class="movie-info"><div class="movie-title">阿甘正传 (1994)</div></div>
|
|
</div>
|
|
<div class="movie-item">
|
|
<img class="movie-cover" src="https://picsum.photos/seed/m5/300/450" alt="海报">
|
|
<div class="movie-info"><div class="movie-title">霸王别姬 (1993)</div></div>
|
|
</div>
|
|
<div class="movie-item">
|
|
<img class="movie-cover" src="https://picsum.photos/seed/m6/300/450" alt="海报">
|
|
<div class="movie-info"><div class="movie-title">肖申克的救赎</div></div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- CES 现场报道(首页展示前4个) -->
|
|
<section class="section-card">
|
|
<div class="section-header">
|
|
<div class="section-title-wrapper">
|
|
<div class="title-bar" style="background-color: #fa8c16;"></div>
|
|
<div class="title-text-container">
|
|
<span class="section-title">CES 现场报道</span>
|
|
<span class="badge">4</span>
|
|
</div>
|
|
</div>
|
|
<div class="more-icon" onclick="openMainDetail('ces')">•••</div>
|
|
</div>
|
|
<div class="article-grid">
|
|
<div class="article-item">
|
|
<img class="article-cover" src="https://picsum.photos/seed/a1/300/225" alt="图片">
|
|
<div class="article-info"><div class="article-title">可塑性极强的玻璃设计</div></div>
|
|
</div>
|
|
<div class="article-item">
|
|
<img class="article-cover" src="https://picsum.photos/seed/a2/300/225" alt="图片">
|
|
<div class="article-info"><div class="article-title">废旧共享单车变微型书屋</div></div>
|
|
</div>
|
|
<div class="article-item">
|
|
<img class="article-cover" src="https://picsum.photos/seed/a3/300/225" alt="图片">
|
|
<div class="article-info"><div class="article-title">荧光灯管与混凝土块的组合</div></div>
|
|
</div>
|
|
<div class="article-item">
|
|
<img class="article-cover" src="https://picsum.photos/seed/a4/300/225" alt="图片">
|
|
<div class="article-info"><div class="article-title">混凝土模块化收纳框</div></div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<!-- B. 右侧明细页面视图 (点击三个点或菜单时平滑切换显示) -->
|
|
<div id="detail-view" class="detail-view">
|
|
|
|
<div class="detail-header-nav">
|
|
<div class="back-btn" onclick="showHomeView()">返回首页</div>
|
|
<div style="font-size: 12px; color: #94a3b8;" id="detail-breadcrumb">首页 / 分类明细</div>
|
|
</div>
|
|
|
|
<div class="detail-page-hero">
|
|
<div class="hero-badge-icon" id="detail-hero-icon">📌</div>
|
|
<h2 class="hero-title" id="detail-title">推荐好站</h2>
|
|
<div class="hero-count" id="detail-count">[11]</div>
|
|
</div>
|
|
|
|
<!-- 渲染明细列表容器 -->
|
|
<div id="detail-content-container"></div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
</div>
|
|
|
|
<script>
|
|
// --- 模拟所有数据集 ---
|
|
const DATABASE = {
|
|
recommend: {
|
|
title: "常用推荐",
|
|
icon: "🔖",
|
|
type: "app-group",
|
|
groups: [
|
|
{
|
|
name: "UI 设计资源",
|
|
items: [
|
|
{ name: "Wallhaven", desc: "WallBase 创办人失踪后推出的精选壁纸站", icon: "W" },
|
|
{ name: "500px", desc: "有着世界上最好的照片分享社区", icon: "5" },
|
|
{ name: "创意人", desc: "去掉了形式主义描述的原创社区", icon: "C" },
|
|
{ name: "顶尖文案", desc: "全球顶尖创意分享平台 OPEN YOUR EYES", icon: "T" },
|
|
{ name: "UI中国", desc: "前身为 iconfans,国内专业的UI设计平台", icon: "U" }
|
|
]
|
|
},
|
|
{
|
|
name: "矢量图标",
|
|
items: [
|
|
{ name: "Iconfont", desc: "阿里妈妈矢量图标库", icon: "I" },
|
|
{ name: "Feather Icons", desc: "简单漂亮的开源图标库", icon: "F" },
|
|
{ name: "FontAwesome", desc: "图标字体与CSS框架", icon: "A" }
|
|
]
|
|
},
|
|
{
|
|
name: "免费壁纸",
|
|
items: [
|
|
{ name: "Unsplash", desc: "免费高清无版权摄影图片", icon: "U" },
|
|
{ name: "Pexels", desc: "才华横溢的摄影师分享的素材", icon: "P" },
|
|
{ name: "Pixabay", desc: "超过2.7百万张优质图片和视频", icon: "X" }
|
|
]
|
|
},
|
|
{
|
|
name: "开发工具",
|
|
items: [
|
|
{ name: "GitHub", desc: "代码托管与开源协作社区", icon: "G" },
|
|
{ name: "CodePen", desc: "前端在线代码演示和练习场", icon: "C" },
|
|
{ name: "Stack Overflow", desc: "全球程序员技术问答社区", icon: "S" }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
ces: {
|
|
title: "CES 现场报道",
|
|
icon: "🏷️",
|
|
type: "ces-card", // 图一页面效果:独立白色卡片
|
|
countText: "[18]",
|
|
items: [
|
|
{ title: "可塑性极强的玻璃,在设计师手里有了更多可能 | 这个设计了不起", desc: "前沿科技", img: "https://picsum.photos/seed/a1/400/250" },
|
|
{ title: "废旧共享单车如何变成微型共享书屋?| 这个设计了不起", desc: "环保设计", img: "https://picsum.photos/seed/a2/400/250" },
|
|
{ title: "荧光灯管与混凝土块的组合,可以玩出多少花样?| 这个设计了不起", desc: "材料探索", img: "https://picsum.photos/seed/a3/400/250" },
|
|
{ title: "混凝土做的模块化收纳框,还能改成搁架用 | 这个设计了不起", desc: "家居模块", img: "https://picsum.photos/seed/a4/400/250" },
|
|
{ title: "这个用拉伸材料做的头盔,还能帮你呼叫救护车 | 这个设计了不起", desc: "智能穿戴", img: "https://picsum.photos/seed/a5/400/250" },
|
|
{ title: "你如何选择字体,简单易读还是好看有趣?| 这个设计了不起", desc: "视觉体验", img: "https://picsum.photos/seed/a6/400/250" },
|
|
{ title: "家里空间小?你需要几把可以悬挂在墙上的椅子 | 这个设计了不起", desc: "空间收纳", img: "https://picsum.photos/seed/a7/400/250" },
|
|
{ title: "宜家厨房家具又被改造了,色彩是亮点 | 这个设计了不起", desc: "色彩灵感", img: "https://picsum.photos/seed/a8/400/250" },
|
|
{ title: "这款诞生50年的扶手椅,推出了特别版配色 | 这个设计了不起", desc: "经典产品", img: "https://picsum.photos/seed/a9/400/250" },
|
|
{ title: "让家和办公室界限变得模糊的一组家具 | 这个设计了不起", desc: "办公家具", img: "https://picsum.photos/seed/a10/400/250" },
|
|
{ title: "这个酒店设计奖,挖掘过去一年体验最好的酒店 | 这个设计了不起", desc: "空间建筑", img: "https://picsum.photos/seed/a11/400/250" },
|
|
{ title: "一款可移动办公桌,挂墙上当作白板就能写写画画 | 这个设计了不起", desc: "移动办公", img: "https://picsum.photos/seed/a12/400/250" }
|
|
]
|
|
},
|
|
movie: {
|
|
title: "推荐电影",
|
|
icon: "🎬",
|
|
type: "movie-card", // 图二页面效果:沉浸式多行竖版海报
|
|
countText: "[12]",
|
|
items: [
|
|
{ title: "千与千寻 千と千尋の神隠し (2001)", img: "https://picsum.photos/seed/m1/300/450" },
|
|
{ title: "美丽人生 La vita è bella (1997)", img: "https://picsum.photos/seed/m2/300/450" },
|
|
{ title: "这个杀手不太冷 Léon (1994)", img: "https://picsum.photos/seed/m3/300/450" },
|
|
{ title: "阿甘正传 Forrest Gump (1994)", img: "https://picsum.photos/seed/m4/300/450" },
|
|
{ title: "霸王别姬 (1993)", img: "https://picsum.photos/seed/m5/300/450" },
|
|
{ title: "肖申克的救赎 The Shawshank Redemption", img: "https://picsum.photos/seed/m6/300/450" },
|
|
{ title: "泰坦尼克号 Titanic (1997)", img: "https://picsum.photos/seed/m7/300/450" },
|
|
{ title: "盗梦空间 Inception (2010)", img: "https://picsum.photos/seed/m8/300/450" },
|
|
{ title: "星际穿越 Interstellar (2014)", img: "https://picsum.photos/seed/m9/300/450" },
|
|
{ title: "楚门的世界 The Truman Show (1998)", img: "https://picsum.photos/seed/m10/300/450" },
|
|
{ title: "疯狂动物城 Zootopia (2016)", img: "https://picsum.photos/seed/m11/300/450" },
|
|
{ title: "大话西游之大圣娶亲 (1995)", img: "https://picsum.photos/seed/m12/300/450" }
|
|
]
|
|
}
|
|
};
|
|
|
|
// --- 左侧折叠菜单交互 ---
|
|
function toggleSubMenu(menuId, el) {
|
|
const menu = document.getElementById(menuId);
|
|
const arrow = el.querySelector('.arrow-icon');
|
|
const isOpen = menu.classList.contains('show');
|
|
|
|
if (isOpen) {
|
|
menu.classList.remove('show');
|
|
arrow.classList.remove('open');
|
|
} else {
|
|
menu.classList.add('show');
|
|
arrow.classList.add('open');
|
|
}
|
|
}
|
|
|
|
// --- 切回首页视图 ---
|
|
function showHomeView() {
|
|
document.getElementById('home-view').style.display = 'flex';
|
|
document.getElementById('detail-view').style.display = 'none';
|
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
}
|
|
|
|
// --- 打开主分类明细(如点击常用推荐、CES现场报道、推荐电影标题右侧的 •••) ---
|
|
function openMainDetail(categoryKey) {
|
|
const data = DATABASE[categoryKey];
|
|
if (!data) return;
|
|
|
|
document.getElementById('home-view').style.display = 'none';
|
|
document.getElementById('detail-view').style.display = 'flex';
|
|
|
|
document.getElementById('detail-hero-icon').innerText = data.icon;
|
|
document.getElementById('detail-title').innerText = data.title;
|
|
document.getElementById('detail-breadcrumb').innerText = `首页 / ${data.title}`;
|
|
|
|
const container = document.getElementById('detail-content-container');
|
|
container.innerHTML = '';
|
|
|
|
// 图一 CES 现场报道卡片网格渲染
|
|
if (data.type === 'ces-card') {
|
|
document.getElementById('detail-count').innerText = data.countText || `[${data.items.length}]`;
|
|
|
|
let html = '<div class="ces-card-grid">';
|
|
data.items.forEach(item => {
|
|
html += `
|
|
<div class="ces-card-item">
|
|
<img class="ces-card-cover" src="${item.img}" alt="cover">
|
|
<div class="ces-card-body">
|
|
<div class="ces-card-title">${item.title}</div>
|
|
<div class="ces-card-desc">${item.desc}</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
});
|
|
html += '</div>';
|
|
container.innerHTML = html;
|
|
}
|
|
// 图二 推荐电影竖版海报网格渲染
|
|
else if (data.type === 'movie-card') {
|
|
document.getElementById('detail-count').innerText = data.countText || `[${data.items.length}]`;
|
|
|
|
let html = '<div class="movie-detail-grid">';
|
|
data.items.forEach(item => {
|
|
html += `
|
|
<div class="movie-item">
|
|
<img class="movie-cover" src="${item.img}" alt="poster">
|
|
<div class="movie-info">
|
|
<div class="movie-title">${item.title}</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
});
|
|
html += '</div>';
|
|
container.innerHTML = html;
|
|
}
|
|
// 常用推荐/APP应用分组明细
|
|
else if (data.type === 'app-group') {
|
|
let totalCount = 0;
|
|
data.groups.forEach(g => totalCount += g.items.length);
|
|
document.getElementById('detail-count').innerText = `[${totalCount}]`;
|
|
|
|
data.groups.forEach(group => {
|
|
const block = document.createElement('div');
|
|
block.className = 'sub-group-block';
|
|
|
|
let groupHtml = `<div class="sub-group-header">${group.name}</div><div class="detail-grid">`;
|
|
group.items.forEach(item => {
|
|
groupHtml += `
|
|
<div class="app-item">
|
|
<div class="app-icon">${item.icon}</div>
|
|
<div class="app-info">
|
|
<div class="app-name">${item.name}</div>
|
|
<div class="app-desc">${item.desc}</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
});
|
|
groupHtml += '</div>';
|
|
block.innerHTML = groupHtml;
|
|
container.appendChild(block);
|
|
});
|
|
}
|
|
|
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
}
|
|
|
|
// --- 点击左侧具体子菜单精确过滤 ---
|
|
function openSubDetail(subKey) {
|
|
document.getElementById('home-view').style.display = 'none';
|
|
document.getElementById('detail-view').style.display = 'flex';
|
|
|
|
const container = document.getElementById('detail-content-container');
|
|
container.innerHTML = '';
|
|
|
|
let targetItems = [];
|
|
let titleName = "";
|
|
|
|
if (subKey === 'ui') {
|
|
titleName = "UI 设计资源";
|
|
targetItems = DATABASE.recommend.groups[0].items;
|
|
} else if (subKey === 'vector') {
|
|
titleName = "矢量图标";
|
|
targetItems = DATABASE.recommend.groups[1].items;
|
|
} else if (subKey === 'wallpaper') {
|
|
titleName = "免费壁纸";
|
|
targetItems = DATABASE.recommend.groups[2].items;
|
|
} else if (subKey === 'dev') {
|
|
titleName = "开发工具";
|
|
targetItems = DATABASE.recommend.groups[3].items;
|
|
} else if (subKey === 'material') {
|
|
openMainDetail('recommend');
|
|
return;
|
|
} else if (subKey === 'tech_ces' || subKey === 'design_ces') {
|
|
openMainDetail('ces');
|
|
return;
|
|
} else if (subKey === 'classic_movie' || subKey === 'hot_movie') {
|
|
openMainDetail('movie');
|
|
return;
|
|
}
|
|
|
|
document.getElementById('detail-hero-icon').innerText = "📌";
|
|
document.getElementById('detail-title').innerText = titleName;
|
|
document.getElementById('detail-count').innerText = `[${targetItems.length}]`;
|
|
document.getElementById('detail-breadcrumb').innerText = `首页 / 常用推荐 / ${titleName}`;
|
|
|
|
let html = '<div class="detail-grid">';
|
|
targetItems.forEach(item => {
|
|
html += `
|
|
<div class="app-item">
|
|
<div class="app-icon">${item.icon}</div>
|
|
<div class="app-info">
|
|
<div class="app-name">${item.name}</div>
|
|
<div class="app-desc">${item.desc}</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
});
|
|
html += '</div>';
|
|
container.innerHTML = html;
|
|
|
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |