File tree Expand file tree Collapse file tree
src/main/resources/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 < span > < img class ="logo " th:src ="@{/img/logo.png} " alt ="reitti logo " title ="reitti " src ="/img/logo.png "> </ span >
2929 < a href ="/statistics " class ="nav-link " th:title ="#{nav.statistics} "> < i class ="lni lni-bar-chart-4 "> </ i > </ a >
3030 < a href ="/settings " class ="nav-link " th:title ="#{nav.settings.tooltip} "> < i class ="lni lni-gear-1 "> </ i > </ a >
31+ < a type ="button " class ="nav-link " onclick ="toggleFullscreen() " title ="Toggle Fullscreen "> < i class ="lni lni-arrow-all-direction "> </ i > </ a >
3132 < form th:action ="@{/logout} " method ="post " >
3233 < button type ="submit " class ="nav-link " style ="font-size: 1.4rem; " th:title ="#{nav.logout.tooltip} "> < i
3334 class ="lni lni-exit "> </ i >
462463 } ) ;
463464 } ) ;
464465
466+ // Fullscreen functionality
467+ function toggleFullscreen ( ) {
468+ if ( ! document . fullscreenElement ) {
469+ document . documentElement . requestFullscreen ( ) . catch ( err => {
470+ console . log ( `Error attempting to enable fullscreen: ${ err . message } ` ) ;
471+ } ) ;
472+ } else {
473+ document . exitFullscreen ( ) ;
474+ }
475+ }
476+
465477</ script >
466478</ body >
467479</ html >
Original file line number Diff line number Diff line change 365365 } ) ;
366366
367367 }
368-
369368</ script >
370369</ body >
371370</ html >
You can’t perform that action at this time.
0 commit comments