packages feed

salmon-ops-0.1.0.0: ui/auth.html

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>salmon serve</title>
<link rel="icon" href="data:,">
<style>
  :root { color-scheme: light dark; font-family: system-ui, sans-serif; }
  body { margin: 0; min-height: 100vh; display: grid; place-items: center; }
  form { display: grid; gap: .75rem; width: min(22rem, calc(100vw - 2rem)); }
  h1 { margin: 0; font-size: 1.25rem; }
  input, button { font: inherit; padding: .5rem .6rem; }
  .refused { margin: 0; color: #c0392b; }
  .ended { margin: 0; opacity: .8; }
</style>
</head>
<body>
<!-- Served by the TCP listener to a browser without a session; see
     Salmon.Actions.Serve.Http.requireToken. It is posted, never fetched from
     script, so the token never passes through the page's JavaScript. -->
<form method="post" action="auth">
  <h1>salmon</h1>
  <label for="token">Token (the content of <code>--token-file</code>)</label>
  <input id="token" name="token" type="password" autocomplete="current-password" required autofocus>
  <!--refused-->
  <button type="submit">Sign in</button>
</form>
</body>
</html>