-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
57 lines (43 loc) · 1.84 KB
/
script.js
File metadata and controls
57 lines (43 loc) · 1.84 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
document.addEventListener('DOMContentLoaded', function() {
const menuDot = document.querySelector('.mobile-toggle img');
const navItem = document.querySelector('.nav-item ul');
if (menuDot) {
console.log('menuDot found');
menuDot.addEventListener('click', function() {
console.log('menuDot clicked');
navItem.classList.toggle('hidden');
});
} else {
console.error('menuDot not found');
}
// Display current time in UTC
function updateTime() {
const utcTimeElement = document.getElementById('utc-time');
const now = new Date();
const utcString = now.toUTCString().split(' ')[4];
utcTimeElement.textContent = utcString;
}
// Display current day
function updateDay() {
const dayElement = document.getElementById('current-day');
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const now = new Date();
const dayString = days[now.getUTCDay()];
dayElement.textContent = dayString;
}
// Populate Slack info
// function populateSlackInfo() {
// document.getElementById('slack-name').textContent = 'HackyRaji';
// document.getElementById('slack-email').textContent = 'hackyraji02@gmail.com'; // Replace with actual Slack email
// const profilePicture = document.getElementById('profile-picture');
// profilePicture.src = 'https://res.cloudinary.com/dldhps3ku/image/upload/v1719844310/hackyraji-mobile_ncsscw.jpg';
// profilePicture.width = profilePicture.naturalWidth;
// profilePicture.height = profilePicture.naturalHeight;
// }
// Initial call
updateTime();
updateDay();
// populateSlackInfo();
// Update time every second
setInterval(updateTime, 1000);
});