eclipse-web 0.13.3

Local web dashboard for eclipse
Documentation
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/favicon.ico" sizes="any">
<title>eclipse ยท sign in</title>
<style>
  {{PALETTE}}
  * { box-sizing:border-box; }
  body { margin:0; min-height:100vh; display:grid; place-items:center; background:var(--bg); color:var(--fg); font:15px/1.5 system-ui, sans-serif; }
  main { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:24px; width:min(380px, 92vw); }
  /* The dashboard's header, repeated rather than restyled: the mark, the word in the accent, the
     version faint (#265). A sign-in page that spells its own blue is a second brand. */
  h1 { display:flex; align-items:center; gap:8px; margin:0 0 8px; font-size:17px;
    letter-spacing:.02em; color:var(--accent); }
  h1 #mark { display:block; width:22px; height:22px; flex:none; }
  h1 .version { color:var(--faint); font:11px ui-monospace, monospace; letter-spacing:0; }
  p { margin:0 0 16px; color:var(--dim); font-size:13px; }
  code { font:12px ui-monospace, monospace; color:var(--fg); }
  label { display:block; font-size:12px; color:var(--dim); margin-bottom:4px; }
  input { width:100%; padding:8px 10px; border-radius:6px; border:1px solid var(--line); background:var(--bg); color:var(--fg); font:inherit; }
  input:focus-visible { outline:none; border-color:var(--accent); }
  button { margin-top:14px; width:100%; padding:8px; border:0; border-radius:6px; background:var(--accent); color:var(--ink); font:inherit; font-weight:600; cursor:pointer; }
  .error { color:var(--bad); margin:0 0 12px; font-size:13px; }
  .error:empty { display:none; }
  .hint { color:var(--dim); font-size:12px; margin:12px 0 0; }
  .hint:empty { display:none; }
  /* Two shapes, one document (#266): the server says which, and the page shows the fields that
     shape has. A token install has no username, so asking for one would be a lie with a label. */
  body.token #userrow { display:none; }
  body.token label.pass { display:none; }
  body:not(.token) label.tok { display:none; }
</style>
</head>
<body class="{{AUTH_MODE}}">
<main>
  <h1><img id="mark" src="/logo.svg" alt="" aria-hidden="true" width="22" height="22">eclipse
    <small class="version">v{{VERSION}}</small></h1>
  <p>{{AUTH_INTRO}}</p>
  <div class="error" role="alert">{{ERROR}}</div>
  <p class="hint">{{HINT}}</p>
  <!-- `autocomplete` is the point of the two fields: a password manager can fill this, which it
       could never do for a 64-character token in a box called "Token". -->
  <form method="post" action="/login">
    <div id="userrow">
      <label for="username">User</label>
      <input id="username" name="username" type="text" autocomplete="username" autofocus>
    </div>
    <label for="password" class="pass">Password</label>
    <label for="password" class="tok">Token</label>
    <input id="password" name="password" type="password" autocomplete="current-password"
           autofocus required>
    <button type="submit">Sign in</button>
  </form>
</main>
</body>
</html>