Skip to content

Commit 03d9b23

Browse files
authored
add index html
0 parents  commit 03d9b23

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

index.html

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!DOCTYPE html>
2+
<html lang="fr">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Créateur de Timestamps</title>
7+
<script src="https://cdn.tailwindcss.com"></script>
8+
</head>
9+
<body class="bg-gray-900 text-white min-h-screen flex items-center justify-center">
10+
<div class="bg-gray-800 p-6 rounded-2xl shadow-xl w-full max-w-xl">
11+
<h1 class="text-2xl font-bold mb-4">🎬 Créateur de timestamps</h1>
12+
13+
<div class="flex gap-2 mb-4">
14+
<input id="time" type="text" placeholder="00:00" class="flex-1 p-2 rounded bg-gray-700 focus:outline-none" />
15+
<input id="label" type="text" placeholder="Introduction" class="flex-1 p-2 rounded bg-gray-700 focus:outline-none" />
16+
<button onclick="addTimestamp()" class="bg-blue-600 px-4 rounded hover:bg-blue-700">Ajouter</button>
17+
</div>
18+
19+
<ul id="list" class="space-y-2 mb-4"></ul>
20+
21+
<button onclick="copyAll()" class="w-full bg-green-600 py-2 rounded hover:bg-green-700">📋 Copier tous les timestamps</button>
22+
</div>
23+
24+
<script>
25+
const list = document.getElementById('list');
26+
27+
function addTimestamp() {
28+
const time = document.getElementById('time').value.trim();
29+
const label = document.getElementById('label').value.trim();
30+
if (!time || !label) return;
31+
32+
const li = document.createElement('li');
33+
li.className = 'bg-gray-700 p-2 rounded flex justify-between items-center';
34+
li.textContent = `${time} - ${label}`;
35+
36+
const remove = document.createElement('button');
37+
remove.textContent = '❌';
38+
remove.onclick = () => li.remove();
39+
40+
li.appendChild(remove);
41+
list.appendChild(li);
42+
43+
document.getElementById('time').value = '';
44+
document.getElementById('label').value = '';
45+
}
46+
47+
function copyAll() {
48+
const text = [...list.children].map(li => li.firstChild.textContent).join('\n');
49+
navigator.clipboard.writeText(text);
50+
alert('Timestamps copiés !');
51+
}
52+
</script>
53+
</body>
54+
</html>

0 commit comments

Comments
 (0)