v1.4.7b Debugging fullscreen

This commit is contained in:
victor 2020-10-16 08:30:05 +02:00
parent 0095a3f887
commit da2dce56e7
2 changed files with 31 additions and 27 deletions

View File

@ -18,7 +18,7 @@
} }
</script> </script>
</head> </head>
<body onresize="setMain()" onload="setMain(); fullScreen();"> <body onresize="setMain()" onload="setMain();">
<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;"> <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") @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"> <img class="w-50" id="sdeLogo" src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" onclick="location.href = '{{ route("root.index") }}';" alt="Syddansk Erhvervsskole">
@ -152,31 +152,6 @@
document.getElementsByTagName("main")[0].style.paddingTop = (10+document.getElementById("header").clientHeight) + "px"; document.getElementsByTagName("main")[0].style.paddingTop = (10+document.getElementById("header").clientHeight) + "px";
//document.getElementById("menu").style.paddingTop = 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> </script>
</body> </body>
</html> </html>

View File

@ -5,7 +5,7 @@
@endsection @endsection
@section("content") @section("content")
<main style="background-color: #00788a; height: 100%;"> <main style="background-color: #00788a; height: 100%;" onload="fullScreen();">
<div class="brand"> <div class="brand">
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole"> <img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
</div> </div>
@ -28,6 +28,7 @@
<input class="btn btn-dark" type="submit" value="Sign in"> <input class="btn btn-dark" type="submit" value="Sign in">
<button type="button" class="btn btn-dark" onclick="location.href = '{{ route("users.signup") }}'" style="line-height: 2rem;">Register</button> <button type="button" class="btn btn-dark" onclick="location.href = '{{ route("users.signup") }}'" style="line-height: 2rem;">Register</button>
</form> </form>
<button type="button" class="btn btn-dark" onclick="fullScreen();">Open Fullscreen</button>
<a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a> <a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a>
</main> </main>
@endsection @endsection
@ -46,5 +47,33 @@
faEye.style.color = "#fff"; faEye.style.color = "#fff";
} }
} }
/*
Make the application fullscreen
*/
//Get all html
let elem = document.documentElement;
function fullScreen() {
if (elem.requestFullscreen) {
elem.requestFullscreen();
console.log("1")
} else if (elem.mozRequestFullScreen) { //Support for Firefox browser
elem.mozRequestFullScreen();
console.log("1")
} else if (elem.webkitRequestFullscreen) { //Support for Safari, Chrome and Opera browser
elem.webkitRequestFullscreen();
console.log("1")
} else if (elem.msRequestFullscreen) { //And support for the old ass internet browser IE and Edge
elem.msRequestFullscreen();
console.log("1")
}
}
</script> </script>
@endsection @endsection