一分钟搭建影视站,支持Docker等部署方式
优化显示效果2
developer48ff36bd68ae
diff --git a/index.html b/index.htmlindex 121f148..fab3bb6 100644--- a/index.html+++ b/index.html@@ -225,17 +225,22 @@<!-- 豆瓣热门推荐区域: 默认隐藏,现在位于搜索区域下方,调整宽度 --><div id="doubanArea" class="w-full my-8 hidden">- <div class="flex items-center justify-between mb-4">- <div class="flex items-center">+ <!-- 改进标题和标签区域布局 -->+ <div class="mb-4">+ <!-- 标题和刷新按钮一行 -->+ <div class="flex items-center justify-between mb-3"><h2 class="text-xl font-bold text-white">豆瓣热门</h2>- <div id="douban-tags" class="ml-4 flex flex-wrap"></div>+ <button id="douban-refresh" class="text-sm px-3 py-1 bg-pink-600 hover:bg-pink-700 text-white rounded-lg flex items-center gap-1">+ <span>换一批</span>+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />+ </svg>+ </button>+ </div>+ <!-- 分类标签独立成行,添加滚动支持以适应移动设备 -->+ <div class="overflow-x-auto pb-2">+ <div id="douban-tags" class="flex space-x-2 min-w-max"></div></div>- <button id="douban-refresh" class="text-sm px-3 py-1 bg-pink-600 hover:bg-pink-700 text-white rounded-lg flex items-center gap-1">- <span>换一批</span>- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />- </svg>- </button></div><div class="mx-auto max-w-screen-xl px-2"><div id="douban-results" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8 gap-3"></div>diff --git a/js/douban.js b/js/douban.jsindex ec5bdbf..ae9578e 100644--- a/js/douban.js+++ b/js/douban.js@@ -125,10 +125,11 @@ function renderDoubanTags() {doubanTags.forEach(tag => {const btn = document.createElement('button');- btn.className = 'px-3 py-1 rounded text-xs font-medium mr-1 mb-1 ' ++ // 更新标签样式:统一高度,添加过渡效果,改进颜色对比度+ btn.className = 'py-1.5 px-3.5 rounded text-sm font-medium transition-all duration-300 ' +(tag === doubanCurrentTag ?- 'bg-pink-600 text-white' :- 'bg-[#222] text-gray-300 hover:bg-pink-700 hover:text-white transition');+ 'bg-pink-600 text-white shadow-md' :+ 'bg-[#1a1a1a] text-gray-300 hover:bg-pink-700 hover:text-white');btn.textContent = tag;