diff --git a/public/css/index.css b/public/css/index.css index 920edb9d..da29f233 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -1,4 +1,3 @@ - :root { --primary-color: #e63946; --secondary-color: #a8dadc; @@ -18,17 +17,74 @@ body { margin: 0; padding: 0; font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; - background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); - color: var(--light-color); min-height: 100vh; overflow-x: hidden; line-height: 1.6; + color: var(--light-color); + position: relative; + background: #0b0000; /* 深黑色背景 */ } +/* 毛玻璃散光背景效果 */ +body::before { + content: ''; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: + radial-gradient(circle at 30% 20%, rgba(230, 57, 70, 0.25), transparent 40%), + radial-gradient(circle at 70% 80%, rgba(230, 57, 70, 0.1), transparent 40%), + radial-gradient(circle at 50% 50%, rgba(230, 57, 70, 0.15), transparent 50%), + linear-gradient(135deg, rgba(20, 0, 0, 0.9), rgba(11, 0, 0, 0.95)); + backdrop-filter: blur(25px); /* 毛玻璃效果 */ + -webkit-backdrop-filter: blur(25px); /* Safari支持 */ + z-index: -2; +} + +/* 添加光斑效果 */ +body::after { + content: ''; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: + radial-gradient(circle at 10% 20%, rgba(255, 100, 100, 0.1), transparent 20%), + radial-gradient(circle at 90% 60%, rgba(255, 80, 80, 0.08), transparent 25%), + radial-gradient(circle at 50% 50%, rgba(255, 120, 120, 0.05), transparent 30%); + animation: glowEffect 15s infinite alternate; + z-index: -1; + mix-blend-mode: overlay; +} + +@keyframes glowEffect { + 0% { + opacity: 0.6; + background-position: 0% 0%; + } + 33% { + opacity: 0.7; + background-position: 30% 30%; + } + 66% { + opacity: 0.8; + background-position: 70% 70%; + } + 100% { + opacity: 0.9; + background-position: 100% 100%; + } +} + +/* 内容容器 */ .container { max-width: 1400px; margin: 0 auto; padding: 3rem; + position: relative; } .main-title { @@ -41,6 +97,7 @@ body { text-transform: uppercase; position: relative; padding-bottom: 1rem; + text-shadow: 0 0 10px rgba(230, 57, 70, 0.3); } .main-title::after { @@ -52,6 +109,7 @@ body { width: 100px; height: 3px; background: var(--primary-color); + box-shadow: 0 0 10px rgba(230, 57, 70, 0.5); } /* 相册选择模块 */ @@ -63,15 +121,16 @@ body { } .album-card { - background: rgba(29, 53, 87, 0.7); + background: rgba(29, 0, 0, 0.7); /* 深红色调 */ border-radius: 16px; overflow: hidden; box-shadow: var(--card-shadow); transition: var(--transition); cursor: pointer; position: relative; - backdrop-filter: blur(10px); - border: 1px solid rgba(255, 255, 255, 0.1); + backdrop-filter: blur(12px); /* 增强卡片毛玻璃效果 */ + -webkit-backdrop-filter: blur(12px); + border: 1px solid rgba(230, 57, 70, 0.2); transform: translateY(0); } @@ -87,6 +146,7 @@ body { background-position: center; position: relative; transition: var(--transition); + background-color: rgba(20, 0, 0, 0.6); } .album-card:hover .album-cover { @@ -119,6 +179,7 @@ body { margin-bottom: 0.5rem; color: var(--light-color); letter-spacing: 1px; + text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); } .album-date { @@ -133,7 +194,7 @@ body { } .back-button { - background: rgba(69, 123, 157, 0.3); + background: rgba(230, 57, 70, 0.3); border: none; font-size: 1rem; color: var(--light-color); @@ -146,11 +207,13 @@ body { padding: 0.8rem 1.5rem; border-radius: 30px; backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); } .back-button:hover { - background: rgba(69, 123, 157, 0.5); + background: rgba(230, 57, 70, 0.5); transform: translateX(-5px); + box-shadow: 0 0 10px rgba(230, 57, 70, 0.3); } .detail-header { @@ -167,49 +230,34 @@ body { margin: 0; letter-spacing: 2px; text-transform: uppercase; + text-shadow: 0 0 10px rgba(230, 57, 70, 0.2); } .photo-grid { - /* 将容器设置为网格布局 */ display: grid; - - /* 定义网格布局的列宽,使用重复函数自动填充,最小宽度为460px,最大宽度为容器的1个分数单位 */ grid-template-columns: repeat(auto-fill, minmax(45%, 1fr)); - - /* 设置网格布局中行与列之间的间隔为2rem */ gap: 2rem; } .photo-item { - /* 设置元素的定位方式为相对定位,以便于在正常文档流中调整元素位置 */ position: relative; - - /* 给元素添加圆角边框,半径为12像素,提升界面的柔和度和美观性 */ border-radius: 12px; - - /* 设置元素内容区域外的样式,隐藏溢出的内容,确保内容不会显示出来 */ overflow: hidden; - - /* 为元素添加阴影效果,使用变量--card-shadow定义阴影的样式 */ box-shadow: var(--card-shadow); - - /* 设置元素过渡效果,使用变量--transition定义过渡的持续时间和属性 */ transition: var(--transition); - aspect-ratio: 4/3; - - /* 设置元素的背景颜色为半透明的蓝色调,使用rgba颜色值定义颜色和透明度 */ - background: rgba(29, 53, 87, 0.5); - - /* 设置元素的初始缩放比例为1,即原始大小,通常用于动画或交互效果 */ + background: rgba(29, 0, 0, 0.5); /* 深红色背景 */ + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); transform: scale(1); - + border: 1px solid rgba(230, 57, 70, 0.1); } .photo-item:hover { transform: scale(1.03); box-shadow: var(--card-hover-shadow); z-index: 2; + border-color: var(--primary-color); } .photo-img { @@ -253,6 +301,8 @@ body { justify-content: center; opacity: 0; transition: opacity 0.3s ease; + backdrop-filter: blur(15px); + -webkit-backdrop-filter: blur(15px); } .preview-modal.active { @@ -277,7 +327,7 @@ body { transform: scale(0.5); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease; opacity: 0; - box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5); + box-shadow: 0 20px 40px rgba(230, 57, 70, 0.2); } .modal-img.active { @@ -305,11 +355,13 @@ body { color: white; font-size: 1.2rem; backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); } .tool-btn:hover { background: rgba(230, 57, 70, 0.5); transform: scale(1.1); + box-shadow: 0 0 10px rgba(230, 57, 70, 0.3); } .nav-btn { @@ -327,6 +379,7 @@ body { transition: var(--transition); z-index: 10; backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); } .nav-btn:hover { @@ -359,6 +412,7 @@ body { align-items: center; justify-content: center; backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); } .close-modal:hover { @@ -387,11 +441,11 @@ body { /* 雪花背景效果 */ .snowflake { position: fixed; - color: white; + color: rgba(255, 200, 200, 0.8); /* 淡红色雪花 */ font-size: 1em; user-select: none; pointer-events: none; - opacity: 0.8; + opacity: 0.5; text-shadow: 0 0 10px rgba(230, 57, 70, 0.5); animation: fall linear infinite; z-index: -1; diff --git a/resources/views/o-index.blade.php b/resources/views/o-index.blade.php index e6ce5dee..664187f0 100644 --- a/resources/views/o-index.blade.php +++ b/resources/views/o-index.blade.php @@ -6,6 +6,461 @@ 记忆 diff --git a/routes/web.php b/routes/web.php index 57a35fa2..65dabd9f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -19,6 +19,23 @@ Route::get('/', function () { ]); }); +Route::get('/o', function () { + $photoAlbum = \App\Models\PhotoAlbumModel::with('photos')->get(); + foreach ($photoAlbum as $album) { + $album->url = \Illuminate\Support\Facades\Storage::url($album->url); + $album->created_at = date('Y-m-d', $album->created_at); + foreach ($album['photos'] as &$photo) { + $photo->original = \Illuminate\Support\Facades\Storage::url($photo->original); + $photo->compressed = \Illuminate\Support\Facades\Storage::url($photo->compressed); + $photo->watermarked = \Illuminate\Support\Facades\Storage::url($photo->watermarked); + } + } +// exit(json_encode($photoAlbum)); + return view('o-index', [ + 'photo_album' => $photoAlbum, + ]); +}); + Route::get('/detail', function () { $id = request()->get('id'); $photoAlbum = \App\Models\PhotoAlbumModel::with('photos')->where('id', $id)->first();