diff --git a/assets/css/album.css b/assets/css/album.css index 820dfc4..ad7ed89 100644 --- a/assets/css/album.css +++ b/assets/css/album.css @@ -1,341 +1,314 @@ -/* 相册详情页面特定样式 - 增强响应式支持 */ +/* ============================================================ + 相册详情页样式 - 瀑布流布局 + 分类标签 + ============================================================ */ + :root { --primary-blue: #1e40af; --secondary-blue: #3b82f6; - --light-blue: #dbeafe; - --accent-blue: #60a5fa; + --accent-purple: #8b5cf6; + --accent-pink: #ec4899; --white: #ffffff; - --light-gray: #f8fafc; - --medium-gray: #e2e8f0; - --dark-gray: #475569; + --bg-primary: #f8fafc; + --bg-surface: #ffffff; + --bg-hover: #f1f5f9; + --border-gray: #e5e7eb; --text-dark: #1e293b; --text-light: #64748b; - --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1); - --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1); + --text-muted: #94a3b8; + --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08); + --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08); --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1); - --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1); - --border-radius: 12px; - --border-radius-lg: 20px; - --mobile-breakpoint: 768px; - --tablet-breakpoint: 1024px; + --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.12); + --radius: 8px; + --radius-card: 12px; + --radius-lg: 16px; } -body { - font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; - background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%); +* { box-sizing: border-box; } + +body { + font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; + background: var(--bg-primary); min-height: 100vh; color: var(--text-dark); line-height: 1.6; overflow-x: hidden; + -webkit-font-smoothing: antialiased; } -.container { - max-width: 1400px; - margin: 0 auto; - padding: 30px 20px; +.container { + max-width: 1400px; + margin: 0 auto; + padding: 24px 20px; } -.header { margin-bottom: 40px; } -.back-link { - display: inline-flex; - align-items: center; - gap: 10px; - padding: 12px 24px; - background: var(--white); - color: var(--primary-blue); - text-decoration: none; - border-radius: var(--border-radius); +/* ============ 顶部返回按钮 ============ */ +.back-link { + display: inline-flex; + align-items: center; + gap: 8px; + padding: 10px 20px; + background: var(--bg-surface); + color: var(--secondary-blue); + text-decoration: none; + border-radius: var(--radius); box-shadow: var(--shadow-sm); - margin-bottom: 25px; - transition: all 0.3s ease; - border: 1px solid var(--medium-gray); + margin-bottom: 20px; + transition: all 0.2s ease; + border: 1px solid var(--border-gray); font-weight: 500; + font-size: 0.9rem; } -.back-link:hover { - background: var(--light-blue); - transform: translateX(-5px); + +.back-link:hover { + background: var(--bg-hover); + transform: translateX(-3px); box-shadow: var(--shadow-md); - color: var(--primary-blue); } -.album-title { - color: var(--text-dark); - font-size: 2.5rem; - text-align: center; - margin-bottom: 15px; + +/* ============ 相册标题区 ============ */ +.header { + text-align: center; + margin-bottom: 32px; +} + +.album-title { + color: var(--text-dark); + font-size: 2rem; + margin-bottom: 12px; font-weight: 700; - background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%); + line-height: 1.3; + background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-purple) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; -} -.album-info { - text-align: center; - color: var(--text-light); - font-size: 1.2rem; - margin-bottom: 20px; - background: var(--white); - padding: 20px; - border-radius: var(--border-radius); - box-shadow: var(--shadow-sm); - border: 1px solid var(--medium-gray); - max-width: 800px; - margin-left: auto; - margin-right: auto; + padding: 0 20px; } -/* 相册元数据标签(人名 + 标签) */ +.album-info { + display: inline-flex; + align-items: center; + gap: 16px; + color: var(--text-light); + font-size: 0.95rem; + padding: 10px 20px; + background: var(--bg-surface); + border-radius: var(--radius-full); + border: 1px solid var(--border-gray); +} + +.album-info i { color: var(--secondary-blue); } + +/* ============ 相册标签区(新:分类着色) ============ */ .album-meta-tags { display: flex; flex-wrap: wrap; justify-content: center; - gap: 10px; - margin: 0 auto 40px; - max-width: 800px; + gap: 8px; + margin: 20px auto 32px; + max-width: 900px; } .meta-chip { display: inline-flex; align-items: center; - gap: 5px; + gap: 6px; padding: 6px 14px; - border-radius: 20px; + border-radius: var(--radius-full); font-size: 0.85rem; + font-weight: 500; cursor: pointer; transition: all 0.2s ease; user-select: none; border: 1px solid transparent; } -.meta-chip i { - font-size: 0.75rem; +.meta-chip:hover { + transform: translateY(-2px); + box-shadow: var(--shadow-md); } +.meta-chip:active { transform: translateY(0); } + +.meta-chip i { font-size: 0.75rem; } + +/* 人物标签 */ .meta-chip-person { - background: #dbeafe; - color: #1e40af; - border-color: #bfdbfe; + background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); + color: var(--accent-purple); + border-color: rgba(139, 92, 246, 0.2); } .meta-chip-person:hover { - background: #bfdbfe; - transform: translateY(-1px); - box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2); + background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%); + color: var(--white); + border-color: transparent; } -.meta-chip-tag { +/* 分类标签(按类别着色) */ +.meta-chip-tag-style { + background: #f0f9ff; + color: #0284c7; + border-color: #bae6fd; +} +.meta-chip-tag-style:hover { background: #0284c7; color: #fff; border-color: #0284c7; } + +.meta-chip-tag-outfit { + background: #fdf2f8; + color: #db2777; + border-color: #fbcfe8; +} +.meta-chip-tag-outfit:hover { background: #db2777; color: #fff; border-color: #db2777; } + +.meta-chip-tag-scene { background: #f0fdf4; - color: #166534; + color: #15803d; border-color: #bbf7d0; } +.meta-chip-tag-scene:hover { background: #15803d; color: #fff; border-color: #15803d; } -.meta-chip-tag:hover { - background: #dcfce7; - transform: translateY(-1px); - box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2); +.meta-chip-tag-body { + background: #fef3c7; + color: #b45309; + border-color: #fde68a; +} +.meta-chip-tag-body:hover { background: #b45309; color: #fff; border-color: #b45309; } + +.meta-chip-tag-mood { + background: #faf5ff; + color: #7c3aed; + border-color: #e9d5ff; +} +.meta-chip-tag-mood:hover { background: #7c3aed; color: #fff; border-color: #7c3aed; } + +.meta-chip-tag-topic { + background: #eff6ff; + color: #0369a1; + border-color: #bfdbfe; +} +.meta-chip-tag-topic:hover { background: #0369a1; color: #fff; border-color: #0369a1; } + +/* 默认标签 */ +.meta-chip-tag { + background: var(--bg-hover); + color: var(--text-light); + border-color: var(--border-gray); +} +.meta-chip-tag:hover { background: var(--text-light); color: #fff; border-color: var(--text-light); } + +/* ============ 瀑布流布局(核心) ============ */ +.images-grid { + column-count: 4; + column-gap: 16px; + margin-bottom: 40px; } -/* 智能图片网格布局 - 自适应瀑布流效果 */ -.images-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); - gap: 25px; - margin-bottom: 50px; - align-items: start; /* 顶部对齐 */ -} - -/* 大屏幕下的优化布局 */ -@media (min-width: 1200px) { - .images-grid { - grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); - gap: 30px; - } -} - -/* 宽幅图片布局 - 超宽图片 (ratio > 1.5) */ -.image-item.landscape { - grid-column: span 1; -} - -.image-item.landscape img { - aspect-ratio: 16/9; - height: auto; +/* 瀑布流中的每一项 */ +.image-item { + position: relative; + display: inline-block; width: 100%; - object-fit: cover; -} - -/* 竖幅图片布局 - 超高图片 (ratio < 0.67) */ -.image-item.portrait { - grid-column: span 1; -} - -.image-item.portrait img { - aspect-ratio: 3/4; - height: auto; - width: 100%; - object-fit: cover; -} - -/* 较宽图片布局 (1.3 < ratio ≤ 1.5) */ -.image-item.wide { - grid-column: span 1; -} - -.image-item.wide img { - aspect-ratio: 4/3; - height: auto; - width: 100%; - object-fit: cover; -} - -/* 较高图片布局 (0.83 ≤ ratio < 1.3) */ -.image-item.tall { - grid-column: span 1; -} - -.image-item.tall img { - aspect-ratio: 3/4; - height: auto; - width: 100%; - object-fit: cover; -} - -/* 方形图片布局 (接近1:1) */ -.image-item.square { - grid-column: span 1; -} - -.image-item.square img { - aspect-ratio: 1/1; - height: auto; - width: 100%; - object-fit: cover; -} - -/* 默认图片样式(未分类的图片) */ -.image-item { - position: relative; - overflow: hidden; - border-radius: var(--border-radius); - box-shadow: var(--shadow-lg); - background: var(--white); + margin: 0 0 16px 0; + overflow: hidden; + border-radius: var(--radius-card); + box-shadow: var(--shadow-sm); + background: var(--bg-surface); transition: all 0.3s ease; cursor: pointer; - border: 1px solid var(--medium-gray); + border: 1px solid var(--border-gray); + break-inside: avoid; + page-break-inside: avoid; } -.image-item:hover { - transform: translateY(-8px); - box-shadow: var(--shadow-xl); - border-color: var(--accent-blue); +.image-item:hover { + transform: translateY(-4px); + box-shadow: var(--shadow-lg); + border-color: var(--secondary-blue); } -/* 通用图片样式 - 移除固定高度,使用自适应 */ -.image-item img { - width: 100%; - height: auto; /* 改为自适应高度 */ - object-fit: cover; +/* 图片本身 - 保持原始比例(瀑布流关键) */ +.image-item img { + width: 100%; + height: auto; display: block; - transition: transform 0.5s ease; + object-fit: contain; + transition: transform 0.4s ease; } -.image-item:hover img { - transform: scale(1.05); +.image-item:hover img { + transform: scale(1.02); } -.image-caption { - padding: 12px; - text-align: center; - color: var(--text-dark); - font-size: 0.9rem; - font-weight: 500; - line-height: 1.4; + +/* 图片说明 */ +.image-caption { + padding: 10px 12px; + color: var(--text-light); + font-size: 0.8rem; display: flex; justify-content: space-between; align-items: center; - flex-wrap: wrap; gap: 8px; + border-top: 1px solid var(--border-gray); } .image-caption small { - background: var(--light-gray); - padding: 4px 8px; - border-radius: 4px; - font-size: 0.8rem; - color: var(--text-light); + background: var(--bg-hover); + padding: 3px 8px; + border-radius: var(--radius-full); + font-size: 0.75rem; + color: var(--text-muted); + font-weight: 500; } -/* 收藏按钮样式 */ +/* 收藏按钮 */ .favorite-btn { position: absolute; top: 10px; right: 10px; - background: rgba(255, 255, 255, 0.9); + background: rgba(255, 255, 255, 0.92); border: none; border-radius: 50%; - width: 36px; - height: 36px; + width: 34px; + height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; - transition: all 0.3s ease; - backdrop-filter: blur(10px); + transition: all 0.25s ease; + backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); opacity: 0; z-index: 10; } -.image-item:hover .favorite-btn { - opacity: 1; -} +.image-item:hover .favorite-btn { opacity: 1; } .favorite-btn:hover { - background: rgba(255, 255, 255, 1); - transform: scale(1.1); + transform: scale(1.12); box-shadow: var(--shadow-md); } .favorite-btn.favorited { - color: #ec4899; - background: rgba(236, 72, 153, 0.1); + color: var(--accent-pink); + background: rgba(236, 72, 153, 0.15); } -.favorite-btn.favorited:hover { - background: rgba(236, 72, 153, 0.2); -} - -.favorite-btn i { - font-size: 16px; - transition: all 0.3s ease; -} - -/* 触摸设备显示收藏按钮 */ -@media (hover: none) and (pointer: coarse) { - .favorite-btn { - opacity: 0.7; - } - - .image-item:active .favorite-btn { - opacity: 1; - transform: scale(1.1); - } -} +.favorite-btn i { font-size: 15px; } /* 图片加载状态 */ .image-loading { position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: var(--light-gray); + top: 0; left: 0; + width: 100%; height: 100%; + background: var(--bg-hover); display: flex; align-items: center; justify-content: center; - color: var(--text-light); + color: var(--text-muted); } .image-loading .fa-spinner { - font-size: 1.5rem; + font-size: 1.3rem; animation: spin 1s linear infinite; } @@ -344,406 +317,243 @@ body { 100% { transform: rotate(360deg); } } -/* 图片查看器样式 */ -.lightbox { - display: none; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(30, 41, 59, 0.95); - z-index: 1000; - justify-content: center; - align-items: center; - flex-direction: column; - backdrop-filter: blur(10px); +/* 触摸设备收藏按钮常显 */ +@media (hover: none) and (pointer: coarse) { + .favorite-btn { opacity: 0.8; } + .image-item:hover { transform: none; box-shadow: var(--shadow-sm); } + .image-item:active { transform: scale(0.98); } } -.lightbox img { - max-width: 85%; - max-height: 75%; - object-fit: contain; - border-radius: 12px; - box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); + +/* ============ 响应式:瀑布流列数 ============ */ + +/* 大屏幕(默认):4列 */ +@media (max-width: 1200px) { + .images-grid { column-count: 3; column-gap: 14px; } + .image-item { margin-bottom: 14px; } } -.lightbox-close { - position: absolute; - top: 30px; - right: 40px; - color: var(--white); - font-size: 36px; - cursor: pointer; - z-index: 1001; - background: rgba(255, 255, 255, 0.1); - width: 50px; - height: 50px; - border-radius: 50%; + +/* 中等屏幕:3列 */ +@media (max-width: 900px) { + .images-grid { column-count: 2; column-gap: 12px; } + .image-item { margin-bottom: 12px; } + .album-title { font-size: 1.6rem; } +} + +/* 手机:2列 */ +@media (max-width: 600px) { + .container { padding: 16px 12px; } + .images-grid { column-count: 2; column-gap: 10px; } + .image-item { margin-bottom: 10px; border-radius: var(--radius); } + .album-title { font-size: 1.3rem; padding: 0 10px; } + .album-info { font-size: 0.85rem; padding: 8px 14px; gap: 10px; } + .back-link { padding: 8px 14px; font-size: 0.85rem; } + .meta-chip { padding: 5px 11px; font-size: 0.8rem; } + .image-caption { padding: 8px 10px; font-size: 0.75rem; } + .favorite-btn { width: 30px; height: 30px; } +} + +/* 小屏手机:1列 */ +@media (max-width: 380px) { + .images-grid { column-count: 1; } +} + +/* ============ 图片查看器(保持原样) ============ */ +.preview-modal { + position: fixed; + top: 0; left: 0; + width: 100%; height: 100%; + z-index: 1000; display: flex; align-items: center; justify-content: center; + opacity: 0; + visibility: hidden; transition: all 0.3s ease; - backdrop-filter: blur(10px); -} -.lightbox-close:hover { - background: rgba(255, 255, 255, 0.2); - transform: scale(1.1); -} -.lightbox-nav { - position: absolute; - top: 50%; - width: 100%; - display: flex; - justify-content: space-between; - padding: 0 20px; - transform: translateY(-50%); - z-index: 1001; -} -.lightbox-nav button { - background: rgba(255,255,255,0.2); - color: var(--white); - font-size: 30px; - padding: 12px 24px; - cursor: pointer; - border-radius: var(--border-radius); - backdrop-filter: blur(10px); - transition: all 0.3s ease; - border: 1px solid rgba(255, 255, 255, 0.1); -} -.lightbox-nav button:hover { - background: rgba(255,255,255,0.3); - transform: scale(1.1); - border-color: rgba(255, 255, 255, 0.3); -} -.lightbox-info { - color: var(--white); - text-align: center; - margin-top: 25px; - font-size: 1.2rem; - background: rgba(255, 255, 255, 0.1); - padding: 15px 25px; - border-radius: var(--border-radius); - backdrop-filter: blur(10px); - max-width: 80%; } -/* 响应式媒体查询 - 移动端优化 */ -@media (max-width: 1024px) { - .container { - padding: 25px 15px; - } - - .header { - margin-bottom: 35px; - } - - .album-title { - font-size: 2.2rem; - } - - .album-info { - font-size: 1.1rem; - padding: 18px; - margin-bottom: 18px; - } - - .album-meta-tags { - margin-bottom: 35px; - } - - .images-grid { - grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); - gap: 20px; - } - - .image-item img { - height: auto; /* 自适应高度 */ - } - - .lightbox img { - max-width: 90%; - max-height: 70%; - } - - .lightbox-close { - top: 20px; - right: 25px; - font-size: 30px; - width: 45px; - height: 45px; - } +.preview-modal.active { opacity: 1; visibility: visible; } + +.preview-overlay { + position: absolute; + top: 0; left: 0; + width: 100%; height: 100%; + background: rgba(15, 23, 42, 0.9); + backdrop-filter: blur(8px); } -@media (max-width: 768px) { - .container { - padding: 20px 15px; - } - - .header { - margin-bottom: 30px; - } - - .back-link { - padding: 10px 20px; - font-size: 0.9rem; - margin-bottom: 20px; - } - - .album-title { - font-size: 1.8rem; - margin-bottom: 12px; - } - - .album-info { - font-size: 1rem; - padding: 15px; - margin-bottom: 15px; - } - - .album-meta-tags { - gap: 8px; - margin-bottom: 30px; - padding: 0 10px; - } - - .meta-chip { - padding: 5px 12px; - font-size: 0.8rem; - } - - .images-grid { - grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); - gap: 15px; - } - - .image-item { - border-radius: 10px; - } - - .image-item img { - height: auto; /* 自适应高度 */ - } - - .image-caption { - padding: 10px; - font-size: 0.85rem; - } - - .image-caption small { - font-size: 0.75rem; - padding: 3px 6px; - } - - .lightbox { - padding: 20px; - } - - .lightbox img { - max-width: 95%; - max-height: 65%; - } - - .lightbox-close { - top: 15px; - right: 15px; - font-size: 24px; - width: 40px; - height: 40px; - } - - .lightbox-nav { - padding: 0 10px; - } - - .lightbox-nav button { - font-size: 24px; - padding: 10px 20px; - } - - .lightbox-info { - font-size: 1rem; - padding: 12px 20px; - margin-top: 20px; - } +.preview-container { + position: relative; + background: var(--bg-surface); + border-radius: var(--radius-lg); + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); + max-width: 92vw; + max-height: 90vh; + width: 1200px; + height: 800px; + display: flex; + flex-direction: column; + transform: scale(0.92); + transition: transform 0.3s ease; } -@media (max-width: 480px) { - .container { - padding: 15px 10px; - } - - .header { - margin-bottom: 25px; - } - - .back-link { - padding: 8px 16px; - font-size: 0.85rem; - margin-bottom: 15px; - } - - .album-title { - font-size: 1.6rem; - margin-bottom: 10px; - } - - .album-info { - font-size: 0.9rem; - padding: 12px; - margin-bottom: 12px; - } - - .album-meta-tags { - gap: 6px; - margin-bottom: 25px; - padding: 0 8px; - } - - .meta-chip { - padding: 4px 10px; - font-size: 0.75rem; - } - - .images-grid { - grid-template-columns: 1fr; - gap: 12px; - } - - .image-item img { - height: auto; /* 自适应高度 */ - } - - .image-caption { - padding: 8px; - font-size: 0.8rem; - flex-direction: column; - align-items: flex-start; - gap: 6px; - } - - .lightbox { - padding: 15px; - } - - .lightbox img { - max-width: 100%; - max-height: 60%; - } - - .lightbox-close { - top: 10px; - right: 10px; - font-size: 20px; - width: 35px; - height: 35px; - } - - .lightbox-nav { - padding: 0 5px; - } - - .lightbox-nav button { - font-size: 20px; - padding: 8px 16px; - } - - .lightbox-info { - font-size: 0.9rem; - padding: 10px 15px; - margin-top: 15px; - max-width: 95%; - } +.preview-modal.active .preview-container { transform: scale(1); } + +.preview-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 16px 20px; + border-bottom: 1px solid var(--border-gray); + flex-shrink: 0; } -/* 触摸设备优化 */ -@media (hover: none) and (pointer: coarse) { - .image-item:hover { - transform: none; - box-shadow: var(--shadow-lg); - } - - .image-item:active { - transform: scale(0.98); - box-shadow: var(--shadow-md); - } - - .back-link:hover { - transform: none; - } - - .back-link:active { - transform: scale(0.95); - } - - .lightbox-nav button:hover { - transform: none; - } - - .lightbox-nav button:active { - transform: scale(0.9); - } - - .lightbox-close:hover { - transform: none; - } - - .lightbox-close:active { - transform: scale(0.9); - } +.preview-title h3 { + font-size: 1.1rem; + font-weight: 600; + color: var(--text-dark); + margin: 0 0 4px 0; } -/* 横屏模式优化 */ -@media (orientation: landscape) and (max-height: 500px) { - .lightbox { - flex-direction: row; - align-items: center; - } - - .lightbox img { - max-width: 70%; - max-height: 85%; - } - - .lightbox-info { - margin-top: 0; - margin-left: 20px; - max-width: 25%; - } +.preview-info { font-size: 0.85rem; color: var(--text-light); } + +.preview-actions { + display: flex; + align-items: center; + gap: 12px; } -/* 高分辨率屏幕优化 */ -@media (min-resolution: 2dppx) { - .image-item img { - image-rendering: -webkit-optimize-contrast; - image-rendering: crisp-edges; - } - - .lightbox img { - image-rendering: auto; - } +.preview-nav { + width: 36px; height: 36px; + border: 1px solid var(--border-gray); + border-radius: var(--radius); + background: var(--bg-surface); + color: var(--text-dark); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s ease; } -/* 暗色模式支持 */ +.preview-nav:hover:not(:disabled) { + background: var(--bg-hover); + border-color: var(--secondary-blue); + color: var(--secondary-blue); +} + +.preview-nav:disabled { opacity: 0.4; cursor: not-allowed; } + +.preview-counter { font-size: 0.85rem; color: var(--text-light); font-weight: 500; } + +.preview-close { + width: 36px; height: 36px; + border: none; + border-radius: var(--radius); + background: var(--bg-hover); + color: var(--text-dark); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s ease; +} + +.preview-close:hover { background: #ef4444; color: #fff; } + +.preview-content { + flex: 1; + padding: 0; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + background: #0f172a; +} + +.preview-image-container { + position: relative; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.preview-image { + max-width: 100%; + max-height: 100%; + object-fit: contain; + transition: opacity 0.3s ease; +} + +.preview-loading { + position: absolute; + top: 50%; left: 50%; + transform: translate(-50%, -50%); + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + color: var(--text-light); +} + +.preview-loading i { font-size: 1.8rem; color: var(--secondary-blue); } + +.preview-footer { + display: flex; + justify-content: space-between; + align-items: center; + padding: 12px 20px; + border-top: 1px solid var(--border-gray); + flex-shrink: 0; +} + +.preview-meta { display: flex; gap: 16px; } + +.preview-meta .meta-item { + display: flex; + align-items: center; + gap: 6px; + font-size: 0.85rem; + color: var(--text-light); +} + +.preview-controls { display: flex; gap: 10px; } + +.preview-action { + padding: 7px 14px; + border: 1px solid var(--border-gray); + border-radius: var(--radius); + background: var(--bg-surface); + color: var(--text-dark); + cursor: pointer; + font-size: 0.85rem; + font-weight: 500; + transition: all 0.2s ease; + display: flex; + align-items: center; + gap: 6px; +} + +.preview-action:hover { background: var(--bg-hover); } + +.preview-remove { border-color: #fecaca; color: #dc2626; } +.preview-remove:hover { background: #fef2f2; border-color: #fca5a5; } + +.preview-action.favorited { border-color: #fbcfe8; color: #ec4899; background: #fdf2f8; } +.preview-action.favorited:hover { background: #fce7f3; border-color: #f9a8d4; } + +/* 暗色模式 */ @media (prefers-color-scheme: dark) { :root { - --primary-blue: #3b82f6; - --light-blue: #1e293b; - --white: #0f172a; - --light-gray: #334155; - --medium-gray: #475569; + --bg-primary: #0f172a; + --bg-surface: #1e293b; + --bg-hover: #334155; + --border-gray: #334155; --text-dark: #f1f5f9; --text-light: #cbd5e1; + --text-muted: #94a3b8; } - - body { - background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%); - } + .preview-container { background: var(--bg-surface); } + .preview-nav, .preview-close, .preview-action { background: var(--bg-hover); color: var(--text-dark); border-color: var(--border-gray); } } - -@media (max-width: 768px) { - .images-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } - .album-title { font-size: 1.8rem; } - .lightbox img { max-width: 95%; max-height: 60%; } - .lightbox-nav button { font-size: 24px; padding: 10px 18px; } - .container { padding: 20px 15px; } - .album-info { font-size: 1.1rem; padding: 15px; } -} \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index 4cf1503..df13b87 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1,39 +1,714 @@ -/* 现代化蓝白配色体系 - 增强响应式支持 */ +/* ============================================================ + 流云图库 - 现代化双栏布局样式 + ============================================================ */ + +/* ============ CSS 变量 ============ */ :root { + /* 主色调 - 蓝紫渐变 */ --primary-blue: #1e40af; --secondary-blue: #3b82f6; - --light-blue: #dbeafe; - --accent-blue: #60a5fa; + --accent-purple: #8b5cf6; + --accent-pink: #ec4899; + + /* 中性色 */ --white: #ffffff; --light-gray: #f8fafc; --medium-gray: #e2e8f0; + --border-gray: #e5e7eb; --dark-gray: #475569; --text-dark: #1e293b; --text-light: #64748b; - --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1); - --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1); + --text-muted: #94a3b8; + + /* 背景 */ + --bg-primary: #f8fafc; + --bg-surface: #ffffff; + --bg-hover: #f1f5f9; + --bg-sidebar: #ffffff; + + /* 阴影 */ + --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05); + --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08); + --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08); --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1); - --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1); - --border-radius: 12px; - --border-radius-lg: 20px; - --mobile-breakpoint: 768px; - --tablet-breakpoint: 1024px; + --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.12); + + /* 圆角 */ + --radius: 8px; + --radius-card: 12px; + --radius-lg: 16px; + --radius-full: 999px; + + /* 间距 */ + --spacer-xs: 4px; + --spacer-sm: 8px; + --spacer-md: 12px; + --spacer-lg: 16px; + --spacer-xl: 20px; + --spacer-2xl: 24px; + --spacer-3xl: 32px; + + /* 尺寸 */ + --sidebar-width: 260px; + --sidebar-collapsed-width: 72px; + --topbar-height: 64px; + + /* 动画 */ + --transition-fast: 150ms ease; + --transition-base: 200ms ease; + --transition-slow: 300ms ease; } +/* ============ 基础 Reset ============ */ * { margin: 0; padding: 0; box-sizing: border-box; } html { scroll-behavior: smooth; } body { - font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; - background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%); + font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; + background: var(--bg-primary); min-height: 100vh; color: var(--text-dark); line-height: 1.6; overflow-x: hidden; - /* 优化渲染性能 */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; } +a { color: inherit; text-decoration: none; } +button { font-family: inherit; cursor: pointer; border: none; background: none; } +input { font-family: inherit; } + +/* ============ 双栏布局 ============ */ +.app-layout { + display: flex; + min-height: 100vh; +} + +/* ============ 侧边栏 ============ */ +.sidebar { + width: var(--sidebar-width); + background: var(--bg-sidebar); + border-right: 1px solid var(--border-gray); + display: flex; + flex-direction: column; + position: sticky; + top: 0; + height: 100vh; + flex-shrink: 0; + transition: width var(--transition-slow); + z-index: 100; + overflow: hidden; +} + +/* 折叠状态 */ +.sidebar.collapsed { + width: var(--sidebar-collapsed-width); +} + +.sidebar.collapsed .brand-text, +.sidebar.collapsed .nav-item span, +.sidebar.collapsed .sidebar-section-title span, +.sidebar.collapsed .sidebar-tags, +.sidebar.collapsed .collapse-btn span { + opacity: 0; + pointer-events: none; +} + +.sidebar.collapsed .sidebar-section-title { + justify-content: center; +} + +.sidebar.collapsed .nav-item { + justify-content: center; + padding-left: 0; + padding-right: 0; +} + +.sidebar.collapsed .collapse-btn { + justify-content: center; +} + +.sidebar.collapsed .collapse-btn i { + transform: rotate(180deg); +} + +/* 品牌 Logo */ +.sidebar-brand { + display: flex; + align-items: center; + gap: var(--spacer-md); + padding: var(--spacer-2xl) var(--spacer-xl); + border-bottom: 1px solid var(--border-gray); + height: var(--topbar-height); + flex-shrink: 0; +} + +.brand-icon { + width: 40px; + height: 40px; + background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--accent-purple) 100%); + border-radius: var(--radius); + display: flex; + align-items: center; + justify-content: center; + color: var(--white); + font-size: 1.1rem; + flex-shrink: 0; + box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); +} + +.brand-text { + font-size: 1.2rem; + font-weight: 700; + background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-purple) 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + white-space: nowrap; + transition: opacity var(--transition-base); +} + +/* 导航菜单 */ +.sidebar-nav { + padding: var(--spacer-lg) var(--spacer-md); + display: flex; + flex-direction: column; + gap: var(--spacer-xs); + flex-shrink: 0; +} + +.nav-item { + display: flex; + align-items: center; + gap: var(--spacer-md); + padding: var(--spacer-md) var(--spacer-lg); + border-radius: var(--radius); + color: var(--text-light); + font-weight: 500; + font-size: 0.95rem; + cursor: pointer; + transition: all var(--transition-fast); + white-space: nowrap; +} + +.nav-item i { + width: 20px; + text-align: center; + flex-shrink: 0; + font-size: 1rem; +} + +.nav-item:hover { + background: var(--bg-hover); + color: var(--text-dark); +} + +.nav-item.active { + background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%); + color: var(--secondary-blue); + font-weight: 600; +} + +.nav-item.active i { + color: var(--secondary-blue); +} + +/* 分隔线 */ +.sidebar-divider { + height: 1px; + background: var(--border-gray); + margin: var(--spacer-sm) var(--spacer-xl); + flex-shrink: 0; +} + +/* 侧边栏区域 */ +.sidebar-section { + flex: 1; + overflow-y: auto; + padding: var(--spacer-lg) var(--spacer-md); + display: flex; + flex-direction: column; + min-height: 0; +} + +.sidebar-section::-webkit-scrollbar { + width: 4px; +} +.sidebar-section::-webkit-scrollbar-thumb { + background: var(--medium-gray); + border-radius: 2px; +} + +.sidebar-section-title { + display: flex; + align-items: center; + gap: var(--spacer-md); + padding: var(--spacer-sm) var(--spacer-lg); + font-size: 0.75rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.05em; + color: var(--text-muted); + margin-bottom: var(--spacer-sm); +} + +.sidebar-section-title i { + width: 20px; + text-align: center; + font-size: 0.85rem; +} + +/* 侧边栏标签列表 */ +.sidebar-tags { + display: flex; + flex-direction: column; + gap: var(--spacer-xs); + transition: opacity var(--transition-base); +} + +.sidebar-tag { + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--spacer-sm) var(--spacer-lg); + border-radius: var(--radius); + cursor: pointer; + transition: all var(--transition-fast); + font-size: 0.9rem; + color: var(--text-light); +} + +.sidebar-tag:hover { + background: var(--bg-hover); + color: var(--text-dark); +} + +.sidebar-tag.active { + background: rgba(59, 130, 246, 0.1); + color: var(--secondary-blue); + font-weight: 500; +} + +.sidebar-tag-name { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.sidebar-tag-count { + background: var(--bg-hover); + padding: 2px 8px; + border-radius: var(--radius-full); + font-size: 0.75rem; + font-weight: 600; + color: var(--text-muted); + flex-shrink: 0; +} + +.sidebar-tag.active .sidebar-tag-count { + background: var(--secondary-blue); + color: var(--white); +} + +/* 侧边栏底部 */ +.sidebar-footer { + padding: var(--spacer-md); + border-top: 1px solid var(--border-gray); + flex-shrink: 0; +} + +.collapse-btn { + display: flex; + align-items: center; + gap: var(--spacer-md); + width: 100%; + padding: var(--spacer-md) var(--spacer-lg); + border-radius: var(--radius); + color: var(--text-light); + font-size: 0.9rem; + font-weight: 500; + transition: all var(--transition-fast); +} + +.collapse-btn:hover { + background: var(--bg-hover); + color: var(--text-dark); +} + +.collapse-btn i { + width: 20px; + text-align: center; + transition: transform var(--transition-base); + flex-shrink: 0; +} + +.collapse-btn span { + transition: opacity var(--transition-base); + white-space: nowrap; +} + +/* ============ 主内容区 ============ */ +.main-content { + flex: 1; + display: flex; + flex-direction: column; + min-width: 0; +} + +/* ============ 顶部工具栏 ============ */ +.topbar { + height: var(--topbar-height); + background: var(--bg-surface); + border-bottom: 1px solid var(--border-gray); + display: flex; + align-items: center; + gap: var(--spacer-lg); + padding: 0 var(--spacer-2xl); + position: sticky; + top: 0; + z-index: 50; +} + +.mobile-menu-btn { + display: none; + width: 40px; + height: 40px; + border-radius: var(--radius); + color: var(--text-light); + align-items: center; + justify-content: center; + transition: all var(--transition-fast); +} + +.mobile-menu-btn:hover { + background: var(--bg-hover); + color: var(--text-dark); +} + +/* 搜索栏 */ +.search-bar { + flex: 1; + max-width: 640px; + position: relative; + display: flex; + align-items: center; +} + +.search-icon { + position: absolute; + left: var(--spacer-lg); + color: var(--text-muted); + font-size: 1rem; + pointer-events: none; +} + +.search-bar input { + width: 100%; + padding: var(--spacer-md) var(--spacer-3xl); + font-size: 0.95rem; + border: 1px solid var(--border-gray); + border-radius: var(--radius-full); + background: var(--bg-hover); + color: var(--text-dark); + transition: all var(--transition-fast); +} + +.search-bar input::placeholder { + color: var(--text-muted); +} + +.search-bar input:focus { + outline: none; + border-color: var(--secondary-blue); + background: var(--white); + box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); +} + +.search-clear { + position: absolute; + right: var(--spacer-md); + width: 28px; + height: 28px; + border-radius: var(--radius-full); + color: var(--text-muted); + display: flex; + align-items: center; + justify-content: center; + transition: all var(--transition-fast); +} + +.search-clear:hover { + background: var(--medium-gray); + color: var(--text-dark); +} + +/* 顶部操作按钮 */ +.topbar-actions { + display: flex; + align-items: center; + gap: var(--spacer-sm); + margin-left: auto; +} + +.action-btn { + width: 40px; + height: 40px; + border-radius: var(--radius); + color: var(--text-light); + display: flex; + align-items: center; + justify-content: center; + transition: all var(--transition-fast); + position: relative; +} + +.action-btn:hover { + background: var(--bg-hover); + color: var(--secondary-blue); +} + +.action-btn:active { + transform: scale(0.95); +} + +/* ============ 筛选状态条 ============ */ +.filter-bar { + display: flex; + align-items: center; + gap: var(--spacer-md); + padding: var(--spacer-md) var(--spacer-2xl); + background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); + border-bottom: 1px solid #fcd34d; +} + +.filter-indicator { + display: flex; + align-items: center; + gap: var(--spacer-sm); + color: #92400e; + font-weight: 600; + font-size: 0.9rem; +} + +.filter-pill { + background: var(--white); + padding: 4px var(--spacer-md); + border-radius: var(--radius-full); + font-weight: 700; + color: #92400e; + font-size: 0.9rem; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); +} + +.filter-remove { + margin-left: auto; + padding: var(--spacer-sm) var(--spacer-md); + background: #92400e; + color: var(--white); + border-radius: var(--radius-full); + font-weight: 600; + font-size: 0.85rem; + transition: all var(--transition-fast); + display: flex; + align-items: center; + gap: var(--spacer-xs); +} + +.filter-remove:hover { + background: #78350f; + transform: translateY(-1px); +} + +/* ============ 内容区域 ============ */ +.content-area { + flex: 1; + padding: var(--spacer-2xl); + max-width: 100%; +} + +/* 统计条 */ +.stats-bar { + display: flex; + align-items: center; + justify-content: center; + gap: var(--spacer-xl); + padding: var(--spacer-xl) var(--spacer-2xl); + background: var(--bg-surface); + border-radius: var(--radius-card); + border: 1px solid var(--border-gray); + margin-bottom: var(--spacer-2xl); +} + +.stat-item { + display: flex; + align-items: center; + gap: var(--spacer-sm); +} + +.stat-icon { + width: 36px; + height: 36px; + border-radius: var(--radius); + background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%); + color: var(--secondary-blue); + display: flex; + align-items: center; + justify-content: center; + font-size: 1rem; +} + +.stat-value { + font-size: 1.4rem; + font-weight: 700; + color: var(--text-dark); + line-height: 1; +} + +.stat-label { + color: var(--text-light); + font-size: 0.9rem; +} + +.stat-divider { + width: 1px; + height: 36px; + background: var(--border-gray); +} + +/* 热门人物横向滚动条 */ +.people-strip { + display: flex; + align-items: center; + gap: var(--spacer-lg); + padding: var(--spacer-md) var(--spacer-xl); + background: var(--bg-surface); + border-radius: var(--radius-card); + border: 1px solid var(--border-gray); + margin-bottom: var(--spacer-2xl); + overflow: hidden; + position: relative; +} + +.people-strip-header { + display: flex; + align-items: center; + gap: var(--spacer-sm); + font-weight: 600; + color: var(--text-dark); + font-size: 0.9rem; + flex-shrink: 0; + padding-right: var(--spacer-lg); + border-right: 1px solid var(--border-gray); +} + +.people-strip-header i { + color: var(--accent-purple); +} + +.people-scroll { + display: flex; + gap: var(--spacer-md); + overflow-x: auto; + flex: 1; + scroll-behavior: smooth; + scrollbar-width: none; + padding: var(--spacer-xs) 0; +} + +.people-scroll::-webkit-scrollbar { + display: none; +} + +.person-chip-scroll { + display: flex; + align-items: center; + gap: var(--spacer-sm); + padding: var(--spacer-xs) var(--spacer-md) var(--spacer-xs) var(--spacer-xs); + background: var(--bg-hover); + border-radius: var(--radius-full); + cursor: pointer; + transition: all var(--transition-fast); + flex-shrink: 0; + border: 1px solid transparent; +} + +.person-chip-scroll:hover { + background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%); + border-color: rgba(139, 92, 246, 0.2); + transform: translateY(-1px); +} + +.person-chip-scroll.active { + background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%); + color: var(--white); +} + +.person-chip-scroll.active .person-chip-name, +.person-chip-scroll.active .person-chip-count { + color: var(--white); +} + +.person-chip-avatar { + width: 32px; + height: 32px; + border-radius: var(--radius-full); + background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%); + color: var(--white); + display: flex; + align-items: center; + justify-content: center; + font-weight: 700; + font-size: 0.85rem; + flex-shrink: 0; +} + +.person-chip-info { + display: flex; + flex-direction: column; + line-height: 1.2; +} + +.person-chip-name { + font-weight: 600; + font-size: 0.85rem; + color: var(--text-dark); + white-space: nowrap; +} + +.person-chip-count { + font-size: 0.75rem; + color: var(--text-muted); +} + +.people-scroll-hint { + color: var(--text-muted); + padding-left: var(--spacer-md); + border-left: 1px solid var(--border-gray); + flex-shrink: 0; + animation: scrollHint 2s ease-in-out infinite; +} + +@keyframes scrollHint { + 0%, 100% { opacity: 0.4; transform: translateX(0); } + 50% { opacity: 1; transform: translateX(4px); } +} + +/* ============ 移动端遮罩 ============ */ +.mobile-overlay { + display: none; + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.4); + z-index: 99; + opacity: 0; + transition: opacity var(--transition-base); +} + +.mobile-overlay.active { + display: block; + opacity: 1; +} + +/* ============ 旧样式保留:搜索框 + 按钮(兼容) ============ */ .container { max-width: 1400px; margin: 0 auto; @@ -111,7 +786,6 @@ body { transform: translateY(-50%) scale(1.05); } -/* 操作按钮样式 */ .action-buttons { display: flex; justify-content: center; @@ -142,11 +816,6 @@ body { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%); } -.random-button:active, .favorites-button:active { - transform: translateY(0); - box-shadow: var(--shadow-sm); -} - .favorites-button { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); } @@ -155,14 +824,13 @@ body { background: linear-gradient(135deg, #db2777 0%, #ec4899 100%); } -/* 收藏夹页面样式 - 重新设计 */ +/* ============ 旧样式保留:收藏夹 ============ */ .favorites-container { width: 100%; min-height: 100vh; background: #f8fafc; } -/* 收藏夹头部 - 固定位置 */ .favorites-header { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%); padding: 30px 40px; @@ -226,17 +894,6 @@ body { font-size: 1.2rem; } -.header-right { - display: flex; - gap: 12px; -} - -.action-buttons { - display: flex; - gap: 12px; - flex-wrap: wrap; -} - .sort-button, .back-button, .explore-button { padding: 10px 20px; border: none; @@ -283,21 +940,16 @@ body { box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); } -/* 收藏夹内容区域 - 铺满页面 */ .favorites-content { width: 100%; padding: 0; margin: 0; } -/* 空状态 */ .empty-favorites { text-align: center; padding: 100px 20px; background: white; - border-radius: 0; - box-shadow: none; - border: none; min-height: 60vh; display: flex; flex-direction: column; @@ -333,7 +985,6 @@ body { margin-bottom: 30px; } -/* 收藏夹网格 - 铺满页面,均匀分布 */ .favorites-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); @@ -345,14 +996,9 @@ body { align-items: start; } -/* 确保卡片宽度一致,实现均匀分布 */ .favorite-card { width: 100%; max-width: 320px; -} - -/* 收藏卡片 - 紧凑布局 */ -.favorite-card { background: white; border-radius: 10px; overflow: hidden; @@ -390,10 +1036,7 @@ body { .card-overlay { position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; + top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.25)); opacity: 0; transition: opacity 0.3s ease; @@ -405,29 +1048,10 @@ body { opacity: 1; } -/* 对于触摸设备,添加焦点状态以显示覆盖层 */ -.favorite-card:focus-within .card-overlay { - opacity: 1; -} - -/* 媒体查询:针对触摸设备的特殊处理 */ @media (hover: none) and (pointer: coarse) { - .favorite-card .card-overlay { - opacity: 0.2; /* 在触摸设备上始终轻微显示覆盖层 */ - } - + .favorite-card .card-overlay { opacity: 0.2; } .favorite-card:active .card-overlay, - .favorite-card:focus .card-overlay { - opacity: 1; - } -} - -/* 为了兼容性,也为触摸设备上的元素添加焦点样式 */ -@media (hover: hover) and (pointer: fine) { - /* 在非触摸设备上保持原有hover效果 */ - .favorite-card:hover .card-overlay { - opacity: 1; - } + .favorite-card:focus .card-overlay { opacity: 1; } } .overlay-content { @@ -450,7 +1074,6 @@ body { align-items: center; justify-content: center; transition: all 0.3s ease; - backdrop-filter: blur(10px); font-size: 0.85rem; } @@ -527,17 +1150,13 @@ body { color: #9ca3af; } -.meta-item i { - font-size: 0.7rem; -} +.meta-item i { font-size: 0.7rem; } -/* 预览模态框样式 */ +/* ============ 旧样式保留:预览模态框 ============ */ .preview-modal { position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; + top: 0; left: 0; + width: 100%; height: 100%; z-index: 1000; display: flex; align-items: center; @@ -554,10 +1173,8 @@ body { .preview-overlay { position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; + top: 0; left: 0; + width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); } @@ -685,8 +1302,7 @@ body { .preview-loading { position: absolute; - top: 50%; - left: 50%; + top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; @@ -695,9 +1311,7 @@ body { color: #6b7280; } -.preview-loading i { - font-size: 2rem; -} +.preview-loading i { font-size: 2rem; } .preview-footer { display: flex; @@ -721,9 +1335,7 @@ body { color: #6b7280; } -.preview-meta .meta-item i { - font-size: 0.8rem; -} +.preview-meta .meta-item i { font-size: 0.8rem; } .preview-controls { display: flex; @@ -760,7 +1372,6 @@ body { border-color: #fca5a5; } -/* 收藏按钮样式 */ .preview-action.favorited { border-color: #fbcfe8; color: #ec4899; @@ -772,306 +1383,9 @@ body { border-color: #f9a8d4; } -.preview-action.favorited i { - color: #ec4899; -} - -/* 预览模态框响应式设计 */ -@media (max-width: 1024px) { - .preview-container { - width: 95vw; - height: 85vh; - margin: 20px; - } - - .preview-header { - padding: 16px 20px; - } - - .preview-title h3 { - font-size: 1.2rem; - } - - .preview-footer { - padding: 12px 20px; - flex-direction: column; - gap: 12px; - align-items: flex-start; - } - - .preview-meta { - gap: 12px; - } - - .preview-meta .meta-item { - font-size: 0.85rem; - } -} - -@media (max-width: 768px) { - .preview-container { - width: 98vw; - height: 90vh; - margin: 10px; - border-radius: 12px; - } - - .preview-header { - padding: 12px 16px; - flex-direction: column; - gap: 12px; - align-items: flex-start; - } - - .preview-title h3 { - font-size: 1.1rem; - } - - .preview-info { - font-size: 0.85rem; - } - - .preview-actions { - width: 100%; - justify-content: space-between; - } - - .preview-nav { - width: 36px; - height: 36px; - } - - .preview-close { - width: 36px; - height: 36px; - } - - .preview-footer { - padding: 10px 16px; - } - - .preview-meta { - flex-wrap: wrap; - gap: 8px; - } - - .preview-controls { - width: 100%; - justify-content: space-between; - } - - .preview-action { - padding: 6px 12px; - font-size: 0.85rem; - flex: 1; - justify-content: center; - } -} - -@media (max-width: 480px) { - .preview-container { - height: 95vh; - margin: 5px; - border-radius: 8px; - } - - .preview-header { - padding: 10px 12px; - } - - .preview-title h3 { - font-size: 1rem; - } - - .preview-actions { - gap: 8px; - } - - .preview-nav { - width: 32px; - height: 32px; - } - - .preview-close { - width: 32px; - height: 32px; - } - - .preview-counter { - font-size: 0.8rem; - } - - .preview-footer { - padding: 8px 12px; - } - - .preview-meta .meta-item { - font-size: 0.8rem; - } - - .preview-action { - padding: 5px 10px; - font-size: 0.8rem; - } -} - -/* 响应式设计 */ -@media (max-width: 1024px) { - .favorites-grid { - grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); - gap: 16px; - padding: 20px; - } - - .favorite-card { - max-width: 260px; - } - - .card-image { - height: 160px; - } -} - -@media (max-width: 768px) { - .favorites-header { - padding: 20px 16px; - } - - .header-content { - flex-direction: column; - text-align: center; - gap: 16px; - } - - .header-left { - flex-direction: column; - gap: 12px; - } - - .favorites-icon { - width: 50px; - height: 50px; - } - - .favorites-icon i { - font-size: 1.5rem; - } - - .header-info h1 { - font-size: 1.6rem; - margin-bottom: 4px; - } - - .favorites-count { - font-size: 1rem; - } - - .count-number { - font-size: 1.1rem; - } - - .action-buttons { - justify-content: center; - width: 100%; - } - - .sort-button, .back-button, .explore-button { - padding: 8px 16px; - font-size: 0.85rem; - flex: 1; - justify-content: center; - min-width: 120px; - } - - .favorites-grid { - grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); - gap: 12px; - padding: 16px; - } - - .favorite-card { - max-width: 280px; - } - - .card-image { - height: 140px; - } - - .card-content { - padding: 10px; - gap: 4px; - } - - .image-title { - font-size: 0.95rem; - } - - .album-info { - font-size: 0.8rem; - } - - .meta-item { - font-size: 0.7rem; - } - - .empty-favorites { - padding: 60px 20px; - min-height: 50vh; - } - - .empty-icon { - width: 80px; - height: 80px; - } - - .empty-icon i { - font-size: 3rem; - } - - .empty-favorites h3 { - font-size: 1.4rem; - } - - .empty-favorites p { - font-size: 1rem; - } -} - -@media (max-width: 480px) { - .favorites-header { - padding: 16px 12px; - } - - .header-info h1 { - font-size: 1.4rem; - } - - .favorites-grid { - padding: 12px; - gap: 10px; - } - - .card-image { - height: 140px; - } - - .sort-button, .back-button, .explore-button { - padding: 6px 12px; - font-size: 0.8rem; - min-width: 100px; - } - - .overlay-content { - padding: 10px; - } - - .quick-view, .remove-favorite { - width: 32px; - height: 32px; - font-size: 0.8rem; - } -} +.preview-action.favorited i { color: #ec4899; } +/* ============ 旧样式保留:统计 + 发现区域 ============ */ .stats { text-align: center; color: var(--text-dark); @@ -1084,10 +1398,6 @@ body { border: 1px solid var(--medium-gray); } -/* ============================================================ - 发现区域 - 热门人物 & 热门标签 - ============================================================ */ - .discover-section { background: var(--white); border-radius: var(--border-radius-lg); @@ -1116,9 +1426,7 @@ body { gap: 10px; } -.section-header h3 i { - color: var(--secondary-blue); -} +.section-header h3 i { color: var(--secondary-blue); } .section-toggle { background: none; @@ -1136,7 +1444,6 @@ body { color: var(--secondary-blue); } -/* 标签云 */ .tag-cloud { padding: 20px 24px; display: flex; @@ -1173,11 +1480,8 @@ body { box-shadow: var(--shadow-md); } -.tag-chip:hover small { - color: rgba(255, 255, 255, 0.85); -} +.tag-chip:hover small { color: rgba(255, 255, 255, 0.85); } -/* 热门人物 */ .people-cloud { padding: 20px 24px; display: grid; @@ -1205,9 +1509,7 @@ body { } .person-chip:hover .person-name, -.person-chip:hover .person-meta { - color: var(--white); -} +.person-chip:hover .person-meta { color: var(--white); } .person-avatar { width: 40px; @@ -1223,14 +1525,9 @@ body { flex-shrink: 0; } -.person-chip:hover .person-avatar { - background: rgba(255, 255, 255, 0.25); -} +.person-chip:hover .person-avatar { background: rgba(255, 255, 255, 0.25); } -.person-info { - flex: 1; - min-width: 0; -} +.person-info { flex: 1; min-width: 0; } .person-name { font-weight: 700; @@ -1247,7 +1544,6 @@ body { margin-top: 2px; } -/* 筛选状态条 */ .filter-status { display: none; align-items: center; @@ -1297,20 +1593,20 @@ body { transform: translateY(-1px); } -/* 响应式网格布局 - 区分PC和手机 */ +/* ============ 相册网格 + 卡片 ============ */ .albums-grid { display: grid; - grid-template-columns: repeat(auto-fill, minmax(300px, 0fr)); - gap: 30px; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: 24px; margin-bottom: 40px; } -/* 加载状态和骨架屏 */ .loading { text-align: center; padding: 60px 20px; color: var(--text-light); font-size: 1.1rem; + grid-column: 1 / -1; } .loading .fa-spinner { @@ -1339,21 +1635,9 @@ body { border: 1px solid var(--medium-gray); } -.skeleton-cover { - height: 220px; - width: 100%; -} - -.skeleton-content { - padding: 25px; -} - -.skeleton-title { - height: 24px; - width: 80%; - margin-bottom: 15px; - border-radius: 4px; -} +.skeleton-cover { height: 220px; width: 100%; } +.skeleton-content { padding: 25px; } +.skeleton-title { height: 24px; width: 80%; margin-bottom: 15px; border-radius: 4px; } .skeleton-meta { display: flex; @@ -1361,42 +1645,38 @@ body { margin-bottom: 20px; } -.skeleton-meta-item { - height: 16px; - width: 40%; - border-radius: 4px; -} - -.skeleton-button { - height: 44px; - width: 100%; - border-radius: 10px; -} +.skeleton-meta-item { height: 16px; width: 40%; border-radius: 4px; } +.skeleton-button { height: 44px; width: 100%; border-radius: 10px; } .album-card { background: var(--white); - border-radius: var(--border-radius-lg); - box-shadow: var(--shadow-lg); + border-radius: var(--radius-card); + box-shadow: var(--shadow-sm); overflow: hidden; - transition: all 0.3s ease; + transition: all var(--transition-slow); position: relative; - border: 1px solid var(--medium-gray); + border: 1px solid var(--border-gray); cursor: pointer; + display: flex; + flex-direction: column; } + .album-card:hover { - transform: translateY(-8px); - box-shadow: var(--shadow-xl); - border-color: var(--accent-blue); + transform: translateY(-4px); + box-shadow: var(--shadow-lg); + border-color: var(--secondary-blue); } + .album-cover { height: 220px; overflow: hidden; position: relative; - background: var(--light-gray); + background: var(--bg-hover); display: flex; align-items: center; justify-content: center; } + .album-cover img { width: 100%; height: 100%; @@ -1404,15 +1684,20 @@ body { transition: transform 0.5s ease; display: block; } -.album-card:hover .album-cover img { - transform: scale(1.05); -} + +.album-card:hover .album-cover img { transform: scale(1.05); } + .album-info { - padding: 25px; + padding: 16px; + display: flex; + flex-direction: column; + gap: 8px; + flex: 1; } + .album-info h3 { - font-size: 1.4rem; - margin-bottom: 12px; + font-size: 1rem; + margin: 0; color: var(--text-dark); line-height: 1.4; display: -webkit-box; @@ -1421,24 +1706,45 @@ body { overflow: hidden; font-weight: 600; } + .album-meta { display: flex; justify-content: space-between; align-items: center; color: var(--text-light); - font-size: 0.9rem; + font-size: 0.85rem; } + .album-meta span { display: flex; align-items: center; gap: 6px; } +/* 相册标签胶囊 */ +.album-tags { + display: flex; + flex-wrap: wrap; + gap: 4px; + margin-top: auto; +} + +.album-tag { + padding: 2px 8px; + background: var(--bg-hover); + border-radius: var(--radius-full); + font-size: 0.75rem; + color: var(--text-light); + font-weight: 500; +} + +/* 无结果 */ .no-results { text-align: center; padding: 60px 20px; color: var(--text-light); font-size: 1.2rem; + grid-column: 1 / -1; } .no-results .fa-search { @@ -1447,7 +1753,6 @@ body { color: var(--medium-gray); } -/* 搜索提示样式 */ .search-hint { text-align: center; padding: 60px 20px; @@ -1455,6 +1760,7 @@ body { font-size: 1.2rem; max-width: 600px; margin: 0 auto; + grid-column: 1 / -1; } .search-hint .fa-search { @@ -1463,12 +1769,8 @@ body { color: var(--medium-gray); } -.search-hint h3 { - color: var(--text-dark); - margin-bottom: 15px; -} +.search-hint h3 { color: var(--text-dark); margin-bottom: 15px; } -/* 加载状态样式 */ .loading-state { text-align: center; padding: 60px 20px; @@ -1476,6 +1778,7 @@ body { font-size: 1.2rem; max-width: 400px; margin: 0 auto; + grid-column: 1 / -1; } .loading-state .fa-spinner { @@ -1484,10 +1787,7 @@ body { color: var(--secondary-blue); } -.loading-state p { - margin-bottom: 20px; - color: var(--text-dark); -} +.loading-state p { margin-bottom: 20px; color: var(--text-dark); } .progress-bar { width: 100%; @@ -1501,259 +1801,10 @@ body { height: 100%; background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--primary-blue) 100%); border-radius: 3px; - transition: width 0.3s ease;} - -.search-hint p { - margin-bottom: 15px; - font-weight: 500; + transition: width 0.3s ease; } -.search-hint ul { - list-style: none; - text-align: left; - max-width: 400px; - margin: 0 auto; -} - -.search-hint li { - margin-bottom: 10px; - padding-left: 0; -} - -.search-hint .btn-primary { - margin-top: 10px; - padding: 8px 16px; - font-size: 0.9rem; -} - -/* 响应式媒体查询 - 移动端优化 */ -@media (max-width: 1024px) { - .container { - padding: 25px 15px; - } - - .header { - margin-bottom: 40px; - } - - .header h1 { - font-size: 2.5rem; - } - - .header p { - font-size: 1.1rem; - } - - .albums-grid { - grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); - gap: 25px; - } - - .album-cover { - height: 200px; - display: flex; - align-items: center; - justify-content: center; - } -} - -@media (max-width: 768px) { - .container { - padding: 20px 15px; - } - - .header { - margin-bottom: 30px; - } - - .header h1 { - font-size: 2rem; - } - - .header p { - font-size: 1rem; - } - - .search-container { - margin-bottom: 40px; - } - - .search-box input { - padding: 16px 55px 16px 20px; - font-size: 16px; - } - - .search-box button { - width: 36px; - height: 36px; - font-size: 16px; - } - - .action-buttons { - gap: 12px; - margin-top: 15px; - } - - .random-button, .favorites-button { - padding: 10px 20px; - font-size: 0.9rem; - } - - .stats { - font-size: 1rem; - padding: 15px; - margin-bottom: 30px; - } - - .albums-grid { - grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); - gap: 20px; - } - - .album-card { - border-radius: var(--border-radius); - } - - .album-cover { - height: 180px; - display: flex; - align-items: center; - justify-content: center; - } - - .album-info { - padding: 20px; - } - - .album-info h3 { - font-size: 1.2rem; - } - - .album-meta { - flex-direction: column; - align-items: flex-start; - gap: 8px; - } -} - -@media (max-width: 480px) { - .container { - padding: 15px 10px; - } - - .header { - margin-bottom: 25px; - } - - .header h1 { - font-size: 1.8rem; - } - - .header p { - font-size: 0.9rem; - } - - .search-container { - margin-bottom: 30px; - } - - .search-box { - max-width: 100%; - } - - .search-box input { - padding: 14px 50px 14px 18px; - font-size: 14px; - } - - .search-box button { - width: 32px; - height: 32px; - font-size: 14px; - right: 10px; - } - - .action-buttons { - gap: 10px; - margin-top: 12px; - } - - .random-button, .favorites-button { - padding: 8px 16px; - font-size: 0.85rem; - } - - .stats { - font-size: 0.9rem; - padding: 12px; - margin-bottom: 25px; - } - - .albums-grid { - grid-template-columns: 1fr; - gap: 15px; - } - - .album-cover { - height: 160px; - display: flex; - align-items: center; - justify-content: center; - } - - .album-info { - padding: 15px; - } - - .album-info h3 { - font-size: 1.1rem; - } - - .album-meta { - font-size: 0.8rem; - } - - .loading { - padding: 40px 15px; - font-size: 1rem; - } - - .loading .fa-spinner { - font-size: 1.5rem; - } - - .no-results { - padding: 40px 15px; - font-size: 1rem; - } - - .no-results .fa-search { - font-size: 2.5rem; - } -} - -/* 触摸设备优化 */ -@media (hover: none) and (pointer: coarse) { - .album-card:hover { - transform: none; - box-shadow: var(--shadow-lg); - } - - .album-card:active { - transform: scale(0.98); - box-shadow: var(--shadow-md); - } -} - -/* 高分辨率屏幕优化 */ -@media (min-resolution: 2dppx) { - .album-cover img { - image-rendering: -webkit-optimize-contrast; - image-rendering: crisp-edges; - } -} - -/* 分页加载样式 */ +/* 分页加载 */ .loading-more { text-align: center; padding: 40px 20px; @@ -1797,53 +1848,180 @@ body { font-size: 1rem; } -.error-content .fa-exclamation-triangle { - font-size: 1.2rem; +.error-content .fa-exclamation-triangle { font-size: 1.2rem; } +.error-content a { color: var(--primary-blue); text-decoration: underline; cursor: pointer; } +.error-content a:hover { color: var(--secondary-blue); } + +/* ============ 响应式设计 ============ */ + +/* 桌面端:侧边栏折叠 */ +@media (max-width: 1199px) { + .content-area { padding: var(--spacer-xl); } + + .stats-bar { + gap: var(--spacer-lg); + padding: var(--spacer-lg); + } + + .stat-value { font-size: 1.2rem; } } -.error-content a { - color: var(--primary-blue); - text-decoration: underline; - cursor: pointer; +/* 平板端 */ +@media (max-width: 1024px) { + .sidebar { + position: fixed; + left: 0; + top: 0; + transform: translateX(-100%); + box-shadow: var(--shadow-xl); + } + + .sidebar.mobile-open { + transform: translateX(0); + } + + .mobile-menu-btn { + display: flex; + } + + .topbar { padding: 0 var(--spacer-lg); } + + .content-area { padding: var(--spacer-lg); } + + .stats-bar { + flex-wrap: wrap; + gap: var(--spacer-md); + } + + .stat-divider:nth-of-type(2) { display: none; } + + .albums-grid { + grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); + gap: 20px; + } + + .album-cover { height: 200px; } } -.error-content a:hover { - color: var(--secondary-blue); -} - -/* 移动端分页样式优化 */ +/* 手机端 */ @media (max-width: 768px) { - .loading-more { - padding: 30px 15px; - margin: 15px 0; + :root { + --topbar-height: 56px; } - .loading-spinner { + .topbar { + padding: 0 var(--spacer-md); + gap: var(--spacer-sm); + } + + .search-bar input { + padding: 10px var(--spacer-2xl); font-size: 0.9rem; - gap: 10px; } - .load-more-error { - padding: 25px 15px; - margin: 15px 0; - } - - .error-content { - font-size: 0.9rem; - flex-direction: column; - gap: 8px; - } -} - -/* 打印样式 */ -@media print { - .search-container { + .topbar-actions .action-btn:nth-child(1) { display: none; } - .album-card { - break-inside: avoid; - box-shadow: none; - border: 1px solid #ccc; + .content-area { padding: var(--spacer-md); } + + .stats-bar { + padding: var(--spacer-md); + gap: var(--spacer-sm); + margin-bottom: var(--spacer-lg); } -} \ No newline at end of file + + .stat-icon { + width: 30px; + height: 30px; + font-size: 0.85rem; + } + + .stat-value { font-size: 1rem; } + .stat-label { font-size: 0.8rem; } + .stat-divider { height: 28px; } + + .people-strip { + padding: var(--spacer-sm) var(--spacer-md); + gap: var(--spacer-md); + margin-bottom: var(--spacer-lg); + } + + .people-strip-header { + font-size: 0.8rem; + padding-right: var(--spacer-md); + } + + .people-scroll-hint { display: none; } + + .albums-grid { + grid-template-columns: repeat(2, 1fr); + gap: 12px; + margin-bottom: 20px; + } + + .album-cover { height: 140px; } + .album-info { padding: 10px; gap: 4px; } + .album-info h3 { font-size: 0.85rem; -webkit-line-clamp: 2; } + .album-meta { font-size: 0.75rem; flex-direction: column; align-items: flex-start; gap: 2px; } + + .filter-bar { + padding: var(--spacer-sm) var(--spacer-md); + flex-wrap: wrap; + gap: var(--spacer-sm); + } + + .filter-indicator { font-size: 0.8rem; } + .filter-pill { font-size: 0.8rem; padding: 3px 10px; } + .filter-remove { font-size: 0.8rem; padding: var(--spacer-xs) var(--spacer-md); } +} + +/* 小屏手机 */ +@media (max-width: 480px) { + .albums-grid { + grid-template-columns: 1fr; + gap: 16px; + } + + .album-cover { height: 180px; } + .album-info { padding: 14px; } + .album-info h3 { font-size: 1rem; } + .album-meta { font-size: 0.85rem; } + + .stats-bar { + flex-direction: column; + gap: var(--spacer-sm); + } + + .stat-divider { + width: 60%; + height: 1px; + } +} + +/* 触摸设备优化 */ +@media (hover: none) and (pointer: coarse) { + .album-card:hover { + transform: none; + box-shadow: var(--shadow-sm); + } + + .album-card:active { + transform: scale(0.98); + box-shadow: var(--shadow-md); + } + + .nav-item:hover { background: transparent; } + .nav-item:active { background: var(--bg-hover); } + + .sidebar-tag:hover { background: transparent; } + .sidebar-tag:active { background: var(--bg-hover); } +} + +/* 高分辨率屏幕优化 */ +@media (min-resolution: 2dppx) { + .album-cover img { + image-rendering: -webkit-optimize-contrast; + image-rendering: crisp-edges; + } +} diff --git a/assets/index.html b/assets/index.html index e884a2f..f4f5421 100644 --- a/assets/index.html +++ b/assets/index.html @@ -8,72 +8,150 @@
-发现精彩瞬间,浏览精美图片
-