-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (61 loc) · 4.23 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>APlayer 嵌入代码生成器v3.4</title>
<script src="https://cdn.tailwindcss.com"></script>
<!-- 引入 Toastr CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen p-4">
<div class="max-w-2xl mx-auto bg-gray-800 rounded-xl shadow-2xl p-8">
<h1 class="text-3xl font-bold text-center mb-8 text-blue-400">APlayer 嵌入代码生成器v3.4</h1>
<!-- 播放器列表容器 -->
<div id="players-container"></div>
<!-- 添加播放器按钮放置区域 -->
<div class="flex justify-end mb-8">
<button id="add-player" class="bg-red-500 hover:bg-red-600 text-white font-bold h-10 w-10 rounded-full border border-red-600 flex items-center justify-center">
+
</button>
</div>
<div class="mb-4">
<label for="cdn-source" class="block text-sm font-medium mb-1 text-gray-300">CDN 源 / CDN Source</label>
<select id="cdn-source" class="w-full px-3 py-2 bg-gray-700 rounded-md border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-white">
<option value="jsdelivr">jsDelivr</option>
<option value="cdnjs">cdnjs</option>
<option value="unpkg">unpkg</option>
<option value="custom">自定义 / Custom</option>
</select>
</div>
<div id="custom-cdn-container" class="mb-4 hidden">
<label for="custom-cdn" class="block text-sm font-medium mb-1 text-gray-300">自定义 CDN URL / Custom CDN URL</label>
<input type="text" id="custom-cdn" placeholder="https://example.com/path/to/aplayer" class="w-full px-3 py-2 bg-gray-700 rounded-md border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-white">
</div>
<button id="generate-code" class="w-full bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-4 rounded mb-4 flex items-center justify-center">
<!-- 齿轮图标 -->
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.286 3.963a1 1 0 00.95.69h4.164c.969 0 1.371 1.24.588 1.81l-3.37 2.448a1 1 0 00-.364 1.118l1.286 3.963c.3.921-.755 1.688-1.54 1.118l-3.37-2.448a1 1 0 00-1.176 0l-3.37 2.448c-.785.57-1.838-.197-1.54-1.118l1.286-3.963a1 1 0 00-.364-1.118L2.318 9.39c-.783-.57-.38-1.81.588-1.81h4.164a1 1 0 00.95-.69l1.286-3.963z" />
</svg>
生成嵌入代码 / Generate Embed Code
</button>
<div id="embed-code-container" class="mb-4 hidden">
<label for="embed-code" class="block text-sm font-medium mb-1 text-gray-300">嵌入代码 / Embed Code</label>
<textarea id="embed-code" rows="10" class="w-full px-3 py-2 bg-gray-700 rounded-md border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 text-white font-mono text-sm" readonly></textarea>
</div>
<button id="copy-code" class="w-full bg-yellow-600 hover:bg-yellow-700 text-white font-bold py-2 px-4 rounded hidden flex items-center justify-center">
<!-- 粘贴板图标 -->
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3M16 3H8a2 2 0 00-2 2v4a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2z" />
</svg>
复制嵌入代码 / Copy Embed Code
</button>
</div>
<!-- 引入 jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- 引入 Toastr JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
<script src="script.js"></script>
</body>
</html>