diff options
| -rw-r--r-- | app/views/otp_challenges/new.html.erb | 28 | ||||
| -rw-r--r-- | app/views/sessions/new.html.erb | 2 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 16 |
3 files changed, 22 insertions, 24 deletions
diff --git a/app/views/otp_challenges/new.html.erb b/app/views/otp_challenges/new.html.erb index ff7df222..551d798c 100644 --- a/app/views/otp_challenges/new.html.erb +++ b/app/views/otp_challenges/new.html.erb | |||
| @@ -1,18 +1,16 @@ | |||
| 1 | <h1><%= t(".title") %></h1> | 1 | <div class="auth_card"> |
| 2 | <h1><%= t(".title") %></h1> | ||
| 2 | 3 | ||
| 3 | <div class="admin_layout"> | 4 | <%= form_tag otp_challenge_path, :method => :post, :class => "otp_form" do %> |
| 4 | <div class="layout_row"> | 5 | <div class="login_field"> |
| 5 | <div class="layout_row_label"> <%= t(".code") %> </div> | 6 | <%= label_tag :code, t(".code") %> |
| 6 | <div class="layout_row_content"> | 7 | <%= text_field_tag :code, nil, :autofocus => true, |
| 7 | <%= form_tag otp_challenge_path, :method => :post, :class => "otp_form" do %> | 8 | :autocomplete => "one-time-code", :inputmode => "numeric", |
| 8 | <%= text_field_tag :code, nil, :autofocus => true, | 9 | :maxlength => 6, :pattern => "[0-9]{6}", :class => "otp_code" %> |
| 9 | :autocomplete => "one-time-code", :inputmode => "numeric", | ||
| 10 | :maxlength => 6, :pattern => "[0-9]{6}", :class => "otp_code" %> | ||
| 11 | <span class="field_hint"> <%= t(".hint") %> </span> | ||
| 12 | <%= button_tag :type => "submit", :class => "action_button" do %> | ||
| 13 | <%= icon("shield-check", library: "tabler", "aria-hidden": true) %> <%= t(".log_in") %> | ||
| 14 | <% end %> | ||
| 15 | <% end %> | ||
| 16 | </div> | 10 | </div> |
| 17 | </div> | 11 | <span class="field_hint"><%= t(".hint") %></span> |
| 12 | <%= button_tag :type => "submit", :class => "action_button" do %> | ||
| 13 | <%= icon("shield-check", library: "tabler", "aria-hidden": true) %> <%= t(".log_in") %> | ||
| 14 | <% end %> | ||
| 15 | <% end %> | ||
| 18 | </div> | 16 | </div> |
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index a57b1ba4..4afa38ad 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | <div id="login_form"> | 1 | <div class="auth_card"> |
| 2 | <h1><%= t(".heading") %></h1> | 2 | <h1><%= t(".heading") %></h1> |
| 3 | 3 | ||
| 4 | <%= form_tag session_path do -%> | 4 | <%= form_tag session_path do -%> |
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 0dc1a048..33fd6062 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -164,35 +164,35 @@ input[type=radio] { | |||
| 164 | 164 | ||
| 165 | .right { text-align: right; } | 165 | .right { text-align: right; } |
| 166 | 166 | ||
| 167 | #login_form { | 167 | .auth_card { |
| 168 | max-width: 18rem; | 168 | max-width: 21rem; |
| 169 | margin: 2rem auto; | 169 | margin: 2rem auto; |
| 170 | padding: 1.25rem; | 170 | padding: 1.25rem; |
| 171 | border: 1px solid var(--border); | 171 | border: 1px solid var(--border); |
| 172 | border-radius: var(--radius-card); | 172 | border-radius: var(--radius-card); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | #login_form input[type=submit] { | 175 | .auth_card input[type=submit] { |
| 176 | margin-top: 1.5rem; | 176 | margin-top: 1.5rem; |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | #login_form h1 { | 179 | .auth_card h1 { |
| 180 | margin: 0 auto 1.5rem auto; | 180 | margin: 0 auto 1.5rem auto; |
| 181 | font-size: var(--text-xl); | 181 | font-size: var(--text-xl); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | #login_form label { | 184 | .auth_card label { |
| 185 | display: block; | 185 | display: block; |
| 186 | margin-bottom: 0.25rem; | 186 | margin-bottom: 0.25rem; |
| 187 | text-transform: lowercase; | 187 | text-transform: lowercase; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | #login_form .login_field { | 190 | .auth_card .login_field { |
| 191 | margin-bottom: 1rem; | 191 | margin-bottom: 1rem; |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | #login_form input[type=text], | 194 | .auth_card input[type=text], |
| 195 | #login_form input[type=password] { | 195 | .auth_card input[type=password] { |
| 196 | width: 100%; | 196 | width: 100%; |
| 197 | box-sizing: border-box; | 197 | box-sizing: border-box; |
| 198 | } | 198 | } |
