v1.4.7a Add fullscreen support
This commit is contained in:
parent
4a8cd4cc9c
commit
0095a3f887
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onresize="setMain()" onload="setMain()">
|
||||
<body onresize="setMain()" onload="setMain(); fullScreen();">
|
||||
<header class="row align-items-center" id="header" style="position: fixed; top: 0; width: calc(100% - 1.75rem - 1.75rem); background: #00788a; transition: top 0.3s;">
|
||||
@if(request()->cookie("mode") == "dark")
|
||||
<img class="w-50" id="sdeLogo" src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" onclick="location.href = '{{ route("root.index") }}';" alt="Syddansk Erhvervsskole">
|
||||
|
@ -152,6 +152,31 @@
|
|||
|
||||
document.getElementsByTagName("main")[0].style.paddingTop = (10+document.getElementById("header").clientHeight) + "px";
|
||||
//document.getElementById("menu").style.paddingTop = document.getElementById("header").clientHeight + "px";
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Make the application fullscreen
|
||||
*/
|
||||
|
||||
//Get all html
|
||||
var elem = document.documentElement;
|
||||
|
||||
function fullScreen() {
|
||||
if (elem.requestFullscreen) {
|
||||
elem.requestFullscreen();
|
||||
} else if (elem.mozRequestFullScreen) { //Support for Firefox browser
|
||||
elem.mozRequestFullScreen();
|
||||
} else if (elem.webkitRequestFullscreen) { //Support for Safari, Chrome and Opera browser
|
||||
elem.webkitRequestFullscreen();
|
||||
} else if (elem.msRequestFullscreen) { //And support for the old ass internet browser IE and Edge
|
||||
elem.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue