Skip to content

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

Enhance player styles: update home button, improve loading spinner, and add error message styling

developer50e6942abf9d
diff --git a/css/player.css b/css/player.css
index 3adb724..7086c3c 100644
--- a/css/player.css
+++ b/css/player.css
@@ -29,6 +29,12 @@ body, html {
pointer-events: auto !important;
}
+.home-button {
+ background: none !important;
+ border: none !important;
+ padding: 0 !important;
+}
+
/* Critical loading styles to prevent FOUC */
.player-placeholder {
width: 100% !important;
@@ -68,9 +74,12 @@ body, html {
.player-loading-spinner {
width: 48px !important;
height: 48px !important;
+ border: 4px solid rgba(255, 255, 255, 0.1) !important;
border-radius: 50% !important;
+ border-top-color: #f97316 !important;
position: relative !important;
margin-bottom: 16px !important;
+ animation: spin 1s linear infinite !important;
}
/* Critical styles for loading text */
@@ -186,6 +195,12 @@ div.player-loading-text {
margin-bottom: 10px;
}
+.error-message-sub {
+ margin-top: 10px;
+ font-size: 14px;
+ color: #aaa;
+}
+
.episode-active {
background-color: #3b82f6 !important;
border-color: #60a5fa !important;
@@ -373,3 +388,8 @@ input:checked + .slider:before {
margin-bottom: 4px;
}
}
+
+/* 隐藏用户名输入框 */
+#username {
+ display: none !important;
+}
diff --git a/player.html b/player.html
index 51a7150..a0021fd 100644
--- a/player.html
+++ b/player.html
@@ -23,7 +23,7 @@
<body>
<header class="player-header-fixed p-4 flex items-center border-b border-[#333] gap-2">
<div class="flex items-center min-w-0">
- <button id="homeButton" type="button" class="flex items-center min-w-0 cursor-pointer" style="background:none;border:none;padding:0;">
+ <button id="homeButton" type="button" class="flex items-center min-w-0 cursor-pointer home-button">
<svg class="w-8 h-8 mr-2 text-[#00ccff] logo-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
</svg>
@@ -58,15 +58,14 @@
</div>
</div>
- <main class="container mx-auto px-4 py-4">
- <!-- 视频播放区 -->
+ <main class="container mx-auto px-4 py-4"> <!-- 视频播放区 -->
<div id="playerContainer" class="player-container mb-4">
<div class="relative">
- <div id="player" class="player-placeholder" style="width: 100%; height: auto; aspect-ratio: 16/9; background-color: #1f2937; position: relative; display: block;">
+ <div id="player" class="player-placeholder">
<!-- Initial loading state before JavaScript loads -->
- <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: white;">
- <div style="width: 48px; height: 48px; border: 4px solid rgba(255, 255, 255, 0.1); border-radius: 50%; border-top-color: #f97316; margin: 0 auto 16px; animation: spin 1s linear infinite;"></div>
- <div style="font-size: 16px; font-weight: 500;" id="loading-title">正在加载视频...</div>
+ <div class="player-loading-overlay">
+ <div class="player-loading-spinner"></div>
+ <div class="player-loading-text" id="loading-title">正在加载视频...</div>
</div>
</div>
<div class="loading-container" id="player-loading" style="display: none;">
@@ -76,7 +75,7 @@
<div class="error-container" id="error">
<div class="error-icon">⚠️</div>
<div id="error-message">视频加载失败</div>
- <div style="margin-top: 10px; font-size: 14px; color: #aaa;">请尝试其他视频源或稍后重试</div>
+ <div class="error-message-sub">请尝试其他视频源或稍后重试</div>
</div>
</div>
</div>