一分钟搭建影视站,支持Docker等部署方式
优化
developer324a60b9629f
diff --git a/css/styles.css b/css/styles.cssindex c6e0dfa..a64e74f 100644--- a/css/styles.css+++ b/css/styles.css@@ -817,8 +817,8 @@ body {/* 搜索结果卡片优化:横向布局 */.search-card-img-container {- width: 80px;- height: 120px;+ width: 100px; /* 增加宽度,从80px到100px */+ height: 150px; /* 增加高度,从120px到150px */overflow: hidden;background-color: #191919;}@@ -844,6 +844,35 @@ body {}}+/* 调整网格布局,减少每行卡片数量以适应更大尺寸的卡片 */+@media (min-width: 769px) and (max-width: 1024px) {+ #results {+ grid-template-columns: repeat(3, minmax(0, 1fr)) !important;+ }+}++@media (min-width: 1025px) {+ #results {+ grid-template-columns: repeat(4, minmax(0, 1fr)) !important;+ }+}++/* 优化卡片内元素间距 */+.card-hover .p-2 {+ padding: 0.75rem; /* 增加内边距 */+}++/* 增加卡片内字体大小 */+.card-hover h3 {+ font-size: 0.95rem; /* 增加标题字体大小 */+ line-height: 1.3rem;+ margin-bottom: 0.5rem;+}++.card-hover p {+ font-size: 0.8rem; /* 增加描述字体大小 */+}+/* 优化卡片内元素间距 */.card-hover .p-2 {padding: 0.5rem;diff --git a/index.html b/index.htmlindex a3a10fd..ccbfe5f 100644--- a/index.html+++ b/index.html@@ -266,8 +266,8 @@<span id="searchResultsCount">0</span> 个结果</div></div>- <!-- 修改网格布局以适应横向卡片 -->- <div id="results" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-3">+ <!-- 修改网格布局以适应大一些的横向卡片 -->+ <div id="results" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4"><!-- 结果将在这里动态生成 --></div></div>diff --git a/js/app.js b/js/app.jsindex 6feede6..675ba49 100644--- a/js/app.js+++ b/js/app.js@@ -723,7 +723,7 @@ async function search() {const apiUrlAttr = item.api_url ?`data-api-url="${item.api_url.replace(/"/g, '"')}"` : '';- // 修改为水平卡片布局,图片在左侧,文本在右侧+ // 修改为水平卡片布局,图片在左侧,文本在右侧,并优化样式const hasCover = item.vod_pic && item.vod_pic.startsWith('http');return `@@ -736,32 +736,33 @@ async function search() {class="h-full w-full object-cover transition-transform hover:scale-110"onerror="this.onerror=null; this.src='https://via.placeholder.com/300x450?text=无封面'; this.classList.add('object-contain');"loading="lazy">+ <div class="absolute inset-0 bg-gradient-to-r from-black/30 to-transparent"></div></div>` : ''}<div class="p-2 flex flex-col flex-grow"><div class="flex-grow">- <h3 class="text-sm font-semibold mb-1 break-words line-clamp-2 ${hasCover ? '' : 'text-center'}" title="${safeName}">${safeName}</h3>+ <h3 class="font-semibold mb-2 break-words line-clamp-2 ${hasCover ? '' : 'text-center'}" title="${safeName}">${safeName}</h3>- <div class="flex flex-wrap ${hasCover ? '' : 'justify-center'} gap-1 mb-1">+ <div class="flex flex-wrap ${hasCover ? '' : 'justify-center'} gap-1 mb-2">${(item.type_name || '').toString().replace(/</g, '<') ?- `<span class="text-xs py-0 px-1 rounded bg-opacity-20 bg-blue-500 text-blue-300">+ `<span class="text-xs py-0.5 px-1.5 rounded bg-opacity-20 bg-blue-500 text-blue-300">${(item.type_name || '').toString().replace(/</g, '<')}</span>` : ''}${(item.vod_year || '') ?- `<span class="text-xs py-0 px-1 rounded bg-opacity-20 bg-purple-500 text-purple-300">+ `<span class="text-xs py-0.5 px-1.5 rounded bg-opacity-20 bg-purple-500 text-purple-300">${item.vod_year}</span>` : ''}</div>- <p class="text-gray-400 text-xs line-clamp-1 overflow-hidden ${hasCover ? '' : 'text-center'}">+ <p class="text-gray-400 line-clamp-2 overflow-hidden ${hasCover ? '' : 'text-center'} mb-2">${(item.vod_remarks || '暂无介绍').toString().replace(/</g, '<')}</p></div>- <div class="flex justify-between items-center mt-1 pt-1 border-t border-gray-800 text-xs">+ <div class="flex justify-between items-center mt-1 pt-1 border-t border-gray-800">${sourceInfo ? `<div>${sourceInfo}</div>` : '<div></div>'}<div>- <span class="text-xs text-gray-500 flex items-center">- <svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3 mr-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">+ <span class="text-gray-500 flex items-center hover:text-blue-400 transition-colors">+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" /></svg>播放