@opengis/fastify-table
Version:
core-plugins
91 lines (88 loc) • 5.4 kB
HTML
<html lang="en" dir="">
<head>
<!-- scripts -->
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-white ">
<main class="flex h-[90vh] justify-center items-center">
<div class="space-y-8 w-[385px]">
<div class="text-center">
{{#if settings.admin.logo}}
<img style="margin-left: auto; margin-right: auto; display: block;" src="{{settings.admin.logo}}" alt="logo">
{{/if}}
<h2 class="font-medium text-xl text-gray-800 ">
{{#if settings.admin.title}}
{{settings.admin.title}}
{{^}}
Вхід в систему
{{/if}}
</h2>
</div>
<div id="login_error" style="color: maroon;font-weight: 500;"></div>
<form action="/api/login" method="get" class="space-y-3">
<div>
<label for="hs-pro-shlgfem" class="sr-only">Email</label>
<input id="hs-pro-shlgfem" type="text" name="username"
class="py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm placeholder:text-gray-400 focus:outline-none h-[50px] focus:border-indigo-500 focus:border-2 disabled:opacity-50 disabled:pointer-events-none "
placeholder="Email">
</div>
<div>
<label for="hs-pro-shlgfps" class="sr-only">Password</label>
<div class="relative">
<input id="hs-pro-shlgfps" name="password" type="password"
class="py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm placeholder:text-gray-400 focus:border-indigo-500 focus:outline-none h-[50px] focus:border-indigo-500 focus:border-2 disabled:opacity-50 disabled:pointer-events-none "
placeholder="Password">
<button type="button" data-hs-toggle-password="{
"target": "#hs-pro-shlgfps"
}"
class="absolute inset-y-0 end-0 flex items-center z-20 px-3 cursor-pointer text-gray-400 rounded-e-md focus:outline-none">
<!--svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
viewBox="0 0 16 16">
<path class="hs-password-active:hidden"
d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z">
</path>
<path class="hs-password-active:hidden"
d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z">
</path>
<path class="hs-password-active:hidden"
d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z">
</path>
<path class="hidden hs-password-active:block"
d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z">
</path>
<path class="hidden hs-password-active:block"
d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"></path>
</svg-->
</button>
</div>
</div>
<div class="flex flex-wrap justify-between items-center gap-3">
<div class="flex gap-x-1">
<input type="checkbox" name="keep"
class="shrink-0 border-gray-300 size-[18px] rounded text-indigo-600 focus:ring-indigo-600 disabled:opacity-50 disabled:pointer-events-none "
id="hs-pro-shlgfemch">
<label for="hs-pro-shlgfemch" class="text-[13px] text-gray-500 ms-1.5">
Remember me
</label>
</div>
<a class="text-[13px] text-gray-500 underline underline-offset-4 hover:text-indigo-600 focus:outline-none focus:text-indigo-600 "
href="#">Forgot your password?</a>
</div>
<div class="space-y-4">
<button type="submit"
class="py-3 px-4 w-full inline-flex justify-center items-center gap-x-2 sm:text-sm font-medium rounded-lg border border-transparent bg-indigo-600 text-white hover:bg-indigo-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-indigo-700">
Log in
</button>
</div>
</form>
</div>
</main>
</body>
<script>
const error = location.search.includes('wrong_pass')
if(error){
document.getElementById('login_error').innerHTML='Не вірний користувач або пароль';
}
</script>
</html>