Culturetiming commited on
Commit
d2dea51
·
verified ·
1 Parent(s): 067e87e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +61 -18
index.html CHANGED
@@ -1,19 +1,62 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>5-Minute Timer</title>
7
+ <style>
8
+ body {
9
+ display: flex;
10
+ justify-content: center;
11
+ align-items: center;
12
+ height: 100vh;
13
+ background-color: #0a2472;
14
+ color: white;
15
+ font-family: 'Montserrat', sans-serif;
16
+ flex-direction: column;
17
+ }
18
+ h1 {
19
+ font-size: 4rem;
20
+ margin: 0;
21
+ }
22
+ button {
23
+ margin-top: 20px;
24
+ padding: 10px 20px;
25
+ border: none;
26
+ border-radius: 10px;
27
+ background-color: #ff7f50;
28
+ color: white;
29
+ font-size: 1.2rem;
30
+ cursor: pointer;
31
+ }
32
+ button:hover {
33
+ background-color: #ff9966;
34
+ }
35
+ </style>
36
+ </head>
37
+ <body>
38
+ <h1 id="timer">05:00</h1>
39
+ <button onclick="startTimer()">Start Timer</button>
40
+
41
+ <script>
42
+ let time = 300; // 5 minutes in seconds
43
+ let timerInterval;
44
+
45
+ function startTimer() {
46
+ clearInterval(timerInterval);
47
+ timerInterval = setInterval(() => {
48
+ const minutes = Math.floor(time / 60);
49
+ const seconds = time % 60;
50
+ document.getElementById('timer').textContent = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
51
+ time--;
52
+
53
+ if (time < 0) {
54
+ clearInterval(timerInterval);
55
+ document.getElementById('timer').textContent = 'TIME\'S UP!';
56
+ }
57
+ }, 1000);
58
+ }
59
+ </script>
60
+ </body>
61
  </html>
62
+