Files
lubo_comment_query/resources/views/user/login.blade.php
2025-12-09 12:50:21 +08:00

84 lines
5.1 KiB
PHP

<html lang="zh">
<head>
<meta charset="UTF-8">
<title>登录 - 录播查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
<script src="{{ mix('/js/manifest.js') }}" rel="script"></script>
</head>
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-100">
@include("common.header")
<main class="flex-grow flex items-center justify-center px-4 sm:px-6 lg:px-8 py-12">
<div class="max-w-md w-full space-y-8 bg-white dark:bg-gray-800 p-8 rounded-xl shadow-lg border border-gray-100 dark:border-gray-700">
<div>
<h2 class="mt-2 text-center text-3xl font-extrabold text-gray-900 dark:text-white">
登录账号
</h2>
<p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">
或者
<a href="{{ route('register') }}" class="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300">
注册新账号
</a>
</p>
</div>
<form class="mt-8 space-y-6" id="webauthn_login_form" action="" method="post" enctype="multipart/form-data">
@csrf
<div class="rounded-md shadow-sm -space-y-px">
<div>
<label for="username" class="sr-only">用户名 / 邮箱</label>
<input id="username" name="username" type="text" autocomplete="username" required value="{{ old("username") }}"
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 text-gray-900 dark:text-white dark:bg-gray-700 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
placeholder="用户名或邮箱">
</div>
<div>
<label for="password" class="sr-only">密码</label>
<input id="password" name="password" type="password" autocomplete="current-password" required value="{{ old("password") }}"
class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 text-gray-900 dark:text-white dark:bg-gray-700 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
placeholder="密码">
</div>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input id="remember_me" name="remember" type="checkbox" value="1" @if(old("remember") == 1) checked @endif
class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600">
<label for="remember_me" class="ml-2 block text-sm text-gray-900 dark:text-gray-300">
记住密码
</label>
</div>
<div class="text-sm">
<a href="#" class="font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-300">
忘记密码?
</a>
</div>
</div>
@include("common.form_error")
<div class="flex flex-col gap-3">
<button type="submit" class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
<svg class="h-5 w-5 text-indigo-500 group-hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd" />
</svg>
</span>
登录
</button>
<button type="button" id="do_webauthn_login" class="group relative w-full flex justify-center py-2 px-4 border border-gray-300 dark:border-gray-600 text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
免输入登录 (Passkey)
<span class="ml-2 inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200">
Alpha
</span>
</button>
</div>
</form>
</div>
</main>
@include("common.footer")
<script src="{{ mix('/js/webauthn.js') }}" rel="script"></script>
</body>
</html>