|
111 | 111 | </head>
|
112 | 112 |
|
113 | 113 | <body>
|
| 114 | + <body> |
114 | 115 | <header>
|
115 | 116 | <button class="theme-toggle" onclick="toggleTheme()">Toggle Theme</button>
|
| 117 | + <button id="menu-toggle" aria-label="Toggle menu"> |
| 118 | + <span></span> |
| 119 | + <span></span> |
| 120 | + <span></span> |
| 121 | + </button> |
| 122 | + <nav id="mobile-menu"> |
| 123 | + <ul> |
| 124 | + <li><a href="https://dorpascal.com/hebrew-calendar/המרת-תאריך-לועזי-לעברי/">Date Conversion</a></li> |
| 125 | + <li><a href="https://dorpascal.com/hebrew-calendar/shabbat-times/">Shabbat Times</a></li> |
| 126 | + <li><a href="https://dorpascal.com/hebrew-calendar/privacy-policy">Privacy Policy</a></li> |
| 127 | + <li><a href="https://dorpascal.com/hebrew-calendar/chrome-extension">Chrome Extension</a></li> |
| 128 | + <li><a href="https://dorpascal.com/hebrew-calendar/he/">לעברית</a></li> |
| 129 | + </ul> |
| 130 | + </nav> |
116 | 131 | <div id="clock"></div>
|
117 | 132 | <div id="date-display"></div>
|
118 | 133 | <h1>Hebrew Calendar</h1>
|
119 | 134 | <div id="parasha-hashavua"></div>
|
120 |
| - <ul> |
121 |
| - <li><a href="#date-calculation-explanation">Explanation of Calculations</a></li> |
122 |
| - <li><a href="https://dorpascal.com/hebrew-calendar/המרת-תאריך-לועזי-לעברי/">Date Conversion</a></li> |
123 |
| - <li><a href="https://dorpascal.com/hebrew-calendar/shabbat-times/">Shabbat Times</a></li> |
124 |
| - <li><a href="https://dorpascal.com/hebrew-calendar/he/" style="display: block; text-align: center; margin-bottom: 20px;">לגרסה בעברית</a></li> |
125 |
| - <li><a href="https://dorpascal.com/hebrew-calendar/privacy-policy">Privacy Policy</a></li> |
126 |
| - </ul> |
| 135 | + <nav id="menu"></nav> |
| 136 | + <ul> |
| 137 | + <li><a href="#date-calculation-explanation">Explanation of Calculations</a></li> |
| 138 | + <li><a href="https://dorpascal.com/hebrew-calendar/המרת-תאריך-לועזי-לעברי/">Date Conversion</a></li> |
| 139 | + <li><a href="https://dorpascal.com/hebrew-calendar/shabbat-times/">Shabbat Times</a></li> |
| 140 | + <li><a href="https://dorpascal.com/hebrew-calendar/privacy-policy">Privacy Policy</a></li> |
| 141 | + <li><a href="https://dorpascal.com/hebrew-calendar/chrome-extension">Chrome Extension</a></li> |
| 142 | + <li><a href="https://dorpascal.com/hebrew-calendar/he/">לעברית</a></li> |
| 143 | + </ul> |
| 144 | + </nav> |
127 | 145 | </header>
|
128 | 146 | <main>
|
129 | 147 |
|
@@ -515,6 +533,25 @@ <h2>Convert Gregorian Date to Hebrew Date</h2>
|
515 | 533 | setInterval(updateClock, 1000);
|
516 | 534 | window.addEventListener('resize', renderCalendar);
|
517 | 535 | };
|
| 536 | + |
| 537 | + // Add this to your existing JavaScript |
| 538 | + |
| 539 | +function toggleMobileMenu() { |
| 540 | + const mobileMenu = document.getElementById('mobile-menu'); |
| 541 | + mobileMenu.classList.toggle('active'); |
| 542 | +} |
| 543 | + |
| 544 | +// Add this to your window.onload function |
| 545 | +document.getElementById('menu-toggle').addEventListener('click', toggleMobileMenu); |
| 546 | + |
| 547 | +// Close menu when clicking outside |
| 548 | +document.addEventListener('click', function(event) { |
| 549 | + const mobileMenu = document.getElementById('mobile-menu'); |
| 550 | + const menuToggle = document.getElementById('menu-toggle'); |
| 551 | + if (!mobileMenu.contains(event.target) && event.target !== menuToggle) { |
| 552 | + mobileMenu.classList.remove('active'); |
| 553 | + } |
| 554 | +}); |
518 | 555 | </script>
|
519 | 556 | </body>
|
520 | 557 |
|
|
0 commit comments