Skip to content

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

优化移动端样式,增加响应式设计和按钮布局调整

developer4ddd080f80ac
diff --git a/player.html b/player.html
index 6f16699..a199d54 100644
--- a/player.html
+++ b/player.html
@@ -159,6 +159,23 @@
.player-container:fullscreen #player {
width: 100%; height: 100%;
}
+
+ /* 新增:移动端响应式样式 */
+ @media (max-width: 640px) {
+ .episode-grid {
+ max-height: 40vh; /* 移动端增加集数列表高度 */
+ }
+
+ /* 改进移动端按钮显示 */
+ button {
+ white-space: nowrap;
+ }
+
+ /* 控制栏在小屏幕上可能需要换行 */
+ .player-container .flex-wrap {
+ margin-bottom: 4px;
+ }
+ }
</style>
</head>
<body>
@@ -237,32 +254,44 @@
<!-- 添加自动播放开关和排序按钮 -->
<div class="player-container">
- <div class="flex justify-end items-center gap-2">
- <span class="text-gray-400 text-sm">自动连播</span>
- <label class="switch">
- <input type="checkbox" id="autoplayToggle">
- <span class="slider"></span>
- </label>
- <button onclick="copyLinks()" class="px-4 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1">
- <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="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
- </svg>
- <span>复制视频链接</span>
- </button>
- <button onclick="toggleEpisodeOrder()" class="px-4 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1">
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" id="orderIcon" viewBox="0 0 20 20" fill="currentColor">
- <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z" clip-rule="evenodd" />
- </svg>
- <span id="orderText">倒序排列</span>
- </button>
- <button id="lockToggle" onclick="toggleControlsLock()" title="锁定控制"
- class="px-2 py-1 bg-[#333] hover:bg-[#444] text-white rounded-full transition">
- <svg id="lockIcon" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
- <!-- 默认状态:未锁图标 -->
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
- d="M15 11V7a3 3 0 00-6 0v4m-3 4h12v6H6v-6z" />
- </svg>
- </button>
+ <div class="flex flex-wrap justify-end items-center gap-2">
+ <!-- 自动连播开关 - 分组到左边 -->
+ <div class="flex items-center gap-1 flex-shrink-0 mr-auto">
+ <span class="text-gray-400 text-sm whitespace-nowrap">自动连播</span>
+ <label class="switch">
+ <input type="checkbox" id="autoplayToggle">
+ <span class="slider"></span>
+ </label>
+ </div>
+
+ <!-- 把各种功能按钮放在右侧 - 在小屏幕上各自占一行 -->
+ <div class="flex flex-wrap justify-end gap-2">
+ <!-- 复制链接按钮 -->
+ <button onclick="copyLinks()" class="px-3 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1 flex-shrink-0">
+ <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="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
+ </svg>
+ <span>复制链接</span>
+ </button>
+
+ <!-- 倒序排列按钮 -->
+ <button onclick="toggleEpisodeOrder()" class="px-3 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1 flex-shrink-0">
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" id="orderIcon" viewBox="0 0 20 20" fill="currentColor">
+ <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z" clip-rule="evenodd" />
+ </svg>
+ <span id="orderText">倒序排列</span>
+ </button>
+
+ <!-- 锁定控制按钮 - 始终显示在最右侧 -->
+ <button id="lockToggle" onclick="toggleControlsLock()" title="锁定控制"
+ class="px-2 py-1 bg-[#333] hover:bg-[#444] text-white rounded-full transition flex-shrink-0">
+ <svg id="lockIcon" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
+ <!-- 默认状态:未锁图标 -->
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
+ d="M15 11V7a3 3 0 00-6 0v4m-3 4h12v6H6v-6z" />
+ </svg>
+ </button>
+ </div>
</div>
</div>