-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclock.php
More file actions
139 lines (132 loc) · 4.32 KB
/
Copy pathclock.php
File metadata and controls
139 lines (132 loc) · 4.32 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Digital Clock</title>
<link href="https://fonts.cdnfonts.com/css/digital-7-mono" rel="stylesheet">
<style>
@import url('https://fonts.cdnfonts.com/css/digital-7-mono');
body {
background-color: #000;
}
.custom-clock {
background: #000;
color: #fff;
padding: 20px;
border: 3px solid #5a6163;
border-radius: 30px;
}
.custom-clock td {
text-align: center;
color: #e01b21;
}
.date-num td {
font-family: 'Digital-7', sans-serif;
}
.custom-clock-container {
border: 5px solid #8d8e94;
padding: 50px;
}
.date {
color: #aabdc1;
font-size: 50px;
}
.date-num {
font-size: 150px;
box-shadow: 0 0 0 3px #5a6163;
border-radius: 10px;
}
.custom-hours {
box-shadow: 0 0 0 3px #5a6163;
border-radius: 10px;
}
.custom-hours td {
font-size: 150px;
font-family: 'Digital-7', sans-serif;
}
.time th {
color: #aabdc1;
font-size: 50px;
}
.ampm div{
width: 60px;
height: 60px;
border: 2px solid #fff;
margin: 10px;
border-radius: 50%;
}
.ampm p{
color: #fff;
}
.ampm{
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<div class="custom-clock-container">
<table class="custom-clock" width="100%">
<tr class="date">
<th colspan="2">DATE</th>
<th colspan="4">MONTH</th>
<th colspan="3">YEAR</th>
</tr>
<tr class="date-num">
<td colspan="2"><?php echo date("d"); ?></td>
<td colspan="4"><?php echo date("m"); ?></td>
<td colspan="3"><?php echo date("y"); ?></td>
</tr>
<tr class="time">
<th colspan="2">HOUR</th>
<th colspan="4">MINUTE</th>
<th colspan="3">SECOND</th>
</tr>
<tr class="custom-hours">
<td colspan="2" id="hours"><?php echo date("h"); ?></td>
<td colspan="1">:</td>
<td colspan="2" id="minutes"><?php echo date("i"); ?></td>
<td colspan="1">:</td>
<td colspan="2" id="seconds"><?php echo date("s"); ?></td>
<!-- <td colspan="2" id="ampm"><?php echo date("a"); ?></td> -->
</tr>
<tr>
<td><input type="radio"> SUN</td>
<td><input type="radio"> MON</td>
<td><input type="radio"> TUE</td>
<td><input type="radio"> WED</td>
<td><input type="radio"> THU</td>
<td><input type="radio"> FRI</td>
<td><input type="radio"> SAT</td>
</tr>
</table>
<div class="ampm">
<div id="am">
</div>
<p>am</p>
<div id="pm">
</div>
<p>pm</p>
</div>
</div>
<script type="text/javascript">
function updateTime() {
var currentTime = new Date();
var hours = String(currentTime.getHours()).padStart(2, '0');
var minutes = String(currentTime.getMinutes()).padStart(2, '0');
var seconds = String(currentTime.getSeconds()).padStart(2, '0');
document.getElementById('hours').innerHTML = hours;
document.getElementById('minutes').innerHTML = minutes;
document.getElementById('seconds').innerHTML = seconds;
}
setInterval(updateTime, 1000); // Update time every second
</script>
<script>
window.onload=function(){
if(document.getElementById("ampm"))
}
</script>
</body>
</html>