Ekapp/skolehjem/resources/views/app/users/login.blade.php

80 lines
3.1 KiB
PHP

@extends("user.layout.base")
@section("title")
Login
@endsection
@section("content")
<main style="background-color: #00788a; height: 100%;" onload="fullScreen();">
<div class="brand">
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
</div>
<form action="{{ route("users.login") }}" method="post">
@csrf
<input class="appinput" type="email" name="email" placeholder="Email" required>
<div class="input-group text-left">
<input type="password" class="appinput form-control" name="password" id="password" placeholder="Password" required>
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-password" onclick="show('password', 'fa-password')" style="background-color: #00788a; color: white;"></span>
</div>
<label class="toggle">
<input class="toggle__input" type="checkbox" name="rememberpassword">
<span class="toggle__label">
<span class="toggle__text text-white">Remember me</span>
</span>
</label>
{!! session()->get('success#passwordchange') !!}
{!! session()->get('error#wrongcredentials') !!}
{!! session()->get('success#loggedout') !!}
<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>
</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>
</main>
@endsection
@section("scripts")
<script>
function show($passID, $faID) {
var inputPass = document.getElementById($passID);
var faEye = document.getElementById($faID);
if (inputPass.type === "password") {
inputPass.type = "text";
faEye.style.color = "#999";
} else {
inputPass.type = "password";
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>
@endsection