-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
103 lines (95 loc) · 3.31 KB
/
index.html
File metadata and controls
103 lines (95 loc) · 3.31 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<title>Clock</title>
<script>
const options = {
weekday: "long",
year: "numeric",
month: "long",
day: "numeric",
};
let a;
let date;
let time;
setInterval(() => {
a = new Date();
time = a.getHours() + ":" + a.getMinutes() + ":" + a.getSeconds();
date = a.toLocaleDateString(undefined, options);
document.getElementById("time").innerHTML =
time + "<br> On Date " + date;
}, 1000);
</script>
<style>
.container{
margin-top: 180px;
margin-left: 370px;
width: 800px;
/* border: 2px solid rgb(154, 150, 150); */
border-radius: 10px;
padding: 20px;
padding-top: 30px;
align-items: center;
justify-content: center;
background-color: rgb(227, 225, 225);
}
.jumbotron{
align-items: center;
justify-content: center;
}
.btn-primary{
margin-left: 290px;
margin-top: 50px;
}
.navbar{
height: 60px;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Clock</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://en.wikipedia.org/wiki/Indian_Standard_Time">Indian Standard Time</a>
</li>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron">
<h1 class="display-4">Current Time in India= <span id="time"></span></h1>
<hr class="my-4" />
<a class="btn btn-primary btn-lg" href="https://www.timeanddate.com/worldclock/india" role="button">Learn More</a>
</div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
</body>
</html>