Commit 00bd2394 authored by Klaus Stein's avatar Klaus Stein
Browse files

Improve user/login layout

parent 84eb8b6a
main.user, main.login {
border: 2px solid #555;
background: #f5f5f5;
max-width: 100%;
/* overflow: auto;*/
padding: 1rem;
margin: auto;
width: 40rem;
form {
margin: 2rem 0;
table {
margin-bottom:1rem;
th {
padding: 1ex;
text-align: left;
}
}
.field {
margin-bottom:1rem;
}
}
}
......@@ -6,4 +6,4 @@
@import "examples";
@import "overview";
@import "maps";
@import "users";
<main class="login">
<h1>Login</h1>
<%= render 'form' %>
<%= link_to "Register", new_user_path %> |
<%= link_to 'Back', users_path %>
<%= link_to "Register new user", new_user_path %>
</main>
......@@ -11,20 +11,23 @@
</div>
<% end %>
<div class="field">
<%= form.label :username %>
<%= form.text_field :username %>
</div>
<table><tbody>
<tr>
<th><%= form.label :username %></th>
<td><%= form.text_field :username %></td>
</tr>
<div class="field">
<%= form.label :password %>
<%= form.password_field :password %>
</div>
<tr>
<th><%= form.label :password %></th>
<td><%= form.password_field :password %></td>
</tr>
<div class="field">
<%= form.label :password_confirmation %>
<%= form.password_field :password_confirmation %>
</div>
<tr>
<th><%= form.label :password_confirmation %></th>
<td><%= form.password_field :password_confirmation %></td>
</tr>
</tbody></table>
<div class="actions">
<%= form.submit %>
......
<main class="user">
<h1>Editing User</h1>
<%= render 'form', user: @user %>
<%= link_to 'Show', @user %> |
<%= link_to 'Back', users_path %>
<%= link_to 'Show', @user %>
</main>
<p id="notice"><%= notice %></p>
<main class="user">
<h1>Users</h1>
<table>
......@@ -25,3 +27,4 @@
<br>
<%= link_to 'New User', new_user_path %>
</main>
<h1>New User</h1>
<main class="user">
<h1>New User</h1>
<%= render 'form', user: @user %>
<%= render 'form', user: @user %>
<%= link_to 'Back', users_path %>
<%= link_to 'Back', login_path %>
</main>
<p id="notice"><%= notice %></p>
<main class="show user">
<p>
<strong>Username:</strong>
<%= @user.username %>
......@@ -12,3 +13,4 @@
<%= link_to 'Edit', edit_user_path(@user) %> |
<%= link_to "Logout", :logout, method: :post %>
</main>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment