This commit is contained in:
lychang
2026-03-22 04:02:47 +08:00
parent e4bf7cf1a4
commit f3ae54a26b
22 changed files with 10607 additions and 347 deletions

View File

@@ -1,4 +1,4 @@
/* 相册详情页面特定样式 - 蓝白配色体系 */
/* 相册详情页面特定样式 - 增强响应式支持 */
:root {
--primary-blue: #1e40af;
--secondary-blue: #3b82f6;
@@ -16,6 +16,8 @@
--shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
--border-radius: 12px;
--border-radius-lg: 20px;
--mobile-breakpoint: 768px;
--tablet-breakpoint: 1024px;
}
body {
@@ -24,6 +26,7 @@ body {
min-height: 100vh;
color: var(--text-dark);
line-height: 1.6;
overflow-x: hidden;
}
.container {
@@ -80,12 +83,84 @@ body {
margin-right: auto;
}
/* 智能图片网格布局 - 自适应瀑布流效果 */
.images-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
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;
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.2 < 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.2) */
.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;
@@ -96,18 +171,22 @@ body {
cursor: pointer;
border: 1px solid var(--medium-gray);
}
.image-item:hover {
transform: translateY(-8px);
box-shadow: var(--shadow-xl);
border-color: var(--accent-blue);
}
/* 通用图片样式 - 移除固定高度,使用自适应 */
.image-item img {
width: 100%;
height: 220px;
height: auto; /* 改为自适应高度 */
object-fit: cover;
display: block;
transition: transform 0.5s ease;
}
.image-item:hover img {
transform: scale(1.05);
}
@@ -118,6 +197,100 @@ body {
font-size: 0.9rem;
font-weight: 500;
line-height: 1.4;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 8px;
}
.image-caption small {
background: var(--light-gray);
padding: 4px 8px;
border-radius: 4px;
font-size: 0.8rem;
color: var(--text-light);
}
/* 收藏按钮样式 */
.favorite-btn {
position: absolute;
top: 10px;
right: 10px;
background: rgba(255, 255, 255, 0.9);
border: none;
border-radius: 50%;
width: 36px;
height: 36px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
box-shadow: var(--shadow-sm);
opacity: 0;
z-index: 10;
}
.image-item:hover .favorite-btn {
opacity: 1;
}
.favorite-btn:hover {
background: rgba(255, 255, 255, 1);
transform: scale(1.1);
box-shadow: var(--shadow-md);
}
.favorite-btn.favorited {
color: #ec4899;
background: rgba(236, 72, 153, 0.1);
}
.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);
}
}
/* 图片加载状态 */
.image-loading {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--light-gray);
display: flex;
align-items: center;
justify-content: center;
color: var(--text-light);
}
.image-loading .fa-spinner {
font-size: 1.5rem;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 图片查看器样式 */
@@ -199,6 +372,294 @@ body {
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: 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;
}
}
@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: 30px;
}
.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;
}
}
@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: 25px;
}
.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%;
}
}
/* 触摸设备优化 */
@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);
}
}
/* 横屏模式优化 */
@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%;
}
}
/* 高分辨率屏幕优化 */
@media (min-resolution: 2dppx) {
.image-item img {
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
}
.lightbox img {
image-rendering: auto;
}
}
/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
:root {
--primary-blue: #3b82f6;
--light-blue: #1e293b;
--white: #0f172a;
--light-gray: #334155;
--medium-gray: #475569;
--text-dark: #f1f5f9;
--text-light: #cbd5e1;
}
body {
background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%);
}
}
@media (max-width: 768px) {

7053
assets/css/font-awesome.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff