view mod_http_oauth2/html/login.html @ 5627:3a5cf8d80089

mod_http_oauth2: Tweak method of centering the UI The percentage here was relative to the viewport width, which on some very wide screens may put the UI slightly outside of the view, requiring scrolling to see. By using a unit relative to the height of the viewport, this is avoided and should work better. But no guarantees, it's still possible to resize the browser or adjust font sizes so that the UI goes out of view.
author Kim Alvefur <zash@zash.se>
date Mon, 31 Jul 2023 07:28:09 +0200
parents e86a1018cdb3
children 2a31ee81e816
line wrap: on
line source

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{site_name} - Sign in</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
{state.error&
	<dialog open="" class="error">
		<p>{state.error}</p>
		<form method="dialog"><button>dismiss</button></form>
	</dialog>}
	<header>
	<h1>{site_name}</h1>
	</header>
	<main>
	<fieldset>
	<legend>Sign in</legend>
	<p>Sign in to your account to continue.</p>
	<form method="post">
		<input type="text" name="username" placeholder="Username" aria-label="Username" required {extra.username_hint~autofocus}{extra.username_hint& value="{extra.username_hint?}"} /><br/>
		<input type="password" name="password" placeholder="Password" aria-label="Password" autocomplete="current-password" required {extra.username_hint&autofocus} /><br />
		<input type="submit" value="Sign in" />
	</form>
	</fieldset>
	</main>
</body>
</html>