@@ -253,6 +253,10 @@ <h1 id="my-heading" style="margin-bottom: -10px" class="notranslate">
253
253
< div id ="stats-display " class ="clock " style ="font-size: 1.25em; font-weight: bold; "> </ div >
254
254
</ div >
255
255
256
+ < button id ="nav-toggle " class ="nav-toggle notranslate " title ="Toggle side navbar " onclick ="toggleNav() ">
257
+ < i class ="fas fa-bars "> </ i >
258
+ </ button >
259
+
256
260
< button class ="back-btn notranslate " onclick ="window.location.href='../../index.html' "> Home</ button >
257
261
< button class ="about notranslate " onclick ="window.location.href='about.html' "> About</ button >
258
262
< button class ="favorites-btn notranslate " onclick ="window.location.href='favorites.html' " title ="View your favorites & watchlists "> Favorites</ button >
@@ -286,6 +290,33 @@ <h1 id="my-heading" style="margin-bottom: -10px" class="notranslate">
286
290
< button id ="trivia-btn " onclick ="window.location.href='trivia.html' " style ="bottom: 90px; right: 10px " title ="Test your movie knowledge "> MovieVerse Trivia</ button >
287
291
</ header >
288
292
293
+ < nav id ="side-nav " class ="side-nav " style ="z-index: 1000000 ">
294
+ < a id ="heading-href " style ="cursor: pointer " href ="../../index.html " title ="Click to go back to the home page ">
295
+ < div id ="my-heading1 " style ="margin-bottom: 15px; margin-left: 0; margin-top: 15px; font-size: 2.1em; font-weight: bold; ">
296
+ The Mo< span class ="highlight2 "> vieV</ span > erse Menu
297
+ </ div >
298
+ </ a >
299
+
300
+ < div id ="button-container ">
301
+ < button id ="button-remove " title ="Close the navbar " onclick ="removeNavBar() "> Close</ button >
302
+ </ div >
303
+
304
+ < ul style ="overflow-y: auto ">
305
+ < li > < a href ="analytics.html "> MovieVerse Analytics</ a > </ li >
306
+ < li > < a href ="#introduction "> Introduction</ a > </ li >
307
+ < li > < a href ="#consent "> Consent</ a > </ li >
308
+ < li > < a href ="#subheading2 "> Information We Collect</ a > </ li >
309
+ < li > < a href ="#subheading "> How We Use Your Information</ a > </ li >
310
+ < li > < a href ="#subheading3 "> Log Files</ a > </ li >
311
+ < li > < a href ="#subheading4 "> Cookies and Web Beacons</ a > </ li >
312
+ < li > < a href ="terms-of-service.html "> Terms of Service</ a > </ li >
313
+ < li > < a href ="sign-in.html "> Sign In</ a > </ li >
314
+ < li > < a href ="user-profile.html "> Profile</ a > </ li >
315
+ < li > < a href ="feedback.html "> Submit Feedback</ a > </ li >
316
+ < li > < a href ="support.html "> Contact Support</ a > </ li >
317
+ </ ul >
318
+ </ nav >
319
+
289
320
< main class ="content-area ">
290
321
< div style ="text-align: center; width: 90% ">
291
322
< div style ="font-weight: bold; font-size: 28px; margin-top: 10px; color: #ff8623 " id ="tos-header "> Terms of Service</ div >
@@ -421,6 +452,54 @@ <h2 style="color: white">Contact Us</h2>
421
452
toggleButtons ( ) ;
422
453
searchInput . addEventListener ( 'input' , toggleButtons ) ;
423
454
} ) ;
455
+
456
+ function toggleNav ( ) {
457
+ const sideNav = document . getElementById ( 'side-nav' ) ;
458
+ sideNav . classList . toggle ( 'manual-toggle' ) ;
459
+ adjustNavBar ( ) ;
460
+ }
461
+
462
+ function removeNavBar ( ) {
463
+ const sideNav = document . getElementById ( 'side-nav' ) ;
464
+ if ( sideNav . classList . contains ( 'manual-toggle' ) ) {
465
+ sideNav . classList . remove ( 'manual-toggle' ) ;
466
+ }
467
+
468
+ adjustNavBar ( ) ;
469
+ }
470
+
471
+ function adjustNavBar ( ) {
472
+ const sideNav = document . getElementById ( 'side-nav' ) ;
473
+ if ( sideNav . classList . contains ( 'manual-toggle' ) ) {
474
+ sideNav . style . left = '0px' ;
475
+ }
476
+ else {
477
+ sideNav . style . left = '-250px' ;
478
+ }
479
+ }
480
+
481
+ document . addEventListener ( 'mousemove' , function ( event ) {
482
+ const sideNav = document . getElementById ( 'side-nav' ) ;
483
+ if ( event . clientX < 10 && ! sideNav . classList . contains ( 'manual-toggle' ) ) {
484
+ sideNav . style . left = '0' ;
485
+ }
486
+ } ) ;
487
+
488
+ document . getElementById ( 'side-nav' ) . addEventListener ( 'mouseleave' , function ( ) {
489
+ const sideNav = document . getElementById ( 'side-nav' ) ;
490
+ if ( ! sideNav . classList . contains ( 'manual-toggle' ) ) {
491
+ sideNav . style . left = '-250px' ;
492
+ }
493
+ } ) ;
494
+
495
+ document . addEventListener ( 'click' , function ( event ) {
496
+ const sideNav = document . getElementById ( 'side-nav' ) ;
497
+ const navToggle = document . getElementById ( 'nav-toggle' ) ;
498
+ if ( ! sideNav . contains ( event . target ) && ! navToggle . contains ( event . target ) && sideNav . classList . contains ( 'manual-toggle' ) ) {
499
+ sideNav . classList . remove ( 'manual-toggle' ) ;
500
+ adjustNavBar ( ) ;
501
+ }
502
+ } ) ;
424
503
</ script >
425
504
426
505
< script >
0 commit comments