<script>
  import { t } from '$lib/i18n/store.js';
  export let form;
</script>

<h1>{$t('admin.login.title')}</h1>

<p class="muted">{$t('admin.login.intro')}</p>

<form method="POST" class="stack" autocomplete="off">
  {#if form?.error}
    <div class="error">{$t(form.error)}</div>
  {/if}
  <label>
    {$t('admin.login.password')}
    <input name="password" type="password" autofocus required />
  </label>
  <div>
    <button type="submit">{$t('admin.login.submit')}</button>
  </div>
</form>

<style>
  .stack { max-width: 360px; }
</style>
