extends includes/template.pug

block body
  .s-page-title.mb24
    h1.s-page-title--header Log in with Matrix

  .d-flex.g16#form-container
    .fl-grow1
      form.d-flex.gy16.fd-column(method="post" action=rel("/api/log-in-with-matrix") hx-post=rel("/api/log-in-with-matrix") hx-indicator="#log-in-button" hx-select="#ok" hx-target="#form-container")
        if next
          input(type="hidden" name="next" value=next)
        .d-flex.gy4.fd-column
          label.s-label(for="mxid") Your Matrix ID
          input.fl-grow1.s-input.wmx3#mxid(name="mxid" required placeholder="@user:example.org" pattern="@([^:]+):([a-z0-9:\\-]+\\.[a-z0-9.:\\-]+)")
        div
          button.s-btn.s-btn__github#log-in-button Continue with Matrix
