Skip to content

Commit 3a33ed3

Browse files
committed
Remove mobile clock and date display
- Removed mobile clock widget from mobile navigation menu - Cleaned up JavaScript methods for mobile clock updates - Removed mobile clock CSS styles and animations - Removed mobile clock tracking variables from constructor - Streamlined Roman clock to only show on desktop - Mobile users now have cleaner navigation menu without clock
1 parent b3a2c95 commit 3a33ed3

File tree

3 files changed

+0
-148
lines changed

3 files changed

+0
-148
lines changed

index.html

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -91,27 +91,6 @@ <h1 class="text-xl font-bold text-gray-900 dark:text-white">BookVault</h1>
9191
<i class="fas fa-plus mr-3"></i>
9292
<span>Add Book</span>
9393
</button>
94-
95-
<!-- Mobile Live Clock -->
96-
<div class="live-clock-container mobile-clock-container">
97-
<div class="live-clock mobile-clock">
98-
<div class="clock-item">
99-
<span class="clock-value" id="mobile-hours">--</span>
100-
<span class="clock-label">HOURS</span>
101-
</div>
102-
<div class="clock-separator">:</div>
103-
<div class="clock-item">
104-
<span class="clock-value" id="mobile-minutes">--</span>
105-
<span class="clock-label">MINS</span>
106-
</div>
107-
<div class="clock-separator">:</div>
108-
<div class="clock-item">
109-
<span class="clock-value" id="mobile-seconds">--</span>
110-
<span class="clock-label">SECS</span>
111-
</div>
112-
</div>
113-
<div class="clock-date mobile-date" id="mobile-live-date">--</div>
114-
</div>
11594
</div>
11695
</div>
11796
</div>

index.js

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ class BookStore {
2525
];
2626
this.currentTypewriterIndex = 0;
2727

28-
// Mobile clock tracking
29-
this.previousMobileHours = '';
30-
this.previousMobileMinutes = '';
31-
this.previousMobileSeconds = '';
32-
this.previousMobileDate = '';
33-
3428
this.init();
3529
}
3630

@@ -1833,14 +1827,6 @@ class BookStore {
18331827
if (dateElement) {
18341828
dateElement.textContent = currentDate;
18351829
}
1836-
1837-
// Update mobile clock if it exists
1838-
this.updateMobileClockWithAnimation(
1839-
String(now.getHours()).padStart(2, '0'),
1840-
String(minutes).padStart(2, '0'),
1841-
String(seconds).padStart(2, '0'),
1842-
currentDate
1843-
);
18441830
};
18451831

18461832
// Initial update
@@ -1868,46 +1854,6 @@ class BookStore {
18681854
}
18691855
}
18701856

1871-
updateMobileClockWithAnimation(hours, minutes, seconds, date) {
1872-
// Update mobile clock elements with animation
1873-
this.updateClockElement('mobile-hours', hours, this.previousMobileHours);
1874-
this.updateClockElement('mobile-minutes', minutes, this.previousMobileMinutes);
1875-
this.updateClockElement('mobile-seconds', seconds, this.previousMobileSeconds);
1876-
1877-
// Update mobile date
1878-
const mobileDateElement = document.getElementById('mobile-live-date');
1879-
if (mobileDateElement && date !== this.previousMobileDate) {
1880-
mobileDateElement.textContent = date;
1881-
}
1882-
1883-
// Store previous values
1884-
this.previousMobileHours = hours;
1885-
this.previousMobileMinutes = minutes;
1886-
this.previousMobileSeconds = seconds;
1887-
this.previousMobileDate = date;
1888-
}
1889-
1890-
updateClockElement(elementId, newValue, previousValue) {
1891-
const element = document.getElementById(elementId);
1892-
if (!element) return;
1893-
1894-
if (newValue !== previousValue) {
1895-
// Add rolling animation class
1896-
element.classList.add('flip');
1897-
1898-
// Update the value
1899-
element.textContent = newValue;
1900-
1901-
// Remove animation class after animation completes
1902-
setTimeout(() => {
1903-
element.classList.remove('flip');
1904-
}, 600);
1905-
} else if (!element.textContent || element.textContent === '--') {
1906-
// Initial load
1907-
element.textContent = newValue;
1908-
}
1909-
}
1910-
19111857
// Infinite Horizontal Carousel functionality
19121858
initializeCarousel() {
19131859
if (this.books.length > 0) {

style.css

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -965,79 +965,6 @@
965965
}
966966
}
967967

968-
/* Mobile Clock Styles */
969-
.mobile-clock-container {
970-
position: relative;
971-
top: auto;
972-
right: auto;
973-
margin: 16px 0;
974-
min-width: auto;
975-
width: 100%;
976-
backdrop-filter: blur(8px);
977-
background: rgba(255, 255, 255, 0.08);
978-
border: 1px solid rgba(255, 255, 255, 0.15);
979-
border-radius: 12px;
980-
padding: 16px;
981-
}
982-
983-
.mobile-clock {
984-
display: flex;
985-
align-items: center;
986-
justify-content: center;
987-
gap: 6px;
988-
margin-bottom: 12px;
989-
}
990-
991-
.mobile-clock .clock-item {
992-
display: flex;
993-
flex-direction: column;
994-
align-items: center;
995-
gap: 4px;
996-
}
997-
998-
.mobile-clock .clock-value {
999-
font-size: 20px;
1000-
font-weight: 700;
1001-
color: transparent;
1002-
background: linear-gradient(135deg, #6366f1, #8b5cf6);
1003-
background-clip: text;
1004-
-webkit-background-clip: text;
1005-
min-width: 28px;
1006-
text-align: center;
1007-
font-family: 'Courier New', monospace;
1008-
transition: all 0.3s ease;
1009-
}
1010-
1011-
.mobile-clock .clock-value.flip {
1012-
animation: digitFlip 0.6s ease-in-out;
1013-
}
1014-
1015-
.mobile-clock .clock-label {
1016-
font-size: 9px;
1017-
font-weight: 600;
1018-
color: rgba(255, 255, 255, 0.7);
1019-
letter-spacing: 1px;
1020-
text-transform: uppercase;
1021-
}
1022-
1023-
.mobile-clock .clock-separator {
1024-
font-size: 20px;
1025-
font-weight: 700;
1026-
color: rgba(255, 255, 255, 0.8);
1027-
margin: 0 2px;
1028-
animation: timePulse 2s ease-in-out infinite;
1029-
}
1030-
1031-
.mobile-date {
1032-
text-align: center;
1033-
font-size: 13px;
1034-
font-weight: 500;
1035-
color: rgba(255, 255, 255, 0.8);
1036-
padding-top: 8px;
1037-
border-top: 1px solid rgba(255, 255, 255, 0.15);
1038-
letter-spacing: 0.5px;
1039-
}
1040-
1041968
.mobile-clock {
1042969
display: flex;
1043970
align-items: center;

0 commit comments

Comments
 (0)