Skip to content

一分钟搭建影视站,支持Docker等部署方式

feat: adjust close button Signed-off-by: JohnsonRan <[email protected]>

JohnsonRan059f130d43c1
diff --git a/css/styles.css b/css/styles.css
index 0f98263..017a788 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -1,3 +1,31 @@
+.close-btn {
+ position: absolute;
+ top: 12px;
+ right: 12px;
+ background: #222;
+ border: 1px solid #333;
+ border-radius: 8px;
+ padding: 6px;
+ color: white;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ transition: all 0.2s ease;
+ z-index: 10;
+}
+
+.close-btn:hover {
+ background: #333;
+ border-color: #555;
+}
+
+.close-btn svg {
+ width: 16px;
+ height: 16px;
+ stroke: currentColor;
+}
+
:root {
/* 赛博影视主题配色方案 - 柔和版 */
--primary-color: #00ccff; /* 霓虹蓝主色调 */
diff --git a/index.html b/index.html
index 2191b0c..16b1ba0 100644
--- a/index.html
+++ b/index.html
@@ -39,7 +39,11 @@
<!-- 历史记录面板 - 标题居中 -->
<div id="historyPanel" class="history-panel fixed left-0 top-0 h-full bg-[#111] border-r border-[#333] p-6 z-40 transform -translate-x-full transition-transform duration-300" aria-label="观看历史" aria-hidden="true">
<div class="flex justify-between items-center mb-6">
- <button onclick="toggleHistory()" class="text-gray-400 hover:text-white" aria-label="关闭历史">&times;</button>
+ <button onclick="toggleHistory()" class="close-btn">
+ <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
+ </svg>
+ </button>
<h3 class="text-xl font-bold gradient-text mx-auto">观看历史</h3>
<div class="w-4"></div> <!-- 添加一个占位元素以确保标题居中 -->
</div>
@@ -58,7 +62,11 @@
<div id="settingsPanel" class="settings-panel fixed right-0 top-0 h-full w-80 bg-[#111] border-l border-[#333] p-6 z-40 overflow-y-auto" aria-label="设置面板" aria-hidden="true">
<div class="flex justify-between items-center mb-6">
<h3 class="text-xl font-bold gradient-text">设置</h3>
- <button onclick="toggleSettings()" class="text-gray-400 hover:text-white" aria-label="关闭设置">&times;</button>
+ <button onclick="toggleSettings()" class="close-btn">
+ <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
+ </svg>
+ </button>
</div>
<div class="space-y-5">
<!-- 数据源设置区域 -->
diff --git a/js/app.js b/js/app.js
index 7738448..541f953 100644
--- a/js/app.js
+++ b/js/app.js
@@ -493,7 +493,7 @@ function setupEventListeners() {
document.addEventListener('click', function(e) {
// 关闭设置面板
const settingsPanel = document.querySelector('#settingsPanel.show');
- const settingsButton = document.querySelector('#settingsButton, button[onclick*="toggleSettings"]');
+ const settingsButton = document.querySelector('#settingsPanel .close-btn');
if (settingsPanel && settingsButton &&
!settingsPanel.contains(e.target) &&
@@ -503,7 +503,7 @@ function setupEventListeners() {
// 关闭历史记录面板
const historyPanel = document.querySelector('#historyPanel.show');
- const historyButton = document.querySelector('#historyButton, button[onclick*="toggleHistory"]');
+ const historyButton = document.querySelector('#historyPanel .close-btn');
if (historyPanel && historyButton &&
!historyPanel.contains(e.target) &&