Redo login.html css to be grid based.
This commit is contained in:
parent
42be44a509
commit
ff72a5d26c
1 changed files with 35 additions and 37 deletions
|
@ -22,44 +22,44 @@ button
|
|||
|
||||
#content_body
|
||||
{
|
||||
max-width: 900px;
|
||||
margin: auto;
|
||||
grid-template:
|
||||
"login_form register_form" auto
|
||||
"message_area message_area" auto
|
||||
/ 1fr 1fr;
|
||||
}
|
||||
|
||||
#login_register_box
|
||||
form
|
||||
{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 0 0 auto;
|
||||
display: grid;
|
||||
grid-auto-rows: max-content;
|
||||
grid-row-gap: 8px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#login_form,
|
||||
#register_form
|
||||
form h2
|
||||
{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
margin: 8px;
|
||||
}
|
||||
#login_form > *,
|
||||
#register_form > *
|
||||
{
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
margin: 0;
|
||||
}
|
||||
#login_form { grid-area: login_form; }
|
||||
#register_form { grid-area: register_form; }
|
||||
#message_area
|
||||
{
|
||||
grid-area: message_area;
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px)
|
||||
{
|
||||
#login_register_box
|
||||
#content_body
|
||||
{
|
||||
flex-direction: column;
|
||||
grid-template:
|
||||
"login_form" auto
|
||||
"register_form" auto
|
||||
"message_area" auto
|
||||
/ 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -67,22 +67,20 @@ button
|
|||
<body>
|
||||
{{header.make_header(session=session)}}
|
||||
<div id="content_body">
|
||||
<div id="login_register_box">
|
||||
<form id="login_form" class="panel" action="/login" method="post">
|
||||
<h2>Log in</h2>
|
||||
<input type="text" id="login_input_username" name="username" placeholder="username" autofocus>
|
||||
<input type="password" id="login_input_password" name="password" placeholder="password">
|
||||
<button type="submit" id="login_submit_button" class="green_button" onclick="login_form(event)">Log in</button>
|
||||
</form>
|
||||
<form id="register_form" class="panel" action="/register" method="post">
|
||||
<h2>Register</h2>
|
||||
<input type="text" id="register_input_username" name="username" placeholder="username (at least {{min_username_length}})">
|
||||
<input type="text" id="register_input_display_name" name="display_name" placeholder="display name (optional)">
|
||||
<input type="password" id="register_input_password_1" name="password_1" placeholder="password (at least {{min_password_length}})">
|
||||
<input type="password" id="register_input_password_2" name="password_2" placeholder="password again">
|
||||
<button type="submit" id="register_input_button" class="green_button" onclick="register_form(event)">Register</button>
|
||||
</form>
|
||||
</div>
|
||||
<form id="login_form" class="panel" action="/login" method="post">
|
||||
<h2>Log in</h2>
|
||||
<input type="text" id="login_input_username" name="username" placeholder="username" autofocus>
|
||||
<input type="password" id="login_input_password" name="password" placeholder="password">
|
||||
<button type="submit" id="login_submit_button" class="green_button" onclick="login_form(event)">Log in</button>
|
||||
</form>
|
||||
<form id="register_form" class="panel" action="/register" method="post">
|
||||
<h2>Register</h2>
|
||||
<input type="text" id="register_input_username" name="username" placeholder="username (at least {{min_username_length}})">
|
||||
<input type="text" id="register_input_display_name" name="display_name" placeholder="display name (optional)">
|
||||
<input type="password" id="register_input_password_1" name="password_1" placeholder="password (at least {{min_password_length}})">
|
||||
<input type="password" id="register_input_password_2" name="password_2" placeholder="password again">
|
||||
<button type="submit" id="register_input_button" class="green_button" onclick="register_form(event)">Register</button>
|
||||
</form>
|
||||
<div id="message_area">
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue