一分钟搭建影视站,支持Docker等部署方式
优化搜索区域布局,添加返回首页按钮,清理旧代码
developer2b13abe5a5e8
diff --git a/index.html b/index.htmlindex 91f1331..a110593 100644--- a/index.html+++ b/index.html@@ -198,28 +198,36 @@<p class="text-gray-400 mb-8">自由观影,畅享精彩</p></header>- <!-- 搜索区域:默认居中 -->+<div id="searchArea" class="flex-1 flex flex-col items-center justify-center"><h2 class="text-3xl font-bold gradient-text mb-8">视频搜索</h2><div class="w-full max-w-2xl">- <div class="flex">- <input type="text"- id="searchInput"- class="w-full bg-[#111] border border-[#333] text-white px-6 py-4 rounded-l-lg focus:outline-none focus:border-white transition-colors"- placeholder="搜索你喜欢的视频..."- aria-label="视频搜索框">- <button onclick="search()"- class="px-8 py-4 bg-white text-black font-medium rounded-r-lg hover:bg-gray-200 transition-colors"- aria-label="搜索按钮">- 搜索+ <div class="flex items-center mb-3">++ <button onclick="resetToHome()" class="mr-2 bg-[#222] hover:bg-[#333] text-gray-300 hover:text-white border border-[#333] rounded-lg px-3 py-2 transition-colors flex items-center gap-1" aria-label="返回首页" title="返回首页">+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />+ </svg>+ <span class="hidden sm:inline">首页</span></button>+ <div class="flex flex-1">+ <input type="text"+ id="searchInput"+ class="w-full bg-[#111] border border-[#333] text-white px-6 py-4 rounded-l-lg focus:outline-none focus:border-white transition-colors"+ placeholder="搜索你喜欢的视频..."+ aria-label="视频搜索框">+ <button onclick="search()"+ class="px-8 py-4 bg-white text-black font-medium rounded-r-lg hover:bg-gray-200 transition-colors"+ aria-label="搜索按钮">+ 搜索+ </button>+ </div></div><!-- 添加最近搜索记录部分 --><div id="recentSearches" class="mt-4 flex flex-wrap gap-2" aria-label="最近搜索记录"><!-- 这里会动态插入最近的搜索记录 --></div>- <!-- 清除历史按钮已移至搜索历史标题行 --></div></div>@@ -243,20 +251,16 @@<div id="douban-tags" class="flex space-x-2 min-w-max"></div></div></div>++ <!-- 推荐内容 --><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></div></div><!-- 搜索结果:初始隐藏 --><div id="resultsArea" class="w-full hidden">- <!-- 添加返回主页按钮 -->- <div class="flex justify-between items-center mb-4">- <button onclick="resetToHome()" class="flex items-center gap-1 px-4 py-2 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white rounded-lg hover:shadow-lg transition-all duration-300 transform hover:-translate-y-1">- <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 17l-5-5m0 0l5-5m-5 5h12" />- </svg>- 返回首页- </button>+ <!-- 修改这里:移除旧的返回首页按钮 -->+ <div class="flex justify-end items-center mb-4"><div class="text-sm text-gray-400"><span id="searchResultsCount">0</span> 个结果</div>